📄 frmselection.cs
字号:
namespace Listener
{
// Library includes
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Windows.Forms.Design;
using System.Text;
using System.IO;
/// Share Files/Folders form class.
public class frmSelection : System.Windows.Forms.Form
{
private System.ComponentModel.IContainer components;
private System.Windows.Forms.Label lbCopyright;
private System.Windows.Forms.Button btnBrowseFileFolder;
private System.Windows.Forms.ToolTip toolTipText;
private System.Windows.Forms.CheckBox chkEntry;
private System.Windows.Forms.RadioButton rbWrite;
private System.Windows.Forms.RadioButton rbRead;
private System.Windows.Forms.GroupBox grpRights;
private System.Windows.Forms.OpenFileDialog FileOpenDialog;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtFoldername;
private System.Windows.Forms.Button btnBrowse;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtFilename;
private System.Windows.Forms.TabPage tpFolder;
private System.Windows.Forms.TabPage tpShare;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.TabControl tabShare;
public frmSelection() { InitializeComponent(); }
// Free resources it was using.
public override void Dispose()
{
base.Dispose();
components.Dispose();
}
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.grpRights = new System.Windows.Forms.GroupBox();
this.rbWrite = new System.Windows.Forms.RadioButton();
this.rbRead = new System.Windows.Forms.RadioButton();
this.chkEntry = new System.Windows.Forms.CheckBox();
this.toolTipText = new System.Windows.Forms.ToolTip(this.components);
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.tpShare = new System.Windows.Forms.TabPage();
this.btnBrowse = new System.Windows.Forms.Button();
this.txtFilename = new System.Windows.Forms.TextBox();
this.tabShare = new System.Windows.Forms.TabControl();
this.tpFolder = new System.Windows.Forms.TabPage();
this.btnBrowseFileFolder = new System.Windows.Forms.Button();
this.txtFoldername = new System.Windows.Forms.TextBox();
this.btnOK = new System.Windows.Forms.Button();
this.FileOpenDialog = new System.Windows.Forms.OpenFileDialog();
this.lbCopyright = new System.Windows.Forms.Label();
this.btnCancel = new System.Windows.Forms.Button();
this.grpRights.SuspendLayout();
this.tpShare.SuspendLayout();
this.tabShare.SuspendLayout();
this.tpFolder.SuspendLayout();
this.SuspendLayout();
//
// grpRights
//
this.grpRights.Controls.AddRange(new System.Windows.Forms.Control[] {
this.rbWrite,
this.rbRead});
this.grpRights.Location = new System.Drawing.Point(16, 128);
this.grpRights.Name = "grpRights";
this.grpRights.Size = new System.Drawing.Size(124, 56);
this.grpRights.TabIndex = 3;
this.grpRights.TabStop = false;
this.grpRights.Text = "Rights";
//
// rbWrite
//
this.rbWrite.Location = new System.Drawing.Point(6, 36);
this.rbWrite.Name = "rbWrite";
this.rbWrite.Size = new System.Drawing.Size(96, 14);
this.rbWrite.TabIndex = 3;
this.rbWrite.Text = "Read/Write";
this.toolTipText.SetToolTip(this.rbWrite, "Allows the user to upload to this file or folder");
//
// rbRead
//
this.rbRead.Checked = true;
this.rbRead.Location = new System.Drawing.Point(6, 16);
this.rbRead.Name = "rbRead";
this.rbRead.Size = new System.Drawing.Size(95, 14);
this.rbRead.TabIndex = 2;
this.rbRead.TabStop = true;
this.rbRead.Text = "Read only";
this.toolTipText.SetToolTip(this.rbRead, "Allows the user to read");
//
// chkEntry
//
this.chkEntry.Location = new System.Drawing.Point(296, 128);
this.chkEntry.Name = "chkEntry";
this.chkEntry.Size = new System.Drawing.Size(120, 16);
this.chkEntry.TabIndex = 4;
this.chkEntry.Text = "Add this entry only";
this.toolTipText.SetToolTip(this.chkEntry, "Quits after adding the entry, if checked");
//
// label1
//
this.label1.Location = new System.Drawing.Point(8, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(248, 14);
this.label1.TabIndex = 2;
this.label1.Text = "Type a filename here or click browse to select:";
//
// label2
//
this.label2.Location = new System.Drawing.Point(8, 8);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(232, 14);
this.label2.TabIndex = 1;
this.label2.Text = "Type a folder name here:";
//
// tpShare
//
this.tpShare.Controls.AddRange(new System.Windows.Forms.Control[] {
this.btnBrowse,
this.label1,
this.txtFilename});
this.tpShare.Location = new System.Drawing.Point(4, 25);
this.tpShare.Name = "tpShare";
this.tpShare.Size = new System.Drawing.Size(388, 89);
this.tpShare.TabIndex = 0;
this.tpShare.Text = "Share File";
//
// btnBrowse
//
this.btnBrowse.Location = new System.Drawing.Point(296, 56);
this.btnBrowse.Name = "btnBrowse";
this.btnBrowse.Size = new System.Drawing.Size(80, 24);
this.btnBrowse.TabIndex = 1;
this.btnBrowse.Text = "&Browse";
this.btnBrowse.Click += new System.EventHandler(this.btnBrowseFile_Click);
//
// txtFilename
//
this.txtFilename.Location = new System.Drawing.Point(13, 26);
this.txtFilename.Name = "txtFilename";
this.txtFilename.Size = new System.Drawing.Size(363, 20);
this.txtFilename.TabIndex = 0;
this.txtFilename.Text = "";
//
// tabShare
//
this.tabShare.Appearance = System.Windows.Forms.TabAppearance.FlatButtons;
this.tabShare.Controls.AddRange(new System.Windows.Forms.Control[] {
this.tpShare,
this.tpFolder});
this.tabShare.Location = new System.Drawing.Point(16, 8);
this.tabShare.Name = "tabShare";
this.tabShare.SelectedIndex = 0;
this.tabShare.Size = new System.Drawing.Size(396, 118);
this.tabShare.TabIndex = 2;
//
// tpFolder
//
this.tpFolder.Controls.AddRange(new System.Windows.Forms.Control[] {
this.btnBrowseFileFolder,
this.label2,
this.txtFoldername});
this.tpFolder.Location = new System.Drawing.Point(4, 25);
this.tpFolder.Name = "tpFolder";
this.tpFolder.Size = new System.Drawing.Size(388, 89);
this.tpFolder.TabIndex = 1;
this.tpFolder.Text = "Share Folder";
//
// btnBrowseFileFolder
//
this.btnBrowseFileFolder.Location = new System.Drawing.Point(296, 56);
this.btnBrowseFileFolder.Name = "btnBrowseFileFolder";
this.btnBrowseFileFolder.Size = new System.Drawing.Size(80, 24);
this.btnBrowseFileFolder.TabIndex = 2;
this.btnBrowseFileFolder.Text = "Browse";
this.btnBrowseFileFolder.Click += new System.EventHandler(this.btnBrowseFolder_Click);
//
// txtFoldername
//
this.txtFoldername.Location = new System.Drawing.Point(13, 26);
this.txtFoldername.Name = "txtFoldername";
this.txtFoldername.Size = new System.Drawing.Size(363, 20);
this.txtFoldername.TabIndex = 0;
this.txtFoldername.Text = "";
//
// btnOK
//
this.btnOK.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(192)), ((System.Byte)(0)));
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold);
this.btnOK.ForeColor = System.Drawing.Color.LemonChiffon;
this.btnOK.Location = new System.Drawing.Point(240, 168);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(85, 25);
this.btnOK.TabIndex = 0;
this.btnOK.Text = "&Share it";
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// lbCopyright
//
this.lbCopyright.Location = new System.Drawing.Point(208, 8);
this.lbCopyright.Name = "lbCopyright";
this.lbCopyright.Size = new System.Drawing.Size(200, 12);
this.lbCopyright.TabIndex = 5;
this.lbCopyright.Text = "
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -