505 lines
14 KiB
C#
505 lines
14 KiB
C#
|
// Decompiled with JetBrains decompiler
|
|||
|
// Type: Rei.Fs.OAuth2Dialog
|
|||
|
// Assembly: Rei.Fs, Version=1.13.2.8796, Culture=neutral, PublicKeyToken=null
|
|||
|
// MVID: D8B08A8B-697C-4439-9CFF-1BE4EE46F7B0
|
|||
|
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Fs.dll
|
|||
|
|
|||
|
using Microsoft.VisualBasic.CompilerServices;
|
|||
|
using System;
|
|||
|
using System.ComponentModel;
|
|||
|
using System.Diagnostics;
|
|||
|
using System.Drawing;
|
|||
|
using System.Runtime.CompilerServices;
|
|||
|
using System.Windows.Forms;
|
|||
|
|
|||
|
namespace Rei.Fs
|
|||
|
{
|
|||
|
[DesignerGenerated]
|
|||
|
public class OAuth2Dialog : Form
|
|||
|
{
|
|||
|
private IContainer components;
|
|||
|
[AccessedThroughProperty("TextBoxAuthCode")]
|
|||
|
private TextBox _TextBoxAuthCode;
|
|||
|
[AccessedThroughProperty("ButtonOK")]
|
|||
|
private Button _ButtonOK;
|
|||
|
[AccessedThroughProperty("ButtonCancel")]
|
|||
|
private Button _ButtonCancel;
|
|||
|
[AccessedThroughProperty("LinkLabel1")]
|
|||
|
private LinkLabel _LinkLabel1;
|
|||
|
[AccessedThroughProperty("Label3")]
|
|||
|
private Label _Label3;
|
|||
|
[AccessedThroughProperty("Label4")]
|
|||
|
private Label _Label4;
|
|||
|
[AccessedThroughProperty("Label5")]
|
|||
|
private Label _Label5;
|
|||
|
[AccessedThroughProperty("Label2")]
|
|||
|
private Label _Label2;
|
|||
|
[AccessedThroughProperty("UriTextBox")]
|
|||
|
private TextBox _UriTextBox;
|
|||
|
[AccessedThroughProperty("Label1")]
|
|||
|
private Label _Label1;
|
|||
|
[AccessedThroughProperty("RememberCheckBox")]
|
|||
|
private CheckBox _RememberCheckBox;
|
|||
|
[AccessedThroughProperty("Label6")]
|
|||
|
private Label _Label6;
|
|||
|
|
|||
|
public OAuth2Dialog()
|
|||
|
{
|
|||
|
this.Load += new EventHandler(this.OAuth2Dialog_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.TextBoxAuthCode = new TextBox();
|
|||
|
this.ButtonOK = new Button();
|
|||
|
this.ButtonCancel = new Button();
|
|||
|
this.LinkLabel1 = new LinkLabel();
|
|||
|
this.Label3 = new Label();
|
|||
|
this.Label4 = new Label();
|
|||
|
this.Label5 = new Label();
|
|||
|
this.Label2 = new Label();
|
|||
|
this.UriTextBox = new TextBox();
|
|||
|
this.Label1 = new Label();
|
|||
|
this.RememberCheckBox = new CheckBox();
|
|||
|
this.Label6 = new Label();
|
|||
|
this.SuspendLayout();
|
|||
|
this.TextBoxAuthCode.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
|||
|
TextBox textBoxAuthCode1 = this.TextBoxAuthCode;
|
|||
|
Point point1 = new Point(80, 128);
|
|||
|
Point point2 = point1;
|
|||
|
textBoxAuthCode1.Location = point2;
|
|||
|
this.TextBoxAuthCode.Name = "TextBoxAuthCode";
|
|||
|
TextBox textBoxAuthCode2 = this.TextBoxAuthCode;
|
|||
|
Size size1 = new Size(200, 19);
|
|||
|
Size size2 = size1;
|
|||
|
textBoxAuthCode2.Size = size2;
|
|||
|
this.TextBoxAuthCode.TabIndex = 7;
|
|||
|
this.ButtonOK.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
|||
|
Button buttonOk1 = this.ButtonOK;
|
|||
|
point1 = new Point(128, 192);
|
|||
|
Point point3 = point1;
|
|||
|
buttonOk1.Location = point3;
|
|||
|
this.ButtonOK.Name = "ButtonOK";
|
|||
|
Button buttonOk2 = this.ButtonOK;
|
|||
|
size1 = new Size(72, 24);
|
|||
|
Size size3 = size1;
|
|||
|
buttonOk2.Size = size3;
|
|||
|
this.ButtonOK.TabIndex = 10;
|
|||
|
this.ButtonOK.Text = "OK";
|
|||
|
this.ButtonOK.UseVisualStyleBackColor = true;
|
|||
|
this.ButtonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
|||
|
this.ButtonCancel.DialogResult = DialogResult.Cancel;
|
|||
|
Button buttonCancel1 = this.ButtonCancel;
|
|||
|
point1 = new Point(208, 192);
|
|||
|
Point point4 = point1;
|
|||
|
buttonCancel1.Location = point4;
|
|||
|
this.ButtonCancel.Name = "ButtonCancel";
|
|||
|
Button buttonCancel2 = this.ButtonCancel;
|
|||
|
size1 = new Size(72, 24);
|
|||
|
Size size4 = size1;
|
|||
|
buttonCancel2.Size = size4;
|
|||
|
this.ButtonCancel.TabIndex = 11;
|
|||
|
this.ButtonCancel.Text = "Cancel";
|
|||
|
this.ButtonCancel.UseVisualStyleBackColor = true;
|
|||
|
this.LinkLabel1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
|||
|
LinkLabel linkLabel1_1 = this.LinkLabel1;
|
|||
|
point1 = new Point(40, 64);
|
|||
|
Point point5 = point1;
|
|||
|
linkLabel1_1.Location = point5;
|
|||
|
this.LinkLabel1.Name = "LinkLabel1";
|
|||
|
LinkLabel linkLabel1_2 = this.LinkLabel1;
|
|||
|
size1 = new Size(239, 16);
|
|||
|
Size size5 = size1;
|
|||
|
linkLabel1_2.Size = size5;
|
|||
|
this.LinkLabel1.TabIndex = 3;
|
|||
|
this.LinkLabel1.TabStop = true;
|
|||
|
this.LinkLabel1.Text = "LinkLabel1";
|
|||
|
this.LinkLabel1.TextAlign = ContentAlignment.MiddleLeft;
|
|||
|
this.Label3.AutoSize = true;
|
|||
|
Label label3_1 = this.Label3;
|
|||
|
point1 = new Point(8, 48);
|
|||
|
Point point6 = point1;
|
|||
|
label3_1.Location = point6;
|
|||
|
this.Label3.Name = "Label3";
|
|||
|
Label label3_2 = this.Label3;
|
|||
|
size1 = new Size(126, 12);
|
|||
|
Size size6 = size1;
|
|||
|
label3_2.Size = size6;
|
|||
|
this.Label3.TabIndex = 2;
|
|||
|
this.Label3.Text = "Step1: Open Link Below";
|
|||
|
this.Label4.AutoSize = true;
|
|||
|
Label label4_1 = this.Label4;
|
|||
|
point1 = new Point(8, 88);
|
|||
|
Point point7 = point1;
|
|||
|
label4_1.Location = point7;
|
|||
|
this.Label4.Name = "Label4";
|
|||
|
Label label4_2 = this.Label4;
|
|||
|
size1 = new Size(203, 12);
|
|||
|
Size size7 = size1;
|
|||
|
label4_2.Size = size7;
|
|||
|
this.Label4.TabIndex = 4;
|
|||
|
this.Label4.Text = "Step2: Authorize CarotDAV on the site";
|
|||
|
this.Label5.AutoSize = true;
|
|||
|
Label label5_1 = this.Label5;
|
|||
|
point1 = new Point(8, 104);
|
|||
|
Point point8 = point1;
|
|||
|
label5_1.Location = point8;
|
|||
|
this.Label5.Name = "Label5";
|
|||
|
Label label5_2 = this.Label5;
|
|||
|
size1 = new Size(166, 12);
|
|||
|
Size size8 = size1;
|
|||
|
label5_2.Size = size8;
|
|||
|
this.Label5.TabIndex = 5;
|
|||
|
this.Label5.Text = "Step3: Input Authorization Code";
|
|||
|
this.Label2.AutoSize = true;
|
|||
|
Label label2_1 = this.Label2;
|
|||
|
point1 = new Point(40, 128);
|
|||
|
Point point9 = point1;
|
|||
|
label2_1.Location = point9;
|
|||
|
this.Label2.Name = "Label2";
|
|||
|
Label label2_2 = this.Label2;
|
|||
|
size1 = new Size(31, 12);
|
|||
|
Size size9 = size1;
|
|||
|
label2_2.Size = size9;
|
|||
|
this.Label2.TabIndex = 6;
|
|||
|
this.Label2.Text = "Code";
|
|||
|
this.UriTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
|||
|
TextBox uriTextBox1 = this.UriTextBox;
|
|||
|
point1 = new Point(8, 24);
|
|||
|
Point point10 = point1;
|
|||
|
uriTextBox1.Location = point10;
|
|||
|
this.UriTextBox.Multiline = true;
|
|||
|
this.UriTextBox.Name = "UriTextBox";
|
|||
|
this.UriTextBox.ReadOnly = true;
|
|||
|
TextBox uriTextBox2 = this.UriTextBox;
|
|||
|
size1 = new Size(272, 19);
|
|||
|
Size size10 = size1;
|
|||
|
uriTextBox2.Size = size10;
|
|||
|
this.UriTextBox.TabIndex = 1;
|
|||
|
this.UriTextBox.TabStop = false;
|
|||
|
this.Label1.AutoSize = true;
|
|||
|
Label label1_1 = this.Label1;
|
|||
|
point1 = new Point(8, 8);
|
|||
|
Point point11 = point1;
|
|||
|
label1_1.Location = point11;
|
|||
|
this.Label1.Name = "Label1";
|
|||
|
Label label1_2 = this.Label1;
|
|||
|
size1 = new Size(90, 12);
|
|||
|
Size size11 = size1;
|
|||
|
label1_2.Size = size11;
|
|||
|
this.Label1.TabIndex = 0;
|
|||
|
this.Label1.Text = "Authorization for";
|
|||
|
this.RememberCheckBox.AutoSize = true;
|
|||
|
CheckBox rememberCheckBox1 = this.RememberCheckBox;
|
|||
|
point1 = new Point(8, 176);
|
|||
|
Point point12 = point1;
|
|||
|
rememberCheckBox1.Location = point12;
|
|||
|
CheckBox rememberCheckBox2 = this.RememberCheckBox;
|
|||
|
size1 = new Size(214, 16);
|
|||
|
Size size12 = size1;
|
|||
|
rememberCheckBox2.MinimumSize = size12;
|
|||
|
this.RememberCheckBox.Name = "RememberCheckBox";
|
|||
|
CheckBox rememberCheckBox3 = this.RememberCheckBox;
|
|||
|
size1 = new Size(214, 16);
|
|||
|
Size size13 = size1;
|
|||
|
rememberCheckBox3.Size = size13;
|
|||
|
this.RememberCheckBox.TabIndex = 9;
|
|||
|
this.RememberCheckBox.Text = "Remember Authorization Info";
|
|||
|
this.RememberCheckBox.UseVisualStyleBackColor = true;
|
|||
|
this.Label6.AutoSize = true;
|
|||
|
Label label6_1 = this.Label6;
|
|||
|
point1 = new Point(8, 152);
|
|||
|
Point point13 = point1;
|
|||
|
label6_1.Location = point13;
|
|||
|
this.Label6.Name = "Label6";
|
|||
|
Label label6_2 = this.Label6;
|
|||
|
size1 = new Size(97, 12);
|
|||
|
Size size14 = size1;
|
|||
|
label6_2.Size = size14;
|
|||
|
this.Label6.TabIndex = 8;
|
|||
|
this.Label6.Text = "Step4: Click \"OK\"";
|
|||
|
this.AcceptButton = (IButtonControl) this.ButtonOK;
|
|||
|
this.AutoScaleDimensions = new SizeF(6f, 12f);
|
|||
|
this.AutoScaleMode = AutoScaleMode.Font;
|
|||
|
this.CancelButton = (IButtonControl) this.ButtonCancel;
|
|||
|
size1 = new Size(288, 224);
|
|||
|
this.ClientSize = size1;
|
|||
|
this.Controls.Add((Control) this.Label6);
|
|||
|
this.Controls.Add((Control) this.RememberCheckBox);
|
|||
|
this.Controls.Add((Control) this.UriTextBox);
|
|||
|
this.Controls.Add((Control) this.Label1);
|
|||
|
this.Controls.Add((Control) this.LinkLabel1);
|
|||
|
this.Controls.Add((Control) this.ButtonCancel);
|
|||
|
this.Controls.Add((Control) this.ButtonOK);
|
|||
|
this.Controls.Add((Control) this.Label2);
|
|||
|
this.Controls.Add((Control) this.Label5);
|
|||
|
this.Controls.Add((Control) this.Label4);
|
|||
|
this.Controls.Add((Control) this.Label3);
|
|||
|
this.Controls.Add((Control) this.TextBoxAuthCode);
|
|||
|
size1 = new Size(304, 262);
|
|||
|
this.MinimumSize = size1;
|
|||
|
this.Name = nameof (OAuth2Dialog);
|
|||
|
this.Text = "OAuth Authorization Dialog";
|
|||
|
this.ResumeLayout(false);
|
|||
|
this.PerformLayout();
|
|||
|
}
|
|||
|
|
|||
|
internal virtual TextBox TextBoxAuthCode
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return this._TextBoxAuthCode;
|
|||
|
}
|
|||
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|||
|
{
|
|||
|
EventHandler eventHandler = new EventHandler(this.TextBox1_TextChanged);
|
|||
|
if (this._TextBoxAuthCode != null)
|
|||
|
this._TextBoxAuthCode.TextChanged -= eventHandler;
|
|||
|
this._TextBoxAuthCode = value;
|
|||
|
if (this._TextBoxAuthCode == null)
|
|||
|
return;
|
|||
|
this._TextBoxAuthCode.TextChanged += eventHandler;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
internal virtual Button ButtonOK
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return this._ButtonOK;
|
|||
|
}
|
|||
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|||
|
{
|
|||
|
EventHandler eventHandler = new EventHandler(this.ButtonOK_Click);
|
|||
|
if (this._ButtonOK != null)
|
|||
|
this._ButtonOK.Click -= eventHandler;
|
|||
|
this._ButtonOK = value;
|
|||
|
if (this._ButtonOK == null)
|
|||
|
return;
|
|||
|
this._ButtonOK.Click += eventHandler;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
internal virtual Button ButtonCancel
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return this._ButtonCancel;
|
|||
|
}
|
|||
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|||
|
{
|
|||
|
this._ButtonCancel = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
internal virtual LinkLabel LinkLabel1
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return this._LinkLabel1;
|
|||
|
}
|
|||
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|||
|
{
|
|||
|
LinkLabelLinkClickedEventHandler clickedEventHandler = new LinkLabelLinkClickedEventHandler(this.LinkLabel1_LinkClicked);
|
|||
|
if (this._LinkLabel1 != null)
|
|||
|
this._LinkLabel1.LinkClicked -= clickedEventHandler;
|
|||
|
this._LinkLabel1 = value;
|
|||
|
if (this._LinkLabel1 == null)
|
|||
|
return;
|
|||
|
this._LinkLabel1.LinkClicked += clickedEventHandler;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
internal virtual Label Label3
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return this._Label3;
|
|||
|
}
|
|||
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|||
|
{
|
|||
|
this._Label3 = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
internal virtual Label Label4
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return this._Label4;
|
|||
|
}
|
|||
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|||
|
{
|
|||
|
this._Label4 = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
internal virtual Label Label5
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return this._Label5;
|
|||
|
}
|
|||
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|||
|
{
|
|||
|
this._Label5 = 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 Label1
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return this._Label1;
|
|||
|
}
|
|||
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|||
|
{
|
|||
|
this._Label1 = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
internal virtual CheckBox RememberCheckBox
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return this._RememberCheckBox;
|
|||
|
}
|
|||
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|||
|
{
|
|||
|
this._RememberCheckBox = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
internal virtual Label Label6
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return this._Label6;
|
|||
|
}
|
|||
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|||
|
{
|
|||
|
this._Label6 = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public string Target
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return this.UriTextBox.Text;
|
|||
|
}
|
|||
|
set
|
|||
|
{
|
|||
|
this.UriTextBox.Text = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public string AuthorizationEndpoint
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return this.LinkLabel1.Text;
|
|||
|
}
|
|||
|
set
|
|||
|
{
|
|||
|
this.LinkLabel1.Text = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public bool ShowRememberCheckBox
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return this.RememberCheckBox.Visible;
|
|||
|
}
|
|||
|
set
|
|||
|
{
|
|||
|
this.RememberCheckBox.Visible = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public bool Remember
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return this.RememberCheckBox.Checked;
|
|||
|
}
|
|||
|
set
|
|||
|
{
|
|||
|
this.RememberCheckBox.Checked = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public string Code
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return this.TextBoxAuthCode.Text;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private void ButtonOK_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
this.DialogResult = DialogResult.OK;
|
|||
|
}
|
|||
|
|
|||
|
private void LinkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
|||
|
{
|
|||
|
Process.Start(this.LinkLabel1.Text);
|
|||
|
}
|
|||
|
|
|||
|
private void TextBox1_TextChanged(object sender, EventArgs e)
|
|||
|
{
|
|||
|
if (this.TextBoxAuthCode.Text.Length < 0)
|
|||
|
return;
|
|||
|
this.ButtonOK.Enabled = true;
|
|||
|
}
|
|||
|
|
|||
|
private void OAuth2Dialog_Load(object sender, EventArgs e)
|
|||
|
{
|
|||
|
this.Icon = Rei.Fs.My.Resources.Resources.security;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|