// Decompiled with JetBrains decompiler // Type: CarotDAV.WebDAVClientSettingForm // 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; using Microsoft.VisualBasic.CompilerServices; using System; using System.ComponentModel; using System.Diagnostics; using System.Drawing; using System.IO; using System.Net; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; using System.Windows.Forms; namespace CarotDAV { [DesignerGenerated] public class WebDAVClientSettingForm : Form { private IContainer components; [AccessedThroughProperty("OKButton")] private Button _OKButton; [AccessedThroughProperty("m_CancelButton")] private Button _m_CancelButton; [AccessedThroughProperty("TabControl1")] private TabControl _TabControl1; [AccessedThroughProperty("GeneralTabPage")] private TabPage _GeneralTabPage; [AccessedThroughProperty("BackgroundImageButton")] private Button _BackgroundImageButton; [AccessedThroughProperty("ClearJumpListButton")] private Button _ClearJumpListButton; [AccessedThroughProperty("TabPage1")] private TabPage _TabPage1; [AccessedThroughProperty("ServerAutoEnableCheckBox")] private CheckBox _ServerAutoEnableCheckBox; [AccessedThroughProperty("Label2")] private Label _Label2; [AccessedThroughProperty("ServerPortTextBox")] private TextBox _ServerPortTextBox; [AccessedThroughProperty("Label1")] private Label _Label1; [AccessedThroughProperty("ServerIPTextBox")] private TextBox _ServerIPTextBox; [AccessedThroughProperty("MaxSizeUpDown")] private NumericUpDown _MaxSizeUpDown; [AccessedThroughProperty("MaxSizeChangeButton")] private Button _MaxSizeChangeButton; [AccessedThroughProperty("SetMasterPasswordButton")] private Button _SetMasterPasswordButton; [AccessedThroughProperty("Label3")] private Label _Label3; [AccessedThroughProperty("BackgroundImagepathTextBox")] private TextBox _BackgroundImagepathTextBox; [AccessedThroughProperty("Label4")] private Label _Label4; [AccessedThroughProperty("GroupBox1")] private GroupBox _GroupBox1; [AccessedThroughProperty("OpenFileDialog1")] private OpenFileDialog _OpenFileDialog1; [AccessedThroughProperty("Label5")] private Label _Label5; [AccessedThroughProperty("MasterPasswordTextBox")] private TextBox _MasterPasswordTextBox; [AccessedThroughProperty("ClearFaviconButton")] private Button _ClearFaviconButton; [AccessedThroughProperty("Label7")] private Label _Label7; [AccessedThroughProperty("Label6")] private Label _Label6; [AccessedThroughProperty("AutoMoundFolderCheckBox")] private CheckBox _AutoMoundFolderCheckBox; [AccessedThroughProperty("AutoMoundDriveCheckBox")] private CheckBox _AutoMoundDriveCheckBox; [AccessedThroughProperty("AutoMoundDriveLetterComboBox")] private ComboBox _AutoMoundDriveLetterComboBox; [AccessedThroughProperty("Label8")] private Label _Label8; [AccessedThroughProperty("Label9")] private Label _Label9; [AccessedThroughProperty("RebootWebClientButton")] private Button _RebootWebClientButton; [AccessedThroughProperty("Label10")] private Label _Label10; private const int BCM_FIRST = 5632; private const int BCM_SETSHIELD = 5644; public WebDAVClientSettingForm() { this.Load += new EventHandler(this.WebDAVClientSettingForm_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.GeneralTabPage = new TabPage(); this.Label7 = new Label(); this.Label6 = new Label(); this.Label5 = new Label(); this.MasterPasswordTextBox = new TextBox(); this.BackgroundImagepathTextBox = new TextBox(); this.Label4 = new Label(); this.SetMasterPasswordButton = new Button(); this.ClearFaviconButton = new Button(); this.ClearJumpListButton = new Button(); this.BackgroundImageButton = new Button(); this.TabPage1 = new TabPage(); this.Label9 = new Label(); this.GroupBox1 = new GroupBox(); this.Label3 = new Label(); this.MaxSizeUpDown = new NumericUpDown(); this.MaxSizeChangeButton = new Button(); this.RebootWebClientButton = new Button(); this.AutoMoundFolderCheckBox = new CheckBox(); this.AutoMoundDriveLetterComboBox = new ComboBox(); this.AutoMoundDriveCheckBox = new CheckBox(); this.ServerAutoEnableCheckBox = new CheckBox(); this.Label2 = new Label(); this.ServerPortTextBox = new TextBox(); this.Label10 = new Label(); this.Label8 = new Label(); this.Label1 = new Label(); this.ServerIPTextBox = new TextBox(); this.OpenFileDialog1 = new OpenFileDialog(); this.TabControl1.SuspendLayout(); this.GeneralTabPage.SuspendLayout(); this.TabPage1.SuspendLayout(); this.GroupBox1.SuspendLayout(); this.MaxSizeUpDown.BeginInit(); this.SuspendLayout(); this.OKButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; Button okButton1 = this.OKButton; Point point1 = new Point(216, 312); 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(296, 312); 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.GeneralTabPage); this.TabControl1.Controls.Add((Control) this.TabPage1); 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(362, 298); Size size4 = size1; tabControl1_2.Size = size4; this.TabControl1.TabIndex = 0; this.GeneralTabPage.Controls.Add((Control) this.Label7); this.GeneralTabPage.Controls.Add((Control) this.Label6); this.GeneralTabPage.Controls.Add((Control) this.Label5); this.GeneralTabPage.Controls.Add((Control) this.MasterPasswordTextBox); this.GeneralTabPage.Controls.Add((Control) this.BackgroundImagepathTextBox); this.GeneralTabPage.Controls.Add((Control) this.Label4); this.GeneralTabPage.Controls.Add((Control) this.SetMasterPasswordButton); this.GeneralTabPage.Controls.Add((Control) this.ClearFaviconButton); this.GeneralTabPage.Controls.Add((Control) this.ClearJumpListButton); this.GeneralTabPage.Controls.Add((Control) this.BackgroundImageButton); TabPage generalTabPage1 = this.GeneralTabPage; point1 = new Point(4, 22); Point point5 = point1; generalTabPage1.Location = point5; this.GeneralTabPage.Name = "GeneralTabPage"; TabPage generalTabPage2 = this.GeneralTabPage; Padding padding1 = new Padding(3); Padding padding2 = padding1; generalTabPage2.Padding = padding2; TabPage generalTabPage3 = this.GeneralTabPage; size1 = new Size(354, 272); Size size5 = size1; generalTabPage3.Size = size5; this.GeneralTabPage.TabIndex = 0; this.GeneralTabPage.Text = "General"; this.GeneralTabPage.UseVisualStyleBackColor = true; this.Label7.AutoSize = true; Label label7_1 = this.Label7; point1 = new Point(32, 136); Point point6 = point1; label7_1.Location = point6; this.Label7.Name = "Label7"; Label label7_2 = this.Label7; size1 = new Size(81, 12); Size size6 = size1; label7_2.Size = size6; this.Label7.TabIndex = 5; this.Label7.Text = "Favicon Cache"; this.Label7.TextAlign = ContentAlignment.MiddleRight; this.Label6.AutoSize = true; Label label6_1 = this.Label6; point1 = new Point(59, 96); Point point7 = point1; label6_1.Location = point7; this.Label6.Name = "Label6"; Label label6_2 = this.Label6; size1 = new Size(56, 12); Size size7 = size1; label6_2.Size = size7; this.Label6.TabIndex = 5; this.Label6.Text = "Jump List"; this.Label6.TextAlign = ContentAlignment.MiddleRight; this.Label5.AutoSize = true; Label label5_1 = this.Label5; point1 = new Point(22, 56); Point point8 = point1; label5_1.Location = point8; this.Label5.Name = "Label5"; Label label5_2 = this.Label5; size1 = new Size(93, 12); Size size8 = size1; label5_2.Size = size8; this.Label5.TabIndex = 5; this.Label5.Text = "Master Password"; this.Label5.TextAlign = ContentAlignment.MiddleRight; TextBox masterPasswordTextBox1 = this.MasterPasswordTextBox; point1 = new Point(120, 56); Point point9 = point1; masterPasswordTextBox1.Location = point9; this.MasterPasswordTextBox.Name = "MasterPasswordTextBox"; this.MasterPasswordTextBox.ReadOnly = true; TextBox masterPasswordTextBox2 = this.MasterPasswordTextBox; size1 = new Size(168, 19); Size size9 = size1; masterPasswordTextBox2.Size = size9; this.MasterPasswordTextBox.TabIndex = 4; this.MasterPasswordTextBox.UseSystemPasswordChar = true; TextBox imagepathTextBox1 = this.BackgroundImagepathTextBox; point1 = new Point(120, 16); Point point10 = point1; imagepathTextBox1.Location = point10; this.BackgroundImagepathTextBox.Name = "BackgroundImagepathTextBox"; TextBox imagepathTextBox2 = this.BackgroundImagepathTextBox; size1 = new Size(168, 19); Size size10 = size1; imagepathTextBox2.Size = size10; this.BackgroundImagepathTextBox.TabIndex = 4; this.Label4.AutoSize = true; Label label4_1 = this.Label4; point1 = new Point(16, 16); Point point11 = point1; label4_1.Location = point11; this.Label4.Name = "Label4"; Label label4_2 = this.Label4; size1 = new Size(99, 12); Size size11 = size1; label4_2.Size = size11; this.Label4.TabIndex = 3; this.Label4.Text = "Background Image"; this.Label4.TextAlign = ContentAlignment.MiddleRight; Button masterPasswordButton1 = this.SetMasterPasswordButton; point1 = new Point(296, 56); Point point12 = point1; masterPasswordButton1.Location = point12; this.SetMasterPasswordButton.Name = "SetMasterPasswordButton"; Button masterPasswordButton2 = this.SetMasterPasswordButton; size1 = new Size(48, 24); Size size12 = size1; masterPasswordButton2.Size = size12; this.SetMasterPasswordButton.TabIndex = 2; this.SetMasterPasswordButton.Text = "Set"; this.SetMasterPasswordButton.UseVisualStyleBackColor = true; Button clearFaviconButton1 = this.ClearFaviconButton; point1 = new Point(120, 136); Point point13 = point1; clearFaviconButton1.Location = point13; this.ClearFaviconButton.Name = "ClearFaviconButton"; Button clearFaviconButton2 = this.ClearFaviconButton; size1 = new Size(72, 24); Size size13 = size1; clearFaviconButton2.Size = size13; this.ClearFaviconButton.TabIndex = 1; this.ClearFaviconButton.Text = "Clear"; this.ClearFaviconButton.UseVisualStyleBackColor = true; Button clearJumpListButton1 = this.ClearJumpListButton; point1 = new Point(120, 96); Point point14 = point1; clearJumpListButton1.Location = point14; this.ClearJumpListButton.Name = "ClearJumpListButton"; Button clearJumpListButton2 = this.ClearJumpListButton; size1 = new Size(72, 24); Size size14 = size1; clearJumpListButton2.Size = size14; this.ClearJumpListButton.TabIndex = 1; this.ClearJumpListButton.Text = "Clear"; this.ClearJumpListButton.UseVisualStyleBackColor = true; Button backgroundImageButton1 = this.BackgroundImageButton; point1 = new Point(296, 16); Point point15 = point1; backgroundImageButton1.Location = point15; this.BackgroundImageButton.Name = "BackgroundImageButton"; Button backgroundImageButton2 = this.BackgroundImageButton; size1 = new Size(48, 23); Size size15 = size1; backgroundImageButton2.Size = size15; this.BackgroundImageButton.TabIndex = 0; this.BackgroundImageButton.Text = "..."; this.BackgroundImageButton.UseVisualStyleBackColor = true; this.TabPage1.Controls.Add((Control) this.Label9); this.TabPage1.Controls.Add((Control) this.GroupBox1); this.TabPage1.Controls.Add((Control) this.RebootWebClientButton); this.TabPage1.Controls.Add((Control) this.AutoMoundFolderCheckBox); this.TabPage1.Controls.Add((Control) this.AutoMoundDriveLetterComboBox); this.TabPage1.Controls.Add((Control) this.AutoMoundDriveCheckBox); this.TabPage1.Controls.Add((Control) this.ServerAutoEnableCheckBox); this.TabPage1.Controls.Add((Control) this.Label2); this.TabPage1.Controls.Add((Control) this.ServerPortTextBox); this.TabPage1.Controls.Add((Control) this.Label10); this.TabPage1.Controls.Add((Control) this.Label8); this.TabPage1.Controls.Add((Control) this.Label1); this.TabPage1.Controls.Add((Control) this.ServerIPTextBox); TabPage tabPage1_1 = this.TabPage1; point1 = new Point(4, 22); Point point16 = point1; tabPage1_1.Location = point16; this.TabPage1.Name = "TabPage1"; TabPage tabPage1_2 = this.TabPage1; padding1 = new Padding(3); Padding padding3 = padding1; tabPage1_2.Padding = padding3; TabPage tabPage1_3 = this.TabPage1; size1 = new Size(354, 272); Size size16 = size1; tabPage1_3.Size = size16; this.TabPage1.TabIndex = 1; this.TabPage1.Text = "DAV Server"; this.TabPage1.UseVisualStyleBackColor = true; Label label9_1 = this.Label9; point1 = new Point(160, 24); Point point17 = point1; label9_1.Location = point17; this.Label9.Name = "Label9"; Label label9_2 = this.Label9; size1 = new Size(192, 32); Size size17 = size1; label9_2.Size = size17; this.Label9.TabIndex = 10; this.Label9.Text = "2000: port 80 and Folder\r\nXP: (port 80 and Drive) or ( Folder )"; this.GroupBox1.Controls.Add((Control) this.Label3); this.GroupBox1.Controls.Add((Control) this.MaxSizeUpDown); this.GroupBox1.Controls.Add((Control) this.MaxSizeChangeButton); GroupBox groupBox1_1 = this.GroupBox1; point1 = new Point(16, 208); Point point18 = point1; groupBox1_1.Location = point18; this.GroupBox1.Name = "GroupBox1"; GroupBox groupBox1_2 = this.GroupBox1; size1 = new Size(328, 56); Size size18 = size1; groupBox1_2.Size = size18; this.GroupBox1.TabIndex = 9; this.GroupBox1.TabStop = false; this.GroupBox1.Text = "Registry Setting"; this.Label3.AutoSize = true; Label label3_1 = this.Label3; point1 = new Point(56, 24); Point point19 = point1; label3_1.Location = point19; this.Label3.Name = "Label3"; Label label3_2 = this.Label3; size1 = new Size(74, 12); Size size19 = size1; label3_2.Size = size19; this.Label3.TabIndex = 0; this.Label3.Text = "Max File Size"; NumericUpDown maxSizeUpDown1 = this.MaxSizeUpDown; Decimal num1 = new Decimal(new int[4] { 1000000, 0, 0, 0 }); Decimal num2 = num1; maxSizeUpDown1.Increment = num2; NumericUpDown maxSizeUpDown2 = this.MaxSizeUpDown; point1 = new Point(136, 24); Point point20 = point1; maxSizeUpDown2.Location = point20; NumericUpDown maxSizeUpDown3 = this.MaxSizeUpDown; num1 = new Decimal(new int[4]{ -1, 0, 0, 0 }); Decimal num3 = num1; maxSizeUpDown3.Maximum = num3; this.MaxSizeUpDown.Name = "MaxSizeUpDown"; NumericUpDown maxSizeUpDown4 = this.MaxSizeUpDown; size1 = new Size(96, 19); Size size20 = size1; maxSizeUpDown4.Size = size20; this.MaxSizeUpDown.TabIndex = 1; this.MaxSizeUpDown.TextAlign = HorizontalAlignment.Right; this.MaxSizeUpDown.ThousandsSeparator = true; Button sizeChangeButton1 = this.MaxSizeChangeButton; point1 = new Point(240, 16); Point point21 = point1; sizeChangeButton1.Location = point21; this.MaxSizeChangeButton.Name = "MaxSizeChangeButton"; Button sizeChangeButton2 = this.MaxSizeChangeButton; size1 = new Size(72, 23); Size size21 = size1; sizeChangeButton2.Size = size21; this.MaxSizeChangeButton.TabIndex = 2; this.MaxSizeChangeButton.Text = "Change"; this.MaxSizeChangeButton.UseVisualStyleBackColor = true; Button rebootWebClientButton1 = this.RebootWebClientButton; point1 = new Point(208, 144); Point point22 = point1; rebootWebClientButton1.Location = point22; this.RebootWebClientButton.Name = "RebootWebClientButton"; Button rebootWebClientButton2 = this.RebootWebClientButton; size1 = new Size(72, 23); Size size22 = size1; rebootWebClientButton2.Size = size22; this.RebootWebClientButton.TabIndex = 2; this.RebootWebClientButton.Text = "Reboot"; this.RebootWebClientButton.UseVisualStyleBackColor = true; this.AutoMoundFolderCheckBox.AutoSize = true; CheckBox moundFolderCheckBox1 = this.AutoMoundFolderCheckBox; point1 = new Point(48, 176); Point point23 = point1; moundFolderCheckBox1.Location = point23; this.AutoMoundFolderCheckBox.Name = "AutoMoundFolderCheckBox"; CheckBox moundFolderCheckBox2 = this.AutoMoundFolderCheckBox; size1 = new Size(191, 16); Size size23 = size1; moundFolderCheckBox2.Size = size23; this.AutoMoundFolderCheckBox.TabIndex = 8; this.AutoMoundFolderCheckBox.Text = "Auto Mount/Unmount WebFolder"; this.AutoMoundFolderCheckBox.UseVisualStyleBackColor = true; this.AutoMoundDriveLetterComboBox.DropDownStyle = ComboBoxStyle.DropDownList; this.AutoMoundDriveLetterComboBox.FormattingEnabled = true; ComboBox driveLetterComboBox1 = this.AutoMoundDriveLetterComboBox; point1 = new Point(136, 120); Point point24 = point1; driveLetterComboBox1.Location = point24; this.AutoMoundDriveLetterComboBox.Name = "AutoMoundDriveLetterComboBox"; ComboBox driveLetterComboBox2 = this.AutoMoundDriveLetterComboBox; size1 = new Size(48, 20); Size size24 = size1; driveLetterComboBox2.Size = size24; this.AutoMoundDriveLetterComboBox.TabIndex = 7; this.AutoMoundDriveCheckBox.AutoSize = true; CheckBox moundDriveCheckBox1 = this.AutoMoundDriveCheckBox; point1 = new Point(48, 96); Point point25 = point1; moundDriveCheckBox1.Location = point25; this.AutoMoundDriveCheckBox.Name = "AutoMoundDriveCheckBox"; CheckBox moundDriveCheckBox2 = this.AutoMoundDriveCheckBox; size1 = new Size(165, 16); Size size25 = size1; moundDriveCheckBox2.Size = size25; this.AutoMoundDriveCheckBox.TabIndex = 5; this.AutoMoundDriveCheckBox.Text = "Auto Mount/Unmount Drive"; this.AutoMoundDriveCheckBox.UseVisualStyleBackColor = true; this.ServerAutoEnableCheckBox.AutoSize = true; CheckBox autoEnableCheckBox1 = this.ServerAutoEnableCheckBox; point1 = new Point(48, 72); Point point26 = point1; autoEnableCheckBox1.Location = point26; this.ServerAutoEnableCheckBox.Name = "ServerAutoEnableCheckBox"; CheckBox autoEnableCheckBox2 = this.ServerAutoEnableCheckBox; size1 = new Size(151, 16); Size size26 = size1; autoEnableCheckBox2.Size = size26; this.ServerAutoEnableCheckBox.TabIndex = 4; this.ServerAutoEnableCheckBox.Text = "Auto Enable DAV Server"; this.ServerAutoEnableCheckBox.UseVisualStyleBackColor = true; this.Label2.AutoSize = true; Label label2_1 = this.Label2; point1 = new Point(16, 40); Point point27 = point1; label2_1.Location = point27; this.Label2.Name = "Label2"; Label label2_2 = this.Label2; size1 = new Size(26, 12); Size size27 = size1; label2_2.Size = size27; this.Label2.TabIndex = 2; this.Label2.Text = "Port"; this.Label2.TextAlign = ContentAlignment.TopRight; TextBox serverPortTextBox1 = this.ServerPortTextBox; point1 = new Point(48, 40); Point point28 = point1; serverPortTextBox1.Location = point28; this.ServerPortTextBox.Name = "ServerPortTextBox"; TextBox serverPortTextBox2 = this.ServerPortTextBox; size1 = new Size(100, 19); Size size28 = size1; serverPortTextBox2.Size = size28; this.ServerPortTextBox.TabIndex = 3; this.Label10.AutoSize = true; Label label10_1 = this.Label10; point1 = new Point(64, 152); Point point29 = point1; label10_1.Location = point29; this.Label10.Name = "Label10"; Label label10_2 = this.Label10; size1 = new Size(138, 12); Size size29 = size1; label10_2.Size = size29; this.Label10.TabIndex = 6; this.Label10.Text = "Reboot WebClient Service"; this.Label10.TextAlign = ContentAlignment.MiddleRight; this.Label8.AutoSize = true; Label label8_1 = this.Label8; point1 = new Point(64, 120); Point point30 = point1; label8_1.Location = point30; this.Label8.Name = "Label8"; Label label8_2 = this.Label8; size1 = new Size(66, 12); Size size30 = size1; label8_2.Size = size30; this.Label8.TabIndex = 6; this.Label8.Text = "Drive Letter"; this.Label8.TextAlign = ContentAlignment.MiddleRight; this.Label1.AutoSize = true; Label label1_1 = this.Label1; point1 = new Point(27, 16); Point point31 = point1; label1_1.Location = point31; this.Label1.Name = "Label1"; Label label1_2 = this.Label1; size1 = new Size(15, 12); Size size31 = size1; label1_2.Size = size31; this.Label1.TabIndex = 0; this.Label1.Text = "IP"; this.Label1.TextAlign = ContentAlignment.TopRight; TextBox serverIpTextBox1 = this.ServerIPTextBox; point1 = new Point(48, 16); Point point32 = point1; serverIpTextBox1.Location = point32; this.ServerIPTextBox.Name = "ServerIPTextBox"; TextBox serverIpTextBox2 = this.ServerIPTextBox; size1 = new Size(100, 19); Size size32 = size1; serverIpTextBox2.Size = size32; this.ServerIPTextBox.TabIndex = 1; this.OpenFileDialog1.FileName = "OpenFileDialog1"; this.AcceptButton = (IButtonControl) this.OKButton; this.AutoScaleDimensions = new SizeF(6f, 12f); this.AutoScaleMode = AutoScaleMode.Font; this.CancelButton = (IButtonControl) this.m_CancelButton; size1 = new Size(377, 344); this.ClientSize = size1; this.Controls.Add((Control) this.TabControl1); this.Controls.Add((Control) this.m_CancelButton); this.Controls.Add((Control) this.OKButton); this.MaximizeBox = false; this.MinimizeBox = false; size1 = new Size(393, 382); this.MinimumSize = size1; this.Name = nameof (WebDAVClientSettingForm); this.ShowInTaskbar = false; this.StartPosition = FormStartPosition.CenterParent; this.Text = "Setting and Tool"; this.TabControl1.ResumeLayout(false); this.GeneralTabPage.ResumeLayout(false); this.GeneralTabPage.PerformLayout(); this.TabPage1.ResumeLayout(false); this.TabPage1.PerformLayout(); this.GroupBox1.ResumeLayout(false); this.GroupBox1.PerformLayout(); this.MaxSizeUpDown.EndInit(); this.ResumeLayout(false); } 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 Button m_CancelButton { get { return this._m_CancelButton; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._m_CancelButton = value; } } internal virtual TabControl TabControl1 { get { return this._TabControl1; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._TabControl1 = value; } } internal virtual TabPage GeneralTabPage { get { return this._GeneralTabPage; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._GeneralTabPage = value; } } internal virtual Button BackgroundImageButton { get { return this._BackgroundImageButton; } [MethodImpl(MethodImplOptions.Synchronized)] set { EventHandler eventHandler = new EventHandler(this.BackgroundImageButton_Click); if (this._BackgroundImageButton != null) this._BackgroundImageButton.Click -= eventHandler; this._BackgroundImageButton = value; if (this._BackgroundImageButton == null) return; this._BackgroundImageButton.Click += eventHandler; } } internal virtual Button ClearJumpListButton { get { return this._ClearJumpListButton; } [MethodImpl(MethodImplOptions.Synchronized)] set { EventHandler eventHandler = new EventHandler(this.ClearJumpListButton_Click); if (this._ClearJumpListButton != null) this._ClearJumpListButton.Click -= eventHandler; this._ClearJumpListButton = value; if (this._ClearJumpListButton == null) return; this._ClearJumpListButton.Click += eventHandler; } } internal virtual TabPage TabPage1 { get { return this._TabPage1; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._TabPage1 = value; } } internal virtual CheckBox ServerAutoEnableCheckBox { get { return this._ServerAutoEnableCheckBox; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._ServerAutoEnableCheckBox = value; } } internal virtual Label Label2 { get { return this._Label2; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._Label2 = value; } } internal virtual TextBox ServerPortTextBox { get { return this._ServerPortTextBox; } [MethodImpl(MethodImplOptions.Synchronized)] set { EventHandler eventHandler = new EventHandler(this.TextBox_Validated); if (this._ServerPortTextBox != null) this._ServerPortTextBox.Validated -= eventHandler; this._ServerPortTextBox = value; if (this._ServerPortTextBox == null) return; this._ServerPortTextBox.Validated += eventHandler; } } internal virtual Label Label1 { get { return this._Label1; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._Label1 = value; } } internal virtual TextBox ServerIPTextBox { get { return this._ServerIPTextBox; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._ServerIPTextBox = value; } } internal virtual NumericUpDown MaxSizeUpDown { get { return this._MaxSizeUpDown; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._MaxSizeUpDown = value; } } internal virtual Button MaxSizeChangeButton { get { return this._MaxSizeChangeButton; } [MethodImpl(MethodImplOptions.Synchronized)] set { EventHandler eventHandler = new EventHandler(this.MaxSizeChangeButton_Click); if (this._MaxSizeChangeButton != null) this._MaxSizeChangeButton.Click -= eventHandler; this._MaxSizeChangeButton = value; if (this._MaxSizeChangeButton == null) return; this._MaxSizeChangeButton.Click += eventHandler; } } internal virtual Button SetMasterPasswordButton { get { return this._SetMasterPasswordButton; } [MethodImpl(MethodImplOptions.Synchronized)] set { EventHandler eventHandler = new EventHandler(this.SetMasterPasswordButton_Click); if (this._SetMasterPasswordButton != null) this._SetMasterPasswordButton.Click -= eventHandler; this._SetMasterPasswordButton = value; if (this._SetMasterPasswordButton == null) return; this._SetMasterPasswordButton.Click += eventHandler; } } internal virtual Label Label3 { get { return this._Label3; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._Label3 = value; } } internal virtual TextBox BackgroundImagepathTextBox { get { return this._BackgroundImagepathTextBox; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._BackgroundImagepathTextBox = value; } } internal virtual Label Label4 { get { return this._Label4; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._Label4 = value; } } internal virtual GroupBox GroupBox1 { get { return this._GroupBox1; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._GroupBox1 = value; } } internal virtual OpenFileDialog OpenFileDialog1 { get { return this._OpenFileDialog1; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._OpenFileDialog1 = value; } } internal virtual Label Label5 { get { return this._Label5; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._Label5 = value; } } internal virtual TextBox MasterPasswordTextBox { get { return this._MasterPasswordTextBox; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._MasterPasswordTextBox = value; } } internal virtual Button ClearFaviconButton { get { return this._ClearFaviconButton; } [MethodImpl(MethodImplOptions.Synchronized)] set { EventHandler eventHandler = new EventHandler(this.ClearFaviconButton_Click); if (this._ClearFaviconButton != null) this._ClearFaviconButton.Click -= eventHandler; this._ClearFaviconButton = value; if (this._ClearFaviconButton == null) return; this._ClearFaviconButton.Click += eventHandler; } } internal virtual Label Label7 { get { return this._Label7; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._Label7 = value; } } internal virtual Label Label6 { get { return this._Label6; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._Label6 = value; } } internal virtual CheckBox AutoMoundFolderCheckBox { get { return this._AutoMoundFolderCheckBox; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._AutoMoundFolderCheckBox = value; } } internal virtual CheckBox AutoMoundDriveCheckBox { get { return this._AutoMoundDriveCheckBox; } [MethodImpl(MethodImplOptions.Synchronized)] set { EventHandler eventHandler = new EventHandler(this.CheckBox_CheckedChanged); if (this._AutoMoundDriveCheckBox != null) this._AutoMoundDriveCheckBox.CheckedChanged -= eventHandler; this._AutoMoundDriveCheckBox = value; if (this._AutoMoundDriveCheckBox == null) return; this._AutoMoundDriveCheckBox.CheckedChanged += eventHandler; } } internal virtual ComboBox AutoMoundDriveLetterComboBox { get { return this._AutoMoundDriveLetterComboBox; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._AutoMoundDriveLetterComboBox = value; } } internal virtual Label Label8 { get { return this._Label8; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._Label8 = value; } } internal virtual Label Label9 { get { return this._Label9; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._Label9 = value; } } internal virtual Button RebootWebClientButton { get { return this._RebootWebClientButton; } [MethodImpl(MethodImplOptions.Synchronized)] set { EventHandler eventHandler = new EventHandler(this.RebootWebClientButton_Click); if (this._RebootWebClientButton != null) this._RebootWebClientButton.Click -= eventHandler; this._RebootWebClientButton = value; if (this._RebootWebClientButton == null) return; this._RebootWebClientButton.Click += eventHandler; } } internal virtual Label Label10 { get { return this._Label10; } [MethodImpl(MethodImplOptions.Synchronized)] set { this._Label10 = value; } } [DllImport("shlwapi.dll")] private static extern bool PathRelativePathTo(StringBuilder path, string from, int attrFrom, string to, int attrTo); private void WebDAVClientSettingForm_Load(object sender, EventArgs e) { this.Icon = CarotDAV.My.Resources.Resources.CarotDAV; this.AutoMoundDriveLetterComboBox.BeginUpdate(); this.AutoMoundDriveLetterComboBox.Items.Clear(); this.AutoMoundDriveLetterComboBox.Items.Add((object) "Auto"); string[] logicalDrives = Environment.GetLogicalDrives(); int num1 = 3; do { string str = Conversions.ToString(Strings.Chr(checked (num1 + 65))); int num2 = 0; int num3 = checked (logicalDrives.Length - 1); int index = num2; while (index <= num3) { if (Operators.CompareString(logicalDrives[index].ToUpperInvariant(), str.ToUpperInvariant() + ":\\", false) != 0) checked { ++index; } else goto label_6; } this.AutoMoundDriveLetterComboBox.Items.Add((object) str.ToUpperInvariant()); label_6: checked { ++num1; } } while (num1 <= 25); WebDAVClientSetting tag = (WebDAVClientSetting) this.Tag; this.BackgroundImagepathTextBox.Text = tag.BackgroundImagePath; this.MasterPasswordTextBox.Text = tag.MasterPassword; this.ServerAutoEnableCheckBox.Checked = tag.AutoEnableDAVServer; this.ServerIPTextBox.Text = tag.ServerIP; this.ServerPortTextBox.Text = tag.ServerPort.ToString(); this.AutoMoundDriveCheckBox.Checked = false; this.AutoMoundDriveLetterComboBox.SelectedIndex = 0; int num4 = 0; int num5 = checked (this.AutoMoundDriveLetterComboBox.Items.Count - 1); int index1 = num4; while (index1 <= num5) { if (Operators.CompareString(this.AutoMoundDriveLetterComboBox.Items[index1].ToString().ToUpperInvariant(), tag.AutoMoundDriveLetter.ToUpperInvariant(), false) == 0) { this.AutoMoundDriveCheckBox.Checked = true; this.AutoMoundDriveLetterComboBox.SelectedIndex = index1; } checked { ++index1; } } this.AutoMoundDriveLetterComboBox.EndUpdate(); this.AutoMoundFolderCheckBox.Checked = tag.AutoMoundWebFolder; this.MaxSizeUpDown.Value = new Decimal(NetDriveManager.ReadMaxFileSize()); WebDAVClientSettingForm.SetShieldIcon(this.MaxSizeChangeButton, true); WebDAVClientSettingForm.SetShieldIcon(this.RebootWebClientButton, true); this.UpdateEnabled(); } private void TextBox_TextChanged(object sender, EventArgs e) { this.UpdateEnabled(); } private void CheckedChanged(object sender, EventArgs e) { this.UpdateEnabled(); } private void OKButton_Click(object sender, EventArgs e) { WebDAVClientSetting tag = (WebDAVClientSetting) this.Tag; tag.BackgroundImagePath = this.BackgroundImagepathTextBox.Text.Trim(); tag.MasterPassword = this.MasterPasswordTextBox.Text; tag.ServerIP = this.ServerIPTextBox.Text.Trim(); tag.ServerPort = int.Parse(this.ServerPortTextBox.Text.Trim()); tag.AutoEnableDAVServer = this.ServerAutoEnableCheckBox.Checked; tag.AutoMoundDriveLetter = !this.AutoMoundDriveCheckBox.Checked ? "" : this.AutoMoundDriveLetterComboBox.SelectedItem.ToString(); tag.AutoMoundWebFolder = this.AutoMoundFolderCheckBox.Checked; this.DialogResult = DialogResult.OK; } public void UpdateEnabled() { bool flag = true; this.AutoMoundDriveLetterComboBox.Enabled = this.AutoMoundDriveCheckBox.Checked; this.ClearJumpListButton.Enabled = !XmlSettingManager.IsPortable && TaskbarManager.IsSupportJumpList; int result = 0; IPAddress address = (IPAddress) null; this.OKButton.Enabled = flag && IPAddress.TryParse(this.ServerIPTextBox.Text.Trim(), out address) && int.TryParse(this.ServerPortTextBox.Text.Trim(), out result) && result > 0 && result < 65536; } private void CheckBox_CheckedChanged(object sender, EventArgs e) { this.UpdateEnabled(); } private void TextBox_Validated(object sender, EventArgs e) { this.UpdateEnabled(); } private void BackgroundImageButton_Click(object sender, EventArgs e) { this.OpenFileDialog1.Title = "Select Background Image"; this.OpenFileDialog1.CheckFileExists = true; this.OpenFileDialog1.CheckPathExists = true; this.OpenFileDialog1.Filter = "Image File(*.bmp,*.jpg,*.png)|*.bmp;*.jpg;*.png"; this.OpenFileDialog1.Multiselect = false; string str = XmlSettingManager.SettingFolder + "\\"; if (string.IsNullOrEmpty(this.BackgroundImagepathTextBox.Text)) this.OpenFileDialog1.FileName = str + "background.png"; else this.OpenFileDialog1.FileName = this.BackgroundImagepathTextBox.Text; if (this.OpenFileDialog1.ShowDialog((IWin32Window) this) != DialogResult.OK) return; if (this.OpenFileDialog1.FileName.StartsWith(str)) this.BackgroundImagepathTextBox.Text = this.OpenFileDialog1.FileName.Substring(str.Length); else this.BackgroundImagepathTextBox.Text = this.OpenFileDialog1.FileName; } private void SetMasterPasswordButton_Click(object sender, EventArgs e) { MasterPasswordChangeForm passwordChangeForm = new MasterPasswordChangeForm(); passwordChangeForm.MasterPassword = this.MasterPasswordTextBox.Text; if (passwordChangeForm.ShowDialog() != DialogResult.OK) return; this.MasterPasswordTextBox.Text = passwordChangeForm.NewMasterPassword; } private void ClearJumpListButton_Click(object sender, EventArgs e) { if (MessageBox.Show((IWin32Window) this, "Are you sure to clear all Jump List?", "Confirm Jump List Clear", MessageBoxButtons.YesNo) != DialogResult.Yes) return; TaskbarManager.ClearJumpList(MainForm.AppUserModelId); } private void ClearFaviconButton_Click(object sender, EventArgs e) { if (MessageBox.Show((IWin32Window) this, "Are you sure to clear all Favicon Cache?", "Confirm Favicon Cache Clear", MessageBoxButtons.YesNo) != DialogResult.Yes) return; string faviconFolder = XmlSettingManager.FaviconFolder; try { Directory.Delete(faviconFolder, true); } catch (DirectoryNotFoundException ex) { ProjectData.SetProjectError((Exception) ex); ProjectData.ClearProjectError(); } catch (Exception ex) { ProjectData.SetProjectError(ex); int num = (int) MessageBox.Show(ex.ToString()); ProjectData.ClearProjectError(); } } [DllImport("user32.dll")] private static extern IntPtr SendMessage(HandleRef hWnd, uint Msg, IntPtr wParam, IntPtr lParam); public static void SetShieldIcon(Button targetButton, bool showShield) { if (Environment.OSVersion.Platform != PlatformID.Win32NT || Environment.OSVersion.Version.Major < 6) return; targetButton.FlatStyle = FlatStyle.System; WebDAVClientSettingForm.SendMessage(new HandleRef((object) targetButton, targetButton.Handle), 5644U, IntPtr.Zero, showShield ? new IntPtr(1) : IntPtr.Zero); } private void MaxSizeChangeButton_Click(object sender, EventArgs e) { NetDriveManager.WriteMaxFileSize(Convert.ToInt64(this.MaxSizeUpDown.Value), this.Handle); } private void RebootWebClientButton_Click(object sender, EventArgs e) { NetDriveManager.RebootWebClient(this.Handle); } } }