|
@@ -209,7 +209,7 @@ namespace UICatalog.Scenarios {
|
|
|
};
|
|
|
Add (_frmMenuDetails);
|
|
|
|
|
|
- _btnMenuBarUp.Clicked += () => {
|
|
|
+ _btnMenuBarUp.Clicked += (s,e) => {
|
|
|
var i = _currentSelectedMenuBar;
|
|
|
var menuItem = _menuBar != null && _menuBar.Menus.Length > 0 ? _menuBar.Menus [i] : null;
|
|
|
if (menuItem != null) {
|
|
@@ -223,7 +223,7 @@ namespace UICatalog.Scenarios {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- _btnMenuBarDown.Clicked += () => {
|
|
|
+ _btnMenuBarDown.Clicked += (s,e) => {
|
|
|
var i = _currentSelectedMenuBar;
|
|
|
var menuItem = _menuBar != null && _menuBar.Menus.Length > 0 ? _menuBar.Menus [i] : null;
|
|
|
if (menuItem != null) {
|
|
@@ -237,7 +237,7 @@ namespace UICatalog.Scenarios {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- _btnUp.Clicked += () => {
|
|
|
+ _btnUp.Clicked += (s,e) => {
|
|
|
var i = _lstMenus.SelectedItem;
|
|
|
var menuItem = DataContext.Menus.Count > 0 ? DataContext.Menus [i].MenuItem : null;
|
|
|
if (menuItem != null) {
|
|
@@ -252,7 +252,7 @@ namespace UICatalog.Scenarios {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- _btnDown.Clicked += () => {
|
|
|
+ _btnDown.Clicked += (s,e) => {
|
|
|
var i = _lstMenus.SelectedItem;
|
|
|
var menuItem = DataContext.Menus.Count > 0 ? DataContext.Menus [i].MenuItem : null;
|
|
|
if (menuItem != null) {
|
|
@@ -267,7 +267,7 @@ namespace UICatalog.Scenarios {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- _btnPreviowsParent.Clicked += () => {
|
|
|
+ _btnPreviowsParent.Clicked += (s,e) => {
|
|
|
if (_currentMenuBarItem != null && _currentMenuBarItem.Parent != null) {
|
|
|
var mi = _currentMenuBarItem;
|
|
|
_currentMenuBarItem = _currentMenuBarItem.Parent as MenuBarItem;
|
|
@@ -297,16 +297,16 @@ namespace UICatalog.Scenarios {
|
|
|
X = Pos.Right (_btnOk) + 3,
|
|
|
Y = Pos.Top (_btnOk),
|
|
|
};
|
|
|
- _btnCancel.Clicked += () => {
|
|
|
+ _btnCancel.Clicked += (s,e) => {
|
|
|
SetFrameDetails (_currentEditMenuBarItem);
|
|
|
};
|
|
|
Add (_btnCancel);
|
|
|
|
|
|
- _lstMenus.SelectedItemChanged += (e) => {
|
|
|
+ _lstMenus.SelectedItemChanged += (s,e) => {
|
|
|
SetFrameDetails ();
|
|
|
};
|
|
|
|
|
|
- _btnOk.Clicked += () => {
|
|
|
+ _btnOk.Clicked += (s,e) => {
|
|
|
if (ustring.IsNullOrEmpty (_frmMenuDetails._txtTitle.Text) && _currentEditMenuBarItem != null) {
|
|
|
MessageBox.ErrorQuery ("Invalid title", "Must enter a valid title!.", "Ok");
|
|
|
} else if (_currentEditMenuBarItem != null) {
|
|
@@ -322,7 +322,7 @@ namespace UICatalog.Scenarios {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- _btnAdd.Clicked += () => {
|
|
|
+ _btnAdd.Clicked += (s,e) => {
|
|
|
if (MenuBar == null) {
|
|
|
MessageBox.ErrorQuery ("Menu Bar Error", "Must add a MenuBar first!", "Ok");
|
|
|
_btnAddMenuBar.SetFocus ();
|
|
@@ -359,7 +359,7 @@ namespace UICatalog.Scenarios {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- _btnRemove.Clicked += () => {
|
|
|
+ _btnRemove.Clicked += (s,e) => {
|
|
|
var menuItem = DataContext.Menus.Count > 0 ? DataContext.Menus [_lstMenus.SelectedItem].MenuItem : null;
|
|
|
if (menuItem != null) {
|
|
|
var childrens = ((MenuBarItem)_currentMenuBarItem).Children;
|
|
@@ -391,7 +391,7 @@ namespace UICatalog.Scenarios {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- _lstMenus.OpenSelectedItem += (e) => {
|
|
|
+ _lstMenus.OpenSelectedItem += (s,e) => {
|
|
|
_currentMenuBarItem = DataContext.Menus [e.Item].MenuItem;
|
|
|
if (!(_currentMenuBarItem is MenuBarItem)) {
|
|
|
MessageBox.ErrorQuery ("Menu Open Error", "Must allows sub menus first!", "Ok");
|
|
@@ -409,14 +409,14 @@ namespace UICatalog.Scenarios {
|
|
|
SetFrameDetails (menuBarItem);
|
|
|
};
|
|
|
|
|
|
- _btnNext.Clicked += () => {
|
|
|
+ _btnNext.Clicked += (s,e) => {
|
|
|
if (_menuBar != null && _currentSelectedMenuBar + 1 < _menuBar.Menus.Length) {
|
|
|
_currentSelectedMenuBar++;
|
|
|
}
|
|
|
SelectCurrentMenuBarItem ();
|
|
|
};
|
|
|
|
|
|
- _btnPrevious.Clicked += () => {
|
|
|
+ _btnPrevious.Clicked += (s,e) => {
|
|
|
if (_currentSelectedMenuBar - 1 > -1) {
|
|
|
_currentSelectedMenuBar--;
|
|
|
}
|
|
@@ -430,7 +430,7 @@ namespace UICatalog.Scenarios {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- _btnAddMenuBar.Clicked += () => {
|
|
|
+ _btnAddMenuBar.Clicked += (s,e) => {
|
|
|
var frameDetails = new DynamicMenuBarDetails (null, false);
|
|
|
var item = frameDetails.EnterMenuItem ();
|
|
|
if (item == null) {
|
|
@@ -457,7 +457,7 @@ namespace UICatalog.Scenarios {
|
|
|
_menuBar.SetNeedsDisplay ();
|
|
|
};
|
|
|
|
|
|
- _btnRemoveMenuBar.Clicked += () => {
|
|
|
+ _btnRemoveMenuBar.Clicked += (s,e) => {
|
|
|
if (_menuBar == null || _menuBar.Menus.Length == 0) {
|
|
|
return;
|
|
|
}
|
|
@@ -784,7 +784,7 @@ namespace UICatalog.Scenarios {
|
|
|
X = Pos.X (_lblShortcut),
|
|
|
Y = Pos.Bottom (_txtShortcut) + 1
|
|
|
};
|
|
|
- _btnShortcut.Clicked += () => {
|
|
|
+ _btnShortcut.Clicked += (s,e) => {
|
|
|
_txtShortcut.Text = "";
|
|
|
};
|
|
|
Add (_btnShortcut);
|
|
@@ -868,7 +868,7 @@ namespace UICatalog.Scenarios {
|
|
|
var _btnOk = new Button ("Ok") {
|
|
|
IsDefault = true,
|
|
|
};
|
|
|
- _btnOk.Clicked += () => {
|
|
|
+ _btnOk.Clicked += (s,e) => {
|
|
|
if (ustring.IsNullOrEmpty (_txtTitle.Text)) {
|
|
|
MessageBox.ErrorQuery ("Invalid title", "Must enter a valid title!.", "Ok");
|
|
|
} else {
|
|
@@ -877,7 +877,7 @@ namespace UICatalog.Scenarios {
|
|
|
}
|
|
|
};
|
|
|
var _btnCancel = new Button ("Cancel");
|
|
|
- _btnCancel.Clicked += () => {
|
|
|
+ _btnCancel.Clicked += (s,e) => {
|
|
|
_txtTitle.Text = ustring.Empty;
|
|
|
Application.RequestStop ();
|
|
|
};
|