private void ctrMenuItem3_OnClikItem(object sender, EventArgs e) { try { Control but = (Control)sender; switch (but.Tag + "") { case "0": if (MainForm.Instance.ShowPanelContianerControl(12)) { MainForm.Instance.GetControl <ctrSmsSender>().SetData(""); } break; case "1": if (MainForm.Instance.ShowPanelContianerControl(4)) { MainForm.Instance.GetControl <ctrSmsManager>().SetSmsBookType(SMSBoxType.Inbox); } break; case "2": if (MainForm.Instance.ShowPanelContianerControl(4)) { MainForm.Instance.GetControl <ctrSmsManager>().SetSmsBookType(SMSBoxType.Outbox); } break; } lastPressed = (ctrMenuItem)but; } catch { } }
void Instance_OnOkButtonPressed() { if (!MainForm.Instance.IsShownControl <ctrSmsMenu>()) { return; } ctrMenuItem item = FocusControl(); if (item == null) { return; } ctrMenuItem3_OnClikItem(item, null); }