-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issues #22 Added "Change Title" menu item
- Loading branch information
1 parent
6222e82
commit 36651ee
Showing
11 changed files
with
7,926 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
using System; | ||
using System.Windows.Forms; | ||
|
||
namespace SmartContextMenu.Forms | ||
{ | ||
partial class TitleForm : Form | ||
{ | ||
public string Title | ||
{ | ||
get | ||
{ | ||
return txtTitle.Text; | ||
} | ||
set | ||
{ | ||
txtTitle.Text = value; | ||
} | ||
} | ||
|
||
public TitleForm(LanguageManager manager) | ||
{ | ||
InitializeComponent(); | ||
InitializeControls(manager); | ||
} | ||
|
||
protected override void OnLoad(EventArgs e) | ||
{ | ||
base.OnLoad(e); | ||
txtTitle.Focus(); | ||
} | ||
|
||
private void InitializeControls(LanguageManager manager) | ||
{ | ||
btnApply.Text = manager.GetString("change_title_btn_apply"); | ||
btnCancel.Text = manager.GetString("change_title_btn_cancel"); | ||
Text = manager.GetString("change_title_form"); | ||
} | ||
|
||
private void ButtonApplyClick(object sender, EventArgs e) | ||
{ | ||
DialogResult = DialogResult.OK; | ||
Close(); | ||
} | ||
|
||
private void ButtonCancelClick(object sender, EventArgs e) | ||
{ | ||
DialogResult = DialogResult.Cancel; | ||
Close(); | ||
} | ||
|
||
private void FormKeyDown(object sender, KeyEventArgs e) | ||
{ | ||
if (e.KeyValue == 27) | ||
{ | ||
ButtonCancelClick(sender, e); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.