mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 18:57:28 -07:00
moved all sources to trunk directory
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@693 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
commit
a22b7578bd
392 changed files with 61489 additions and 0 deletions
153
GreenshotConfluencePlugin/Forms/ConfluenceForm.Designer.cs
generated
Normal file
153
GreenshotConfluencePlugin/Forms/ConfluenceForm.Designer.cs
generated
Normal file
|
@ -0,0 +1,153 @@
|
|||
/*
|
||||
* Greenshot - a free and open source screenshot tool
|
||||
* Copyright (C) 2007-2010 Thomas Braun, Jens Klingen, Robin Krom
|
||||
*
|
||||
* For more information see: http://getgreenshot.org/
|
||||
* The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
namespace GreenshotConfluencePlugin {
|
||||
partial class ConfluenceForm {
|
||||
/// <summary>
|
||||
/// Designer variable used to keep track of non-visual components.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Disposes resources used by the form.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing) {
|
||||
if (components != null) {
|
||||
components.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is required for Windows Forms designer support.
|
||||
/// Do not change the method contents inside the source code editor. The Forms designer might
|
||||
/// not be able to load this method if it was changed manually.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.textBox_space = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.textBox_page = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.textBox_filename = new System.Windows.Forms.TextBox();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// textBox_space
|
||||
//
|
||||
this.textBox_space.Location = new System.Drawing.Point(180, 30);
|
||||
this.textBox_space.Name = "textBox_space";
|
||||
this.textBox_space.Size = new System.Drawing.Size(100, 20);
|
||||
this.textBox_space.TabIndex = 0;
|
||||
this.textBox_space.Text = "dev";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Location = new System.Drawing.Point(12, 30);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(162, 23);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "Space key";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Location = new System.Drawing.Point(12, 53);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(162, 23);
|
||||
this.label2.TabIndex = 3;
|
||||
this.label2.Text = "Page title";
|
||||
//
|
||||
// textBox_page
|
||||
//
|
||||
this.textBox_page.Location = new System.Drawing.Point(180, 53);
|
||||
this.textBox_page.Name = "textBox_page";
|
||||
this.textBox_page.Size = new System.Drawing.Size(100, 20);
|
||||
this.textBox_page.TabIndex = 2;
|
||||
this.textBox_page.Text = "15 Developer JF";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Location = new System.Drawing.Point(12, 76);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(162, 23);
|
||||
this.label3.TabIndex = 5;
|
||||
this.label3.Text = "Filename";
|
||||
//
|
||||
// textBox_filename
|
||||
//
|
||||
this.textBox_filename.Location = new System.Drawing.Point(180, 76);
|
||||
this.textBox_filename.Name = "textBox_filename";
|
||||
this.textBox_filename.Size = new System.Drawing.Size(100, 20);
|
||||
this.textBox_filename.TabIndex = 4;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(44, 125);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(75, 23);
|
||||
this.button1.TabIndex = 6;
|
||||
this.button1.Text = "OK";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.ButtonOKClick);
|
||||
//
|
||||
// button2
|
||||
//
|
||||
this.button2.Location = new System.Drawing.Point(180, 125);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(75, 23);
|
||||
this.button2.TabIndex = 7;
|
||||
this.button2.Text = "Cancel";
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
this.button2.Click += new System.EventHandler(this.ButtonCancelClick);
|
||||
//
|
||||
// ConfluenceForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(292, 175);
|
||||
this.Controls.Add(this.button2);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.textBox_filename);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.textBox_page);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.textBox_space);
|
||||
this.Name = "ConfluenceForm";
|
||||
this.Text = "ConfluenceForm";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
}
|
||||
private System.Windows.Forms.TextBox textBox_space;
|
||||
private System.Windows.Forms.TextBox textBox_page;
|
||||
private System.Windows.Forms.Button button2;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.TextBox textBox_filename;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
}
|
||||
}
|
59
GreenshotConfluencePlugin/Forms/ConfluenceForm.cs
Normal file
59
GreenshotConfluencePlugin/Forms/ConfluenceForm.cs
Normal file
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Greenshot - a free and open source screenshot tool
|
||||
* Copyright (C) 2007-2010 Thomas Braun, Jens Klingen, Robin Krom
|
||||
*
|
||||
* For more information see: http://getgreenshot.org/
|
||||
* The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using Confluence;
|
||||
|
||||
namespace GreenshotConfluencePlugin {
|
||||
/// <summary>
|
||||
/// Description of ConfluenceForm.
|
||||
/// </summary>
|
||||
public partial class ConfluenceForm : Form {
|
||||
private ConfluenceConnector confluence;
|
||||
public ConfluenceForm(ConfluenceConnector confluence) {
|
||||
//
|
||||
// The InitializeComponent() call is required for Windows Forms designer support.
|
||||
//
|
||||
InitializeComponent();
|
||||
|
||||
this.confluence = confluence;
|
||||
}
|
||||
|
||||
public void setFilename(string filename) {
|
||||
textBox_filename.Text = filename;
|
||||
}
|
||||
|
||||
public void upload(byte [] buffer) {
|
||||
Page page = confluence.getPage(textBox_space.Text, textBox_page.Text);
|
||||
confluence.addAttachment(page.id, " image/png", "HALLO", textBox_filename.Text, buffer);
|
||||
}
|
||||
|
||||
void ButtonCancelClick(object sender, EventArgs e) {
|
||||
this.DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
|
||||
void ButtonOKClick(object sender, EventArgs e) {
|
||||
this.DialogResult = DialogResult.OK;
|
||||
}
|
||||
}
|
||||
}
|
89
GreenshotConfluencePlugin/Forms/ListViewColumnSorter.cs
Normal file
89
GreenshotConfluencePlugin/Forms/ListViewColumnSorter.cs
Normal file
|
@ -0,0 +1,89 @@
|
|||
using System.Collections;
|
||||
using System.Windows.Forms;
|
||||
|
||||
/// <summary>
|
||||
/// This class is an implementation of the 'IComparer' interface.
|
||||
/// </summary>
|
||||
public class ListViewColumnSorter : IComparer {
|
||||
/// <summary>
|
||||
/// Specifies the column to be sorted
|
||||
/// </summary>
|
||||
private int ColumnToSort;
|
||||
/// <summary>
|
||||
/// Specifies the order in which to sort (i.e. 'Ascending').
|
||||
/// </summary>
|
||||
private SortOrder OrderOfSort;
|
||||
/// <summary>
|
||||
/// Case insensitive comparer object
|
||||
/// </summary>
|
||||
private CaseInsensitiveComparer ObjectCompare;
|
||||
|
||||
/// <summary>
|
||||
/// Class constructor. Initializes various elements
|
||||
/// </summary>
|
||||
public ListViewColumnSorter() {
|
||||
// Initialize the column to '0'
|
||||
ColumnToSort = 0;
|
||||
|
||||
// Initialize the sort order to 'none'
|
||||
OrderOfSort = SortOrder.None;
|
||||
|
||||
// Initialize the CaseInsensitiveComparer object
|
||||
ObjectCompare = new CaseInsensitiveComparer();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is inherited from the IComparer interface. It compares the two objects passed using a case insensitive comparison.
|
||||
/// </summary>
|
||||
/// <param name="x">First object to be compared</param>
|
||||
/// <param name="y">Second object to be compared</param>
|
||||
/// <returns>The result of the comparison. "0" if equal, negative if 'x' is less than 'y' and positive if 'x' is greater than 'y'</returns>
|
||||
public int Compare(object x, object y) {
|
||||
int compareResult;
|
||||
ListViewItem listviewX, listviewY;
|
||||
|
||||
// Cast the objects to be compared to ListViewItem objects
|
||||
listviewX = (ListViewItem)x;
|
||||
listviewY = (ListViewItem)y;
|
||||
|
||||
// Compare the two items
|
||||
compareResult = ObjectCompare.Compare(listviewX.SubItems[ColumnToSort].Text, listviewY.SubItems[ColumnToSort].Text);
|
||||
|
||||
// Calculate correct return value based on object comparison
|
||||
if (OrderOfSort == SortOrder.Ascending) {
|
||||
// Ascending sort is selected, return normal result of compare operation
|
||||
return compareResult;
|
||||
} else if (OrderOfSort == SortOrder.Descending) {
|
||||
// Descending sort is selected, return negative result of compare operation
|
||||
return (-compareResult);
|
||||
} else {
|
||||
// Return '0' to indicate they are equal
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of the column to which to apply the sorting operation (Defaults to '0').
|
||||
/// </summary>
|
||||
public int SortColumn {
|
||||
set {
|
||||
ColumnToSort = value;
|
||||
}
|
||||
get {
|
||||
return ColumnToSort;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the order of sorting to apply (for example, 'Ascending' or 'Descending').
|
||||
/// </summary>
|
||||
public SortOrder Order {
|
||||
set {
|
||||
OrderOfSort = value;
|
||||
}
|
||||
get {
|
||||
return OrderOfSort;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
154
GreenshotConfluencePlugin/Forms/LoginForm.Designer.cs
generated
Normal file
154
GreenshotConfluencePlugin/Forms/LoginForm.Designer.cs
generated
Normal file
|
@ -0,0 +1,154 @@
|
|||
/*
|
||||
* Greenshot - a free and open source screenshot tool
|
||||
* Copyright (C) 2007-2010 Thomas Braun, Jens Klingen, Robin Krom
|
||||
*
|
||||
* For more information see: http://getgreenshot.org/
|
||||
* The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
namespace GreenshotConfluencePlugin {
|
||||
partial class LoginForm {
|
||||
/// <summary>
|
||||
/// Designer variable used to keep track of non-visual components.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Disposes resources used by the form.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing) {
|
||||
if (components != null) {
|
||||
components.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is required for Windows Forms designer support.
|
||||
/// Do not change the method contents inside the source code editor. The Forms designer might
|
||||
/// not be able to load this method if it was changed manually.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.textBoxPassword = new System.Windows.Forms.TextBox();
|
||||
this.label_password = new System.Windows.Forms.Label();
|
||||
this.buttonOK = new System.Windows.Forms.Button();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.label_user = new System.Windows.Forms.Label();
|
||||
this.textBoxUser = new System.Windows.Forms.TextBox();
|
||||
this.label_url = new System.Windows.Forms.Label();
|
||||
this.textBoxUrl = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// textBoxPassword
|
||||
//
|
||||
this.textBoxPassword.Location = new System.Drawing.Point(118, 73);
|
||||
this.textBoxPassword.Name = "textBoxPassword";
|
||||
this.textBoxPassword.PasswordChar = '*';
|
||||
this.textBoxPassword.Size = new System.Drawing.Size(190, 20);
|
||||
this.textBoxPassword.TabIndex = 0;
|
||||
this.textBoxPassword.KeyUp += new System.Windows.Forms.KeyEventHandler(this.TextBoxPasswordKeyUp);
|
||||
//
|
||||
// label_password
|
||||
//
|
||||
this.label_password.Location = new System.Drawing.Point(12, 73);
|
||||
this.label_password.Name = "label_password";
|
||||
this.label_password.Size = new System.Drawing.Size(100, 20);
|
||||
this.label_password.TabIndex = 1;
|
||||
this.label_password.Text = "Password";
|
||||
//
|
||||
// buttonOK
|
||||
//
|
||||
this.buttonOK.Location = new System.Drawing.Point(152, 102);
|
||||
this.buttonOK.Name = "buttonOK";
|
||||
this.buttonOK.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonOK.TabIndex = 2;
|
||||
this.buttonOK.Text = "OK";
|
||||
this.buttonOK.UseVisualStyleBackColor = true;
|
||||
this.buttonOK.Click += new System.EventHandler(this.ButtonOKClick);
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.Location = new System.Drawing.Point(233, 102);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonCancel.TabIndex = 3;
|
||||
this.buttonCancel.Text = "Cancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick);
|
||||
//
|
||||
// label_user
|
||||
//
|
||||
this.label_user.Location = new System.Drawing.Point(12, 47);
|
||||
this.label_user.Name = "label_user";
|
||||
this.label_user.Size = new System.Drawing.Size(100, 20);
|
||||
this.label_user.TabIndex = 5;
|
||||
this.label_user.Text = "User";
|
||||
//
|
||||
// textBoxUser
|
||||
//
|
||||
this.textBoxUser.Location = new System.Drawing.Point(118, 47);
|
||||
this.textBoxUser.Name = "textBoxUser";
|
||||
this.textBoxUser.Size = new System.Drawing.Size(190, 20);
|
||||
this.textBoxUser.TabIndex = 4;
|
||||
//
|
||||
// label_url
|
||||
//
|
||||
this.label_url.Location = new System.Drawing.Point(12, 21);
|
||||
this.label_url.Name = "label_url";
|
||||
this.label_url.Size = new System.Drawing.Size(100, 20);
|
||||
this.label_url.TabIndex = 7;
|
||||
this.label_url.Text = "Url";
|
||||
//
|
||||
// textBoxUrl
|
||||
//
|
||||
this.textBoxUrl.Location = new System.Drawing.Point(118, 21);
|
||||
this.textBoxUrl.Name = "textBoxUrl";
|
||||
this.textBoxUrl.Size = new System.Drawing.Size(190, 20);
|
||||
this.textBoxUrl.TabIndex = 6;
|
||||
//
|
||||
// LoginForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(320, 139);
|
||||
this.Controls.Add(this.label_url);
|
||||
this.Controls.Add(this.textBoxUrl);
|
||||
this.Controls.Add(this.label_user);
|
||||
this.Controls.Add(this.textBoxUser);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.buttonOK);
|
||||
this.Controls.Add(this.label_password);
|
||||
this.Controls.Add(this.textBoxPassword);
|
||||
this.Name = "LoginForm";
|
||||
this.Text = "Please enter your Confluence password";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
}
|
||||
private System.Windows.Forms.TextBox textBoxUrl;
|
||||
private System.Windows.Forms.Label label_url;
|
||||
private System.Windows.Forms.TextBox textBoxUser;
|
||||
private System.Windows.Forms.Label label_password;
|
||||
private System.Windows.Forms.Label label_user;
|
||||
private System.Windows.Forms.TextBox textBoxPassword;
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.Button buttonOK;
|
||||
|
||||
}
|
||||
}
|
80
GreenshotConfluencePlugin/Forms/LoginForm.cs
Normal file
80
GreenshotConfluencePlugin/Forms/LoginForm.cs
Normal file
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
* Greenshot - a free and open source screenshot tool
|
||||
* Copyright (C) 2007-2010 Thomas Braun, Jens Klingen, Robin Krom
|
||||
*
|
||||
* For more information see: http://getgreenshot.org/
|
||||
* The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using GreenshotPlugin.Core;
|
||||
|
||||
namespace GreenshotConfluencePlugin {
|
||||
/// <summary>
|
||||
/// Description of LoginForm.
|
||||
/// </summary>
|
||||
public partial class LoginForm : Form {
|
||||
private ILanguage lang = Language.GetInstance();
|
||||
|
||||
public LoginForm() {
|
||||
//
|
||||
// The InitializeComponent() call is required for Windows Forms designer support.
|
||||
//
|
||||
InitializeComponent();
|
||||
InitializeTexts();
|
||||
}
|
||||
|
||||
private void InitializeTexts() {
|
||||
this.label_url.Text = lang.GetString(LangKey.label_url);
|
||||
this.label_user.Text = lang.GetString(LangKey.label_user);
|
||||
this.label_password.Text = lang.GetString(LangKey.label_password);
|
||||
this.buttonOK.Text = lang.GetString(LangKey.OK);
|
||||
this.buttonCancel.Text = lang.GetString(LangKey.CANCEL);
|
||||
this.Text = lang.GetString(LangKey.login_title);
|
||||
}
|
||||
|
||||
public string Url {
|
||||
get {return textBoxUrl.Text;}
|
||||
set {textBoxUrl.Text = value;}
|
||||
}
|
||||
|
||||
public string User {
|
||||
get {return textBoxUser.Text;}
|
||||
set {textBoxUser.Text = value;}
|
||||
}
|
||||
|
||||
public string Password {
|
||||
get {return textBoxPassword.Text;}
|
||||
set {textBoxPassword.Text = value;}
|
||||
}
|
||||
|
||||
void ButtonOKClick(object sender, EventArgs e) {
|
||||
this.DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
void ButtonCancelClick(object sender, System.EventArgs e) {
|
||||
this.DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
|
||||
void TextBoxPasswordKeyUp(object sender, KeyEventArgs e) {
|
||||
if (e.KeyCode == Keys.Enter) {
|
||||
this.DialogResult = DialogResult.OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue