523 lines
17 KiB
C#
523 lines
17 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: Rei.Fs.LinkListForm
|
|
// 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 Rei.Fs.My;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Diagnostics;
|
|
using System.Drawing;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Rei.Fs
|
|
{
|
|
[DesignerGenerated]
|
|
public class LinkListForm : Form
|
|
{
|
|
private IContainer components;
|
|
[AccessedThroughProperty("ButtonClose")]
|
|
private Button _ButtonClose;
|
|
[AccessedThroughProperty("ListView1")]
|
|
private ListView _ListView1;
|
|
[AccessedThroughProperty("ColumnHeader1")]
|
|
private ColumnHeader _ColumnHeader1;
|
|
[AccessedThroughProperty("ColumnHeader2")]
|
|
private ColumnHeader _ColumnHeader2;
|
|
[AccessedThroughProperty("ColumnHeader3")]
|
|
private ColumnHeader _ColumnHeader3;
|
|
[AccessedThroughProperty("ButtonCopy")]
|
|
private Button _ButtonCopy;
|
|
[AccessedThroughProperty("ContextMenuStrip1")]
|
|
private ContextMenuStrip _ContextMenuStrip1;
|
|
[AccessedThroughProperty("SelectAllToolStripMenuItem")]
|
|
private ToolStripMenuItem _SelectAllToolStripMenuItem;
|
|
[AccessedThroughProperty("CopyToolStripMenuItem")]
|
|
private ToolStripMenuItem _CopyToolStripMenuItem;
|
|
[AccessedThroughProperty("CopyAllToolStripMenuItem")]
|
|
private ToolStripMenuItem _CopyAllToolStripMenuItem;
|
|
[AccessedThroughProperty("ToolStripSeparator1")]
|
|
private ToolStripSeparator _ToolStripSeparator1;
|
|
private const int MinColWidth = 32;
|
|
public string[] Data;
|
|
private bool columchangingflag;
|
|
|
|
public LinkListForm()
|
|
{
|
|
this.Load += new EventHandler(this.SharedLinkForm_Load);
|
|
this.columchangingflag = 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.ButtonClose = new Button();
|
|
this.ListView1 = new ListView();
|
|
this.ColumnHeader1 = new ColumnHeader();
|
|
this.ColumnHeader2 = new ColumnHeader();
|
|
this.ColumnHeader3 = new ColumnHeader();
|
|
this.ContextMenuStrip1 = new ContextMenuStrip(this.components);
|
|
this.CopyToolStripMenuItem = new ToolStripMenuItem();
|
|
this.CopyAllToolStripMenuItem = new ToolStripMenuItem();
|
|
this.ToolStripSeparator1 = new ToolStripSeparator();
|
|
this.SelectAllToolStripMenuItem = new ToolStripMenuItem();
|
|
this.ButtonCopy = new Button();
|
|
this.ContextMenuStrip1.SuspendLayout();
|
|
this.SuspendLayout();
|
|
this.ButtonClose.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
|
Button buttonClose1 = this.ButtonClose;
|
|
Point point1 = new Point(152, 152);
|
|
Point point2 = point1;
|
|
buttonClose1.Location = point2;
|
|
this.ButtonClose.Name = "ButtonClose";
|
|
Button buttonClose2 = this.ButtonClose;
|
|
Size size1 = new Size(72, 24);
|
|
Size size2 = size1;
|
|
buttonClose2.Size = size2;
|
|
this.ButtonClose.TabIndex = 2;
|
|
this.ButtonClose.Text = "Close";
|
|
this.ButtonClose.UseVisualStyleBackColor = true;
|
|
this.ListView1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
|
this.ListView1.Columns.AddRange(new ColumnHeader[3]
|
|
{
|
|
this.ColumnHeader1,
|
|
this.ColumnHeader2,
|
|
this.ColumnHeader3
|
|
});
|
|
this.ListView1.ContextMenuStrip = this.ContextMenuStrip1;
|
|
this.ListView1.FullRowSelect = true;
|
|
this.ListView1.GridLines = true;
|
|
this.ListView1.HideSelection = false;
|
|
ListView listView1_1 = this.ListView1;
|
|
point1 = new Point(8, 8);
|
|
Point point3 = point1;
|
|
listView1_1.Location = point3;
|
|
this.ListView1.Name = "ListView1";
|
|
ListView listView1_2 = this.ListView1;
|
|
size1 = new Size(216, 136);
|
|
Size size3 = size1;
|
|
listView1_2.Size = size3;
|
|
this.ListView1.TabIndex = 0;
|
|
this.ListView1.UseCompatibleStateImageBehavior = false;
|
|
this.ListView1.View = View.Details;
|
|
this.ColumnHeader1.Text = "Path";
|
|
this.ColumnHeader2.Text = "State";
|
|
this.ColumnHeader3.Text = "SharedLink";
|
|
this.ContextMenuStrip1.Items.AddRange(new ToolStripItem[4]
|
|
{
|
|
(ToolStripItem) this.CopyToolStripMenuItem,
|
|
(ToolStripItem) this.CopyAllToolStripMenuItem,
|
|
(ToolStripItem) this.ToolStripSeparator1,
|
|
(ToolStripItem) this.SelectAllToolStripMenuItem
|
|
});
|
|
this.ContextMenuStrip1.Name = "ContextMenuStrip1";
|
|
ContextMenuStrip contextMenuStrip1 = this.ContextMenuStrip1;
|
|
size1 = new Size(167, 76);
|
|
Size size4 = size1;
|
|
contextMenuStrip1.Size = size4;
|
|
this.CopyToolStripMenuItem.Name = "CopyToolStripMenuItem";
|
|
this.CopyToolStripMenuItem.ShortcutKeys = Keys.C | Keys.Control;
|
|
ToolStripMenuItem toolStripMenuItem1 = this.CopyToolStripMenuItem;
|
|
size1 = new Size(166, 22);
|
|
Size size5 = size1;
|
|
toolStripMenuItem1.Size = size5;
|
|
this.CopyToolStripMenuItem.Text = "Copy Link";
|
|
this.CopyAllToolStripMenuItem.Name = "CopyAllToolStripMenuItem";
|
|
ToolStripMenuItem toolStripMenuItem2 = this.CopyAllToolStripMenuItem;
|
|
size1 = new Size(166, 22);
|
|
Size size6 = size1;
|
|
toolStripMenuItem2.Size = size6;
|
|
this.CopyAllToolStripMenuItem.Text = "Copy All";
|
|
this.ToolStripSeparator1.Name = "ToolStripSeparator1";
|
|
ToolStripSeparator toolStripSeparator1 = this.ToolStripSeparator1;
|
|
size1 = new Size(163, 6);
|
|
Size size7 = size1;
|
|
toolStripSeparator1.Size = size7;
|
|
this.SelectAllToolStripMenuItem.Name = "SelectAllToolStripMenuItem";
|
|
this.SelectAllToolStripMenuItem.ShortcutKeys = Keys.A | Keys.Control;
|
|
ToolStripMenuItem toolStripMenuItem3 = this.SelectAllToolStripMenuItem;
|
|
size1 = new Size(166, 22);
|
|
Size size8 = size1;
|
|
toolStripMenuItem3.Size = size8;
|
|
this.SelectAllToolStripMenuItem.Text = "Select All";
|
|
this.ButtonCopy.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
|
Button buttonCopy1 = this.ButtonCopy;
|
|
point1 = new Point(72, 152);
|
|
Point point4 = point1;
|
|
buttonCopy1.Location = point4;
|
|
this.ButtonCopy.Name = "ButtonCopy";
|
|
Button buttonCopy2 = this.ButtonCopy;
|
|
size1 = new Size(72, 24);
|
|
Size size9 = size1;
|
|
buttonCopy2.Size = size9;
|
|
this.ButtonCopy.TabIndex = 1;
|
|
this.ButtonCopy.Text = "Copy";
|
|
this.ButtonCopy.UseVisualStyleBackColor = true;
|
|
this.AcceptButton = (IButtonControl) this.ButtonClose;
|
|
this.AutoScaleDimensions = new SizeF(6f, 12f);
|
|
this.AutoScaleMode = AutoScaleMode.Font;
|
|
size1 = new Size(233, 185);
|
|
this.ClientSize = size1;
|
|
this.Controls.Add((Control) this.ListView1);
|
|
this.Controls.Add((Control) this.ButtonCopy);
|
|
this.Controls.Add((Control) this.ButtonClose);
|
|
size1 = new Size(249, 223);
|
|
this.MinimumSize = size1;
|
|
this.Name = "SharedLinkForm";
|
|
this.Text = "SharedLink Form";
|
|
this.ContextMenuStrip1.ResumeLayout(false);
|
|
this.ResumeLayout(false);
|
|
}
|
|
|
|
internal virtual Button ButtonClose
|
|
{
|
|
get
|
|
{
|
|
return this._ButtonClose;
|
|
}
|
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
EventHandler eventHandler = new EventHandler(this.ButtonClose_Click);
|
|
if (this._ButtonClose != null)
|
|
this._ButtonClose.Click -= eventHandler;
|
|
this._ButtonClose = value;
|
|
if (this._ButtonClose == null)
|
|
return;
|
|
this._ButtonClose.Click += eventHandler;
|
|
}
|
|
}
|
|
|
|
internal virtual ListView ListView1
|
|
{
|
|
get
|
|
{
|
|
return this._ListView1;
|
|
}
|
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
EventHandler eventHandler1 = new EventHandler(this.ListView1_ClientSizeChanged);
|
|
EventHandler eventHandler2 = new EventHandler(this.ListView1_SelectedIndexChanged);
|
|
ColumnWidthChangedEventHandler changedEventHandler = new ColumnWidthChangedEventHandler(this.ListView1_ColumnWidthChanged);
|
|
if (this._ListView1 != null)
|
|
{
|
|
this._ListView1.ClientSizeChanged -= eventHandler1;
|
|
this._ListView1.SelectedIndexChanged -= eventHandler2;
|
|
this._ListView1.ColumnWidthChanged -= changedEventHandler;
|
|
}
|
|
this._ListView1 = value;
|
|
if (this._ListView1 == null)
|
|
return;
|
|
this._ListView1.ClientSizeChanged += eventHandler1;
|
|
this._ListView1.SelectedIndexChanged += eventHandler2;
|
|
this._ListView1.ColumnWidthChanged += changedEventHandler;
|
|
}
|
|
}
|
|
|
|
internal virtual ColumnHeader ColumnHeader1
|
|
{
|
|
get
|
|
{
|
|
return this._ColumnHeader1;
|
|
}
|
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
this._ColumnHeader1 = value;
|
|
}
|
|
}
|
|
|
|
internal virtual ColumnHeader ColumnHeader2
|
|
{
|
|
get
|
|
{
|
|
return this._ColumnHeader2;
|
|
}
|
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
this._ColumnHeader2 = value;
|
|
}
|
|
}
|
|
|
|
internal virtual ColumnHeader ColumnHeader3
|
|
{
|
|
get
|
|
{
|
|
return this._ColumnHeader3;
|
|
}
|
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
this._ColumnHeader3 = value;
|
|
}
|
|
}
|
|
|
|
internal virtual Button ButtonCopy
|
|
{
|
|
get
|
|
{
|
|
return this._ButtonCopy;
|
|
}
|
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
EventHandler eventHandler = new EventHandler(this.ButtonCopy_Click);
|
|
if (this._ButtonCopy != null)
|
|
this._ButtonCopy.Click -= eventHandler;
|
|
this._ButtonCopy = value;
|
|
if (this._ButtonCopy == null)
|
|
return;
|
|
this._ButtonCopy.Click += eventHandler;
|
|
}
|
|
}
|
|
|
|
internal virtual ContextMenuStrip ContextMenuStrip1
|
|
{
|
|
get
|
|
{
|
|
return this._ContextMenuStrip1;
|
|
}
|
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
this._ContextMenuStrip1 = value;
|
|
}
|
|
}
|
|
|
|
internal virtual ToolStripMenuItem SelectAllToolStripMenuItem
|
|
{
|
|
get
|
|
{
|
|
return this._SelectAllToolStripMenuItem;
|
|
}
|
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
EventHandler eventHandler = new EventHandler(this.SelectAllToolStripMenuItem_Click);
|
|
if (this._SelectAllToolStripMenuItem != null)
|
|
this._SelectAllToolStripMenuItem.Click -= eventHandler;
|
|
this._SelectAllToolStripMenuItem = value;
|
|
if (this._SelectAllToolStripMenuItem == null)
|
|
return;
|
|
this._SelectAllToolStripMenuItem.Click += eventHandler;
|
|
}
|
|
}
|
|
|
|
internal virtual ToolStripMenuItem CopyToolStripMenuItem
|
|
{
|
|
get
|
|
{
|
|
return this._CopyToolStripMenuItem;
|
|
}
|
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
EventHandler eventHandler = new EventHandler(this.ButtonCopy_Click);
|
|
if (this._CopyToolStripMenuItem != null)
|
|
this._CopyToolStripMenuItem.Click -= eventHandler;
|
|
this._CopyToolStripMenuItem = value;
|
|
if (this._CopyToolStripMenuItem == null)
|
|
return;
|
|
this._CopyToolStripMenuItem.Click += eventHandler;
|
|
}
|
|
}
|
|
|
|
internal virtual ToolStripMenuItem CopyAllToolStripMenuItem
|
|
{
|
|
get
|
|
{
|
|
return this._CopyAllToolStripMenuItem;
|
|
}
|
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
EventHandler eventHandler = new EventHandler(this.CopyAllToolStripMenuItem_Click);
|
|
if (this._CopyAllToolStripMenuItem != null)
|
|
this._CopyAllToolStripMenuItem.Click -= eventHandler;
|
|
this._CopyAllToolStripMenuItem = value;
|
|
if (this._CopyAllToolStripMenuItem == null)
|
|
return;
|
|
this._CopyAllToolStripMenuItem.Click += eventHandler;
|
|
}
|
|
}
|
|
|
|
internal virtual ToolStripSeparator ToolStripSeparator1
|
|
{
|
|
get
|
|
{
|
|
return this._ToolStripSeparator1;
|
|
}
|
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
this._ToolStripSeparator1 = value;
|
|
}
|
|
}
|
|
|
|
private void SharedLinkForm_Load(object sender, EventArgs e)
|
|
{
|
|
this.ListView1.BeginUpdate();
|
|
int num1 = 0;
|
|
int num2 = checked (this.Data.Length - 1);
|
|
int index = num1;
|
|
while (index <= num2)
|
|
{
|
|
ListViewItem listViewItem = new ListViewItem(this.Data[index].Split(new string[1]
|
|
{
|
|
"\t"
|
|
}, 3, StringSplitOptions.None));
|
|
if (Operators.CompareString(listViewItem.SubItems[1].Text, "error", false) == 0)
|
|
listViewItem.SubItems[1].ForeColor = Color.Red;
|
|
listViewItem.Selected = true;
|
|
this.ListView1.Items.Add(listViewItem);
|
|
checked { ++index; }
|
|
}
|
|
this.ListView1.EndUpdate();
|
|
}
|
|
|
|
private void ButtonClose_Click(object sender, EventArgs e)
|
|
{
|
|
this.Close();
|
|
this.Dispose();
|
|
}
|
|
|
|
private void ButtonCopy_Click(object sender, EventArgs e)
|
|
{
|
|
List<string> stringList = new List<string>();
|
|
int num1 = 0;
|
|
int num2 = checked (this.ListView1.Items.Count - 1);
|
|
int index = num1;
|
|
while (index <= num2)
|
|
{
|
|
if (this.ListView1.Items[index].Selected)
|
|
stringList.Add(this.ListView1.Items[index].SubItems[2].Text);
|
|
checked { ++index; }
|
|
}
|
|
string text = string.Join("\r\n", stringList.ToArray());
|
|
if (string.IsNullOrEmpty(text))
|
|
return;
|
|
MyProject.Computer.Clipboard.SetText(text, TextDataFormat.Text);
|
|
}
|
|
|
|
private void CopyAllToolStripMenuItem_Click(object sender, EventArgs e)
|
|
{
|
|
List<string> stringList = new List<string>();
|
|
int num1 = 0;
|
|
int num2 = checked (this.ListView1.Items.Count - 1);
|
|
int index = num1;
|
|
while (index <= num2)
|
|
{
|
|
if (this.ListView1.Items[index].Selected)
|
|
stringList.Add(this.Data[index]);
|
|
checked { ++index; }
|
|
}
|
|
string text = string.Join("\r\n", stringList.ToArray());
|
|
if (string.IsNullOrEmpty(text))
|
|
return;
|
|
MyProject.Computer.Clipboard.SetText(text, TextDataFormat.Text);
|
|
}
|
|
|
|
private void SelectAllToolStripMenuItem_Click(object sender, EventArgs e)
|
|
{
|
|
this.ListView1.BeginUpdate();
|
|
int num1 = 0;
|
|
int num2 = checked (this.ListView1.Items.Count - 1);
|
|
int index = num1;
|
|
while (index <= num2)
|
|
{
|
|
this.ListView1.Items[index].Selected = true;
|
|
checked { ++index; }
|
|
}
|
|
this.ListView1.EndUpdate();
|
|
}
|
|
|
|
private void ListView1_ClientSizeChanged(object sender, EventArgs e)
|
|
{
|
|
if (this.columchangingflag)
|
|
return;
|
|
this.columchangingflag = true;
|
|
int num1 = this.ListView1.Columns[0].Width;
|
|
if (num1 < 32)
|
|
num1 = 32;
|
|
int num2 = this.ListView1.Columns[1].Width;
|
|
if (num2 < 32)
|
|
num2 = 32;
|
|
int num3 = checked (this.ListView1.ClientSize.Width - num1 - num2);
|
|
if (num3 < 32)
|
|
{
|
|
num3 = 32;
|
|
Size clientSize = this.ListView1.ClientSize;
|
|
num2 = checked (clientSize.Width - num1 - num3);
|
|
if (num2 < 32)
|
|
{
|
|
num2 = 32;
|
|
clientSize = this.ListView1.ClientSize;
|
|
num1 = checked (clientSize.Width - num2 - num3);
|
|
if (num1 < 32)
|
|
num1 = 32;
|
|
}
|
|
}
|
|
this.ListView1.BeginUpdate();
|
|
this.ListView1.Columns[0].Width = num1;
|
|
this.ListView1.Columns[1].Width = num2;
|
|
this.ListView1.Columns[2].Width = num3;
|
|
this.ListView1.EndUpdate();
|
|
this.columchangingflag = false;
|
|
}
|
|
|
|
private void ListView1_ColumnWidthChanged(object sender, ColumnWidthChangedEventArgs e)
|
|
{
|
|
if (this.columchangingflag)
|
|
return;
|
|
this.columchangingflag = true;
|
|
int num1 = this.ListView1.Columns[0].Width;
|
|
if (num1 < 32)
|
|
num1 = 32;
|
|
int num2 = this.ListView1.Columns[1].Width;
|
|
if (num2 < 32)
|
|
num2 = 32;
|
|
int num3 = checked (this.ListView1.ClientSize.Width - num1 - num2);
|
|
if (num3 < 32)
|
|
{
|
|
num3 = 32;
|
|
Size clientSize = this.ListView1.ClientSize;
|
|
num2 = checked (clientSize.Width - num1 - num3);
|
|
if (num2 < 32)
|
|
{
|
|
num2 = 32;
|
|
clientSize = this.ListView1.ClientSize;
|
|
num1 = checked (clientSize.Width - num2 - num3);
|
|
if (num1 < 32)
|
|
num1 = 32;
|
|
}
|
|
}
|
|
this.ListView1.BeginUpdate();
|
|
this.ListView1.Columns[0].Width = num1;
|
|
this.ListView1.Columns[1].Width = num2;
|
|
this.ListView1.Columns[2].Width = num3;
|
|
this.ListView1.EndUpdate();
|
|
this.columchangingflag = false;
|
|
}
|
|
|
|
private void ListView1_SelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
if (this.ListView1.SelectedItems.Count == 0)
|
|
this.ButtonCopy.Enabled = false;
|
|
else
|
|
this.ButtonCopy.Enabled = true;
|
|
}
|
|
}
|
|
}
|