private MiddleToolBar() : base() { // Also a hardcodet frameManager this.Orientation = Orientation.Vertical; var fm = FrameManager.GetInstance(); mainToolBar = MainToolBar.GetInstance(); var textButton = MakeHorizontalButton("Kategorie"); textButton.Clicked += delegate { fm.ChangeMainFrameMode(DisplayMode.TEXTE); }; var programButton = MakeHorizontalButton("Programm"); programButton.Clicked += delegate { fm.ChangeMainFrameMode(DisplayMode.PROGRAMM); }; var eventButton = MakeHorizontalButton("Veranstaltung"); eventButton.Clicked += delegate { fm.ChangeMainFrameMode(DisplayMode.VERANSTALTUNG); }; this.PackStart(textButton, false, false, 0); this.PackStart(programButton, false, false, 0); this.PackStart(eventButton, false, false, 0); }
public static MainToolBar GetInstance() { if (instance == null) { instance = new MainToolBar(); } return(instance); }
private void InitMainWindow() { currMode = DisplayMode.PROGRAMM; // Default start Mode // TODO: Stop Singletons here! mainFrame = MainFrame.GetInstance(); titleBar = TitleBar.GetInstance(); mainToolBar = MainToolBar.GetInstance(); middleToolBar = MiddleToolBar.GetInstance(); listFrameAdapter = ListFrameAdapter.GetInstance(); editFrameAdapter = EditFrameAdapter.GetInstance(); }
private MainFrame() : base(WindowType.Toplevel) { Title = "Tabellarius"; SetDefaultSize(900, 600); // Valid default size SetPosition(WindowPosition.Center); DeleteEvent += new DeleteEventHandler(OnDelete); AccelGroup agr = new AccelGroup(); var mainBox = new VBox(false, 2); // Titlebar - mainBox top var titleBar = TitleBar.GetInstance(); // MainToolBar - mainBox middle var mainToolBar = MainToolBar.GetInstance(); // ListFrame - Table left var listFrameAdapter = ListFrameAdapter.GetInstance(); // Toolbar - Table middle var middleToolBar = MiddleToolBar.GetInstance(); // EditFrame - Table right var editFrameAdapter = EditFrameAdapter.GetInstance(); var paneBox = new HBox(); paneBox.PackStart(listFrameAdapter, true, true, 0); paneBox.PackStart(new VSeparator(), false, true, 0); paneBox.PackStart(middleToolBar, false, true, 0); paneBox.PackStart(new VSeparator(), false, true, 0); var paned = new Paned(Orientation.Horizontal); paned.Add1(paneBox); paned.Add2(editFrameAdapter); paned.Position = 500; // Pack stuff mainBox.PackStart(titleBar, false, true, 0); mainBox.PackStart(mainToolBar, false, true, 0); mainBox.PackStart(new HSeparator(), false, true, 0); mainBox.PackStart(paned, true, true, 0); Add(mainBox); }