private void toolBar_ButtonClick(object sender, ToolBarButtonClickEventArgs e) { if (!screenIsLocked) { if (e.Button == tbTools) { changeTool(Tool.Move); } else if (e.Button == tbAddLayer) { mainControler.addLayer(); } else if (e.Button == tbSaveButton) { mainControler.save(); } else if (e.Button == tbSettings) { mainControler.showSettingsDialog(); } else if ((e.Button == tbBack) && this.bTbBackEnabled) { mainControler.UndoAction(); } } }
private void menuItemClick(object sender, EventArgs e) { if (sender == openProjectMenuItem) { mainControler.openMWD(); } else if (sender == openTransportMenuItem) { mainControler.importTransportLayer(true); } else if (sender == importProjectMenuItem) { mainControler.importMWD(); } else if (sender == importTransportMenuItem) { mainControler.importTransportLayer(false); } else if (sender == saveMenuItem) { mainControler.save(); } #if DEVELOP else if (sender == stressTest) { mainControler.stressTest(); } #endif else if (sender == saveAsMenuItem) { mainControler.showSaveDialog(); } else if (sender == closeMenuItem) { mainControler.ExitProgram(); } else if (sender == loadDefaultSettingsMenuItem) { mainControler.LoadDefaultSettings(); } else if (sender == aboutMenuItem) { mainControler.showAboutDialog(); } else if (sender == settingsMenuItem) { mainControler.showSettingsDialog(); } }