예제 #1
0
 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();
 }
예제 #2
0
        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);
        }