CarotDav_decompile/CarotDAV/DestinationForm.cs

601 lines
18 KiB
C#

// Decompiled with JetBrains decompiler
// Type: CarotDAV.DestinationForm
// 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 System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
namespace CarotDAV
{
[DesignerGenerated]
public class DestinationForm : Form
{
private IContainer components;
[AccessedThroughProperty("Label5")]
private Label _Label5;
[AccessedThroughProperty("Label4")]
private Label _Label4;
[AccessedThroughProperty("SourceTextBox")]
private TextBox _SourceTextBox;
[AccessedThroughProperty("m_CancelButton")]
private Button _m_CancelButton;
[AccessedThroughProperty("OKButton")]
private Button _OKButton;
[AccessedThroughProperty("Label2")]
private Label _Label2;
[AccessedThroughProperty("DestinationTextBox")]
private TextBox _DestinationTextBox;
[AccessedThroughProperty("TableLayoutPanel1")]
private TableLayoutPanel _TableLayoutPanel1;
[AccessedThroughProperty("Panel1")]
private Panel _Panel1;
[AccessedThroughProperty("Panel2")]
private Panel _Panel2;
[AccessedThroughProperty("Label1")]
private Label _Label1;
[AccessedThroughProperty("DepthInfinite")]
private RadioButton _DepthInfinite;
[AccessedThroughProperty("DepthOneRadio")]
private RadioButton _DepthOneRadio;
[AccessedThroughProperty("DepthZeroRadio")]
private RadioButton _DepthZeroRadio;
[AccessedThroughProperty("DepthPanel")]
private Panel _DepthPanel;
private DestinationMethodType pMethod;
public DestinationForm()
{
this.Load += new EventHandler(this.DestinationForm_Load);
this.Shown += new EventHandler(this.DestinationForm_Shown);
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.Label5 = new Label();
this.Label4 = new Label();
this.SourceTextBox = new TextBox();
this.m_CancelButton = new Button();
this.OKButton = new Button();
this.Label2 = new Label();
this.DestinationTextBox = new TextBox();
this.TableLayoutPanel1 = new TableLayoutPanel();
this.Panel1 = new Panel();
this.Panel2 = new Panel();
this.Label1 = new Label();
this.DepthInfinite = new RadioButton();
this.DepthOneRadio = new RadioButton();
this.DepthZeroRadio = new RadioButton();
this.DepthPanel = new Panel();
this.TableLayoutPanel1.SuspendLayout();
this.Panel1.SuspendLayout();
this.Panel2.SuspendLayout();
this.DepthPanel.SuspendLayout();
this.SuspendLayout();
this.Label5.AutoSize = true;
Label label5_1 = this.Label5;
Point point1 = new Point(0, 0);
Point point2 = point1;
label5_1.Location = point2;
this.Label5.Name = "Label5";
Label label5_2 = this.Label5;
Size size1 = new Size(111, 12);
Size size2 = size1;
label5_2.Size = size2;
this.Label5.TabIndex = 0;
this.Label5.Text = "Destination URI (To)";
this.Label4.AutoSize = true;
Label label4_1 = this.Label4;
point1 = new Point(0, 0);
Point point3 = point1;
label4_1.Location = point3;
this.Label4.Name = "Label4";
Label label4_2 = this.Label4;
size1 = new Size(101, 12);
Size size3 = size1;
label4_2.Size = size3;
this.Label4.TabIndex = 0;
this.Label4.Text = "Source URI (From)";
this.SourceTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
TextBox sourceTextBox1 = this.SourceTextBox;
point1 = new Point(0, 16);
Point point4 = point1;
sourceTextBox1.Location = point4;
this.SourceTextBox.Multiline = true;
this.SourceTextBox.Name = "SourceTextBox";
this.SourceTextBox.ReadOnly = true;
TextBox sourceTextBox2 = this.SourceTextBox;
size1 = new Size(352, 42);
Size size4 = size1;
sourceTextBox2.Size = size4;
this.SourceTextBox.TabIndex = 1;
this.m_CancelButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
this.m_CancelButton.DialogResult = DialogResult.Cancel;
Button mCancelButton1 = this.m_CancelButton;
point1 = new Point(296, 184);
Point point5 = point1;
mCancelButton1.Location = point5;
this.m_CancelButton.Name = "m_CancelButton";
Button mCancelButton2 = this.m_CancelButton;
size1 = new Size(72, 24);
Size size5 = size1;
mCancelButton2.Size = size5;
this.m_CancelButton.TabIndex = 4;
this.m_CancelButton.Text = "Cancel";
this.m_CancelButton.UseVisualStyleBackColor = true;
this.OKButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
Button okButton1 = this.OKButton;
point1 = new Point(216, 184);
Point point6 = point1;
okButton1.Location = point6;
this.OKButton.Name = "OKButton";
Button okButton2 = this.OKButton;
size1 = new Size(72, 24);
Size size6 = size1;
okButton2.Size = size6;
this.OKButton.TabIndex = 3;
this.OKButton.Text = "OK";
this.OKButton.UseVisualStyleBackColor = true;
this.Label2.AutoSize = true;
Label label2_1 = this.Label2;
point1 = new Point(8, 8);
Point point7 = point1;
label2_1.Location = point7;
this.Label2.Name = "Label2";
Label label2_2 = this.Label2;
size1 = new Size(94, 12);
Size size7 = size1;
label2_2.Size = size7;
this.Label2.TabIndex = 0;
this.Label2.Text = "Enter Destination";
this.DestinationTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
TextBox destinationTextBox1 = this.DestinationTextBox;
point1 = new Point(0, 16);
Point point8 = point1;
destinationTextBox1.Location = point8;
this.DestinationTextBox.Multiline = true;
this.DestinationTextBox.Name = "DestinationTextBox";
TextBox destinationTextBox2 = this.DestinationTextBox;
size1 = new Size(352, 42);
Size size8 = size1;
destinationTextBox2.Size = size8;
this.DestinationTextBox.TabIndex = 1;
this.TableLayoutPanel1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
this.TableLayoutPanel1.ColumnCount = 1;
this.TableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50f));
this.TableLayoutPanel1.Controls.Add((Control) this.Panel1, 0, 0);
this.TableLayoutPanel1.Controls.Add((Control) this.Panel2, 0, 1);
TableLayoutPanel tableLayoutPanel1_1 = this.TableLayoutPanel1;
point1 = new Point(8, 24);
Point point9 = point1;
tableLayoutPanel1_1.Location = point9;
this.TableLayoutPanel1.Name = "TableLayoutPanel1";
this.TableLayoutPanel1.RowCount = 2;
this.TableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 50f));
this.TableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 50f));
TableLayoutPanel tableLayoutPanel1_2 = this.TableLayoutPanel1;
size1 = new Size(360, 128);
Size size9 = size1;
tableLayoutPanel1_2.Size = size9;
this.TableLayoutPanel1.TabIndex = 1;
this.Panel1.Controls.Add((Control) this.SourceTextBox);
this.Panel1.Controls.Add((Control) this.Label4);
this.Panel1.Dock = DockStyle.Fill;
Panel panel1_1 = this.Panel1;
point1 = new Point(3, 3);
Point point10 = point1;
panel1_1.Location = point10;
this.Panel1.Name = "Panel1";
Panel panel1_2 = this.Panel1;
size1 = new Size(354, 58);
Size size10 = size1;
panel1_2.Size = size10;
this.Panel1.TabIndex = 0;
this.Panel2.Controls.Add((Control) this.DestinationTextBox);
this.Panel2.Controls.Add((Control) this.Label5);
this.Panel2.Dock = DockStyle.Fill;
Panel panel2_1 = this.Panel2;
point1 = new Point(3, 67);
Point point11 = point1;
panel2_1.Location = point11;
this.Panel2.Name = "Panel2";
Panel panel2_2 = this.Panel2;
size1 = new Size(354, 58);
Size size11 = size1;
panel2_2.Size = size11;
this.Panel2.TabIndex = 1;
this.Label1.AutoSize = true;
Label label1_1 = this.Label1;
point1 = new Point(8, 8);
Point point12 = point1;
label1_1.Location = point12;
this.Label1.Name = "Label1";
Label label1_2 = this.Label1;
size1 = new Size(37, 12);
Size size12 = size1;
label1_2.Size = size12;
this.Label1.TabIndex = 0;
this.Label1.Text = "Depth:";
this.DepthInfinite.AutoSize = true;
this.DepthInfinite.Checked = true;
RadioButton depthInfinite1 = this.DepthInfinite;
point1 = new Point(48, 8);
Point point13 = point1;
depthInfinite1.Location = point13;
this.DepthInfinite.Name = "DepthInfinite";
RadioButton depthInfinite2 = this.DepthInfinite;
size1 = new Size(58, 16);
Size size13 = size1;
depthInfinite2.Size = size13;
this.DepthInfinite.TabIndex = 1;
this.DepthInfinite.TabStop = true;
this.DepthInfinite.Text = "Infinite";
this.DepthInfinite.UseVisualStyleBackColor = true;
this.DepthOneRadio.AutoSize = true;
RadioButton depthOneRadio1 = this.DepthOneRadio;
point1 = new Point(112, 8);
Point point14 = point1;
depthOneRadio1.Location = point14;
this.DepthOneRadio.Name = "DepthOneRadio";
RadioButton depthOneRadio2 = this.DepthOneRadio;
size1 = new Size(29, 16);
Size size14 = size1;
depthOneRadio2.Size = size14;
this.DepthOneRadio.TabIndex = 2;
this.DepthOneRadio.Text = "1";
this.DepthOneRadio.UseVisualStyleBackColor = true;
this.DepthZeroRadio.AutoSize = true;
RadioButton depthZeroRadio1 = this.DepthZeroRadio;
point1 = new Point(152, 8);
Point point15 = point1;
depthZeroRadio1.Location = point15;
this.DepthZeroRadio.Name = "DepthZeroRadio";
RadioButton depthZeroRadio2 = this.DepthZeroRadio;
size1 = new Size(29, 16);
Size size15 = size1;
depthZeroRadio2.Size = size15;
this.DepthZeroRadio.TabIndex = 3;
this.DepthZeroRadio.Text = "0";
this.DepthZeroRadio.UseVisualStyleBackColor = true;
this.DepthPanel.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
this.DepthPanel.Controls.Add((Control) this.DepthZeroRadio);
this.DepthPanel.Controls.Add((Control) this.Label1);
this.DepthPanel.Controls.Add((Control) this.DepthInfinite);
this.DepthPanel.Controls.Add((Control) this.DepthOneRadio);
Panel depthPanel1 = this.DepthPanel;
point1 = new Point(8, 160);
Point point16 = point1;
depthPanel1.Location = point16;
this.DepthPanel.Name = "DepthPanel";
Panel depthPanel2 = this.DepthPanel;
size1 = new Size(192, 32);
Size size16 = size1;
depthPanel2.Size = size16;
this.DepthPanel.TabIndex = 2;
this.DepthPanel.Visible = false;
this.AcceptButton = (IButtonControl) this.OKButton;
this.AutoScaleDimensions = new SizeF(6f, 12f);
this.AutoScaleMode = AutoScaleMode.Font;
this.CancelButton = (IButtonControl) this.m_CancelButton;
size1 = new Size(376, 215);
this.ClientSize = size1;
this.Controls.Add((Control) this.DepthPanel);
this.Controls.Add((Control) this.TableLayoutPanel1);
this.Controls.Add((Control) this.Label2);
this.Controls.Add((Control) this.m_CancelButton);
this.Controls.Add((Control) this.OKButton);
size1 = new Size(392, 253);
this.MaximumSize = size1;
size1 = new Size(256, 205);
this.MinimumSize = size1;
this.Name = nameof (DestinationForm);
this.StartPosition = FormStartPosition.CenterParent;
this.Text = "Destination";
this.TableLayoutPanel1.ResumeLayout(false);
this.Panel1.ResumeLayout(false);
this.Panel1.PerformLayout();
this.Panel2.ResumeLayout(false);
this.Panel2.PerformLayout();
this.DepthPanel.ResumeLayout(false);
this.DepthPanel.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
internal virtual Label Label5
{
get
{
return this._Label5;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label5 = value;
}
}
internal virtual Label Label4
{
get
{
return this._Label4;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label4 = value;
}
}
internal virtual TextBox SourceTextBox
{
get
{
return this._SourceTextBox;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._SourceTextBox = value;
}
}
internal virtual Button m_CancelButton
{
get
{
return this._m_CancelButton;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._m_CancelButton = value;
}
}
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 Label Label2
{
get
{
return this._Label2;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label2 = value;
}
}
internal virtual TextBox DestinationTextBox
{
get
{
return this._DestinationTextBox;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.DestinationTextBox_TextChanged);
if (this._DestinationTextBox != null)
this._DestinationTextBox.TextChanged -= eventHandler;
this._DestinationTextBox = value;
if (this._DestinationTextBox == null)
return;
this._DestinationTextBox.TextChanged += eventHandler;
}
}
internal virtual TableLayoutPanel TableLayoutPanel1
{
get
{
return this._TableLayoutPanel1;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._TableLayoutPanel1 = value;
}
}
internal virtual Panel Panel1
{
get
{
return this._Panel1;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Panel1 = value;
}
}
internal virtual Panel Panel2
{
get
{
return this._Panel2;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Panel2 = value;
}
}
internal virtual Label Label1
{
get
{
return this._Label1;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label1 = value;
}
}
internal virtual RadioButton DepthInfinite
{
get
{
return this._DepthInfinite;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._DepthInfinite = value;
}
}
internal virtual RadioButton DepthOneRadio
{
get
{
return this._DepthOneRadio;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._DepthOneRadio = value;
}
}
internal virtual RadioButton DepthZeroRadio
{
get
{
return this._DepthZeroRadio;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._DepthZeroRadio = value;
}
}
internal virtual Panel DepthPanel
{
get
{
return this._DepthPanel;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._DepthPanel = value;
}
}
public DestinationMethodType Method
{
get
{
return this.pMethod;
}
set
{
this.pMethod = value;
}
}
public string Source
{
get
{
return this.SourceTextBox.Text;
}
set
{
this.SourceTextBox.Text = value;
}
}
public string Destination
{
get
{
return this.DestinationTextBox.Text;
}
set
{
this.DestinationTextBox.Text = value;
}
}
public void Initialize(DestinationMethodType method, Uri sourceuri)
{
this.Method = method;
this.SourceTextBox.Text = sourceuri.ToString();
}
private void DestinationForm_Load(object sender, EventArgs e)
{
this.Icon = CarotDAV.My.Resources.Resources.CarotDAV;
this.DestinationTextBox.Text = this.SourceTextBox.Text;
switch (this.Method)
{
case DestinationMethodType.Copy:
this.OKButton.Text = "Copy";
this.DepthPanel.Visible = true;
break;
case DestinationMethodType.Move:
this.OKButton.Text = "Move";
this.DepthPanel.Visible = false;
break;
}
int num = this.DestinationTextBox.Text.LastIndexOf("/");
if (num == checked (this.DestinationTextBox.Text.Length - 1))
num = this.DestinationTextBox.Text.LastIndexOf("/", checked (num - 1));
if (num < 0)
return;
this.DestinationTextBox.Select(checked (num + 1), checked (this.DestinationTextBox.Text.Length - num - 1));
}
private void DestinationForm_Shown(object sender, EventArgs e)
{
this.DestinationTextBox.Focus();
}
private void OKButton_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
}
private void DestinationTextBox_TextChanged(object sender, EventArgs e)
{
this.OKButton.Enabled = Operators.CompareString(this.SourceTextBox.Text, this.DestinationTextBox.Text, false) != 0;
}
}
}