457 lines
14 KiB
C#
457 lines
14 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: CarotDAV.ResouceListingForm
|
|
// 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.Threading;
|
|
using System.Windows.Forms;
|
|
|
|
namespace CarotDAV
|
|
{
|
|
[DesignerGenerated]
|
|
public class ResouceListingForm : Form
|
|
{
|
|
private IContainer components;
|
|
[AccessedThroughProperty("TextBoxUri")]
|
|
private TextBox _TextBoxUri;
|
|
[AccessedThroughProperty("ButtonCancel")]
|
|
private Button _ButtonCancel;
|
|
[AccessedThroughProperty("Label1")]
|
|
private Label _Label1;
|
|
[AccessedThroughProperty("Label2")]
|
|
private Label _Label2;
|
|
[AccessedThroughProperty("Label3")]
|
|
private Label _Label3;
|
|
[AccessedThroughProperty("TextBoxFiles")]
|
|
private TextBox _TextBoxFiles;
|
|
[AccessedThroughProperty("TextBoxFoldes")]
|
|
private TextBox _TextBoxFoldes;
|
|
[AccessedThroughProperty("TextBoxTotalSize")]
|
|
private TextBox _TextBoxTotalSize;
|
|
[AccessedThroughProperty("TextBoxRestFolders")]
|
|
private TextBox _TextBoxRestFolders;
|
|
[AccessedThroughProperty("Label4")]
|
|
private Label _Label4;
|
|
[AccessedThroughProperty("Timer1")]
|
|
private System.Windows.Forms.Timer _Timer1;
|
|
internal CarotDAVDataObject pDataObject;
|
|
public Thread Thread;
|
|
private bool pTaskbarButtonCreated;
|
|
|
|
public ResouceListingForm()
|
|
{
|
|
this.Load += new EventHandler(this.ResouceListingForm_Load);
|
|
this.Shown += new EventHandler(this.ListingResoucesForm_Shown);
|
|
this.pTaskbarButtonCreated = false;
|
|
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.TextBoxUri = new TextBox();
|
|
this.ButtonCancel = new Button();
|
|
this.Label1 = new Label();
|
|
this.Label2 = new Label();
|
|
this.Label3 = new Label();
|
|
this.TextBoxFiles = new TextBox();
|
|
this.TextBoxFoldes = new TextBox();
|
|
this.TextBoxTotalSize = new TextBox();
|
|
this.TextBoxRestFolders = new TextBox();
|
|
this.Label4 = new Label();
|
|
this.Timer1 = new System.Windows.Forms.Timer(this.components);
|
|
this.SuspendLayout();
|
|
this.TextBoxUri.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
|
TextBox textBoxUri1 = this.TextBoxUri;
|
|
Point point1 = new Point(8, 8);
|
|
Point point2 = point1;
|
|
textBoxUri1.Location = point2;
|
|
this.TextBoxUri.Multiline = true;
|
|
this.TextBoxUri.Name = "TextBoxUri";
|
|
this.TextBoxUri.ReadOnly = true;
|
|
TextBox textBoxUri2 = this.TextBoxUri;
|
|
Size size1 = new Size(240, 19);
|
|
Size size2 = size1;
|
|
textBoxUri2.Size = size2;
|
|
this.TextBoxUri.TabIndex = 1;
|
|
this.ButtonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
|
this.ButtonCancel.DialogResult = DialogResult.Cancel;
|
|
Button buttonCancel1 = this.ButtonCancel;
|
|
point1 = new Point(176, 136);
|
|
Point point3 = point1;
|
|
buttonCancel1.Location = point3;
|
|
this.ButtonCancel.Name = "ButtonCancel";
|
|
Button buttonCancel2 = this.ButtonCancel;
|
|
size1 = new Size(72, 24);
|
|
Size size3 = size1;
|
|
buttonCancel2.Size = size3;
|
|
this.ButtonCancel.TabIndex = 2;
|
|
this.ButtonCancel.Text = "Cancel";
|
|
this.ButtonCancel.UseVisualStyleBackColor = true;
|
|
this.Label1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
|
|
Label label1_1 = this.Label1;
|
|
point1 = new Point(8, 40);
|
|
Point point4 = point1;
|
|
label1_1.Location = point4;
|
|
this.Label1.Name = "Label1";
|
|
Label label1_2 = this.Label1;
|
|
size1 = new Size(80, 16);
|
|
Size size4 = size1;
|
|
label1_2.Size = size4;
|
|
this.Label1.TabIndex = 3;
|
|
this.Label1.Text = "Files:";
|
|
this.Label1.TextAlign = ContentAlignment.MiddleRight;
|
|
this.Label2.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
|
|
Label label2_1 = this.Label2;
|
|
point1 = new Point(8, 64);
|
|
Point point5 = point1;
|
|
label2_1.Location = point5;
|
|
this.Label2.Name = "Label2";
|
|
Label label2_2 = this.Label2;
|
|
size1 = new Size(80, 16);
|
|
Size size5 = size1;
|
|
label2_2.Size = size5;
|
|
this.Label2.TabIndex = 4;
|
|
this.Label2.Text = "Folders:";
|
|
this.Label2.TextAlign = ContentAlignment.MiddleRight;
|
|
this.Label3.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
|
|
Label label3_1 = this.Label3;
|
|
point1 = new Point(8, 88);
|
|
Point point6 = point1;
|
|
label3_1.Location = point6;
|
|
this.Label3.Name = "Label3";
|
|
Label label3_2 = this.Label3;
|
|
size1 = new Size(80, 16);
|
|
Size size6 = size1;
|
|
label3_2.Size = size6;
|
|
this.Label3.TabIndex = 5;
|
|
this.Label3.Text = "Total Size:";
|
|
this.Label3.TextAlign = ContentAlignment.MiddleRight;
|
|
this.TextBoxFiles.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
|
TextBox textBoxFiles1 = this.TextBoxFiles;
|
|
point1 = new Point(88, 40);
|
|
Point point7 = point1;
|
|
textBoxFiles1.Location = point7;
|
|
this.TextBoxFiles.Name = "TextBoxFiles";
|
|
this.TextBoxFiles.ReadOnly = true;
|
|
TextBox textBoxFiles2 = this.TextBoxFiles;
|
|
size1 = new Size(160, 19);
|
|
Size size7 = size1;
|
|
textBoxFiles2.Size = size7;
|
|
this.TextBoxFiles.TabIndex = 6;
|
|
this.TextBoxFoldes.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
|
TextBox textBoxFoldes1 = this.TextBoxFoldes;
|
|
point1 = new Point(88, 64);
|
|
Point point8 = point1;
|
|
textBoxFoldes1.Location = point8;
|
|
this.TextBoxFoldes.Name = "TextBoxFoldes";
|
|
this.TextBoxFoldes.ReadOnly = true;
|
|
TextBox textBoxFoldes2 = this.TextBoxFoldes;
|
|
size1 = new Size(160, 19);
|
|
Size size8 = size1;
|
|
textBoxFoldes2.Size = size8;
|
|
this.TextBoxFoldes.TabIndex = 7;
|
|
this.TextBoxTotalSize.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
|
TextBox textBoxTotalSize1 = this.TextBoxTotalSize;
|
|
point1 = new Point(88, 88);
|
|
Point point9 = point1;
|
|
textBoxTotalSize1.Location = point9;
|
|
this.TextBoxTotalSize.Name = "TextBoxTotalSize";
|
|
this.TextBoxTotalSize.ReadOnly = true;
|
|
TextBox textBoxTotalSize2 = this.TextBoxTotalSize;
|
|
size1 = new Size(160, 19);
|
|
Size size9 = size1;
|
|
textBoxTotalSize2.Size = size9;
|
|
this.TextBoxTotalSize.TabIndex = 8;
|
|
this.TextBoxRestFolders.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
|
TextBox textBoxRestFolders1 = this.TextBoxRestFolders;
|
|
point1 = new Point(88, 112);
|
|
Point point10 = point1;
|
|
textBoxRestFolders1.Location = point10;
|
|
this.TextBoxRestFolders.Name = "TextBoxRestFolders";
|
|
this.TextBoxRestFolders.ReadOnly = true;
|
|
TextBox textBoxRestFolders2 = this.TextBoxRestFolders;
|
|
size1 = new Size(160, 19);
|
|
Size size10 = size1;
|
|
textBoxRestFolders2.Size = size10;
|
|
this.TextBoxRestFolders.TabIndex = 10;
|
|
this.Label4.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
|
|
Label label4_1 = this.Label4;
|
|
point1 = new Point(8, 112);
|
|
Point point11 = point1;
|
|
label4_1.Location = point11;
|
|
this.Label4.Name = "Label4";
|
|
Label label4_2 = this.Label4;
|
|
size1 = new Size(80, 16);
|
|
Size size11 = size1;
|
|
label4_2.Size = size11;
|
|
this.Label4.TabIndex = 9;
|
|
this.Label4.Text = "Rest Folders:";
|
|
this.Label4.TextAlign = ContentAlignment.MiddleRight;
|
|
this.AutoScaleDimensions = new SizeF(6f, 12f);
|
|
this.AutoScaleMode = AutoScaleMode.Font;
|
|
this.CancelButton = (IButtonControl) this.ButtonCancel;
|
|
size1 = new Size(257, 169);
|
|
this.ClientSize = size1;
|
|
this.Controls.Add((Control) this.TextBoxRestFolders);
|
|
this.Controls.Add((Control) this.Label4);
|
|
this.Controls.Add((Control) this.TextBoxTotalSize);
|
|
this.Controls.Add((Control) this.TextBoxFoldes);
|
|
this.Controls.Add((Control) this.TextBoxFiles);
|
|
this.Controls.Add((Control) this.Label3);
|
|
this.Controls.Add((Control) this.Label2);
|
|
this.Controls.Add((Control) this.Label1);
|
|
this.Controls.Add((Control) this.ButtonCancel);
|
|
this.Controls.Add((Control) this.TextBoxUri);
|
|
this.Cursor = Cursors.WaitCursor;
|
|
this.MaximizeBox = false;
|
|
this.MinimizeBox = false;
|
|
size1 = new Size(273, 207);
|
|
this.MinimumSize = size1;
|
|
this.Name = nameof (ResouceListingForm);
|
|
this.StartPosition = FormStartPosition.CenterScreen;
|
|
this.Text = "Listing Resources";
|
|
this.ResumeLayout(false);
|
|
this.PerformLayout();
|
|
}
|
|
|
|
internal virtual TextBox TextBoxUri
|
|
{
|
|
get
|
|
{
|
|
return this._TextBoxUri;
|
|
}
|
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
this._TextBoxUri = value;
|
|
}
|
|
}
|
|
|
|
internal virtual Button ButtonCancel
|
|
{
|
|
get
|
|
{
|
|
return this._ButtonCancel;
|
|
}
|
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
EventHandler eventHandler = new EventHandler(this.ButtonCancel_Click);
|
|
if (this._ButtonCancel != null)
|
|
this._ButtonCancel.Click -= eventHandler;
|
|
this._ButtonCancel = value;
|
|
if (this._ButtonCancel == null)
|
|
return;
|
|
this._ButtonCancel.Click += eventHandler;
|
|
}
|
|
}
|
|
|
|
internal virtual Label Label1
|
|
{
|
|
get
|
|
{
|
|
return this._Label1;
|
|
}
|
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
this._Label1 = value;
|
|
}
|
|
}
|
|
|
|
internal virtual Label Label2
|
|
{
|
|
get
|
|
{
|
|
return this._Label2;
|
|
}
|
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
this._Label2 = value;
|
|
}
|
|
}
|
|
|
|
internal virtual Label Label3
|
|
{
|
|
get
|
|
{
|
|
return this._Label3;
|
|
}
|
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
this._Label3 = value;
|
|
}
|
|
}
|
|
|
|
internal virtual TextBox TextBoxFiles
|
|
{
|
|
get
|
|
{
|
|
return this._TextBoxFiles;
|
|
}
|
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
this._TextBoxFiles = value;
|
|
}
|
|
}
|
|
|
|
internal virtual TextBox TextBoxFoldes
|
|
{
|
|
get
|
|
{
|
|
return this._TextBoxFoldes;
|
|
}
|
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
this._TextBoxFoldes = value;
|
|
}
|
|
}
|
|
|
|
internal virtual TextBox TextBoxTotalSize
|
|
{
|
|
get
|
|
{
|
|
return this._TextBoxTotalSize;
|
|
}
|
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
this._TextBoxTotalSize = value;
|
|
}
|
|
}
|
|
|
|
internal virtual TextBox TextBoxRestFolders
|
|
{
|
|
get
|
|
{
|
|
return this._TextBoxRestFolders;
|
|
}
|
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
this._TextBoxRestFolders = value;
|
|
}
|
|
}
|
|
|
|
internal virtual Label Label4
|
|
{
|
|
get
|
|
{
|
|
return this._Label4;
|
|
}
|
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
this._Label4 = 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;
|
|
}
|
|
}
|
|
|
|
protected override void WndProc(ref Message m)
|
|
{
|
|
if (m.Msg == TaskbarManager.TaskbarButtonCreatedMessage)
|
|
this.pTaskbarButtonCreated = true;
|
|
base.WndProc(ref m);
|
|
}
|
|
|
|
public bool TaskbarButtonCreated
|
|
{
|
|
get
|
|
{
|
|
return this.pTaskbarButtonCreated;
|
|
}
|
|
}
|
|
|
|
private void ListingResoucesForm_Shown(object sender, EventArgs e)
|
|
{
|
|
this.Activate();
|
|
this.Timer1.Interval = 200;
|
|
this.Timer1.Start();
|
|
}
|
|
|
|
private void ButtonCancel_Click(object sender, EventArgs e)
|
|
{
|
|
this.DialogResult = DialogResult.Cancel;
|
|
this.Close();
|
|
}
|
|
|
|
private void EnterWaitState()
|
|
{
|
|
Cursor.Current = Cursors.WaitCursor;
|
|
if (!this.TaskbarButtonCreated)
|
|
return;
|
|
TaskbarManager.SetProgressState((Control) this, TaskbarManager.TaskbarProgressBarStatus.Indeterminate);
|
|
}
|
|
|
|
private void LeaveWaitState()
|
|
{
|
|
if (this.TaskbarButtonCreated)
|
|
TaskbarManager.SetProgressState((Control) this, TaskbarManager.TaskbarProgressBarStatus.NoProgress);
|
|
Cursor.Current = Cursors.Default;
|
|
}
|
|
|
|
private void Timer1_Tick(object sender, EventArgs e)
|
|
{
|
|
object syncobject = this.pDataObject.syncobject;
|
|
ObjectFlowControl.CheckForSyncLockOnValueType(syncobject);
|
|
Monitor.Enter(syncobject);
|
|
try
|
|
{
|
|
this.TextBoxUri.Text = this.pDataObject.targetid.ToString();
|
|
}
|
|
finally
|
|
{
|
|
Monitor.Exit(syncobject);
|
|
}
|
|
this.TextBoxFiles.Text = this.pDataObject.files.ToString("#,0");
|
|
this.TextBoxFoldes.Text = this.pDataObject.folders.ToString("#,0");
|
|
this.TextBoxRestFolders.Text = this.pDataObject.restfolders.ToString("#,0");
|
|
this.TextBoxTotalSize.Text = Interlocked.Read(ref this.pDataObject.sizes).ToString("#,0");
|
|
if (this.Thread.IsAlive)
|
|
return;
|
|
this.DialogResult = DialogResult.OK;
|
|
this.Close();
|
|
}
|
|
|
|
private void ResouceListingForm_Load(object sender, EventArgs e)
|
|
{
|
|
this.Icon = CarotDAV.My.Resources.Resources.CarotDAV;
|
|
}
|
|
}
|
|
}
|