280 lines
8.5 KiB
C#
280 lines
8.5 KiB
C#
|
// Decompiled with JetBrains decompiler
|
|||
|
// Type: CarotDAV.MasterPasswordInputForm
|
|||
|
// 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 MasterPasswordInputForm : Form
|
|||
|
{
|
|||
|
private IContainer components;
|
|||
|
[AccessedThroughProperty("TextBoxPassword")]
|
|||
|
private TextBox _TextBoxPassword;
|
|||
|
[AccessedThroughProperty("m_CancelButton")]
|
|||
|
private Button _m_CancelButton;
|
|||
|
[AccessedThroughProperty("OKButton")]
|
|||
|
private Button _OKButton;
|
|||
|
[AccessedThroughProperty("Label1")]
|
|||
|
private Label _Label1;
|
|||
|
[AccessedThroughProperty("ButtonClearAll")]
|
|||
|
private Button _ButtonClearAll;
|
|||
|
public bool PasswordInvalid;
|
|||
|
|
|||
|
public MasterPasswordInputForm()
|
|||
|
{
|
|||
|
this.Load += new EventHandler(this.MasterPasswordInputForm_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.TextBoxPassword = new TextBox();
|
|||
|
this.m_CancelButton = new Button();
|
|||
|
this.OKButton = new Button();
|
|||
|
this.Label1 = new Label();
|
|||
|
this.ButtonClearAll = new Button();
|
|||
|
this.SuspendLayout();
|
|||
|
this.TextBoxPassword.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
|||
|
TextBox textBoxPassword1 = this.TextBoxPassword;
|
|||
|
Point point1 = new Point(8, 24);
|
|||
|
Point point2 = point1;
|
|||
|
textBoxPassword1.Location = point2;
|
|||
|
this.TextBoxPassword.Name = "TextBoxPassword";
|
|||
|
TextBox textBoxPassword2 = this.TextBoxPassword;
|
|||
|
Size size1 = new Size(283, 19);
|
|||
|
Size size2 = size1;
|
|||
|
textBoxPassword2.Size = size2;
|
|||
|
this.TextBoxPassword.TabIndex = 1;
|
|||
|
this.TextBoxPassword.UseSystemPasswordChar = true;
|
|||
|
this.m_CancelButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
|||
|
this.m_CancelButton.DialogResult = DialogResult.Cancel;
|
|||
|
Button mCancelButton1 = this.m_CancelButton;
|
|||
|
point1 = new Point(218, 66);
|
|||
|
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 = 4;
|
|||
|
this.m_CancelButton.Text = "Abort";
|
|||
|
this.m_CancelButton.UseVisualStyleBackColor = true;
|
|||
|
this.OKButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
|||
|
Button okButton1 = this.OKButton;
|
|||
|
point1 = new Point(138, 66);
|
|||
|
Point point4 = point1;
|
|||
|
okButton1.Location = point4;
|
|||
|
this.OKButton.Name = "OKButton";
|
|||
|
Button okButton2 = this.OKButton;
|
|||
|
size1 = new Size(72, 24);
|
|||
|
Size size4 = size1;
|
|||
|
okButton2.Size = size4;
|
|||
|
this.OKButton.TabIndex = 3;
|
|||
|
this.OKButton.Text = "OK";
|
|||
|
this.OKButton.UseVisualStyleBackColor = true;
|
|||
|
this.Label1.AutoSize = true;
|
|||
|
this.Label1.ForeColor = Color.Red;
|
|||
|
Label label1_1 = this.Label1;
|
|||
|
point1 = new Point(8, 8);
|
|||
|
Point point5 = point1;
|
|||
|
label1_1.Location = point5;
|
|||
|
this.Label1.Name = "Label1";
|
|||
|
Label label1_2 = this.Label1;
|
|||
|
size1 = new Size(50, 12);
|
|||
|
Size size5 = size1;
|
|||
|
label1_2.Size = size5;
|
|||
|
this.Label1.TabIndex = 0;
|
|||
|
this.Label1.Text = "Message";
|
|||
|
this.ButtonClearAll.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
|||
|
Button buttonClearAll1 = this.ButtonClearAll;
|
|||
|
point1 = new Point(18, 66);
|
|||
|
Point point6 = point1;
|
|||
|
buttonClearAll1.Location = point6;
|
|||
|
this.ButtonClearAll.Name = "ButtonClearAll";
|
|||
|
Button buttonClearAll2 = this.ButtonClearAll;
|
|||
|
size1 = new Size(112, 24);
|
|||
|
Size size6 = size1;
|
|||
|
buttonClearAll2.Size = size6;
|
|||
|
this.ButtonClearAll.TabIndex = 2;
|
|||
|
this.ButtonClearAll.Text = "Clear All Settings";
|
|||
|
this.ButtonClearAll.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(299, 97);
|
|||
|
this.ClientSize = size1;
|
|||
|
this.Controls.Add((Control) this.Label1);
|
|||
|
this.Controls.Add((Control) this.m_CancelButton);
|
|||
|
this.Controls.Add((Control) this.ButtonClearAll);
|
|||
|
this.Controls.Add((Control) this.OKButton);
|
|||
|
this.Controls.Add((Control) this.TextBoxPassword);
|
|||
|
this.FormBorderStyle = FormBorderStyle.FixedDialog;
|
|||
|
this.MaximizeBox = false;
|
|||
|
size1 = new Size(305, 125);
|
|||
|
this.MaximumSize = size1;
|
|||
|
this.MinimizeBox = false;
|
|||
|
size1 = new Size(305, 125);
|
|||
|
this.MinimumSize = size1;
|
|||
|
this.Name = nameof (MasterPasswordInputForm);
|
|||
|
this.StartPosition = FormStartPosition.CenterScreen;
|
|||
|
this.Text = "Enter Master Password";
|
|||
|
this.ResumeLayout(false);
|
|||
|
this.PerformLayout();
|
|||
|
}
|
|||
|
|
|||
|
internal virtual TextBox TextBoxPassword
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return this._TextBoxPassword;
|
|||
|
}
|
|||
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|||
|
{
|
|||
|
EventHandler eventHandler = new EventHandler(this.TextBoxPassword_TextChanged);
|
|||
|
if (this._TextBoxPassword != null)
|
|||
|
this._TextBoxPassword.TextChanged -= eventHandler;
|
|||
|
this._TextBoxPassword = value;
|
|||
|
if (this._TextBoxPassword == null)
|
|||
|
return;
|
|||
|
this._TextBoxPassword.TextChanged += eventHandler;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
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 Label1
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return this._Label1;
|
|||
|
}
|
|||
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|||
|
{
|
|||
|
this._Label1 = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
internal virtual Button ButtonClearAll
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return this._ButtonClearAll;
|
|||
|
}
|
|||
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|||
|
{
|
|||
|
EventHandler eventHandler = new EventHandler(this.ButtonClearAll_Click);
|
|||
|
if (this._ButtonClearAll != null)
|
|||
|
this._ButtonClearAll.Click -= eventHandler;
|
|||
|
this._ButtonClearAll = value;
|
|||
|
if (this._ButtonClearAll == null)
|
|||
|
return;
|
|||
|
this._ButtonClearAll.Click += eventHandler;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public bool ShowClearAllButton
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return this.ButtonClearAll.Visible;
|
|||
|
}
|
|||
|
set
|
|||
|
{
|
|||
|
this.ButtonClearAll.Visible = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public string MasterPassword
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return this.TextBoxPassword.Text;
|
|||
|
}
|
|||
|
set
|
|||
|
{
|
|||
|
this.TextBoxPassword.Text = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private void MasterPasswordInputForm_Load(object sender, EventArgs e)
|
|||
|
{
|
|||
|
this.Icon = CarotDAV.My.Resources.Resources.security;
|
|||
|
this.Label1.Text = !this.PasswordInvalid ? "" : "Password Invalid.";
|
|||
|
this.OKButton.Enabled = false;
|
|||
|
}
|
|||
|
|
|||
|
private void TextBoxPassword_TextChanged(object sender, EventArgs e)
|
|||
|
{
|
|||
|
this.OKButton.Enabled = this.TextBoxPassword.Text.Length > 0;
|
|||
|
}
|
|||
|
|
|||
|
private void OKButton_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
this.DialogResult = DialogResult.OK;
|
|||
|
}
|
|||
|
|
|||
|
private void ButtonClearAll_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
if (MessageBox.Show("Clear All Settings.", "Warning", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2) != DialogResult.OK)
|
|||
|
return;
|
|||
|
this.DialogResult = DialogResult.Ignore;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|