CarotDav_decompile/Rei.Fs.Webdav/ConnectionTestForm.cs

890 lines
27 KiB
C#

// Decompiled with JetBrains decompiler
// Type: Rei.Fs.Webdav.ConnectionTestForm
// Assembly: Rei.Fs.Webdav, Version=1.13.2.18288, Culture=neutral, PublicKeyToken=null
// MVID: D30DD1E3-8520-48B5-AAE5-C87970350A82
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Fs.Webdav.dll
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Net;
using System.Net.Security;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
namespace Rei.Fs.Webdav
{
[DesignerGenerated]
public class ConnectionTestForm : Form
{
private IContainer components;
[AccessedThroughProperty("OPTIONSCheck")]
private CheckBox _OPTIONSCheck;
[AccessedThroughProperty("DAVClass1Check")]
private CheckBox _DAVClass1Check;
[AccessedThroughProperty("DAVClass2Check")]
private CheckBox _DAVClass2Check;
[AccessedThroughProperty("ResolveDNSCheck")]
private CheckBox _ResolveDNSCheck;
[AccessedThroughProperty("UriTextBox")]
private TextBox _UriTextBox;
[AccessedThroughProperty("Label1")]
private Label _Label1;
[AccessedThroughProperty("OKButton")]
private Button _OKButton;
[AccessedThroughProperty("ValidURICheck")]
private CheckBox _ValidURICheck;
[AccessedThroughProperty("Timer1")]
private System.Windows.Forms.Timer _Timer1;
[AccessedThroughProperty("HTTP11Check")]
private CheckBox _HTTP11Check;
[AccessedThroughProperty("PROPFINDCheck")]
private CheckBox _PROPFINDCheck;
[AccessedThroughProperty("OPTIONSAuthText")]
private TextBox _OPTIONSAuthText;
[AccessedThroughProperty("PROPFINDAuthText")]
private TextBox _PROPFINDAuthText;
[AccessedThroughProperty("DetailTextBox")]
private TextBox _DetailTextBox;
[AccessedThroughProperty("CertAvailCheckBox")]
private CheckBox _CertAvailCheckBox;
[AccessedThroughProperty("CertChainCheckBox")]
private CheckBox _CertChainCheckBox;
[AccessedThroughProperty("CertNameCheckBox")]
private CheckBox _CertNameCheckBox;
[AccessedThroughProperty("GroupBox1")]
private GroupBox _GroupBox1;
[AccessedThroughProperty("DAVClass3Check")]
private CheckBox _DAVClass3Check;
[AccessedThroughProperty("MethodsTextBox")]
private TextBox _MethodsTextBox;
[AccessedThroughProperty("Label2")]
private Label _Label2;
[AccessedThroughProperty("TextBoxSSLVersion")]
private TextBox _TextBoxSSLVersion;
[AccessedThroughProperty("Label3")]
private Label _Label3;
private string puser;
private string ppass;
private ConnectionSetting pSetting;
private const string GroupName = "Test";
public ConnectionTestForm()
{
this.Load += new EventHandler(this.ConnectionTestForm_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.components = (IContainer) new System.ComponentModel.Container();
this.OPTIONSCheck = new CheckBox();
this.DAVClass1Check = new CheckBox();
this.DAVClass2Check = new CheckBox();
this.ResolveDNSCheck = new CheckBox();
this.UriTextBox = new TextBox();
this.Label1 = new Label();
this.OKButton = new Button();
this.ValidURICheck = new CheckBox();
this.Timer1 = new System.Windows.Forms.Timer(this.components);
this.HTTP11Check = new CheckBox();
this.PROPFINDCheck = new CheckBox();
this.OPTIONSAuthText = new TextBox();
this.PROPFINDAuthText = new TextBox();
this.DetailTextBox = new TextBox();
this.CertAvailCheckBox = new CheckBox();
this.CertChainCheckBox = new CheckBox();
this.CertNameCheckBox = new CheckBox();
this.GroupBox1 = new GroupBox();
this.Label3 = new Label();
this.TextBoxSSLVersion = new TextBox();
this.DAVClass3Check = new CheckBox();
this.MethodsTextBox = new TextBox();
this.Label2 = new Label();
this.GroupBox1.SuspendLayout();
this.SuspendLayout();
this.OPTIONSCheck.AutoCheck = false;
this.OPTIONSCheck.AutoSize = true;
CheckBox optionsCheck1 = this.OPTIONSCheck;
Point point1 = new Point(16, 104);
Point point2 = point1;
optionsCheck1.Location = point2;
this.OPTIONSCheck.Name = "OPTIONSCheck";
CheckBox optionsCheck2 = this.OPTIONSCheck;
Size size1 = new Size(72, 16);
Size size2 = size1;
optionsCheck2.Size = size2;
this.OPTIONSCheck.TabIndex = 5;
this.OPTIONSCheck.Text = "OPTIONS";
this.OPTIONSCheck.UseVisualStyleBackColor = true;
this.DAVClass1Check.AutoCheck = false;
this.DAVClass1Check.AutoSize = true;
CheckBox davClass1Check1 = this.DAVClass1Check;
point1 = new Point(32, 128);
Point point3 = point1;
davClass1Check1.Location = point3;
this.DAVClass1Check.Name = "DAVClass1Check";
CheckBox davClass1Check2 = this.DAVClass1Check;
size1 = new Size(89, 16);
Size size3 = size1;
davClass1Check2.Size = size3;
this.DAVClass1Check.TabIndex = 7;
this.DAVClass1Check.Text = "DAV class 1";
this.DAVClass1Check.UseVisualStyleBackColor = true;
this.DAVClass2Check.AutoCheck = false;
this.DAVClass2Check.AutoSize = true;
CheckBox davClass2Check1 = this.DAVClass2Check;
point1 = new Point(32, 152);
Point point4 = point1;
davClass2Check1.Location = point4;
this.DAVClass2Check.Name = "DAVClass2Check";
CheckBox davClass2Check2 = this.DAVClass2Check;
size1 = new Size(89, 16);
Size size4 = size1;
davClass2Check2.Size = size4;
this.DAVClass2Check.TabIndex = 8;
this.DAVClass2Check.Text = "DAV class 2";
this.DAVClass2Check.UseVisualStyleBackColor = true;
this.ResolveDNSCheck.AutoCheck = false;
this.ResolveDNSCheck.AutoSize = true;
CheckBox resolveDnsCheck1 = this.ResolveDNSCheck;
point1 = new Point(16, 56);
Point point5 = point1;
resolveDnsCheck1.Location = point5;
this.ResolveDNSCheck.Name = "ResolveDNSCheck";
CheckBox resolveDnsCheck2 = this.ResolveDNSCheck;
size1 = new Size(92, 16);
Size size5 = size1;
resolveDnsCheck2.Size = size5;
this.ResolveDNSCheck.TabIndex = 3;
this.ResolveDNSCheck.Text = "Resolve DNS";
this.ResolveDNSCheck.UseVisualStyleBackColor = true;
this.UriTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
TextBox uriTextBox1 = this.UriTextBox;
point1 = new Point(48, 8);
Point point6 = point1;
uriTextBox1.Location = point6;
this.UriTextBox.Name = "UriTextBox";
this.UriTextBox.ReadOnly = true;
TextBox uriTextBox2 = this.UriTextBox;
size1 = new Size(336, 19);
Size size6 = size1;
uriTextBox2.Size = size6;
this.UriTextBox.TabIndex = 1;
this.Label1.AutoSize = true;
Label label1_1 = this.Label1;
point1 = new Point(16, 8);
Point point7 = point1;
label1_1.Location = point7;
this.Label1.Name = "Label1";
Label label1_2 = this.Label1;
size1 = new Size(24, 12);
Size size7 = size1;
label1_2.Size = size7;
this.Label1.TabIndex = 0;
this.Label1.Text = "URI";
this.Label1.TextAlign = ContentAlignment.MiddleLeft;
this.OKButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
this.OKButton.DialogResult = DialogResult.Cancel;
Button okButton1 = this.OKButton;
point1 = new Point(312, 314);
Point point8 = point1;
okButton1.Location = point8;
this.OKButton.Name = "OKButton";
Button okButton2 = this.OKButton;
size1 = new Size(72, 24);
Size size8 = size1;
okButton2.Size = size8;
this.OKButton.TabIndex = 16;
this.OKButton.Text = "OK";
this.OKButton.UseVisualStyleBackColor = true;
this.ValidURICheck.AutoCheck = false;
this.ValidURICheck.AutoSize = true;
CheckBox validUriCheck1 = this.ValidURICheck;
point1 = new Point(16, 32);
Point point9 = point1;
validUriCheck1.Location = point9;
this.ValidURICheck.Name = "ValidURICheck";
CheckBox validUriCheck2 = this.ValidURICheck;
size1 = new Size(73, 16);
Size size9 = size1;
validUriCheck2.Size = size9;
this.ValidURICheck.TabIndex = 2;
this.ValidURICheck.Text = "Valid URI";
this.ValidURICheck.UseVisualStyleBackColor = true;
this.HTTP11Check.AutoCheck = false;
this.HTTP11Check.AutoSize = true;
CheckBox httP11Check1 = this.HTTP11Check;
point1 = new Point(16, 80);
Point point10 = point1;
httP11Check1.Location = point10;
this.HTTP11Check.Name = "HTTP11Check";
CheckBox httP11Check2 = this.HTTP11Check;
size1 = new Size(73, 16);
Size size10 = size1;
httP11Check2.Size = size10;
this.HTTP11Check.TabIndex = 4;
this.HTTP11Check.Text = "HTTP/1.1";
this.HTTP11Check.UseVisualStyleBackColor = true;
this.PROPFINDCheck.AutoCheck = false;
this.PROPFINDCheck.AutoSize = true;
CheckBox propfindCheck1 = this.PROPFINDCheck;
point1 = new Point(16, 200);
Point point11 = point1;
propfindCheck1.Location = point11;
this.PROPFINDCheck.Name = "PROPFINDCheck";
CheckBox propfindCheck2 = this.PROPFINDCheck;
size1 = new Size(80, 16);
Size size11 = size1;
propfindCheck2.Size = size11;
this.PROPFINDCheck.TabIndex = 12;
this.PROPFINDCheck.Text = "PROPFIND";
this.PROPFINDCheck.UseVisualStyleBackColor = true;
TextBox optionsAuthText1 = this.OPTIONSAuthText;
point1 = new Point(104, 104);
Point point12 = point1;
optionsAuthText1.Location = point12;
this.OPTIONSAuthText.Name = "OPTIONSAuthText";
this.OPTIONSAuthText.ReadOnly = true;
TextBox optionsAuthText2 = this.OPTIONSAuthText;
size1 = new Size(104, 19);
Size size12 = size1;
optionsAuthText2.Size = size12;
this.OPTIONSAuthText.TabIndex = 6;
TextBox propfindAuthText1 = this.PROPFINDAuthText;
point1 = new Point(104, 200);
Point point13 = point1;
propfindAuthText1.Location = point13;
this.PROPFINDAuthText.Name = "PROPFINDAuthText";
this.PROPFINDAuthText.ReadOnly = true;
TextBox propfindAuthText2 = this.PROPFINDAuthText;
size1 = new Size(104, 19);
Size size13 = size1;
propfindAuthText2.Size = size13;
this.PROPFINDAuthText.TabIndex = 13;
this.DetailTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
TextBox detailTextBox1 = this.DetailTextBox;
point1 = new Point(16, 232);
Point point14 = point1;
detailTextBox1.Location = point14;
this.DetailTextBox.Multiline = true;
this.DetailTextBox.Name = "DetailTextBox";
this.DetailTextBox.ReadOnly = true;
TextBox detailTextBox2 = this.DetailTextBox;
size1 = new Size(368, 74);
Size size14 = size1;
detailTextBox2.Size = size14;
this.DetailTextBox.TabIndex = 15;
this.CertAvailCheckBox.AutoCheck = false;
this.CertAvailCheckBox.AutoSize = true;
CheckBox certAvailCheckBox1 = this.CertAvailCheckBox;
point1 = new Point(8, 72);
Point point15 = point1;
certAvailCheckBox1.Location = point15;
this.CertAvailCheckBox.Name = "CertAvailCheckBox";
CheckBox certAvailCheckBox2 = this.CertAvailCheckBox;
size1 = new Size(139, 16);
Size size15 = size1;
certAvailCheckBox2.Size = size15;
this.CertAvailCheckBox.TabIndex = 2;
this.CertAvailCheckBox.Text = "Certificate Availabitily";
this.CertAvailCheckBox.UseVisualStyleBackColor = true;
this.CertChainCheckBox.AutoCheck = false;
this.CertChainCheckBox.AutoSize = true;
CheckBox certChainCheckBox1 = this.CertChainCheckBox;
point1 = new Point(8, 24);
Point point16 = point1;
certChainCheckBox1.Location = point16;
this.CertChainCheckBox.Name = "CertChainCheckBox";
CheckBox certChainCheckBox2 = this.CertChainCheckBox;
size1 = new Size(111, 16);
Size size16 = size1;
certChainCheckBox2.Size = size16;
this.CertChainCheckBox.TabIndex = 0;
this.CertChainCheckBox.Text = "Certificate Chain";
this.CertChainCheckBox.UseVisualStyleBackColor = true;
this.CertNameCheckBox.AutoCheck = false;
this.CertNameCheckBox.AutoSize = true;
CheckBox certNameCheckBox1 = this.CertNameCheckBox;
point1 = new Point(8, 48);
Point point17 = point1;
certNameCheckBox1.Location = point17;
this.CertNameCheckBox.Name = "CertNameCheckBox";
CheckBox certNameCheckBox2 = this.CertNameCheckBox;
size1 = new Size(111, 16);
Size size17 = size1;
certNameCheckBox2.Size = size17;
this.CertNameCheckBox.TabIndex = 1;
this.CertNameCheckBox.Text = "Certificate Name";
this.CertNameCheckBox.UseVisualStyleBackColor = true;
this.GroupBox1.Controls.Add((Control) this.Label3);
this.GroupBox1.Controls.Add((Control) this.TextBoxSSLVersion);
this.GroupBox1.Controls.Add((Control) this.CertChainCheckBox);
this.GroupBox1.Controls.Add((Control) this.CertAvailCheckBox);
this.GroupBox1.Controls.Add((Control) this.CertNameCheckBox);
GroupBox groupBox1_1 = this.GroupBox1;
point1 = new Point(216, 32);
Point point18 = point1;
groupBox1_1.Location = point18;
this.GroupBox1.Name = "GroupBox1";
GroupBox groupBox1_2 = this.GroupBox1;
size1 = new Size(168, 136);
Size size18 = size1;
groupBox1_2.Size = size18;
this.GroupBox1.TabIndex = 14;
this.GroupBox1.TabStop = false;
this.GroupBox1.Text = "Security";
this.Label3.AutoSize = true;
Label label3_1 = this.Label3;
point1 = new Point(8, 96);
Point point19 = point1;
label3_1.Location = point19;
this.Label3.Name = "Label3";
Label label3_2 = this.Label3;
size1 = new Size(68, 12);
Size size19 = size1;
label3_2.Size = size19;
this.Label3.TabIndex = 10;
this.Label3.Text = "SSL Version";
this.Label3.TextAlign = ContentAlignment.MiddleLeft;
TextBox textBoxSslVersion1 = this.TextBoxSSLVersion;
point1 = new Point(8, 112);
Point point20 = point1;
textBoxSslVersion1.Location = point20;
this.TextBoxSSLVersion.Name = "TextBoxSSLVersion";
this.TextBoxSSLVersion.ReadOnly = true;
TextBox textBoxSslVersion2 = this.TextBoxSSLVersion;
size1 = new Size(152, 19);
Size size20 = size1;
textBoxSslVersion2.Size = size20;
this.TextBoxSSLVersion.TabIndex = 3;
this.DAVClass3Check.AutoCheck = false;
this.DAVClass3Check.AutoSize = true;
CheckBox davClass3Check1 = this.DAVClass3Check;
point1 = new Point(32, 176);
Point point21 = point1;
davClass3Check1.Location = point21;
this.DAVClass3Check.Name = "DAVClass3Check";
CheckBox davClass3Check2 = this.DAVClass3Check;
size1 = new Size(89, 16);
Size size21 = size1;
davClass3Check2.Size = size21;
this.DAVClass3Check.TabIndex = 9;
this.DAVClass3Check.Text = "DAV class 3";
this.DAVClass3Check.UseVisualStyleBackColor = true;
this.MethodsTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
TextBox methodsTextBox1 = this.MethodsTextBox;
point1 = new Point(152, 176);
Point point22 = point1;
methodsTextBox1.Location = point22;
this.MethodsTextBox.Name = "MethodsTextBox";
this.MethodsTextBox.ReadOnly = true;
TextBox methodsTextBox2 = this.MethodsTextBox;
size1 = new Size(232, 19);
Size size22 = size1;
methodsTextBox2.Size = size22;
this.MethodsTextBox.TabIndex = 11;
this.Label2.AutoSize = true;
Label label2_1 = this.Label2;
point1 = new Point(152, 160);
Point point23 = point1;
label2_1.Location = point23;
this.Label2.Name = "Label2";
Label label2_2 = this.Label2;
size1 = new Size(48, 12);
Size size23 = size1;
label2_2.Size = size23;
this.Label2.TabIndex = 10;
this.Label2.Text = "Methods";
this.Label2.TextAlign = ContentAlignment.MiddleLeft;
this.AutoScaleDimensions = new SizeF(6f, 12f);
this.AutoScaleMode = AutoScaleMode.Font;
size1 = new Size(392, 346);
this.ClientSize = size1;
this.Controls.Add((Control) this.Label2);
this.Controls.Add((Control) this.MethodsTextBox);
this.Controls.Add((Control) this.DAVClass3Check);
this.Controls.Add((Control) this.GroupBox1);
this.Controls.Add((Control) this.DetailTextBox);
this.Controls.Add((Control) this.PROPFINDAuthText);
this.Controls.Add((Control) this.OPTIONSAuthText);
this.Controls.Add((Control) this.DAVClass2Check);
this.Controls.Add((Control) this.DAVClass1Check);
this.Controls.Add((Control) this.OPTIONSCheck);
this.Controls.Add((Control) this.PROPFINDCheck);
this.Controls.Add((Control) this.HTTP11Check);
this.Controls.Add((Control) this.ValidURICheck);
this.Controls.Add((Control) this.OKButton);
this.Controls.Add((Control) this.Label1);
this.Controls.Add((Control) this.UriTextBox);
this.Controls.Add((Control) this.ResolveDNSCheck);
this.MaximizeBox = false;
this.MinimizeBox = false;
size1 = new Size(408, 384);
this.MinimumSize = size1;
this.Name = nameof (ConnectionTestForm);
this.ShowInTaskbar = false;
this.StartPosition = FormStartPosition.CenterParent;
this.Text = "Connection Test";
this.GroupBox1.ResumeLayout(false);
this.GroupBox1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
internal virtual CheckBox OPTIONSCheck
{
get
{
return this._OPTIONSCheck;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._OPTIONSCheck = value;
}
}
internal virtual CheckBox DAVClass1Check
{
get
{
return this._DAVClass1Check;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._DAVClass1Check = value;
}
}
internal virtual CheckBox DAVClass2Check
{
get
{
return this._DAVClass2Check;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._DAVClass2Check = value;
}
}
internal virtual CheckBox ResolveDNSCheck
{
get
{
return this._ResolveDNSCheck;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._ResolveDNSCheck = value;
}
}
internal virtual TextBox UriTextBox
{
get
{
return this._UriTextBox;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._UriTextBox = value;
}
}
internal virtual Label Label1
{
get
{
return this._Label1;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label1 = value;
}
}
internal virtual Button OKButton
{
get
{
return this._OKButton;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._OKButton = value;
}
}
internal virtual CheckBox ValidURICheck
{
get
{
return this._ValidURICheck;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._ValidURICheck = value;
}
}
internal virtual System.Windows.Forms.Timer Timer1
{
get
{
return this._Timer1;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.Timer1_Tick);
if (this._Timer1 != null)
this._Timer1.Tick -= eventHandler;
this._Timer1 = value;
if (this._Timer1 == null)
return;
this._Timer1.Tick += eventHandler;
}
}
internal virtual CheckBox HTTP11Check
{
get
{
return this._HTTP11Check;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._HTTP11Check = value;
}
}
internal virtual CheckBox PROPFINDCheck
{
get
{
return this._PROPFINDCheck;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._PROPFINDCheck = value;
}
}
internal virtual TextBox OPTIONSAuthText
{
get
{
return this._OPTIONSAuthText;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._OPTIONSAuthText = value;
}
}
internal virtual TextBox PROPFINDAuthText
{
get
{
return this._PROPFINDAuthText;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._PROPFINDAuthText = value;
}
}
internal virtual TextBox DetailTextBox
{
get
{
return this._DetailTextBox;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._DetailTextBox = value;
}
}
internal virtual CheckBox CertAvailCheckBox
{
get
{
return this._CertAvailCheckBox;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._CertAvailCheckBox = value;
}
}
internal virtual CheckBox CertChainCheckBox
{
get
{
return this._CertChainCheckBox;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._CertChainCheckBox = value;
}
}
internal virtual CheckBox CertNameCheckBox
{
get
{
return this._CertNameCheckBox;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._CertNameCheckBox = value;
}
}
internal virtual GroupBox GroupBox1
{
get
{
return this._GroupBox1;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._GroupBox1 = value;
}
}
internal virtual CheckBox DAVClass3Check
{
get
{
return this._DAVClass3Check;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._DAVClass3Check = value;
}
}
internal virtual TextBox MethodsTextBox
{
get
{
return this._MethodsTextBox;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._MethodsTextBox = value;
}
}
internal virtual Label Label2
{
get
{
return this._Label2;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label2 = value;
}
}
internal virtual TextBox TextBoxSSLVersion
{
get
{
return this._TextBoxSSLVersion;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._TextBoxSSLVersion = value;
}
}
internal virtual Label Label3
{
get
{
return this._Label3;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label3 = value;
}
}
public string TargetUri
{
get
{
return this.UriTextBox.Text;
}
set
{
this.UriTextBox.Text = value;
}
}
public string Username
{
get
{
return this.puser;
}
set
{
this.puser = value;
}
}
public string Password
{
get
{
return this.ppass;
}
set
{
this.ppass = value;
}
}
public ConnectionSetting Setting
{
get
{
return this.pSetting;
}
set
{
this.pSetting = value;
}
}
private void Check()
{
Uri result = (Uri) null;
if (!Uri.TryCreate(this.UriTextBox.Text, UriKind.Absolute, out result))
return;
this.ValidURICheck.Checked = true;
if (Operators.CompareString(result.Scheme, "https", false) == 0)
{
this.CertChainCheckBox.Enabled = true;
this.CertNameCheckBox.Enabled = true;
this.CertAvailCheckBox.Enabled = true;
}
else
{
this.CertChainCheckBox.Enabled = false;
this.CertNameCheckBox.Enabled = false;
this.CertAvailCheckBox.Enabled = false;
}
IPAddress address = (IPAddress) null;
if (IPAddress.TryParse(result.Host, out address))
{
this.ResolveDNSCheck.CheckState = CheckState.Indeterminate;
}
else
{
try
{
Dns.GetHostEntry(result.Host);
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
this.DetailTextBox.Text = ex.Message;
ProjectData.ClearProjectError();
return;
}
this.ResolveDNSCheck.Checked = true;
}
WebdavFs client = this.Setting.InnerGetClient();
client.GroupName = "Test";
this.Setting.CertErrorIgnores = SslPolicyErrors.RemoteCertificateNotAvailable | SslPolicyErrors.RemoteCertificateNameMismatch | SslPolicyErrors.RemoteCertificateChainErrors;
try
{
DavResourceOptions resourceOptions = client.GetResourceOptions(result);
if (resourceOptions.ProtocolVersion > new Version(1, 0))
this.HTTP11Check.Checked = true;
this.OPTIONSCheck.Checked = true;
this.OPTIONSAuthText.Text = client.LastAuthType;
this.DAVClass1Check.Checked = resourceOptions.DAVSupported("1");
this.DAVClass2Check.Checked = resourceOptions.DAVSupported("2");
this.DAVClass3Check.Checked = resourceOptions.DAVSupported("3");
this.MethodsTextBox.Text = resourceOptions.AllowedMethods;
this.TextBoxSSLVersion.Text = resourceOptions.SSLVersionString;
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
Exception exception = ex;
this.DetailTextBox.Text = exception.Message + "\r\n" + exception.StackTrace;
client.ResetConnection();
ProjectData.ClearProjectError();
return;
}
finally
{
if (Operators.CompareString(result.Scheme, "https", false) == 0)
{
this.CertChainCheckBox.Checked = (this.Setting.LastCertError & SslPolicyErrors.RemoteCertificateChainErrors) == SslPolicyErrors.None;
this.CertNameCheckBox.Checked = (this.Setting.LastCertError & SslPolicyErrors.RemoteCertificateNameMismatch) == SslPolicyErrors.None;
this.CertAvailCheckBox.Checked = (this.Setting.LastCertError & SslPolicyErrors.RemoteCertificateNotAvailable) == SslPolicyErrors.None;
}
}
try
{
client.GetInfoAndEntries(result);
this.PROPFINDCheck.Checked = true;
this.PROPFINDAuthText.Text = client.LastAuthType;
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
Exception exception = ex;
this.DetailTextBox.Text = exception.Message + "\r\n" + exception.StackTrace;
client.ResetConnection();
ProjectData.ClearProjectError();
return;
}
client.ResetConnection();
}
private void Timer1_Tick(object sender, EventArgs e)
{
this.Timer1.Stop();
Cursor.Current = Cursors.WaitCursor;
this.Check();
Cursor.Current = Cursors.Default;
this.OKButton.Enabled = true;
}
private void ConnectionTestForm_Load(object sender, EventArgs e)
{
this.Icon = ConnectionSetting.GetDefaultFavicon();
this.Timer1.Start();
this.OKButton.Enabled = false;
}
}
}