public ComPanel(Window parent, ComService comService) : base(parent) { _comService = comService; _comService.DataArrived += ComDataArrived; _comService.StatusChanged += ComStatusChanged; var sizer = new BoxSizer(Orientation.Vertical); _dataFont = new Font(10, FontFamily.Teletype, FontStyle.Normal, FontWeight.Normal); Panel controlPanel = CreateControlPanel(); sizer.Add(controlPanel, 0, SizerFlag.Expand | SizerFlag.All, 0); _history = new TextCtrl(this, "", WxDefaultPosition, WxDefaultSize, WindowStyles.TextCtrlMultiline | WindowStyles.TextCtrlReadonly) { Font = _dataFont }; sizer.Add(_history, 1, SizerFlag.Expand | SizerFlag.All, 0); Panel sendPanel = CreateSendPanel(); sizer.Add(sendPanel, 0, SizerFlag.Expand | SizerFlag.All, 5); SetSizer(sizer); sizer.SetSizeHints(this); EvtSize((e, s) => Sizer.SetDimension(0, 0, Width, Height)); EvtClose((e, s) => OnClose()); DisableInput(); }
private Panel CreateSendPanel() { Panel panel = new Panel(this); BoxSizer sizer = new BoxSizer(Orientation.Horizontal); _textInput = new TextCtrl(panel, "", WxDefaultPosition, WxDefaultSize, WindowStyles.TextCtrlProcessEnter) { Font = _dataFont }; sizer.Add(_textInput, 1, SizerFlag.Expand | SizerFlag.All, 0); _textInput.EvtKeyDown((s, e) => { KeyEvent keyEvent = e as KeyEvent; if (keyEvent != null && keyEvent.KeyCode == 13) { OnSend(); } e.Skip(true); }); _send = new Button(panel, ID_Send, "Send"); EvtButton(ID_Send, (s, e) => OnSend()); sizer.Add(_send, 0, SizerFlag.Expand | SizerFlag.All, 0); panel.SetSizer(sizer); sizer.SetSizeHints(panel); return(panel); }
public void Init() { GDevice.Get().CreateDevice(640, 480, 32, false); GDevice.Get().SetWindowText("Gui Controls"); style = new StyleFactory("res/gui/default.xml"); boxBackground = new Box(new Rect(0, 0, 640, 480), new Color(160, 196, 255)); windowQuit = new Window(new Rect(100, 100, 380, 364), "Main Window", style, "testwindow"); windowText = new Window(new Rect(300, 120, 640, 400), "Text Window", style); WindowManager.Get().RegisterWindow(windowText); WindowManager.Get().RegisterWindow(windowQuit); btnWindowQuitQuit = new Button(windowQuit, new Rect(12, 32, 268, 64), "Quit", style); btnWindowQuitQuit.LeftDown += new EventHandler(OnButtonWindowQuitQuit); progressBar = new ProgressBar(windowQuit, new Rect(12, 96, 268, 128), "", style); txtWindowTextText = new TextCtrl(windowText, new Rect(12, 32, 328, 260), "", style); progressBar.SetBorder(10, 50); progressBar.Value = 30; //progressBar.ShowText = false; StreamReader sr = new StreamReader(File.Open("res/sample.txt", FileMode.Open)); txtWindowTextText.AppendText(sr.ReadToEnd()); sr.Close(); }
public ComPanel(Window parent, ComService comService) : base(parent) { _comService = comService; _comService.DataArrived += ComDataArrived; _comService.StatusChanged += ComStatusChanged; var sizer = new BoxSizer(Orientation.Vertical); _dataFont = new Font(10, FontFamily.Teletype, FontStyle.Normal, FontWeight.Normal); Panel controlPanel = CreateControlPanel(); sizer.Add(controlPanel, 0, SizerFlag.Expand | SizerFlag.All, 0); _history = new TextCtrl(this, "", WxDefaultPosition, WxDefaultSize, WindowStyles.TextCtrlMultiline | WindowStyles.TextCtrlReadonly) { Font = _dataFont }; sizer.Add(_history, 1, SizerFlag.Expand | SizerFlag.All, 0); Panel sendPanel = CreateSendPanel(); sizer.Add(sendPanel, 0, SizerFlag.Expand | SizerFlag.All, 5); SetSizer(sizer); sizer.SetSizeHints(this); EvtSize((e, s) => Sizer.SetDimension(0, 0, Width, Height)); EvtClose((e, s) => OnClose()); DisableInput(); }
public ScenarioInfoDialog(Window parent) : base(parent, 0, wxPorting.L("Scenario Information"), Window.wxDefaultPosition, Window.wxDefaultSize, WindowStyles.DD_DEFAULT_STYLE, wxPorting.L("Scenario Information")) { BoxSizer buttonCol = new BoxSizer(Orientation.wxVERTICAL); BoxSizer column = new BoxSizer(Orientation.wxVERTICAL); BoxSizer leftColumn = new BoxSizer(Orientation.wxVERTICAL); BoxSizer row = new BoxSizer(Orientation.wxHORIZONTAL); ListItem col = new ListItem(); m_notes = new TextCtrl(this, wxID_ANY, Globals.wxEmptyString, Window.wxDefaultPosition, new Size(200, 100), WindowStyles.TE_MULTILINE); leftColumn.Add(m_notes, 2, SizerFlag.wxGROW | SizerFlag.wxALL, 3); row.Add(leftColumn, 60, SizerFlag.wxGROW | SizerFlag.wxRIGHT | SizerFlag.wxLEFT, 3); buttonCol.Add(row, 0, SizerFlag.wxGROW | SizerFlag.wxALL, 5); row = new BoxSizer(Orientation.wxHORIZONTAL); row.Add(new Button(this, wxID_OK, wxPorting.L("&OK")), 0, SizerFlag.wxALL, 4); row.Add(new Button(this, wxID_CANCEL, wxPorting.L("&Cancel")), 0, SizerFlag.wxALL, 4); buttonCol.Add(row, 0, SizerFlag.wxALIGN_RIGHT | SizerFlag.wxGROW | SizerFlag.wxALL, 6); SetSizer(buttonCol); buttonCol.Fit(this); buttonCol.SetSizeHints(this); }
public FrontPanelPanel(MainFrame parent, ComService comService) : base(parent) { _comService = comService; _comService.DataArrived += ComDataArrived; FlexGridSizer sizer = new FlexGridSizer(4, 0, 0); sizer.Add(new StaticText(this, "External\nVoltage", WxDefaultPosition, WxDefaultSize, WindowStyles.AlignRight), 0, SizerFlag.AlignCenterVertical | SizerFlag.All, 5); _externalVoltage = new ValueDisplay(this) { Value = "0.0", Unit = "mV" }; sizer.Add(_externalVoltage, 0, SizerFlag.All, 5); sizer.Add(new StaticText(this, "Load\nVoltage", WxDefaultPosition, WxDefaultSize, WindowStyles.AlignRight), 0, SizerFlag.AlignCenterVertical | SizerFlag.All, 5); _loadVoltage = new ValueDisplay(this) { Value = "0.0", Unit = "mV" }; sizer.Add(_loadVoltage, 0, SizerFlag.All, 5); sizer.Add(new StaticText(this, "External\nCurrent", WxDefaultPosition, WxDefaultSize, WindowStyles.AlignRight), 0, SizerFlag.AlignCenterVertical | SizerFlag.All, 5); _externalCurrent = new ValueDisplay(this) { Value = "0.0", Unit = "mA" }; sizer.Add(_externalCurrent, 0, SizerFlag.All, 5); sizer.Add(new StaticText(this, "Load\nCurrent", WxDefaultPosition, WxDefaultSize, WindowStyles.AlignRight), 0, SizerFlag.AlignCenterVertical | SizerFlag.All, 5); _loadCurrent = new ValueDisplay(this) { Value = "0.0", Unit = "mV" }; sizer.Add(_loadCurrent, 0, SizerFlag.All, 5); sizer.Add(0, 0); sizer.Add(0, 0); sizer.Add(new StaticText(this, "Target\nCurrent", WxDefaultPosition, WxDefaultSize, WindowStyles.AlignRight), 0, SizerFlag.AlignCenterVertical | SizerFlag.All, 5); Panel targetCurrentPanel = new Panel(this); var targetCurrentSizer = new FlexGridSizer(2, 5, 5); _targetCurrentSet = new Button(targetCurrentPanel, ID_TargetCurrentSet, "Set"); EvtButton(ID_TargetCurrentSet, (s, e) => SetTargetCurrent()); _targetCurrent = new TextCtrl(targetCurrentPanel, "0.0mA", WxDefaultPosition, new Size(70, _targetCurrentSet.Size.Height)); targetCurrentSizer.Add(_targetCurrent); targetCurrentSizer.Add(_targetCurrentSet); targetCurrentPanel.SetSizer(targetCurrentSizer); targetCurrentSizer.SetSizeHints(targetCurrentPanel); sizer.Add(targetCurrentPanel, 0, SizerFlag.All, 5); SetSizer(sizer); sizer.SetSizeHints(this); EvtDestroy((s, e) => { OnDestory(); e.Skip(true); }); _targetCurrent.EvtSetFocus((s, e) => _targetCurrentHasFocus = true); _targetCurrent.EvtKillFocus((s, e) => _targetCurrentHasFocus = false); }
public void SetValue <ControlType, type>(ControlType control, type value) { if (control is TextCtrl) { TextCtrl cls = control as TextCtrl; String strValue = value as String; cls.Value = strValue; } }
public type GetValue <ControlType, type>(ControlType control) where type : class { if (control is TextCtrl) { TextCtrl cls = control as TextCtrl; return(cls.Value as type); } return(default(type)); }
/// <summary> /// Called by framework. Do not call directly. /// </summary> protected override void OnAwake() { base.OnAwake(); Background.Color = Color.Black.WithAlpha(0.75f); RectTransform.Size = new Point(0, 17); RectTransform.Alignment = Alignment.TopHStretch; RectTransform.Spacing = new Rect(0, 0, 1, 1); Text = AddComponent <Text>(); Text.Height = 15; Text.Offset = new Point(2, 1); Ctrl = AddComponent <TextCtrl>(); }
// // // public SwitchboardCellDialog(Window parent) : base(parent, 0, wxPorting.T("Switchboard Name"), Window.wxDefaultPosition, Window.wxDefaultSize, WindowStyles.DD_DEFAULT_STYLE, wxPorting.L("Switchboard Name")) { EVT_BUTTON((int)wx.MenuIDs.wxID_RESET, new wx.EventListener(OnRemove)); EVT_BUTTON((int)wx.MenuIDs.wxID_OK, new wx.EventListener(OnSave)); EVT_BUTTON((int)wx.MenuIDs.wxID_CANCEL, new wx.EventListener(OnClose)); ArrayString strings; BoxSizer column = new BoxSizer(Orientation.wxVERTICAL); BoxSizer row = new BoxSizer(Orientation.wxHORIZONTAL); StaticText header = new StaticText(this, 0, wxPorting.L("&Label")); m_name = new TextCtrl(this, 0, Globals.wxEmptyString, Window.wxDefaultPosition, Window.wxDefaultSize); row.Add(header, 35, SizerFlag.wxALIGN_LEFT | SizerFlag.wxRIGHT, 4); row.Add(m_name, 65, SizerFlag.wxGROW | SizerFlag.wxALIGN_RIGHT | SizerFlag.wxLEFT, 6); column.Add(row, 1, SizerFlag.wxGROW | SizerFlag.wxTOP | SizerFlag.wxRIGHT | SizerFlag.wxLEFT, 10); row = new BoxSizer(Orientation.wxHORIZONTAL); header = new StaticText(this, 0, wxPorting.L("&Itinerary Name")); m_itin = new TextCtrl(this, 0, Globals.wxEmptyString, Window.wxDefaultPosition, Window.wxDefaultSize); row.Add(header, 35, SizerFlag.wxALIGN_LEFT | SizerFlag.wxRIGHT, 4); row.Add(m_itin, 65, SizerFlag.wxGROW | SizerFlag.wxALIGN_RIGHT | SizerFlag.wxLEFT, 6); column.Add(row, 1, SizerFlag.wxGROW | SizerFlag.wxTOP | SizerFlag.wxRIGHT | SizerFlag.wxLEFT, 10); // wxStaticLine *line = new wxStaticLine( this ); // column.Add(line); row = new BoxSizer(Orientation.wxHORIZONTAL); m_removebutton = new Button(this, (int)wx.MenuIDs.wxID_RESET, wxPorting.L("&Remove")); row.Add(m_removebutton, 0, SizerFlag.wxTOP | SizerFlag.wxGROW, 10); m_savebutton = new Button(this, wxID_OK, wxPorting.L("&Save")); m_savebutton.SetDefault(); row.Add(m_savebutton, 0, SizerFlag.wxTOP | SizerFlag.wxGROW, 10); m_closebutton = new Button(this, wxID_CANCEL, wxPorting.L("Cl&ose")); row.Add(m_closebutton, 0, SizerFlag.wxTOP | SizerFlag.wxGROW, 10); column.Add(row, 1, SizerFlag.wxGROW | SizerFlag.wxTOP | SizerFlag.wxRIGHT | SizerFlag.wxLEFT, 10); SetSizer(column); column.Fit(this); column.SetSizeHints(this); }
public static Sizer MyDialogFunc(Window parent, bool call_fit, bool set_sizer) { BoxSizer item0 = new BoxSizer(Orientation.wxVERTICAL); StaticBox item2 = new StaticBox(parent, -1, "Controls will remember their values"); StaticBoxSizer item1 = new StaticBoxSizer(item2, Orientation.wxVERTICAL); FlexGridSizer item3 = new FlexGridSizer(0, 2, 0, 0); item3.AddGrowableCol(0); item3.AddGrowableCol(1); StaticText item4 = new StaticText(parent, ID_TEXT, "wxSpinCtrl:", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item4.Name = "TestName"; item3.Add(item4, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); SpinCtrl item5 = new SpinCtrl(parent, ID_MY_NUMBER, "0", Window.wxDefaultPosition, new Size(130, -1), SpinCtrl.wxSP_ARROW_KEYS | SpinCtrl.wxSP_WRAP, 0, 100, 0); item3.Add(item5, 0, Stretch.wxGROW | Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxALL, 5); StaticText item6 = new StaticText(parent, ID_TEXT, "wxTextCtrl:", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item3.Add(item6, 0, Alignment.wxALIGN_RIGHT | Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxALL, 5); TextCtrl item7 = new TextCtrl(parent, ID_MY_TEXT, "", Window.wxDefaultPosition, new Size(130, -1), 0); item3.Add(item7, 0, Stretch.wxGROW | Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxALL, 5); item1.Add(item3, 1, Stretch.wxGROW | Direction.wxALL, 5); item0.Add(item1, 0, Stretch.wxGROW | Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxALL, 5); StaticLine item8 = new StaticLine(parent, ID_LINE, Window.wxDefaultPosition, new Size(300, -1), StaticLine.wxLI_HORIZONTAL); item0.Add(item8, 0, Stretch.wxGROW | Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxALL, 5); Button item9 = new Button(parent, Window.wxID_OK, "OK", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item0.Add(item9, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); if (set_sizer) { parent.SetSizer(item0); if (call_fit) { item0.SetSizeHints(parent); } } return(item0); }
public static TextCtrl AddTextLine(Dialog dialog, BoxSizer column, string txt) { BoxSizer row = new BoxSizer(Orientation.wxHORIZONTAL); StaticText header = new StaticText(dialog, 0, wxPorting.LV(txt)); TextCtrl txtctrl = new TextCtrl(dialog, 0, Globals.wxEmptyString, Window.wxDefaultPosition, Window.wxDefaultSize); row.Add(header, 50, SizerFlag.wxGROW | SizerFlag.wxLEFT, 10); row.Add(txtctrl, 50, SizerFlag.wxGROW | SizerFlag.wxLEFT, 10); column.Add(row, 1, SizerFlag.wxGROW | SizerFlag.wxALL, 10); return(txtctrl); }
private static TextCtrl AddTextLine(Dialog dialog, BoxSizer column, String txt) { BoxSizer row = new BoxSizer(Orientation.wxHORIZONTAL); StaticText header = new StaticText(dialog, 0, wxPorting.LV(txt)); TextCtrl txtctrl = new TextCtrl(dialog, 0, Globals.wxEmptyString, Window.wxDefaultPosition, Window.wxDefaultSize); row.Add(header, 35, SizerFlag.wxALIGN_LEFT | SizerFlag.wxRIGHT | SizerFlag.wxTOP, 4); row.Add(txtctrl, 65, SizerFlag.wxGROW | SizerFlag.wxALIGN_RIGHT | SizerFlag.wxTOP, 4); column.Add(row, 1, SizerFlag.wxGROW | SizerFlag.wxLEFT | SizerFlag.wxRIGHT, 10); lastLabel = header; return(txtctrl); }
public FrontPanelPanel(MainFrame parent, ComService comService) : base(parent) { _comService = comService; _comService.DataArrived += ComDataArrived; FlexGridSizer sizer = new FlexGridSizer(4, 0, 0); sizer.Add(new StaticText(this, "External\nVoltage", WxDefaultPosition, WxDefaultSize, WindowStyles.AlignRight), 0, SizerFlag.AlignCenterVertical | SizerFlag.All, 5); _externalVoltage = new ValueDisplay(this) { Value = "0.0", Unit = "mV" }; sizer.Add(_externalVoltage, 0, SizerFlag.All, 5); sizer.Add(new StaticText(this, "Load\nVoltage", WxDefaultPosition, WxDefaultSize, WindowStyles.AlignRight), 0, SizerFlag.AlignCenterVertical | SizerFlag.All, 5); _loadVoltage = new ValueDisplay(this) { Value = "0.0", Unit = "mV" }; sizer.Add(_loadVoltage, 0, SizerFlag.All, 5); sizer.Add(new StaticText(this, "External\nCurrent", WxDefaultPosition, WxDefaultSize, WindowStyles.AlignRight), 0, SizerFlag.AlignCenterVertical | SizerFlag.All, 5); _externalCurrent = new ValueDisplay(this) { Value = "0.0", Unit = "mA" }; sizer.Add(_externalCurrent, 0, SizerFlag.All, 5); sizer.Add(new StaticText(this, "Load\nCurrent", WxDefaultPosition, WxDefaultSize, WindowStyles.AlignRight), 0, SizerFlag.AlignCenterVertical | SizerFlag.All, 5); _loadCurrent = new ValueDisplay(this) { Value = "0.0", Unit = "mV" }; sizer.Add(_loadCurrent, 0, SizerFlag.All, 5); sizer.Add(0, 0); sizer.Add(0, 0); sizer.Add(new StaticText(this, "Target\nCurrent", WxDefaultPosition, WxDefaultSize, WindowStyles.AlignRight), 0, SizerFlag.AlignCenterVertical | SizerFlag.All, 5); Panel targetCurrentPanel = new Panel(this); var targetCurrentSizer = new FlexGridSizer(2, 5, 5); _targetCurrentSet = new Button(targetCurrentPanel, ID_TargetCurrentSet, "Set"); EvtButton(ID_TargetCurrentSet, (s, e) => SetTargetCurrent()); _targetCurrent = new TextCtrl(targetCurrentPanel, "0.0mA", WxDefaultPosition, new Size(70, _targetCurrentSet.Size.Height)); targetCurrentSizer.Add(_targetCurrent); targetCurrentSizer.Add(_targetCurrentSet); targetCurrentPanel.SetSizer(targetCurrentSizer); targetCurrentSizer.SetSizeHints(targetCurrentPanel); sizer.Add(targetCurrentPanel, 0, SizerFlag.All, 5); SetSizer(sizer); sizer.SetSizeHints(this); EvtDestroy((s, e) => { OnDestory(); e.Skip(true); }); _targetCurrent.EvtSetFocus((s, e) => _targetCurrentHasFocus = true); _targetCurrent.EvtKillFocus((s, e) => _targetCurrentHasFocus = false); }
public HelloWorldFrame(Window parent, int id, string title) : base(parent, id, "Helloworldframe", wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE) { mainbutton = new Button(this, (int)Cmd.ID_MAINBUTTON, "Press Me"); mainbutton.Click += new EventListener(OnButtonClicked); text1 = new TextCtrl(this, (int)Cmd.ID_TEXT1, ""); text2 = new TextCtrl(this, (int)Cmd.ID_TEXT2, ""); sizer = new BoxSizer(Orientation.wxVERTICAL); sizer.Add(mainbutton, 1, Direction.wxALL | Stretch.wxEXPAND, 2); sizer.Add(text1, 1, Direction.wxALL | Stretch.wxEXPAND, 2); sizer.Add(text2, 1, Direction.wxALL | Stretch.wxEXPAND, 2); sizer.Fit(this); sizer.SetSizeHints(this); SetSizer(sizer); Layout(); }
public static Sizer MyDialogFunc( Window parent, bool call_fit, bool set_sizer ) { BoxSizer item0 = new BoxSizer( Orientation.wxVERTICAL ); StaticBox item2 = new StaticBox( parent, -1, "Controls will remember their values" ); StaticBoxSizer item1 = new StaticBoxSizer( item2, Orientation.wxVERTICAL ); FlexGridSizer item3 = new FlexGridSizer( 0, 2, 0, 0 ); item3.AddGrowableCol( 0 ); item3.AddGrowableCol( 1 ); StaticText item4 = new StaticText( parent, ID_TEXT, "wxSpinCtrl:", Window.wxDefaultPosition, Window.wxDefaultSize, 0 ); item4.Name = "TestName"; item3.Add( item4, 0, Alignment.wxALIGN_CENTER|Direction.wxALL, 5 ); SpinCtrl item5 = new SpinCtrl( parent, ID_MY_NUMBER, "0", Window.wxDefaultPosition, new Size(130,-1), SpinCtrl.wxSP_ARROW_KEYS|SpinCtrl.wxSP_WRAP, 0, 100, 0 ); item3.Add( item5, 0, Stretch.wxGROW|Alignment.wxALIGN_CENTER_VERTICAL|Direction.wxALL, 5 ); StaticText item6 = new StaticText( parent, ID_TEXT, "wxTextCtrl:", Window.wxDefaultPosition, Window.wxDefaultSize, 0 ); item3.Add( item6, 0, Alignment.wxALIGN_RIGHT|Alignment.wxALIGN_CENTER_VERTICAL|Direction.wxALL, 5 ); TextCtrl item7 = new TextCtrl( parent, ID_MY_TEXT, "", Window.wxDefaultPosition, new Size(130,-1), 0 ); item3.Add( item7, 0, Stretch.wxGROW|Alignment.wxALIGN_CENTER_VERTICAL|Direction.wxALL, 5 ); item1.Add( item3, 1, Stretch.wxGROW|Direction.wxALL, 5 ); item0.Add( item1, 0, Stretch.wxGROW|Alignment.wxALIGN_CENTER_VERTICAL|Direction.wxALL, 5 ); StaticLine item8 = new StaticLine( parent, ID_LINE, Window.wxDefaultPosition, new Size(300,-1), StaticLine.wxLI_HORIZONTAL ); item0.Add( item8, 0, Stretch.wxGROW|Alignment.wxALIGN_CENTER_VERTICAL|Direction.wxALL, 5 ); Button item9 = new Button( parent, Window.wxID_OK, "OK", Window.wxDefaultPosition, Window.wxDefaultSize, 0 ); item0.Add( item9, 0, Alignment.wxALIGN_CENTER|Direction.wxALL, 5 ); if (set_sizer) { parent.SetSizer( item0 ); if (call_fit) item0.SetSizeHints( parent ); } return item0; }
public static Sizer PageOneFunc(Window parent, bool call_fit, bool set_sizer) { BoxSizer item0 = new BoxSizer(Orientation.wxVERTICAL); TextCtrl item1 = new TextCtrl(parent, ID_TEXTCTRL, "", Window.wxDefaultPosition, new Size(200, -1), 0); item0.Add(item1, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 20); TextCtrl item2 = new TextCtrl(parent, ID_TEXTCTRL, "", Window.wxDefaultPosition, new Size(200, 90), TextCtrl.wxTE_MULTILINE); item0.Add(item2, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 20); if (set_sizer) { parent.SetSizer(item0); if (call_fit) { item0.SetSizeHints(parent); } } return(item0); }
private Panel CreateSendPanel() { Panel panel = new Panel(this); BoxSizer sizer = new BoxSizer(Orientation.Horizontal); _textInput = new TextCtrl(panel, "", WxDefaultPosition, WxDefaultSize, WindowStyles.TextCtrlProcessEnter) { Font = _dataFont }; sizer.Add(_textInput, 1, SizerFlag.Expand | SizerFlag.All, 0); _textInput.EvtKeyDown((s, e) => { KeyEvent keyEvent = e as KeyEvent; if (keyEvent != null && keyEvent.KeyCode == 13) { OnSend(); } e.Skip(true); }); _send = new Button(panel, ID_Send, "Send"); EvtButton(ID_Send, (s, e) => OnSend()); sizer.Add(_send, 0, SizerFlag.Expand | SizerFlag.All, 0); panel.SetSizer(sizer); sizer.SetSizeHints(panel); return panel; }
public static Sizer frmAlterarSenha(Window parent, bool call_fit, bool set_sizer) { BoxSizer item0 = new BoxSizer(Orientation.wxVERTICAL); GridSizer item1 = new GridSizer(0, 2, 0, 0); BoxSizer item2 = new BoxSizer(Orientation.wxVERTICAL); StaticText item3 = new StaticText(parent, ID_TEXT, "Login:"******"", Window.wxDefaultPosition, new Size(100, -1), 0); item4.Name = "edtLogin"; item2.Add(item4, 0, Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxALL, 0); item1.Add(item2, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); BoxSizer item5 = new BoxSizer(Orientation.wxVERTICAL); StaticText item6 = new StaticText(parent, ID_TEXT, "Senha atual:", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item5.Add(item6, 0, Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxRIGHT | Direction.wxBOTTOM, 5); TextCtrl item7 = new TextCtrl(parent, EDT_SENHAATUAL, "", Window.wxDefaultPosition, new Size(100, -1), 0); item7.Name = "edtSenhaAtual"; item5.Add(item7, 0, Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxALL, 0); item1.Add(item5, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); BoxSizer item8 = new BoxSizer(Orientation.wxVERTICAL); StaticText item9 = new StaticText(parent, ID_TEXT, "Nova senha:", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item8.Add(item9, 0, Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxRIGHT | Direction.wxBOTTOM, 5); TextCtrl item10 = new TextCtrl(parent, EDT_NOVASENHA, "", Window.wxDefaultPosition, new Size(100, -1), 0); item10.Name = "edtNovaSenha"; item8.Add(item10, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 0); item1.Add(item8, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); BoxSizer item11 = new BoxSizer(Orientation.wxVERTICAL); StaticText item12 = new StaticText(parent, ID_TEXT, "Confirmar senha:", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item11.Add(item12, 0, Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxRIGHT | Direction.wxBOTTOM, 5); TextCtrl item13 = new TextCtrl(parent, EDT_CONFIRMSENHA, "", Window.wxDefaultPosition, new Size(100, -1), 0); item13.Name = "edtConfirmarSenha"; item11.Add(item13, 0, Alignment.wxALIGN_CENTER_VERTICAL, 5); item1.Add(item11, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); item0.Add(item1, 0, Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxALL, 5); BoxSizer item14 = new BoxSizer(Orientation.wxHORIZONTAL); Button item15 = new Button(parent, BTN_SALVAR, "Salvar", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item15.Name = "btnSalvar"; item14.Add(item15, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); Button item16 = new Button(parent, BTN_LIMPAR, "Limpar", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item16.Name = "btnLimpar"; item14.Add(item16, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); Button item17 = new Button(parent, BTN_FECHAR, "Fechar", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item17.Name = "btnFechar"; item14.Add(item17, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); item0.Add(item14, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); if (set_sizer) { // parent.SetAutoLayout( true ); parent.SetSizer(item0); if (call_fit) { item0.Fit(parent); item0.SetSizeHints(parent); } } return(item0); }
public static Sizer frmLogin(Window parent, bool call_fit, bool set_sizer) { BoxSizer item0 = new BoxSizer(Orientation.wxVERTICAL); BoxSizer item1 = new BoxSizer(Orientation.wxHORIZONTAL); StaticBitmap item2 = new StaticBitmap(parent, ID_STATICBITMAP, ListaBitmaps(5), Window.wxDefaultPosition, Window.wxDefaultSize); item1.Add(item2, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 0); BoxSizer item3 = new BoxSizer(Orientation.wxVERTICAL); BoxSizer item4 = new BoxSizer(Orientation.wxVERTICAL); StaticText item5 = new StaticText(parent, LAB_LOGIN, "Login:"******"labLogin"; item4.Add(item5, 0, Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxRIGHT | Direction.wxBOTTOM, 5); TextCtrl item6 = new TextCtrl(parent, EDT_LOGIN, "", Window.wxDefaultPosition, new Size(80, -1), 0); item6.Name = "edtLogin"; item4.Add(item6, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 0); item3.Add(item4, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); BoxSizer item7 = new BoxSizer(Orientation.wxVERTICAL); StaticText item8 = new StaticText(parent, LAB_SENHA, "Senha:", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item8.Name = "labSenha"; item7.Add(item8, 0, Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxRIGHT | Direction.wxBOTTOM, 5); TextCtrl item9 = new TextCtrl(parent, EDT_SENHA, "", Window.wxDefaultPosition, new Size(80, -1), TextCtrl.wxTE_PASSWORD); item9.Name = "edtSenha"; item7.Add(item9, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 0); item3.Add(item7, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); item1.Add(item3, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 0); item0.Add(item1, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); BoxSizer item10 = new BoxSizer(Orientation.wxHORIZONTAL); Button item11 = new Button(parent, BTN_LOGIN, "Login", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item11.SetDefault(); item11.Name = "btnLogin"; item10.Add(item11, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); Button item12 = new Button(parent, BTN_CANCELAR, "Cancelar", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item12.Name = "btnCancelar"; item10.Add(item12, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); item0.Add(item10, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); if (set_sizer) { // parent.SetAutoLayout( true ); parent.SetSizer(item0); if (call_fit) { item0.Fit(parent); item0.SetSizeHints(parent); } } return(item0); }
public static Sizer frmCadAssuntos(Window parent, bool call_fit, bool set_sizer) { BoxSizer item0 = new BoxSizer(Orientation.wxVERTICAL); FlexGridSizer item1 = new FlexGridSizer(0, 2, 0, 0); item1.AddGrowableCol(0); FlexGridSizer item2 = new FlexGridSizer(0, 1, 0, 0); item2.AddGrowableRow(0); item2.AddGrowableRow(1); BoxSizer item3 = new BoxSizer(Orientation.wxVERTICAL); StaticText item4 = new StaticText(parent, LAB_CODIGO, "Código:", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item4.Name = "labCodigo"; item3.Add(item4, 5, Alignment.wxALIGN_CENTER_VERTICAL, 0); TextCtrl item5 = new TextCtrl(parent, EDT_CODIGO, "", Window.wxDefaultPosition, new Size(80, -1), 0); item5.Name = "edtCodigo"; item3.Add(item5, 0, Alignment.wxALIGN_CENTER, 0); item2.Add(item3, 0, Alignment.wxALIGN_CENTER_VERTICAL, 0); BoxSizer item6 = new BoxSizer(Orientation.wxVERTICAL); StaticText item7 = new StaticText(parent, LAB_DESCRICAO, "Assunto:", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item7.Name = "labDescricao"; item6.Add(item7, 5, Alignment.wxALIGN_CENTER_VERTICAL, 0); TextCtrl item8 = new TextCtrl(parent, EDT_DESCRICAO, "", Window.wxDefaultPosition, new Size(200, -1), 0); item8.Name = "edtDescricao"; item6.Add(item8, 0, Alignment.wxALIGN_CENTER, 0); item2.Add(item6, 0, Alignment.wxALIGN_CENTER, 0); item1.Add(item2, 0, Alignment.wxALIGN_CENTER_HORIZONTAL | Direction.wxALL, 5); BoxSizer item9 = new BoxSizer(Orientation.wxVERTICAL); Button item10 = new Button(parent, BTN_PESQUISAR, "Pesquisar", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item10.SetDefault(); item10.Name = "btnPesquisar"; item9.Add(item10, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 0); Button item11 = new Button(parent, BTN_ANTERIOR, "Anterior", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item11.Name = "btnAnterior"; item11.Enabled = false; item9.Add(item11, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); Button item12 = new Button(parent, BTN_PROXIMO, "Próximo", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item12.Name = "btnProximo"; item12.Enabled = false; item9.Add(item12, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 0); item1.Add(item9, 0, Alignment.wxALIGN_CENTER_HORIZONTAL | Direction.wxALL, 5); item0.Add(item1, 0, Stretch.wxGROW | Alignment.wxALIGN_CENTER_VERTICAL, 0); BoxSizer item13 = new BoxSizer(Orientation.wxHORIZONTAL); Button item14 = new Button(parent, BTN_SALVAR, "Salvar", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item14.Name = "btnSalvar"; item14.Enabled = false; item13.Add(item14, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); Button item15 = new Button(parent, BTN_EXCLUIR, "Excluir", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item15.Name = "btnExcluir"; item15.Enabled = false; item13.Add(item15, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); Button item16 = new Button(parent, BTN_LIMPAR, "Limpar", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item16.Name = "btnLimpar"; item13.Add(item16, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); Button item17 = new Button(parent, BTN_FECHAR, "Fechar", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item17.Name = "btnFechar"; item13.Add(item17, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); item0.Add(item13, 0, Alignment.wxALIGN_RIGHT | Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxALL, 5); if (set_sizer) { // parent.SetAutoLayout( true ); parent.SetSizer(item0); if (call_fit) { item0.Fit(parent); item0.SetSizeHints(parent); } } return(item0); }
public static Sizer frmConAssuntos(Window parent, bool call_fit, bool set_sizer) { FlexGridSizer item0 = new FlexGridSizer(0, 1, 0, 0); item0.AddGrowableRow(1); BoxSizer item1 = new BoxSizer(Orientation.wxHORIZONTAL); BoxSizer item2 = new BoxSizer(Orientation.wxVERTICAL); StaticText item3 = new StaticText(parent, LAB_DESCRICAO, "Assunto:", Window.wxDefaultPosition, new Size(40, -1), 0); item3.Name = "labDescricao"; item2.Add(item3, 5, Alignment.wxALIGN_CENTER_VERTICAL, 5); TextCtrl item4 = new TextCtrl(parent, EDT_DESCRICAO, "", Window.wxDefaultPosition, new Size(250, -1), 0); item4.Name = "edtDescricao"; item2.Add(item4, 0, Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxALL, 0); item1.Add(item2, 0, Alignment.wxALIGN_CENTER_HORIZONTAL | Direction.wxALL, 5); Button item5 = new Button(parent, BTN_PESQUISAR, "Pesquisar", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item5.Name = "btnPesquisar"; item1.Add(item5, 0, Alignment.wxALIGN_BOTTOM | Alignment.wxALIGN_CENTER_HORIZONTAL | Direction.wxALL, 5); item0.Add(item1, 0, Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxALL, 5); item6.Name = "gridConsulta"; item0.Add(item6, 0, Stretch.wxGROW, 0); FlexGridSizer item7 = new FlexGridSizer(0, 2, 0, 0); item7.AddGrowableCol(0); BoxSizer item8 = new BoxSizer(Orientation.wxHORIZONTAL); StaticText item9 = new StaticText(parent, LAB_REGISTROS, "Registro: 0 de 0", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item9.Name = "labRegistros"; item8.Add(item9, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); item7.Add(item8, 0, Alignment.wxALIGN_BOTTOM | Direction.wxALL, 5); BoxSizer item10 = new BoxSizer(Orientation.wxHORIZONTAL); Button item11 = new Button(parent, LAB_LIMPAR, "Limpar", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item11.Name = "btnLimpar"; item10.Add(item11, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); Button item12 = new Button(parent, BTN_FECHAR, "Fechar", Window.wxDefaultPosition, Window.wxDefaultSize, 0); item12.Name = "btnFechar"; item10.Add(item12, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5); item7.Add(item10, 0, Stretch.wxGROW | Alignment.wxALIGN_BOTTOM | Direction.wxALL, 5); item0.Add(item7, 0, Stretch.wxGROW | Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxALL, 5); if (set_sizer) { // parent.SetAutoLayout( true ); parent.SetSizer(item0); if (call_fit) { item0.Fit(parent); item0.SetSizeHints(parent); } } return(item0); }
public static Sizer PageOneFunc( Window parent, bool call_fit, bool set_sizer ) { BoxSizer item0 = new BoxSizer( Orientation.wxVERTICAL ); TextCtrl item1 = new TextCtrl( parent, ID_TEXTCTRL, "", Window.wxDefaultPosition, new Size(200,-1), 0 ); item0.Add( item1, 0, Alignment.wxALIGN_CENTER|Direction.wxALL, 20 ); TextCtrl item2 = new TextCtrl( parent, ID_TEXTCTRL, "", Window.wxDefaultPosition, new Size(200,90), TextCtrl.wxTE_MULTILINE ); item0.Add( item2, 0, Alignment.wxALIGN_CENTER|Direction.wxALL, 20 ); if (set_sizer) { parent.SetSizer( item0 ); if (call_fit) item0.SetSizeHints( parent ); } return item0; }
//--------------------------------------------------------------------- public MyFrame(string title, Point pos, Size size) : base(title, pos, size) { // Set the window icon and status bar Icon = new wx.Icon("../Samples/ListCtrl/mondrian.png"); // Make an image list containing large icons m_imageListNormal = new ImageList(32, 32, true); m_imageListSmall = new ImageList(16, 16, true); Image image = new Image("../Samples/ListCtrl/bitmaps/toolbrai.xpm"); m_imageListNormal.Add(new Bitmap(image)); image = new Image("../Samples/ListCtrl/bitmaps/toolchar.xpm"); m_imageListNormal.Add(new Bitmap(image)); image = new Image("../Samples/ListCtrl/bitmaps/tooldata.xpm"); m_imageListNormal.Add(new Bitmap(image)); image = new Image("../Samples/ListCtrl/bitmaps/toolnote.xpm"); m_imageListNormal.Add(new Bitmap(image)); image = new Image("../Samples/ListCtrl/bitmaps/tooltodo.xpm"); m_imageListNormal.Add(new Bitmap(image)); image = new Image("../Samples/ListCtrl/bitmaps/toolchec.xpm"); m_imageListNormal.Add(new Bitmap(image)); image = new Image("../Samples/ListCtrl/bitmaps/toolgame.xpm"); m_imageListNormal.Add(new Bitmap(image)); image = new Image("../Samples/ListCtrl/bitmaps/tooltime.xpm"); m_imageListNormal.Add(new Bitmap(image)); image = new Image("../Samples/ListCtrl/bitmaps/toolword.xpm"); m_imageListNormal.Add(new Bitmap(image)); image = new Image("../Samples/ListCtrl/bitmaps/small1.xpm"); m_imageListSmall.Add(new Bitmap(image)); // Make a menubar Menu menuFile = new Menu(); menuFile.Append((int)Cmd.LIST_ABOUT, _("&About")); menuFile.AppendSeparator(); menuFile.Append((int)Cmd.LIST_QUIT, _("E&xit\tAlt-X")); Menu menuView = new Menu(); menuView.Append((int)Cmd.LIST_LIST_VIEW, _("&List view\tF1")); menuView.Append((int)Cmd.LIST_REPORT_VIEW, _("&Report view\tF2")); menuView.Append((int)Cmd.LIST_ICON_VIEW, _("&Icon view\tF3")); menuView.Append((int)Cmd.LIST_ICON_TEXT_VIEW, _("Icon view with &text\tF4")); menuView.Append((int)Cmd.LIST_SMALL_ICON_VIEW, _("&Small icon view\tF5")); menuView.Append((int)Cmd.LIST_SMALL_ICON_TEXT_VIEW, _("Small icon &view with text\tF6")); menuView.Append((int)Cmd.LIST_VIRTUAL_VIEW, _("Virtual view\tF7")); Menu menuList = new Menu(); menuList.Append((int)Cmd.LIST_FOCUS_LAST, _("&Make last item current\tCtrl-L")); menuList.Append((int)Cmd.LIST_TOGGLE_FIRST, _("To&ggle first item\tCtrl-G")); menuList.Append((int)Cmd.LIST_DESELECT_ALL, _("&Deselect All\tCtrl-D")); menuList.Append((int)Cmd.LIST_SELECT_ALL, _("S&elect All\tCtrl-A")); menuList.AppendSeparator(); menuList.Append((int)Cmd.LIST_SHOW_COL_INFO, _("Show &column info\tCtrl-C")); menuList.Append((int)Cmd.LIST_SHOW_SEL_INFO, _("Show &selected items\tCtrl-S")); menuList.AppendSeparator(); menuList.Append((int)Cmd.LIST_SORT, _("&Sort\tCtrl-S")); menuList.AppendSeparator(); menuList.Append((int)Cmd.LIST_ADD, _("&Append an item\tCtrl-P")); menuList.Append((int)Cmd.LIST_EDIT, _("&Edit the item\tCtrl-E")); menuList.Append((int)Cmd.LIST_DELETE, _("&Delete first item\tCtrl-X")); menuList.Append((int)Cmd.LIST_DELETE_ALL, _("Delete &all items")); menuList.AppendSeparator(); menuList.Append((int)Cmd.LIST_FREEZE, _("Free&ze\tCtrl-Z")); menuList.Append((int)Cmd.LIST_THAW, _("Tha&w\tCtrl-W")); menuList.AppendSeparator(); menuList.AppendCheckItem((int)Cmd.LIST_TOGGLE_LINES, _("Toggle &lines\tCtrl-I")); menuList.AppendCheckItem((int)Cmd.LIST_TOGGLE_MULTI_SEL, _("&Multiple selection\tCtrl-M"), _("Toggle multiple selection")); Menu menuCol = new Menu(); menuCol.Append((int)Cmd.LIST_SET_FG_COL, _("&Foreground colour...")); menuCol.Append((int)Cmd.LIST_SET_BG_COL, _("&Background colour...")); MenuBar menubar = new MenuBar(); menubar.Append(menuFile, _("&File")); menubar.Append(menuView, _("&View")); menubar.Append(menuList, _("&List")); menubar.Append(menuCol, _("&Colour")); MenuBar = menubar; m_panel = new Panel(this, wxID_ANY); m_logWindow = new TextCtrl(m_panel, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wx.WindowStyles.TE_MULTILINE | wx.WindowStyles.BORDER_SUNKEN); Log.SetActiveTarget(m_logWindow); RecreateList(wx.WindowStyles.LC_REPORT | wx.WindowStyles.LC_SINGLE_SEL); CreateStatusBar(3); EVT_SIZE(new EventListener(OnSize)); EVT_MENU((int)Cmd.LIST_QUIT, new EventListener(OnQuit)); EVT_MENU((int)Cmd.LIST_ABOUT, new EventListener(OnAbout)); EVT_MENU((int)Cmd.LIST_LIST_VIEW, new EventListener(OnListView)); EVT_MENU((int)Cmd.LIST_REPORT_VIEW, new EventListener(OnReportView)); EVT_MENU((int)Cmd.LIST_ICON_VIEW, new EventListener(OnIconView)); EVT_MENU((int)Cmd.LIST_ICON_TEXT_VIEW, new EventListener(OnIconTextView)); EVT_MENU((int)Cmd.LIST_SMALL_ICON_VIEW, new EventListener(OnSmallIconView)); EVT_MENU((int)Cmd.LIST_SMALL_ICON_TEXT_VIEW, new EventListener(OnSmallIconTextView)); EVT_MENU((int)Cmd.LIST_VIRTUAL_VIEW, new EventListener(OnVirtualView)); EVT_MENU((int)Cmd.LIST_FOCUS_LAST, new EventListener(OnFocusLast)); EVT_MENU((int)Cmd.LIST_TOGGLE_FIRST, new EventListener(OnToggleFirstSel)); EVT_MENU((int)Cmd.LIST_DESELECT_ALL, new EventListener(OnDeselectAll)); EVT_MENU((int)Cmd.LIST_SELECT_ALL, new EventListener(OnSelectAll)); EVT_MENU((int)Cmd.LIST_DELETE, new EventListener(OnDelete)); EVT_MENU((int)Cmd.LIST_ADD, new EventListener(OnAdd)); EVT_MENU((int)Cmd.LIST_EDIT, new EventListener(OnEdit)); EVT_MENU((int)Cmd.LIST_DELETE_ALL, new EventListener(OnDeleteAll)); EVT_MENU((int)Cmd.LIST_SORT, new EventListener(OnSort)); EVT_MENU((int)Cmd.LIST_SET_FG_COL, new EventListener(OnSetFgColour)); EVT_MENU((int)Cmd.LIST_SET_BG_COL, new EventListener(OnSetBgColour)); EVT_MENU((int)Cmd.LIST_TOGGLE_MULTI_SEL, new EventListener(OnToggleMultiSel)); EVT_MENU((int)Cmd.LIST_SHOW_COL_INFO, new EventListener(OnShowColInfo)); EVT_MENU((int)Cmd.LIST_SHOW_SEL_INFO, new EventListener(OnShowSelInfo)); EVT_MENU((int)Cmd.LIST_FREEZE, new EventListener(OnFreeze)); EVT_MENU((int)Cmd.LIST_THAW, new EventListener(OnThaw)); EVT_MENU((int)Cmd.LIST_TOGGLE_LINES, new EventListener(OnToggleLines)); EVT_UPDATE_UI((int)Cmd.LIST_SHOW_COL_INFO, new EventListener(OnUpdateShowColInfo)); EVT_UPDATE_UI((int)Cmd.LIST_TOGGLE_MULTI_SEL, new EventListener(OnUpdateToggleMultiSel)); Closing += new EventListener(OnClosing); }