Beispiel #1
0
        //---------------------------------------------------------------------

        public MyFrame(string title, Point pos, Size size)
            : base(title, pos, size)
        {
            // Set the window icon

            Icon = new wx.Icon("../Samples/Minimal/mondrian.png");

            // Set up a menu

            wx.Menu fileMenu = new wx.Menu();
            //fileMenu.Append((int)Cmd.Dialog, "&Show dialog\tAlt-D", "Show test dialog");
            fileMenu.Append((int)Cmd.Quit, "E&xit\tAlt-X", "Quit this program");

            wx.Menu helpMenu = new wx.Menu();
            helpMenu.Append((int)Cmd.About, "&About...\tF1", "Show about dialog");

            wx.MenuBar menuBar = new wx.MenuBar();
            menuBar.Append(fileMenu, "&File");
            menuBar.Append(helpMenu, "&Help");

            MenuBar = menuBar;

            // Set up a status bar

            CreateStatusBar(2);
            StatusText = "Welcome to wxWidgets!";

            // Set up the event table

            EVT_MENU((int)Cmd.Quit, new EventListener(OnQuit));
            EVT_MENU((int)Cmd.Dialog, new EventListener(OnDialog));
            EVT_MENU((int)Cmd.About, new EventListener(OnAbout));
        }
Beispiel #2
0
        protected void DoControls()
        {
            termsTC = new wx.TextCtrl (this, (int)Id.termsTC, string.Empty, wx.Window.wxDefaultPosition, wx.Window.wxDefaultSize, wx.WindowStyles.TE_READONLY);
            documentsTC = new wx.TextCtrl (this, (int)Id.documentsTC, string.Empty, wx.Window.wxDefaultPosition, wx.Window.wxDefaultSize, wx.WindowStyles.TE_READONLY);
            searchTC = new wx.TextCtrl (this, (int)Id.searchTC);
            termsBtn = new wx.Button (this, (int)Id.termsBtn, "Wczytaj termy");
            documentsBtn = new wx.Button (this, (int)Id.documentsBtn, "Wczytaj dokumenty");
            searchBtn = new wx.Button (this, (int)Id.searchBtn, "Szukaj");
            resultsLC = new wx.ListCtrl (this, (int)Id.resultsLC);

            menuBar = new wx.MenuBar ();
            this.MenuBar = menuBar;
            fileMenu = new wx.Menu ();
            fileMenu.Append ((int)Id.quitFileMenu, "Zakończ");
            helpMenu = new wx.Menu ();
            helpMenu.Append ((int)Id.aboutHelpMenu, "O programie");
            optionsMenu = new wx.Menu();
            optionsMenu.Append((int)Id.showDocumentsOptionsMenu, "Pokaż prztworzone dokumenty");
            optionsMenu.Append((int)Id.showTermsOptionsMenu, "Pokaż prztworzone termy");
            showZerosMenuCheck = optionsMenu.AppendCheckItem((int)Id.showZerosOptionsMenu, "Wyświetlaj dokumenty z zerową miarą");
            menuBar.Append (fileMenu, "Plik");
            menuBar.Append(optionsMenu, "Opcje");
            menuBar.Append (helpMenu, "Pomoc");

            this.CreateStatusBar (1, wx.WindowStyles.SB_RAISED);
            this.StatusText = "Wyszukiwarka...";
        }