// Decompiled with JetBrains decompiler // Type: CarotDAV.PropertyForm // Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null // MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8 // Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe using Microsoft.VisualBasic.CompilerServices; using Rei.Fs; using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Drawing; using System.Runtime.CompilerServices; using System.Windows.Forms; namespace CarotDAV { [DesignerGenerated] public class PropertyForm : Form { private IContainer components; [AccessedThroughProperty("m_CancelButton")] private Button _m_CancelButton; [AccessedThroughProperty("OKButton")] private Button _OKButton; [AccessedThroughProperty("TabControl1")] private TabControl _TabControl1; [AccessedThroughProperty("TabPage1")] private TabPage _TabPage1; [AccessedThroughProperty("TabPage2")] private TabPage _TabPage2; [AccessedThroughProperty("Label5")] private Label _Label5; [AccessedThroughProperty("LastModifiedTextBox")] private TextBox _LastModifiedTextBox; [AccessedThroughProperty("Label4")] private Label _Label4; [AccessedThroughProperty("CreationDateTextBox")] private TextBox _CreationDateTextBox; [AccessedThroughProperty("Label3")] private Label _Label3; [AccessedThroughProperty("SizeTextBox")] private TextBox _SizeTextBox; [AccessedThroughProperty("Label2")] private Label _Label2; [AccessedThroughProperty("UriTextBox")] private TextBox _UriTextBox; [AccessedThroughProperty("Label7")] private Label _Label7; [AccessedThroughProperty("ContentTypeTextBox")] private TextBox _ContentTypeTextBox; [AccessedThroughProperty("ElementValueTextBox")] private TextBox _ElementValueTextBox; [AccessedThroughProperty("ElementNameTextBox")] private TextBox _ElementNameTextBox; [AccessedThroughProperty("PropAddButton")] private Button _PropAddButton; [AccessedThroughProperty("PropDelButton")] private Button _PropDelButton; [AccessedThroughProperty("Label9")] private Label _Label9; [AccessedThroughProperty("Label10")] private Label _Label10; [AccessedThroughProperty("PropListView")] private ListView _PropListView; [AccessedThroughProperty("NameColumnHeader")] private ColumnHeader _NameColumnHeader; [AccessedThroughProperty("ValueColumnHeader")] private ColumnHeader _ValueColumnHeader; [AccessedThroughProperty("StatusColumnHeader")] private ColumnHeader _StatusColumnHeader; [AccessedThroughProperty("ApplyButton")] private Button _ApplyButton; private ResourceInfo pOriginalInfo; private ResourceInfo pCurrentInfo; private bool pDirty; private ResourceId pTargetId; private MainForm pMainForm; public PropertyForm() { this.Load += new EventHandler(this.PropertyForm_Load); this.InitializeComponent(); } [DebuggerNonUserCode] protected override void Dispose(bool disposing) { try { if (!disposing || this.components == null) return; this.components.Dispose(); } finally { base.Dispose(disposing); } } [DebuggerStepThrough] private void InitializeComponent() { this.OKButton = new Button(); this.m_CancelButton = new Button(); this.TabControl1 = new TabControl(); this.TabPage1 = new TabPage(); this.Label7 = new Label(); this.ContentTypeTextBox = new TextBox(); this.Label5 = new Label(); this.LastModifiedTextBox = new TextBox(); this.Label4 = new Label(); this.CreationDateTextBox = new TextBox(); this.Label3 = new Label(); this.SizeTextBox = new TextBox(); this.Label2 = new Label(); this.UriTextBox = new TextBox(); this.TabPage2 = new TabPage(); this.PropListView = new ListView(); this.NameColumnHeader = new ColumnHeader(); this.ValueColumnHeader = new ColumnHeader(); this.StatusColumnHeader = new ColumnHeader(); this.PropAddButton = new Button(); this.PropDelButton = new Button(); this.Label9 = new Label(); this.Label10 = new Label(); this.ElementValueTextBox = new TextBox(); this.ElementNameTextBox = new TextBox(); this.ApplyButton = new Button(); this.TabControl1.SuspendLayout(); this.TabPage1.SuspendLayout(); this.TabPage2.SuspendLayout(); this.SuspendLayout(); this.OKButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; Button okButton1 = this.OKButton; Point point1 = new Point(64, 304); Point point2 = point1; okButton1.Location = point2; this.OKButton.Name = "OKButton"; Button okButton2 = this.OKButton; Size size1 = new Size(72, 24); Size size2 = size1; okButton2.Size = size2; this.OKButton.TabIndex = 1; this.OKButton.Text = "OK"; this.OKButton.UseVisualStyleBackColor = true; this.m_CancelButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; this.m_CancelButton.DialogResult = DialogResult.Cancel; Button mCancelButton1 = this.m_CancelButton; point1 = new Point(144, 304); Point point3 = point1; mCancelButton1.Location = point3; this.m_CancelButton.Name = "m_CancelButton"; Button mCancelButton2 = this.m_CancelButton; size1 = new Size(72, 24); Size size3 = size1; mCancelButton2.Size = size3; this.m_CancelButton.TabIndex = 2; this.m_CancelButton.Text = "Cancel"; this.m_CancelButton.UseVisualStyleBackColor = true; this.TabControl1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; this.TabControl1.Controls.Add((Control) this.TabPage1); this.TabControl1.Controls.Add((Control) this.TabPage2); TabControl tabControl1_1 = this.TabControl1; point1 = new Point(8, 8); Point point4 = point1; tabControl1_1.Location = point4; this.TabControl1.Name = "TabControl1"; this.TabControl1.SelectedIndex = 0; TabControl tabControl1_2 = this.TabControl1; size1 = new Size(288, 288); Size size4 = size1; tabControl1_2.Size = size4; this.TabControl1.TabIndex = 0; this.TabPage1.Controls.Add((Control) this.Label7); this.TabPage1.Controls.Add((Control) this.ContentTypeTextBox); this.TabPage1.Controls.Add((Control) this.Label5); this.TabPage1.Controls.Add((Control) this.LastModifiedTextBox); this.TabPage1.Controls.Add((Control) this.Label4); this.TabPage1.Controls.Add((Control) this.CreationDateTextBox); this.TabPage1.Controls.Add((Control) this.Label3); this.TabPage1.Controls.Add((Control) this.SizeTextBox); this.TabPage1.Controls.Add((Control) this.Label2); this.TabPage1.Controls.Add((Control) this.UriTextBox); TabPage tabPage1_1 = this.TabPage1; point1 = new Point(4, 22); Point point5 = point1; tabPage1_1.Location = point5; this.TabPage1.Name = "TabPage1"; TabPage tabPage1_2 = this.TabPage1; Padding padding1 = new Padding(3); Padding padding2 = padding1; tabPage1_2.Padding = padding2; TabPage tabPage1_3 = this.TabPage1; size1 = new Size(280, 262); Size size5 = size1; tabPage1_3.Size = size5; this.TabPage1.TabIndex = 0; this.TabPage1.Text = "General"; this.TabPage1.UseVisualStyleBackColor = true; this.Label7.AutoSize = true; Label label7_1 = this.Label7; point1 = new Point(16, 136); Point point6 = point1; label7_1.Location = point6; this.Label7.Name = "Label7"; Label label7_2 = this.Label7; size1 = new Size(74, 12); Size size6 = size1; label7_2.Size = size6; this.Label7.TabIndex = 10; this.Label7.Text = "Content Type"; this.ContentTypeTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; TextBox contentTypeTextBox1 = this.ContentTypeTextBox; point1 = new Point(136, 136); Point point7 = point1; contentTypeTextBox1.Location = point7; this.ContentTypeTextBox.Multiline = true; this.ContentTypeTextBox.Name = "ContentTypeTextBox"; this.ContentTypeTextBox.ReadOnly = true; TextBox contentTypeTextBox2 = this.ContentTypeTextBox; size1 = new Size(128, 112); Size size7 = size1; contentTypeTextBox2.Size = size7; this.ContentTypeTextBox.TabIndex = 11; this.Label5.AutoSize = true; Label label5_1 = this.Label5; point1 = new Point(16, 112); Point point8 = point1; label5_1.Location = point8; this.Label5.Name = "Label5"; Label label5_2 = this.Label5; size1 = new Size(102, 12); Size size8 = size1; label5_2.Size = size8; this.Label5.TabIndex = 8; this.Label5.Text = "Last Modified Date"; this.LastModifiedTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; TextBox lastModifiedTextBox1 = this.LastModifiedTextBox; point1 = new Point(136, 112); Point point9 = point1; lastModifiedTextBox1.Location = point9; this.LastModifiedTextBox.Name = "LastModifiedTextBox"; this.LastModifiedTextBox.ReadOnly = true; TextBox lastModifiedTextBox2 = this.LastModifiedTextBox; size1 = new Size(128, 19); Size size9 = size1; lastModifiedTextBox2.Size = size9; this.LastModifiedTextBox.TabIndex = 9; this.LastModifiedTextBox.TextAlign = HorizontalAlignment.Right; this.Label4.AutoSize = true; Label label4_1 = this.Label4; point1 = new Point(16, 88); Point point10 = point1; label4_1.Location = point10; this.Label4.Name = "Label4"; Label label4_2 = this.Label4; size1 = new Size(76, 12); Size size10 = size1; label4_2.Size = size10; this.Label4.TabIndex = 6; this.Label4.Text = "Creation Date"; this.CreationDateTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; TextBox creationDateTextBox1 = this.CreationDateTextBox; point1 = new Point(136, 88); Point point11 = point1; creationDateTextBox1.Location = point11; this.CreationDateTextBox.Name = "CreationDateTextBox"; this.CreationDateTextBox.ReadOnly = true; TextBox creationDateTextBox2 = this.CreationDateTextBox; size1 = new Size(128, 19); Size size11 = size1; creationDateTextBox2.Size = size11; this.CreationDateTextBox.TabIndex = 7; this.CreationDateTextBox.TextAlign = HorizontalAlignment.Right; this.Label3.AutoSize = true; Label label3_1 = this.Label3; point1 = new Point(16, 64); Point point12 = point1; label3_1.Location = point12; this.Label3.Name = "Label3"; Label label3_2 = this.Label3; size1 = new Size(26, 12); Size size12 = size1; label3_2.Size = size12; this.Label3.TabIndex = 4; this.Label3.Text = "Size"; this.SizeTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; TextBox sizeTextBox1 = this.SizeTextBox; point1 = new Point(136, 64); Point point13 = point1; sizeTextBox1.Location = point13; this.SizeTextBox.Name = "SizeTextBox"; this.SizeTextBox.ReadOnly = true; TextBox sizeTextBox2 = this.SizeTextBox; size1 = new Size(128, 19); Size size13 = size1; sizeTextBox2.Size = size13; this.SizeTextBox.TabIndex = 5; this.SizeTextBox.TextAlign = HorizontalAlignment.Right; this.Label2.AutoSize = true; Label label2_1 = this.Label2; point1 = new Point(16, 16); Point point14 = point1; label2_1.Location = point14; this.Label2.Name = "Label2"; Label label2_2 = this.Label2; size1 = new Size(24, 12); Size size14 = size1; label2_2.Size = size14; this.Label2.TabIndex = 0; this.Label2.Text = "URI"; this.UriTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; TextBox uriTextBox1 = this.UriTextBox; point1 = new Point(136, 16); Point point15 = point1; uriTextBox1.Location = point15; this.UriTextBox.Name = "UriTextBox"; this.UriTextBox.ReadOnly = true; TextBox uriTextBox2 = this.UriTextBox; size1 = new Size(128, 19); Size size15 = size1; uriTextBox2.Size = size15; this.UriTextBox.TabIndex = 1; this.TabPage2.Controls.Add((Control) this.PropListView); this.TabPage2.Controls.Add((Control) this.PropAddButton); this.TabPage2.Controls.Add((Control) this.PropDelButton); this.TabPage2.Controls.Add((Control) this.Label9); this.TabPage2.Controls.Add((Control) this.Label10); this.TabPage2.Controls.Add((Control) this.ElementValueTextBox); this.TabPage2.Controls.Add((Control) this.ElementNameTextBox); TabPage tabPage2_1 = this.TabPage2; point1 = new Point(4, 22); Point point16 = point1; tabPage2_1.Location = point16; this.TabPage2.Name = "TabPage2"; TabPage tabPage2_2 = this.TabPage2; padding1 = new Padding(3); Padding padding3 = padding1; tabPage2_2.Padding = padding3; TabPage tabPage2_3 = this.TabPage2; size1 = new Size(280, 262); Size size16 = size1; tabPage2_3.Size = size16; this.TabPage2.TabIndex = 1; this.TabPage2.Text = "Custom"; this.TabPage2.UseVisualStyleBackColor = true; this.PropListView.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; this.PropListView.Columns.AddRange(new ColumnHeader[3] { this.NameColumnHeader, this.ValueColumnHeader, this.StatusColumnHeader }); this.PropListView.FullRowSelect = true; ListView propListView1 = this.PropListView; point1 = new Point(16, 120); Point point17 = point1; propListView1.Location = point17; this.PropListView.MultiSelect = false; this.PropListView.Name = "PropListView"; ListView propListView2 = this.PropListView; size1 = new Size(248, 128); Size size17 = size1; propListView2.Size = size17; this.PropListView.TabIndex = 6; this.PropListView.UseCompatibleStateImageBehavior = false; this.PropListView.View = View.Details; this.NameColumnHeader.Text = "Name"; this.ValueColumnHeader.Text = "Value"; this.StatusColumnHeader.Text = "Status"; this.PropAddButton.Anchor = AnchorStyles.Top | AnchorStyles.Right; Button propAddButton1 = this.PropAddButton; point1 = new Point(128, 88); Point point18 = point1; propAddButton1.Location = point18; this.PropAddButton.Name = "PropAddButton"; Button propAddButton2 = this.PropAddButton; size1 = new Size(64, 24); Size size18 = size1; propAddButton2.Size = size18; this.PropAddButton.TabIndex = 4; this.PropAddButton.Text = "Add"; this.PropAddButton.UseVisualStyleBackColor = true; this.PropDelButton.Anchor = AnchorStyles.Top | AnchorStyles.Right; Button propDelButton1 = this.PropDelButton; point1 = new Point(200, 88); Point point19 = point1; propDelButton1.Location = point19; this.PropDelButton.Name = "PropDelButton"; Button propDelButton2 = this.PropDelButton; size1 = new Size(64, 24); Size size19 = size1; propDelButton2.Size = size19; this.PropDelButton.TabIndex = 5; this.PropDelButton.Text = "Delete"; this.PropDelButton.UseVisualStyleBackColor = true; this.Label9.AutoSize = true; Label label9_1 = this.Label9; point1 = new Point(16, 32); Point point20 = point1; label9_1.Location = point20; this.Label9.Name = "Label9"; Label label9_2 = this.Label9; size1 = new Size(81, 12); Size size20 = size1; label9_2.Size = size20; this.Label9.TabIndex = 2; this.Label9.Text = "Property Value"; this.Label10.AutoSize = true; Label label10_1 = this.Label10; point1 = new Point(16, 8); Point point21 = point1; label10_1.Location = point21; this.Label10.Name = "Label10"; Label label10_2 = this.Label10; size1 = new Size(81, 12); Size size21 = size1; label10_2.Size = size21; this.Label10.TabIndex = 0; this.Label10.Text = "Property Name"; this.ElementValueTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; TextBox elementValueTextBox1 = this.ElementValueTextBox; point1 = new Point(104, 32); Point point22 = point1; elementValueTextBox1.Location = point22; this.ElementValueTextBox.Multiline = true; this.ElementValueTextBox.Name = "ElementValueTextBox"; TextBox elementValueTextBox2 = this.ElementValueTextBox; size1 = new Size(160, 48); Size size22 = size1; elementValueTextBox2.Size = size22; this.ElementValueTextBox.TabIndex = 3; this.ElementNameTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; TextBox elementNameTextBox1 = this.ElementNameTextBox; point1 = new Point(104, 8); Point point23 = point1; elementNameTextBox1.Location = point23; this.ElementNameTextBox.Name = "ElementNameTextBox"; TextBox elementNameTextBox2 = this.ElementNameTextBox; size1 = new Size(160, 19); Size size23 = size1; elementNameTextBox2.Size = size23; this.ElementNameTextBox.TabIndex = 1; this.ApplyButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; this.ApplyButton.DialogResult = DialogResult.Cancel; this.ApplyButton.Enabled = false; Button applyButton1 = this.ApplyButton; point1 = new Point(224, 304); Point point24 = point1; applyButton1.Location = point24; this.ApplyButton.Name = "ApplyButton"; Button applyButton2 = this.ApplyButton; size1 = new Size(72, 24); Size size24 = size1; applyButton2.Size = size24; this.ApplyButton.TabIndex = 3; this.ApplyButton.Text = "Apply"; this.ApplyButton.UseVisualStyleBackColor = true; this.AcceptButton = (IButtonControl) this.OKButton; this.AutoScaleDimensions = new SizeF(6f, 12f); this.AutoScaleMode = AutoScaleMode.Font; this.CancelButton = (IButtonControl) this.m_CancelButton; size1 = new Size(304, 336); this.ClientSize = size1; this.Controls.Add((Control) this.ApplyButton); this.Controls.Add((Control) this.m_CancelButton); this.Controls.Add((Control) this.OKButton); this.Controls.Add((Control) this.TabControl1); size1 = new Size(320, 373); this.MinimumSize = size1; this.Name = nameof (PropertyForm); this.Text = nameof (PropertyForm); this.TabControl1.ResumeLayout(false); this.TabPage1.ResumeLayout(false); this.TabPage1.PerformLayout(); this.TabPage2.ResumeLayout(false); this.TabPage2.PerformLayout(); this.ResumeLayout(false); } internal virtual Button m_CancelButton { get { return this._m_CancelButton; } [MethodImpl(MethodImplOptions.Synchronized)] set { EventHandler eventHandler = new EventHandler(this.m_CancelButton_Click); if (this._m_CancelButton != null) this._m_CancelButton.Click -= eventHandler; this._m_CancelButton = value; if (this._m_CancelButton == null) return; this._m_CancelButton.Click += eventHandler; } } internal virtual Button OKButton { get { return this._OKButton; } [MethodImpl(MethodImplOptions.Synchronized)] set { EventHandler eventHandler = new EventHandler(this.OKButton_Click); if (this._OKButton != null) this._OKButton.Click -= eventHandler; this._OKButton = value; if (this._OKButton == null) return; this._OKButton.Click += eventHandler; } } internal virtual TabControl TabControl1 { get { return this._TabControl1; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._TabControl1 = value; } } internal virtual TabPage TabPage1 { get { return this._TabPage1; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._TabPage1 = value; } } internal virtual TabPage TabPage2 { get { return this._TabPage2; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._TabPage2 = value; } } internal virtual Label Label5 { get { return this._Label5; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._Label5 = value; } } internal virtual TextBox LastModifiedTextBox { get { return this._LastModifiedTextBox; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._LastModifiedTextBox = value; } } internal virtual Label Label4 { get { return this._Label4; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._Label4 = value; } } internal virtual TextBox CreationDateTextBox { get { return this._CreationDateTextBox; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._CreationDateTextBox = value; } } internal virtual Label Label3 { get { return this._Label3; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._Label3 = value; } } internal virtual TextBox SizeTextBox { get { return this._SizeTextBox; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._SizeTextBox = value; } } internal virtual Label Label2 { get { return this._Label2; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._Label2 = value; } } internal virtual TextBox UriTextBox { get { return this._UriTextBox; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._UriTextBox = value; } } internal virtual Label Label7 { get { return this._Label7; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._Label7 = value; } } internal virtual TextBox ContentTypeTextBox { get { return this._ContentTypeTextBox; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._ContentTypeTextBox = value; } } internal virtual TextBox ElementValueTextBox { get { return this._ElementValueTextBox; } [MethodImpl(MethodImplOptions.Synchronized)] set { EventHandler eventHandler = new EventHandler(this.ElementContentTextBox_TextChanged); if (this._ElementValueTextBox != null) this._ElementValueTextBox.TextChanged -= eventHandler; this._ElementValueTextBox = value; if (this._ElementValueTextBox == null) return; this._ElementValueTextBox.TextChanged += eventHandler; } } internal virtual TextBox ElementNameTextBox { get { return this._ElementNameTextBox; } [MethodImpl(MethodImplOptions.Synchronized)] set { CancelEventHandler cancelEventHandler = new CancelEventHandler(this.ElementNameTextBox_Validating); EventHandler eventHandler = new EventHandler(this.ElementNameTextBox_TextChanged); if (this._ElementNameTextBox != null) { this._ElementNameTextBox.Validating -= cancelEventHandler; this._ElementNameTextBox.TextChanged -= eventHandler; } this._ElementNameTextBox = value; if (this._ElementNameTextBox == null) return; this._ElementNameTextBox.Validating += cancelEventHandler; this._ElementNameTextBox.TextChanged += eventHandler; } } internal virtual Button PropAddButton { get { return this._PropAddButton; } [MethodImpl(MethodImplOptions.Synchronized)] set { EventHandler eventHandler = new EventHandler(this.PropAddButton_Click); if (this._PropAddButton != null) this._PropAddButton.Click -= eventHandler; this._PropAddButton = value; if (this._PropAddButton == null) return; this._PropAddButton.Click += eventHandler; } } internal virtual Button PropDelButton { get { return this._PropDelButton; } [MethodImpl(MethodImplOptions.Synchronized)] set { EventHandler eventHandler = new EventHandler(this.PropDelButton_Click); if (this._PropDelButton != null) this._PropDelButton.Click -= eventHandler; this._PropDelButton = value; if (this._PropDelButton == null) return; this._PropDelButton.Click += eventHandler; } } internal virtual Label Label9 { get { return this._Label9; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._Label9 = value; } } internal virtual Label Label10 { get { return this._Label10; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._Label10 = value; } } internal virtual ListView PropListView { get { return this._PropListView; } [MethodImpl(MethodImplOptions.Synchronized)] set { EventHandler eventHandler = new EventHandler(this.PropListView_SelectedIndexChanged); if (this._PropListView != null) this._PropListView.SelectedIndexChanged -= eventHandler; this._PropListView = value; if (this._PropListView == null) return; this._PropListView.SelectedIndexChanged += eventHandler; } } internal virtual ColumnHeader NameColumnHeader { get { return this._NameColumnHeader; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._NameColumnHeader = value; } } internal virtual ColumnHeader ValueColumnHeader { get { return this._ValueColumnHeader; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._ValueColumnHeader = value; } } internal virtual ColumnHeader StatusColumnHeader { get { return this._StatusColumnHeader; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._StatusColumnHeader = value; } } internal virtual Button ApplyButton { get { return this._ApplyButton; } [MethodImpl(MethodImplOptions.Synchronized)] set { EventHandler eventHandler = new EventHandler(this.ApplyButton_Click); if (this._ApplyButton != null) this._ApplyButton.Click -= eventHandler; this._ApplyButton = value; if (this._ApplyButton == null) return; this._ApplyButton.Click += eventHandler; } } public event EventHandler PropertyUpdated; public MainForm MainForm { get { return this.pMainForm; } set { this.pMainForm = value; } } public ResourceId Target { get { return this.pTargetId; } set { this.pTargetId = value; if (!this.IsHandleCreated) return; this.ReloadProperty(); } } public ResourceInfo ResourceInfo { get { return this.pOriginalInfo; } set { this.pOriginalInfo = value; this.pCurrentInfo = this.pOriginalInfo; this.pDirty = false; } } private void PropertyForm_Load(object sender, EventArgs e) { this.Icon = CarotDAV.My.Resources.Resources.CarotDAV; if (this.pOriginalInfo == null) this.ReloadProperty(); else this.RefreshProperty(); } private void PropListView_SelectedIndexChanged(object sender, EventArgs e) { if (this.PropListView.SelectedItems.Count == 0) { this.UpdateWindow(); } else { if (this.PropListView.SelectedItems.Count != 1) return; ResourceInfo.ResourceProperty tag = (ResourceInfo.ResourceProperty) this.PropListView.SelectedItems[0].Tag; this.ElementValueTextBox.Text = tag.Value; this.ElementNameTextBox.Text = tag.Name; this.UpdateWindow(); } } private void ElementNameTextBox_TextChanged(object sender, EventArgs e) { this.UpdateWindow(); } private void ElementNameTextBox_Validating(object sender, CancelEventArgs e) { if (this.ElementNameTextBox.Text.Length == 0) e.Cancel = false; else if (this.ElementNameTextBox.Text.EndsWith(":")) e.Cancel = true; else if (this.ElementNameTextBox.Text.StartsWith(":")) e.Cancel = true; else e.Cancel = false; } private void ElementContentTextBox_TextChanged(object sender, EventArgs e) { this.UpdateWindow(); } private void PropAddButton_Click(object sender, EventArgs e) { string text = this.ElementNameTextBox.Text; int index = this.pCurrentInfo.Properties.IndexOf(text); if (index >= 0) { this.pCurrentInfo.Properties[index] = new ResourceInfo.ResourceProperty(text, this.ElementValueTextBox.Text, "Changed", false); this.pDirty = true; this.UpdatePropList(); } else { if (this.ElementNameTextBox.Text.Length <= 0) return; this.pCurrentInfo.Properties.Add(text, this.ElementValueTextBox.Text, "Added", false); this.pDirty = true; this.UpdatePropList(); } } private void PropDelButton_Click(object sender, EventArgs e) { string text = this.ElementNameTextBox.Text; if (this.pCurrentInfo.Properties.IndexOf(text) < 0) return; this.pCurrentInfo.Properties.Remove(text); this.pDirty = true; this.UpdatePropList(); } private void OKButton_Click(object sender, EventArgs e) { if (!this.MainForm.Fs_SetResourceInfo(this.pCurrentInfo, this.pOriginalInfo)) return; EventHandler propertyUpdatedEvent = this.PropertyUpdatedEvent; if (propertyUpdatedEvent != null) propertyUpdatedEvent((object) this, EventArgs.Empty); this.DialogResult = DialogResult.OK; this.Close(); } private void m_CancelButton_Click(object sender, EventArgs e) { this.DialogResult = DialogResult.Cancel; this.Close(); } private void ApplyButton_Click(object sender, EventArgs e) { if (!this.MainForm.Fs_SetResourceInfo(this.pCurrentInfo, this.pOriginalInfo)) return; EventHandler propertyUpdatedEvent = this.PropertyUpdatedEvent; if (propertyUpdatedEvent != null) propertyUpdatedEvent((object) this, EventArgs.Empty); this.ReloadProperty(); } private void UpdateWindow() { if (this.pCurrentInfo.CanSetInfo) { int index = this.pCurrentInfo.Properties.IndexOf(this.ElementNameTextBox.Text); if (index >= 0) { if (Operators.CompareString(this.pCurrentInfo.Properties[index].Value, this.ElementValueTextBox.Text, false) == 0) { this.PropAddButton.Enabled = false; this.PropAddButton.Text = "Update"; } else { this.PropAddButton.Enabled = true; this.PropAddButton.Text = "Update"; } this.PropDelButton.Enabled = true; } else if (this.ElementNameTextBox.Text.Length > 0) { this.PropAddButton.Enabled = true; this.PropAddButton.Text = "Add"; this.PropDelButton.Enabled = false; } else { this.PropAddButton.Enabled = false; this.PropAddButton.Text = "Update"; this.PropDelButton.Enabled = false; } if (this.pDirty) { this.ApplyButton.Enabled = true; this.OKButton.Enabled = true; } else { this.ApplyButton.Enabled = false; this.OKButton.Enabled = false; } } else { this.ElementNameTextBox.ReadOnly = true; this.ElementValueTextBox.ReadOnly = true; this.PropAddButton.Enabled = false; this.PropDelButton.Enabled = false; } } private void UpdatePropList() { this.PropListView.BeginUpdate(); this.PropListView.Items.Clear(); List.Enumerator enumerator; try { enumerator = this.pCurrentInfo.Properties.GetEnumerator(); while (enumerator.MoveNext()) { ResourceInfo.ResourceProperty current = enumerator.Current; this.PropListView.Items.Add(new ListViewItem(new string[3] { current.Name, current.Value, current.StateDescription }) { Tag = (object) current }); } } finally { enumerator.Dispose(); } this.PropListView.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); this.PropListView.EndUpdate(); this.UpdateWindow(); } public void ReloadProperty() { ResourceInfo info = this.MainForm.Fs_GetInfo(this.pTargetId, false); this.pTargetId = info.Id; this.pOriginalInfo = info; this.pCurrentInfo = (ResourceInfo) this.pOriginalInfo.Clone(); this.pDirty = false; this.RefreshProperty(); } public void RefreshProperty() { this.Text = "Property of " + this.pOriginalInfo.Id.Uri.ToString(); this.UriTextBox.Text = this.pOriginalInfo.Id.Uri.ToString(); this.ContentTypeTextBox.Text = string.Join("/", this.pOriginalInfo.Types.ToArray()); this.SizeTextBox.Text = this.pOriginalInfo.Size.ToString(); this.CreationDateTextBox.Text = this.pOriginalInfo.CreationTime.ToString(); this.LastModifiedTextBox.Text = this.pOriginalInfo.LastModifiedTime.ToString(); this.UpdatePropList(); } } }