Ejemplo n.º 1
0
        public MainWindow()
        {
            Icon = IconHelper.GetAppIcon();

            if (Program.CmdlineArgs.TrayIcon)
            {
                InitStatusIcon();
            }

            Width  = 500;
            Height = 400;

            CloseRequested += MainWindow_CloseRequested;
            Closed         += MainWindow_Closed;

            var notebook = new Notebook();

            notebook.TabOrientation = NotebookTabOrientation.Bottom;
            notebook.Add(new TextCleanerWidget(), T.GetString("Text Cleaner"));
            notebook.Add(new TableCleanerWidget(), T.GetString("Table Cleaner"));
            notebook.Add(new CaseChangerWidget(), T.GetString("Case Changer"));
            notebook.Add(new UuidGeneratorWidget(), T.GetString("UUID Generator"));
            notebook.CurrentTabChanged += Notebook_CurrentTabChanged;

            UpdateTitle(notebook.CurrentTab.Label);

            var vbox = new VBox();

            vbox.PackStart(notebook, true, true);

            Content = vbox;
            Content.Show();
        }
Ejemplo n.º 2
0
 public NotebookSample()
 {
     Notebook nb = new Notebook ();
     nb.Add (new Label ("First tab content"), "First Tab");
     nb.Add (new MyWidget (), "Second Tab");
     PackStart (nb, BoxMode.FillAndExpand);
 }
Ejemplo n.º 3
0
        private void InitializeComponent()
        {
            Width = 550;
            Height = 600;
            //Location = WindowLocation.CenterScreen;

            vbox2 = new VBox();
            vbox2.Visible = true;
            vbox2.Spacing = 3;

            notebook1 = new Notebook();
            notebook1.Visible = true;
            notebook1.CanGetFocus = true;

            image1 = new ImageView();
            string file = FileHelper.FindSupportFile("bygfoot_splash.png", false);
            image1.Image = Image.FromFile(file);

            treeview_splash_contributors = new TreeView();

            scrolledwindow2 = new ScrollView();
            scrolledwindow2.Content = treeview_splash_contributors;

            notebook1.Add(image1, "");
            notebook1.Add(scrolledwindow2, "");
            vbox2.PackStart(notebook1);

            Content = vbox2;
        }
Ejemplo n.º 4
0
 public NotebookSample()
 {
     Notebook nb = new Notebook ();
     nb.Add (new Label ("First tab content"), "First Tab");
     nb.Add (new MyWidget (), "Second Tab");
     nb.TabOrientation = NotebookTabOrientation.Bottom;
     PackStart (nb, true);
 }
Ejemplo n.º 5
0
        public NotebookSample()
        {
            Notebook nb = new Notebook();

            nb.Add(new Label("First tab content"), "First Tab");
            nb.Add(new MyWidget(), "Second Tab");
            PackStart(nb, BoxMode.FillAndExpand);
        }
Ejemplo n.º 6
0
        public NotebookSample()
        {
            Notebook nb = new Notebook();

            nb.Add(new Label("First tab content"), "First Tab");
            nb.Add(new MyWidget(), "Second Tab");
            nb.TabOrientation = NotebookTabOrientation.Bottom;
            PackStart(nb, true);
        }
Ejemplo n.º 7
0
 void BuildGui()
 {
     this.Title = GettextCatalog.GetString("Add Team Foundation Server");
     this.Buttons.Add(Command.Ok, Command.Cancel);
     notebook.Add(widget, GettextCatalog.GetString("TFS Server"));
     notebook.Add(vsoWidget, GettextCatalog.GetString("Visual Studio Online"));
     this.Content   = notebook;
     this.Resizable = false;
 }
Ejemplo n.º 8
0
        void BuildGui()
        {
            this.Title              = GettextCatalog.GetString("Check In files");
            this.Resizable          = false;
            notebook.TabOrientation = NotebookTabOrientation.Left;

            var checkInTab = new VBox();

            checkInTab.PackStart(new Label(GettextCatalog.GetString("Pending Changes") + ":"));
            filesView.WidthRequest  = 500;
            filesView.HeightRequest = 150;
            var checkView = new CheckBoxCellView(isCheckedField);

            checkView.Editable = true;
            filesView.Columns.Add("Name", checkView, new TextCellView(nameField));
            filesView.Columns.Add("Changes", changesField);
            filesView.Columns.Add("Folder", folderField);
            filesView.DataSource = fileStore;
            checkInTab.PackStart(filesView, true, true);

            checkInTab.PackStart(new Label(GettextCatalog.GetString("Comment") + ":"));
            commentEntry.MultiLine = true;
            checkInTab.PackStart(commentEntry);

            notebook.Add(checkInTab, GettextCatalog.GetString("Pending Changes"));


            var workItemsTab     = new HBox();
            var workItemsListBox = new VBox();

            workItemsListBox.PackStart(new Label(GettextCatalog.GetString("Work Items") + ":"));
            workItemsView.Columns.Add("Id", idField);
            workItemsView.Columns.Add("Title", titleField);
            workItemsView.DataSource = workItemsStore;
            workItemsListBox.PackStart(workItemsView, true);
            workItemsTab.PackStart(workItemsListBox, true, true);

            var workItemButtonBox = new VBox();
            var addWorkItemButton = new Button(GettextCatalog.GetString("Add Work Item"));

            addWorkItemButton.Clicked += OnAddWorkItem;
            workItemButtonBox.PackStart(addWorkItemButton);
            var removeWorkItemButton = new Button(GettextCatalog.GetString("Remove Work Item"));

            removeWorkItemButton.Clicked += OnRemoveWorkItem;
            workItemButtonBox.PackStart(removeWorkItemButton);
            workItemsTab.PackStart(workItemButtonBox);

            notebook.Add(workItemsTab, GettextCatalog.GetString("Work Items"));


            this.Buttons.Add(Command.Ok, Command.Cancel);


            this.Content = notebook;
        }
Ejemplo n.º 9
0
        private void Build()
        {
            namespaceBox.PackStart(namespaceLabel);
            namespaceBox.PackEnd(namespaceEntry);

            arrayTypeBox.PackStart(arrayTypeLabel);
            arrayTypeBox.PackEnd(arrayTypeComboBox);

            outputFeatureBox.PackStart(outputFeatureLabel);
            outputFeatureBox.PackEnd(outputFeatureComboBox);

            languageTabVBox.PackStart(namespaceBox, marginLeft: 10, marginTop: 10, marginRight: 10);
            languageTabVBox.PackStart(arrayTypeBox, marginLeft: 10, marginTop: 5, marginRight: 10);
            languageTabVBox.PackStart(outputFeatureBox, marginLeft: 10, marginTop: 5, marginRight: 10);
            languageTabVBox.PackStart(checkRequiredCheckBox, marginLeft: 10, marginRight: 10);
            languageTabVBox.PackStart(allPropertiesOptionalCheckBox, marginLeft: 10, marginRight: 10, marginBottom: 10);

            languageVersionBox.PackStart(languageVersionLabel);
            languageVersionBox.PackEnd(languageVersionComboBox);

            propertyDensityBox.PackStart(propertyDensityLabel);
            propertyDensityBox.PackEnd(propertyDensityComboBox);

            numberTypeBox.PackStart(numberTypeLabel);
            numberTypeBox.PackEnd(numberTypeComboBox);

            anyTypeBox.PackStart(anyTypeLabel);
            anyTypeBox.PackEnd(anyTypeComboBox);

            baseClassBox.PackStart(baseClassLabel);
            baseClassBox.PackEnd(baseClassComboBox);

            otherTabVBox.PackStart(languageVersionBox, marginLeft: 10, marginTop: 10, marginRight: 10);
            otherTabVBox.PackStart(propertyDensityBox, marginLeft: 10, marginTop: 5, marginRight: 10);
            otherTabVBox.PackStart(numberTypeBox, marginLeft: 10, marginTop: 5, marginRight: 10);
            otherTabVBox.PackStart(anyTypeBox, marginLeft: 10, marginTop: 5, marginRight: 10);
            otherTabVBox.PackStart(baseClassBox, marginLeft: 10, marginTop: 5, marginRight: 10);
            otherTabVBox.PackStart(detectUUIDsCheckBox, marginLeft: 10, marginRight: 10);
            otherTabVBox.PackStart(detectBooleansInStringsCheckBox, marginLeft: 10, marginRight: 10);
            otherTabVBox.PackStart(detectDatesAndTimesCheckBox, marginLeft: 10, marginRight: 10);
            otherTabVBox.PackStart(detectEnumsCheckBox, marginLeft: 10, marginRight: 10);
            otherTabVBox.PackStart(detectIntegersInStringsCheckBox, marginLeft: 10, marginRight: 10);
            otherTabVBox.PackStart(detectMapsCheckBox, marginLeft: 10, marginRight: 10);
            otherTabVBox.PackStart(noIgnoreJsonRefsCheckBox, marginLeft: 10, marginRight: 10);
            otherTabVBox.PackStart(mergeSimiliarClassesCheckBox, marginLeft: 10, marginRight: 10, marginBottom: 10);


            mainNotebook.Add(languageTabVBox, "Language");
            mainNotebook.Add(otherTabVBox, "Other");

            buttonsHBox.PackStart(saveButton);
            buttonsHBox.PackEnd(generateButton);

            mainVBox.PackStart(mainNotebook, marginTop: 8);
            mainVBox.PackEnd(buttonsHBox, false, WidgetPlacement.End, WidgetPlacement.End, margin: 7);
        }
Ejemplo n.º 10
0
        void BuildGui()
        {
            _mainNotebook.Add(_mainPaned, " Main ");
            _mainNotebook.Add(_mainOptionsBox, " Settings ");

            _mainPaned.Panel1.Content = _mainLeftBox;
            _mainPaned.Panel2.Content = _mainRightBox;

            _mainLeftBox.PackStart(_selectProjectsLabel, expand: false, marginTop: 10);
            _mainLeftBox.PackStart(_selectProjectsComboBox, expand: false, marginBottom: 5);
            _mainLeftBox.PackStart(_selectResultLabel, expand: false);
            _mainLeftBox.PackStart(_selectResultComboBox, expand: false, marginBottom: 5);
            _mainLeftBox.PackStart(_resultListView, expand: true, marginBottom: 5);
            _mainLeftBox.PackEnd(_analyzeButton);

            _mainRightBox.PackStart(_selectedAssetResultListView, expand: true, marginBottom: 5);
            _mainRightBox.PackStart(_selectedAssetListView, expand: true, marginBottom: 5);


            _mainOptionsBox.PackStart(_analizeOptionsBox);
            _analizeOptionsBox.PackStart(_iosAnalizeOptionsBox, hpos: WidgetPlacement.Center, marginTop: 10);
            _analizeOptionsBox.PackEnd(_androidAnalizeOptionsBox, hpos: WidgetPlacement.Center, marginTop: 10);

            _iosAnalizeOptionsBox.PackStart(_iosAnalizeOptionsLabel, hpos: WidgetPlacement.Center);
            _iosResolutionMarginBox.PackStart(_iosResolutionMarginLabel);
            _iosResolutionMarginBox.PackEnd(_iosResolutionMarginTextEntry);
            _iosAnalizeOptionsBox.PackStart(_iosStandardFileConditionCheckbox, marginBottom: -8);
            _iosAnalizeOptionsBox.PackStart(_iosX2FileConditionCheckbox, marginBottom: -8);
            _iosAnalizeOptionsBox.PackStart(_iosX3FileConditionCheckbox, marginBottom: -8);
            _iosAnalizeOptionsBox.PackStart(_iosResolutionFileConditionCheckbox, marginBottom: -10);
            _iosAnalizeOptionsBox.PackStart(_iosResolutionMarginBox, marginBottom: -8, marginLeft: 25);



            _androidAnalizeOptionsBox.PackStart(_androidAnalizeOptionsLabel, hpos: WidgetPlacement.Center);
            _androidResolutionMarginBox.PackStart(_androidResolutionMarginLabel);
            _androidResolutionMarginBox.PackEnd(_androidResolutionMarginTextEntry);
            _androidAnalizeOptionsBox.PackStart(_androidStandardFileConditionCheckbox, marginBottom: -8);
            _androidAnalizeOptionsBox.PackStart(_androidLdpiFileConditionCheckbox, marginBottom: -8);
            _androidAnalizeOptionsBox.PackStart(_androidMdpiFileConditionCheckbox, marginBottom: -8);
            _androidAnalizeOptionsBox.PackStart(_androidHdpiFileConditionCheckbox, marginBottom: -8);
            _androidAnalizeOptionsBox.PackStart(_androidXhdpiFileConditionCheckbox, marginBottom: -8);
            _androidAnalizeOptionsBox.PackStart(_androidXxhdpiFileConditionCheckbox, marginBottom: -8);
            _androidAnalizeOptionsBox.PackStart(_androidXxxhdpiFileConditionCheckbox, marginBottom: -8);
            _androidAnalizeOptionsBox.PackStart(_androidResolutionFileConditionCheckbox, marginBottom: -8);
            _androidAnalizeOptionsBox.PackStart(_androidResolutionMarginBox, marginBottom: -8, marginLeft: 25);
            _androidAnalizeOptionsBox.PackStart(_androidDrawableFileConditionCheckbox, marginBottom: -8);

            Content = _mainNotebook;
        }
Ejemplo n.º 11
0
        public ContentWidget(string name)
        {
            // Building Paneds
            var outerVPaned = new VPaned();
            var innerVPaned = new VPaned();
            var middleNb    = new Notebook();
            var lowerNb     = new Notebook();

            this.tv1 = new TreeView();
            this.tv2 = new TreeView();
            this.tv3 = new TreeView();

            ScrolledWindow sw;

            sw            = new ScrolledWindow();
            sw.ShadowType = ShadowType.In;
            sw.AddWithViewport(tv1);
            outerVPaned.Add1(sw);
            outerVPaned.Add2(innerVPaned);
            innerVPaned.Add1(middleNb);
            innerVPaned.Add2(lowerNb);
            sw            = new ScrolledWindow();
            sw.ShadowType = ShadowType.In;
            sw.AddWithViewport(tv2);
            middleNb.Add(sw);
            sw            = new ScrolledWindow();
            sw.ShadowType = ShadowType.In;
            sw.AddWithViewport(tv3);
            lowerNb.Add(sw);
            AddWithViewport(outerVPaned);
            ShowAll();
        }
        void AddCustomTab()
        {
            var mainVBox = new VBox();

            mainVBox.Margin = 10;
            notebook.Add(mainVBox, "Custom");

            var customHBox = new HBox();

            mainVBox.PackStart(customHBox, false);

            var label = new Label();

            label.Text = "Custom Text:";
            customHBox.PackStart(label);

            customMessageTextEntry = new TextEntry();
            customHBox.PackStart(customMessageTextEntry, true);
        }
Ejemplo n.º 13
0
        public MainWindow()
            : base(WindowType.Toplevel)
        {
            this.barChart          = new SmartQuant.Controls.BarChart.BarChart();
            this.barChart2         = new SmartQuant.Controls.BarChart.BarChart2();
            this.chart3            = new SmartQuant.FinChart.Chart();
            this.chart3.ActionType = ChartActionType.Cross;
            var nb = new Notebook();

            nb.Add(barChart);
            nb.SetTabLabelText(barChart, "Chart");
            nb.Add(barChart2);
            nb.SetTabLabelText(barChart2, "Chart(Gapless)");
            nb.Add(chart3);
            nb.SetTabLabelText(chart3, "Performance");
            Add(nb);
            SetDefaultSize(624, 362);

            DeleteEvent += (sender, e) =>
            {
                Application.Quit();
                e.RetVal = true;
            };

            var f = new Framework("Demo", true);

            f.IsDisposable    = false;
            f.GroupDispatcher = new GroupDispatcher(f);
            this.barChart.Init(f, null, null);
            this.barChart2.Init(f, null, null);
            this.barChart.ResumeUpdates();
            this.barChart2.ResumeUpdates();

            GLib.Timeout.Add(500, new TimeoutHandler(delegate
            {
                barChart.UpdateGUI();
                barChart2.UpdateGUI();
                return(true);
            }));

            // Until the framework is created, We cannot show them
            ShowAll();
        }
Ejemplo n.º 14
0
		public void HiddenTree ()
		{
			var f = new DataField<string> ();
			TreeStore ts = new TreeStore (f);
			var node = ts.AddNode ().SetValue (f, "1").AddChild ().SetValue (f, "2").AddChild ().SetValue (f, "3");
			var tree = new TreeView (ts);

			Window w = new Window ();
			Notebook nb = new Notebook ();
			nb.Add (new Label ("Hi"), "One");
			nb.Add (tree, "Two");
			w.Content = nb;
			ShowWindow (w);

			tree.ScrollToRow (node.CurrentPosition);

			tree.Columns.Add ("Hi", f);

			tree.ScrollToRow (node.CurrentPosition);
		}
Ejemplo n.º 15
0
        private MainWindow(Builder builder) : base(builder.GetObject("MainWindow").Handle)
        {
            base.SetDefaultSize(900, 900);
            CssProvider provider = new CssProvider();

            provider.LoadFromPath(@"Styles/gtk-dark.gtk-3.0.Materia.css");

            builder.Autoconnect(this);

            Gtk.StyleContext.AddProviderForScreen(Gdk.Screen.Default, provider, 800);

            DeleteEvent               += Window_DeleteEvent;
            _openfilebutton.Clicked   += Openfile_Clicked;
            _openfolderbutton.Clicked += Openfolder_Clicked;
            _SaveButton.Clicked       += SaveButton_Click;
            FileTextEditor.closefile  += CloseEditor;
            _folderexplore.openfile   += OpenFolderOpenFile;

            //Added to keep the Notebook from Breaking
            _maineditorbook.Add(new Label("Open A file"));
        }
Ejemplo n.º 16
0
        private void Build()
        {
            _container.PackStart(_menu, false, false, 0);
            _container.Add(_pane);
            _container.PackEnd(Statusbar, false, false, 0);
            Add(_container);

            // Menubar
            _fileMenu.Add(_sync);
            _sync.Activated += OnSync;
            _fileMenu.Add(_settings);
            _settings.Activated += OnSettings;
            _fileMenu.Add(_close);
            _close.Activated += delegate { Visible = false; };
            _fileMenu.Add(new SeparatorMenuItem());
            _fileMenu.Add(_quit);
            _quit.Activated += delegate { Application.Quit(); };
            _menu.Add(_file);
            _file.Submenu = _fileMenu;
            _helpMenu.Add(_updates);
            _helpMenu.Add(_about);
            _about.Activated += OnAbout;
            _menu.Add(_help);
            _help.Submenu = _helpMenu;

            // Sidebar
            _pane.Add1(_sidebar);
            _sidebar.CursorChanged += OnSidebarActivated;
            var crp = new CellRendererPixbuf();
            var crt = new CellRendererText();

            _column.PackStart(crp, true);
            _column.PackEnd(crt, true);
            _column.AddAttribute(crp, "pixbuf", 0);
            _column.AddAttribute(crt, "text", 1);
            _sidebar.AppendColumn(_column);
            _sidebar.HeadersVisible = false;
            //TODO find icons
            _store.AppendValues(Pixbuf.LoadFromResource("Trackr.Gui.Gtk.Resources.icons.anime.png"), "Anime");
            _store.AppendValues(Pixbuf.LoadFromResource("Trackr.Gui.Gtk.Resources.icons.manga.png"), "Manga");
            var i = _store.AppendValues(Pixbuf.LoadFromResource("Trackr.Gui.Gtk.Resources.icons.find.png"), "Search");

            _store.AppendValues(i, Pixbuf.LoadFromResource("Trackr.Gui.Gtk.Resources.icons.search.png"), "Anime ");             // the extra space means search!
            _store.AppendValues(i, Pixbuf.LoadFromResource("Trackr.Gui.Gtk.Resources.icons.search.png"), "Manga ");

            // Notebook
            _pane.Add2(_nb);
            _nb.ShowTabs = false;
            _nb.Add(AnimeBox);
            _nb.Add(_mangaBox);
            _nb.Add(_nullAccountBox);
            _nb.Add(_defaultSearch);
            _nb.Add(AnimeSearch);
            _nb.Add(_mangaSearch);

            // toolbar buttons
            AnimeBox.SettingsItem.Clicked += OnSettings;
            AnimeBox.SyncItem.Clicked     += OnSync;
        }
Ejemplo n.º 17
0
        public Notebook ToSdkObject()
        {
            var notebook = new Notebook(this.Metadata?.ToSdkObject(), this.NotebookFormat.GetValueOrDefault(), this.NotebookFormatMinor.GetValueOrDefault(),
                                        this.Cells?.Select(element => element?.ToSdkObject()))
            {
                Description       = this.Description,
                BigDataPool       = this.BigDataPool?.ToSdkObject(),
                SessionProperties = this.SessionProperties?.ToSdkObject()
            };

            this.AdditionalProperties?.ForEach(item => notebook.Add(item.Key, item.Value));
            return(notebook);
        }
Ejemplo n.º 18
0
        public NotebookSample()
        {
            Notebook nb = new Notebook();
            nb.Add(new ListView2(), "Browser Settings");
            nb.Add(new Tables(), "Locators");
            nb.Add(new TreeViews(), "Page Objects");
            nb.Add(new RadioButtonSample(), "Locators");
            nb.Add(new MyTestWidget(), "Source Code");
            nb.Add(new Frames(), "HTML Source");
            nb.Add(new ScrollWindowSample(), "ScrollWindow");
                        nb.Add(new TextEntries (), "Playground");

            nb.TabOrientation = NotebookTabOrientation.Top;
            PackStart(nb, true);
        }
        void BuildGui()
        {
            _baseSizeBox.PackStart(_baseSizeLabel);
            _baseSizeBox.PackEnd(_radioButtonsBox);
            _radioButtonsBox.PackStart(_3xRadioButton);
            _radioButtonsBox.PackStart(_4xRadioButton);
            _mainBox.PackStart(_baseSizeBox, marginBottom: 5);

            _mainBox.PackStart(_imagesLabel);
            _imagesBox.PackStart(_imagesListView, marginTop: 5);
            _imagesBox.PackEnd(_imagesSelectorButton);
            _mainBox.PackStart(_imagesBox);

            _mainBox.PackStart(_overwriteFilesCheckBox, marginBottom: 10);

            _iOSBox.PackStart(_iOSCheckBox);
            _iOSBox.PackStart(_iOSOptionsLabel);
            _mainBox.PackStart(_iOSBox);

            _androidBox.PackStart(_androidCheckBox);
            _androidBox.PackStart(_androidOptionsLabel);
            _mainBox.PackStart(_androidBox);

            _androidDrawableBox.PackStart(_androidDrawableCheckBox);
            _androidDrawableBox.PackStart(_androidDrawableOptionsLabel);
            _mainBox.PackStart(_androidDrawableBox);

            _mainBox.PackEnd(_generateButton, hpos: WidgetPlacement.End);
            _mainBox.Margin = new WidgetSpacing(10, 10, 10, 10);

            _mainNotebook.Add(_mainBox, " Main ");
            _mainNotebook.Add(_resultListView, " Output ");

            Content   = _mainNotebook;
            Resizable = false;
        }
Ejemplo n.º 20
0
        private void save_button_Click(object sender, RoutedEventArgs e)
        {
            if (titleTextBox.Text == "")
            {
                return;
            }

            DateTime temp = DateTime.Now;

            if (Notebook.rememberThis != null)
            {
                temp = Notebook.rememberThis.DateCreate;
                if (titleTextBox.Text != Notebook.rememberThis.Title)
                {
                    Notebook.Delete(Notebook.rememberThis);
                }
                else
                {
                    Notebook.RemoveAt(Notebook.IndexOf(Notebook.rememberThis));
                }
            }
            else
            {
                foreach (Note x in Notebook.notebook)
                {
                    if (titleTextBox.Text.ToLower().Equals(x.Title.ToLower()))
                    {
                        MessageBox.Show("Note with same title already exist.");
                        return;
                    }
                }
            }

            Notebook.Add(new Note(titleTextBox.Text, richTextBox.Document, temp, DateTime.Now));
            Notebook.Last().SaveToFile(String.Format("{0}{1}.note", Evennote.path, Notebook.Last().Title));
            File.SetCreationTime(String.Format("{1}{0}.note", Notebook.Last().Title, Evennote.path), temp);
            Notebook.Last().DateChanged = File.GetLastWriteTime(String.Format("{1}{0}.note", Notebook.Last().Title, Evennote.path));
            ((Application.Current.MainWindow as MainWindow).mainframe.Content as menu_page).frame.Source = new Uri("notes_page.xaml", UriKind.Relative);
        }
Ejemplo n.º 21
0
        public void adicionaTabPage(Notebook noteBook, HPaned spPanel, string nomeAba)
        {
            HBox tabAba;

            Gtk.Image imgAba;
            Label     labAba;

            noteBook.Add(spPanel);

            tabAba = new HBox();
            imgAba = new Gtk.Image(ExtensaoBO.Instancia.CDOuroGIF);

            labAba           = new Label();
            labAba.Name      = "labAba" + nomeAba;
            labAba.LabelProp = nomeAba;

            tabAba.Add(imgAba);
            tabAba.Add(labAba);

            noteBook.SetTabLabel(spPanel, tabAba);
            tabAba.ShowAll();
            noteBook.ShowAll();
        }
        private void Build()
        {
            this.Title         = "MonoGame Packager";
            this.DefaultWidth  = this.WidthRequest = 640;
            this.DefaultHeight = this.HeightRequest = 480;

#if WINDOWS
            this.ModifyBg(StateType.Normal, new Gdk.Color(255, 255, 255));
#endif

#if GTK3
            var geom = new Gdk.Geometry();
            geom.MinWidth  = geom.MaxWidth = this.DefaultWidth;
            geom.MinHeight = geom.MaxHeight = this.DefaultHeight;
            this.SetGeometryHints(this, geom, Gdk.WindowHints.MinSize | Gdk.WindowHints.MaxSize);
#else
            this.Resizable = false;
#endif

            vbox1         = new VBox();
            vbox1.Spacing = 4;

            notebook1            = new Notebook();
            notebook1.ShowBorder = false;
            notebook1.ShowTabs   = false;

            // Wizard Page 0

            vbox2         = new VBox();
            vbox2.Spacing = 10;

            label1              = new Label();
            label1.Wrap         = true;
            label1.LineWrapMode = Pango.WrapMode.Word;
            label1.Text         = "Welcome to MonoGame Packager\n" +
                                  "\n" +
                                  "This tool will help you pack you desktop game for redistribution. It offers 2 options, installer and bundle of binaries. The difference between bundling the game into an archive with this tool and doing it by hand is the fact that this tool will help by adding per platform dependencies.";
            vbox2.PackStart(label1, true, true, 0);

            label2 = new Label("Do note that installer generation is usually only supported for the OS this tool is run from.\n");
            vbox2.PackStart(label2, false, true, 1);

            notebook1.Add(vbox2);

            // Wizaed Page 1

            table1 = new Table(5, 3, false);

            table1.Attach(new Label(), 0, 3, 0, 1);

            label3 = new Label(" Select game folder: ");
            label3.SetAlignment(0f, 0.5f);
            table1.Attach(label3, 0, 1, 1, 2, AttachOptions.Fill, AttachOptions.Fill, 4, 4);

            entryGameDir           = new Entry();
            entryGameDir.Sensitive = false;
            table1.Attach(entryGameDir, 1, 2, 1, 2, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Fill, 4, 4);

            btnBrowse          = new Button("Browse...");
            btnBrowse.Clicked += BtnBrowse_Clicked;
            table1.Attach(btnBrowse, 2, 3, 1, 2, AttachOptions.Fill, AttachOptions.Fill, 4, 4);

            label4 = new Label(" Select game .exe file:");
            label4.SetAlignment(0f, 0.5f);
            table1.Attach(label4, 0, 1, 2, 3, AttachOptions.Fill, AttachOptions.Fill, 4, 4);

            scroll1 = new ScrolledWindow();
            scroll1.HeightRequest = 200;

            treeview1 = new TreeView();
            treeview1.HeightRequest  = scroll1.HeightRequest;
            treeview1.HeadersVisible = false;
            treeview1.Reorderable    = false;
            treeview1.CursorChanged += Treeview1_CursorChanged;

            scroll1.Add(treeview1);

            table1.Attach(scroll1, 0, 3, 3, 4, AttachOptions.Fill, AttachOptions.Shrink, 0, 0);

            table1.Attach(new Label(), 0, 3, 4, 5);

            notebook1.Add(table1);

            // Wizard Page 2

            table2 = new Table(10, 3, false);

            table2.Attach(new Label(), 0, 3, 0, 1);

            imageIcon = new Image();

            btnIcon = new Button(imageIcon);
            btnIcon.WidthRequest = btnIcon.HeightRequest = 64;
            btnIcon.Clicked     += BtnIcon_Clicked;
            table2.Attach(btnIcon, 0, 1, 1, 3, AttachOptions.Fill, AttachOptions.Fill, 4, 4);

            label5 = new Label("Title:");
            label5.SetAlignment(0f, 0.5f);
            table2.Attach(label5, 1, 2, 1, 2, AttachOptions.Fill, AttachOptions.Shrink, 4, 4);

            entryTitle = new Entry();
            table2.Attach(entryTitle, 2, 3, 1, 2, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Shrink, 4, 4);

            label6 = new Label("Version:");
            label6.SetAlignment(0f, 0.5f);
            table2.Attach(label6, 1, 2, 2, 3, AttachOptions.Fill, AttachOptions.Fill, 4, 4);

            entryVersion = new Entry();
            table2.Attach(entryVersion, 2, 3, 2, 3, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Shrink, 4, 4);

            label7 = new Label("Creator:");
            label7.SetAlignment(0f, 0.5f);
            table2.Attach(label7, 1, 2, 3, 4, AttachOptions.Fill, AttachOptions.Fill, 4, 4);

            entryCompany = new Entry();
            table2.Attach(entryCompany, 2, 3, 3, 4, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Shrink, 4, 4);

            table2.Attach(new HSeparator(), 0, 3, 4, 5, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Shrink, 4, 4);

            table3 = new Table(3, 5, false);

            label8 = new Label("Generate bundle of binaries:");
            label8.SetAlignment(0f, 0.5f);
            table3.Attach(label8, 0, 1, 0, 1, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Shrink, 4, 4);

            var bundlers = Generators.GetBundlerList();
            for (int i = 0; i < bundlers.Count; i++)
            {
                var checkButton = new TagCheckButton(bundlers[i].Name);
                checkButton.SetAlignment(0f, 0.5f);
                checkButton.Tag      = bundlers[i];
                checkButton.Toggled += (sender, e) => btnNext.Sensitive = Page3NextSensitive();

                table3.Attach(checkButton, 0, 1, 1 + (uint)i, 2 + (uint)i, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Shrink, 20, 2);
                checkBundlers.Add(checkButton);
            }

            label9 = new Label("Generate installer:");
            label9.SetAlignment(0f, 0.5f);
            table3.Attach(label9, 2, 3, 0, 1, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Shrink, 4, 4);

            var installers = Generators.GetInstallerList();
            for (int i = 0; i < installers.Count; i++)
            {
                var checkButton = new TagCheckButton(installers[i].Name);
                checkButton.SetAlignment(0f, 0.5f);
                checkButton.Tag      = installers[i];
                checkButton.Toggled += (sender, e) => btnNext.Sensitive = Page3NextSensitive();

                table3.Attach(checkButton, 2, 3, 1 + (uint)i, 2 + (uint)i, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Shrink, 20, 2);
                checkInstallers.Add(checkButton);
            }

            table2.Attach(table3, 0, 3, 5, 6, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Fill, 40, 4);

            table2.Attach(new Label(), 0, 3, 6, 7);

            notebook1.Add(table2);

            // Wizard Page 3

            vbox3             = new VBox();
            vbox3.BorderWidth = 4;
            vbox3.Spacing     = 4;

            label10 = new Label("Select output folder:");
            label10.SetAlignment(0f, 1f);
            vbox3.PackStart(label10, true, true, 0);

            hbox2         = new HBox();
            hbox2.Spacing = 4;

            entryOutputDir           = new Entry();
            entryOutputDir.Sensitive = false;
            hbox2.PackStart(entryOutputDir, true, true, 0);

            btnBrowse2          = new Button("Browse...");
            btnBrowse2.Clicked += BtnBrowse2_Clicked;
            hbox2.PackStart(btnBrowse2, false, true, 1);

            vbox3.PackStart(hbox2, false, false, 1);

            vbox3.PackStart(new Label(), true, true, 2);

            notebook1.Add(vbox3);

            // Wizard Page 4

            scroll2 = new ScrolledWindow();

            textView1 = new TextView();
            scroll2.Add(textView1);

            notebook1.Add(scroll2);

            // Control Buttons

            vbox1.PackStart(notebook1, true, true, 0);

            var eventBox = new EventBox();
#if WINDOWS
            eventBox.ModifyBg(StateType.Normal, new Gdk.Color(240, 240, 240));
#endif

            hbox1             = new HBox();
            hbox1.BorderWidth = 10;

            btnCancel = new Button("Cancel");
            btnCancel.WidthRequest = 90;
            btnCancel.Clicked     += (sender, e) => Application.Quit();
            hbox1.PackStart(btnCancel, false, false, 0);

            hbox1.PackStart(new Label(), true, true, 1);

            btnPrev = new Button("Previous");
            btnPrev.WidthRequest = btnCancel.WidthRequest;
            btnPrev.Clicked     += BtnPrev_Clicked;
            btnPrev.Sensitive    = false;
            hbox1.PackStart(btnPrev, false, false, 2);

            btnNext = new Button("Next");
            btnNext.WidthRequest = btnCancel.WidthRequest;
            btnNext.Clicked     += BtnNext_Clicked;
            hbox1.PackStart(btnNext, false, false, 3);

            eventBox.Add(hbox1);
            vbox1.PackStart(eventBox, false, true, 1);

            this.Add(vbox1);
            this.ShowAll();

            this.DeleteEvent += OnDeleteEvent;
        }
Ejemplo n.º 23
0
        void Build()
        {
            paned = new HPaned();

            var tasksVBox = new VBox();

            tasksVBox.MinWidth   = 400;
            paned.Panel1.Content = tasksVBox;

            projectsComboBox = new ComboBox();
            tasksVBox.PackStart(projectsComboBox);

            tasksTreeView = new TreeView();
            tasksTreeView.HeadersVisible = false;
            tasksVBox.PackStart(tasksTreeView, true, true);

            taskRunnerField         = new DataField <TaskRunnerTreeNode> ();
            taskRunnerNodeIconField = new DataField <Image> ();
            taskRunnerNodeNameField = new DataField <string> ();
            tasksTreeStore          = new TreeStore(
                taskRunnerNodeIconField,
                taskRunnerNodeNameField,
                taskRunnerField);
            tasksTreeView.DataSource = tasksTreeStore;

            taskCellView = new TaskCellView {
                ImageField = taskRunnerNodeIconField,
                NameField  = taskRunnerNodeNameField
            };

            var column = new ListViewColumn("Task", taskCellView);

            tasksTreeView.Columns.Add(column);

            notebook = new Notebook();
            notebook.TabOrientation = NotebookTabOrientation.Top;
            paned.Panel2.Content    = notebook;
            paned.Panel2.Resize     = true;

            bindingsTreeView = new TreeView();
            bindingsTreeView.HeadersVisible = false;
            notebook.Add(bindingsTreeView, GettextCatalog.GetString("Bindings"));

            bindingNodeNameField = new DataField <string> ();
            bindingNodeIconField = new DataField <Image> ();
            bindingNodeField     = new DataField <TaskBindingTreeNode> ();
            bindingsTreeStore    = new TreeStore(
                bindingNodeIconField,
                bindingNodeNameField,
                bindingNodeField);
            bindingsTreeView.DataSource = bindingsTreeStore;

            bindingCellView = new TaskCellView {
                ImageField = bindingNodeIconField,
                NameField  = bindingNodeNameField
            };

            column = new ListViewColumn("Binding", bindingCellView);
            bindingsTreeView.Columns.Add(column);

            AddBindingsTreeNodes();

            Content = paned;
        }
Ejemplo n.º 24
0
	  /******************************************
			THIS IS AUTO GENERATED CODE BY GLADEBUILDER
			DO NOT EDIT
			USE THE IMPLEMENTATION CLASS INSTEAD
	  *******************************************/
	  namespace GladeBuilder
Ejemplo n.º 25
0
 protected virtual void Build()
 {
     // Widget BizeeBirdBoarding.Ui.MainWindow
     Name           = "BizeeBirdBoarding.Ui.MainWindow";
     Title          = "BiZee Bird Boarding";
     WindowPosition = WindowPosition.CenterOnParent;
     DefaultWidth   = 1115;
     DefaultHeight  = 480;
     // Container child BizeeBirdBoarding.Ui.MainWindow.Container+ContainerChild
     topLevelVbox         = new VBox();
     topLevelVbox.Name    = "topLevelVbox";
     topLevelVbox.Spacing = 6;
     // Container child topLevelVbox.Box+BoxChild
     toolbarButtonBox             = new HButtonBox();
     toolbarButtonBox.Name        = "toolbarButtonBox";
     toolbarButtonBox.LayoutStyle = ButtonBoxStyle.Start;
     // Container child toolbarButtonBox.ButtonBox+ButtonBoxChild
     button1              = new Button();
     button1.CanFocus     = true;
     button1.Name         = "button1";
     button1.UseUnderline = true;
     button1.Label        = "New Customer";
     toolbarButtonBox.Add(button1);
     ButtonBox.ButtonBoxChild w1 = (ButtonBox.ButtonBoxChild)toolbarButtonBox[button1];
     w1.Expand = false;
     w1.Fill   = false;
     // Container child toolbarButtonBox.ButtonBox+ButtonBoxChild
     button2              = new Button();
     button2.CanFocus     = true;
     button2.Name         = "button2";
     button2.UseUnderline = true;
     button2.Label        = "New Appointment";
     toolbarButtonBox.Add(button2);
     ButtonBox.ButtonBoxChild w2 = (ButtonBox.ButtonBoxChild)toolbarButtonBox[button2];
     w2.Position = 1;
     w2.Expand   = false;
     w2.Fill     = false;
     topLevelVbox.Add(toolbarButtonBox);
     Box.BoxChild w3 = ((Box.BoxChild)(topLevelVbox[toolbarButtonBox]));
     w3.Position = 0;
     w3.Expand   = false;
     w3.Fill     = false;
     // Container child topLevelVbox.Box+BoxChild
     notebook             = new Notebook();
     notebook.CanFocus    = true;
     notebook.Name        = "notebook";
     notebook.CurrentPage = 0;
     // Container child notebook.Notebook+NotebookChild
     appointmentsTabHPaned      = new HPaned();
     appointmentsTabHPaned.Name = "appointmentsTabHPaned";
     // Container child appointmentsTabHPaned.Paned+PanedChild
     upcomingDropOffsFrame = new Frame();
     upcomingDropOffsFrame.WidthRequest = 450;
     upcomingDropOffsFrame.Name         = "upcomingDropOffsFrame";
     upcomingDropOffsFrame.ShadowType   = ShadowType.In;
     // Container child upcomingDropOffsFrame.Container+ContainerChild
     upcomingDropOffsGtkAlignment             = new Alignment(0F, 0F, 1F, 1F);
     upcomingDropOffsGtkAlignment.Name        = "upcomingDropOffsGtkAlignment";
     upcomingDropOffsGtkAlignment.LeftPadding = 12;
     // Container child upcomingDropOffsGtkAlignment.Container+ContainerChild
     upcomingDropOffsGtkScrolledWindow            = new ScrolledWindow();
     upcomingDropOffsGtkScrolledWindow.Name       = "upcomingDropOffsGtkScrolledWindow";
     upcomingDropOffsGtkScrolledWindow.ShadowType = ShadowType.In;
     // Container child upcomingDropOffsGtkScrolledWindow.Container+ContainerChild
     upcomingDropOffsTreeView          = new TreeView();
     upcomingDropOffsTreeView.CanFocus = true;
     upcomingDropOffsTreeView.Name     = "upcomingDropOffsTreeView";
     upcomingDropOffsGtkScrolledWindow.Add(upcomingDropOffsTreeView);
     upcomingDropOffsGtkAlignment.Add(upcomingDropOffsGtkScrolledWindow);
     upcomingDropOffsFrame.Add(upcomingDropOffsGtkAlignment);
     upcomingDropOffsLabel             = new Label();
     upcomingDropOffsLabel.Name        = "upcomingDropOffsLabel";
     upcomingDropOffsLabel.LabelProp   = "<b>Upcoming Drop Offs</b>";
     upcomingDropOffsLabel.UseMarkup   = true;
     upcomingDropOffsFrame.LabelWidget = upcomingDropOffsLabel;
     appointmentsTabHPaned.Add(upcomingDropOffsFrame);
     Paned.PanedChild w7 = (Paned.PanedChild)appointmentsTabHPaned[upcomingDropOffsFrame];
     w7.Resize = false;
     // Container child appointmentsTabHPaned.Paned+PanedChild
     upcomingPickupsFrame            = new Frame();
     upcomingPickupsFrame.Name       = "upcomingPickupsFrame";
     upcomingPickupsFrame.ShadowType = ShadowType.In;
     // Container child upcomingPickupsFrame.Container+ContainerChild
     upcomingPickupsAlignment             = new Alignment(0F, 0F, 1F, 1F);
     upcomingPickupsAlignment.Name        = "upcomingPickupsAlignment";
     upcomingPickupsAlignment.LeftPadding = 12;
     // Container child upcomingPickupsAlignment.Container+ContainerChild
     upcomingPickupsScrolledWindow            = new ScrolledWindow();
     upcomingPickupsScrolledWindow.Name       = "upcomingPickupsScrolledWindow";
     upcomingPickupsScrolledWindow.ShadowType = ShadowType.In;
     // Container child upcomingPickupsScrolledWindow.Container+ContainerChild
     upcomingPickupsTreeview          = new TreeView();
     upcomingPickupsTreeview.CanFocus = true;
     upcomingPickupsTreeview.Name     = "upcomingPickupsTreeview";
     upcomingPickupsScrolledWindow.Add(upcomingPickupsTreeview);
     upcomingPickupsAlignment.Add(upcomingPickupsScrolledWindow);
     upcomingPickupsFrame.Add(upcomingPickupsAlignment);
     upcomingPickupsLabel             = new Label();
     upcomingPickupsLabel.Name        = "upcomingPickupsLabel";
     upcomingPickupsLabel.LabelProp   = "<b>Upcoming Pickups</b>";
     upcomingPickupsLabel.UseMarkup   = true;
     upcomingPickupsFrame.LabelWidget = upcomingPickupsLabel;
     appointmentsTabHPaned.Add(upcomingPickupsFrame);
     notebook.Add(appointmentsTabHPaned);
     // Notebook tab
     appointmentsTabLabel           = new Label();
     appointmentsTabLabel.Name      = "appointmentsTabLabel";
     appointmentsTabLabel.LabelProp = "Appointments";
     notebook.SetTabLabel(appointmentsTabHPaned, appointmentsTabLabel);
     appointmentsTabLabel.ShowAll();
     // Container child notebook.Notebook+NotebookChild
     customerTabVbox         = new VBox();
     customerTabVbox.Name    = "customerTabVbox";
     customerTabVbox.Spacing = 6;
     // Container child customerTabVbox.Box+BoxChild
     hbox1         = new HBox();
     hbox1.Name    = "hbox1";
     hbox1.Spacing = 6;
     // Container child hbox1.Box+BoxChild
     customerSearchLabel           = new Label();
     customerSearchLabel.Name      = "customerSearchLabel";
     customerSearchLabel.LabelProp = "Search";
     hbox1.Add(customerSearchLabel);
     Box.BoxChild w13 = (Box.BoxChild)hbox1[customerSearchLabel];
     w13.Position = 0;
     w13.Expand   = false;
     w13.Fill     = false;
     // Container child hbox1.Box+BoxChild
     customerSearchEntry            = new Entry();
     customerSearchEntry.CanFocus   = true;
     customerSearchEntry.Name       = "customerSearchEntry";
     customerSearchEntry.IsEditable = true;
     hbox1.Add(customerSearchEntry);
     Box.BoxChild w14 = (Box.BoxChild)hbox1[customerSearchEntry];
     w14.Position = 1;
     customerTabVbox.Add(hbox1);
     Box.BoxChild w15 = (Box.BoxChild)customerTabVbox[hbox1];
     w15.Position = 0;
     w15.Expand   = false;
     w15.Fill     = false;
     // Container child customerTabVbox.Box+BoxChild
     customersScrolledWindow            = new ScrolledWindow();
     customersScrolledWindow.Name       = "customersScrolledWindow";
     customersScrolledWindow.ShadowType = ShadowType.In;
     // Container child customersScrolledWindow.Container+ContainerChild
     customersTreeview          = new TreeView();
     customersTreeview.CanFocus = true;
     customersTreeview.Name     = "customersTreeview";
     customersScrolledWindow.Add(customersTreeview);
     customerTabVbox.Add(customersScrolledWindow);
     Box.BoxChild w17 = (Box.BoxChild)customerTabVbox[customersScrolledWindow];
     w17.Position = 1;
     notebook.Add(customerTabVbox);
     Notebook.NotebookChild w18 = (Notebook.NotebookChild)notebook[customerTabVbox];
     w18.Position = 1;
     // Notebook tab
     customerTabLabel           = new Label();
     customerTabLabel.Name      = "customerTabLabel";
     customerTabLabel.LabelProp = "Customers";
     notebook.SetTabLabel(customerTabVbox, customerTabLabel);
     customerTabLabel.ShowAll();
     // Container child notebook.Notebook+NotebookChild
     historyTablVbox         = new VBox();
     historyTablVbox.Name    = "historyTablVbox";
     historyTablVbox.Spacing = 6;
     // Container child historyTablVbox.Box+BoxChild
     historySearchHbox         = new HBox();
     historySearchHbox.Name    = "historySearchHbox";
     historySearchHbox.Spacing = 6;
     // Container child historySearchHbox.Box+BoxChild
     historySearchLabel           = new Label();
     historySearchLabel.Name      = "historySearchLabel";
     historySearchLabel.LabelProp = "Search";
     historySearchHbox.Add(historySearchLabel);
     Box.BoxChild w19 = (Box.BoxChild)historySearchHbox[historySearchLabel];
     w19.Position = 0;
     w19.Expand   = false;
     w19.Fill     = false;
     // Container child historySearchHbox.Box+BoxChild
     historySearchEntry            = new Entry();
     historySearchEntry.CanFocus   = true;
     historySearchEntry.Name       = "historySearchEntry";
     historySearchEntry.IsEditable = true;
     historySearchHbox.Add(historySearchEntry);
     Box.BoxChild w20 = (Box.BoxChild)historySearchHbox[historySearchEntry];
     w20.Position = 1;
     historyTablVbox.Add(historySearchHbox);
     Box.BoxChild w21 = (Box.BoxChild)historyTablVbox[historySearchHbox];
     w21.Position = 0;
     w21.Expand   = false;
     w21.Fill     = false;
     // Container child historyTablVbox.Box+BoxChild
     historyScrolledWindow            = new ScrolledWindow();
     historyScrolledWindow.Name       = "historyScrolledWindow";
     historyScrolledWindow.ShadowType = ShadowType.In;
     // Container child historyScrolledWindow.Container+ContainerChild
     historyTreeview          = new TreeView();
     historyTreeview.CanFocus = true;
     historyTreeview.Name     = "historyTreeview";
     historyScrolledWindow.Add(historyTreeview);
     historyTablVbox.Add(historyScrolledWindow);
     Box.BoxChild w23 = (Box.BoxChild)historyTablVbox[historyScrolledWindow];
     w23.Position = 1;
     notebook.Add(historyTablVbox);
     Notebook.NotebookChild w24 = (Notebook.NotebookChild)notebook[historyTablVbox];
     w24.Position = 2;
     // Notebook tab
     historyTabLabel           = new Label();
     historyTabLabel.Name      = "historyTabLabel";
     historyTabLabel.LabelProp = "History";
     notebook.SetTabLabel(historyTablVbox, historyTabLabel);
     historyTabLabel.ShowAll();
     topLevelVbox.Add(notebook);
     Box.BoxChild w25 = (Box.BoxChild)topLevelVbox[notebook];
     w25.Position = 1;
     Add(topLevelVbox);
     if ((Child != null))
     {
         Child.ShowAll();
     }
     Show();
     DeleteEvent     += new DeleteEventHandler(OnDeleteEvent);
     button1.Clicked += new System.EventHandler(onNewCustomerClicked);
     button2.Clicked += new System.EventHandler(onNewApointmentButtonClicked);
     upcomingDropOffsTreeView.RowActivated += new RowActivatedHandler(onUpcomingDropOffsRowActivated);
     upcomingPickupsTreeview.RowActivated  += new RowActivatedHandler(onUpcomingPickupsRowActivated);
     customerSearchEntry.Changed           += new System.EventHandler(onCustomerSearchEntryChanged);
     customersTreeview.RowActivated        += new RowActivatedHandler(onCustomersRowActivated);
     historySearchEntry.Changed            += new System.EventHandler(onHistorySearchEntryChanged);
     historyTreeview.RowActivated          += new RowActivatedHandler(onHistoryRowActivated);
 }
Ejemplo n.º 26
0
    protected virtual void Build()
    {
        BorderWidth = 0;

        notebook1             = new Notebook();
        notebook1.CurrentPage = 0;
        notebook1.ShowTabs    = false;
        notebook1.BorderWidth = 0;
        notebook1.ShowBorder  = false;

        scrolledwindow1             = new ScrolledWindow();
        scrolledwindow1.CanFocus    = true;
        scrolledwindow1.ShadowType  = ShadowType.None;
        scrolledwindow1.BorderWidth = 0;

        Viewport w1 = new Viewport();

        w1.ShadowType  = ShadowType.None;
        w1.BorderWidth = 0;

        fixed1           = new Fixed();
        fixed1.HasWindow = true;
        w1.Add(fixed1);
        scrolledwindow1.Add(w1);
        notebook1.Add(scrolledwindow1);

        label1 = new Label();
        notebook1.SetTabLabel(scrolledwindow1, label1);
        label1.ShowAll();

        vbox2 = new VBox();

        eventbox_titlebar = new EventBox();
        eventbox_titlebar.HeightRequest = 24;

        hbox1 = new HBox();

        label_title = new Label();
        hbox1.Add(label_title);
        Box.BoxChild w5 = ((Box.BoxChild)(hbox1[label_title]));
        w5.Position = 1;

        eventbox_restore = new EventBox();

        image_restore        = new Image();
        image_restore.Pixbuf = RestoreImageNormal;
        eventbox_restore.Add(image_restore);
        hbox1.Add(eventbox_restore);
        Box.BoxChild w7 = ((Box.BoxChild)(hbox1[eventbox_restore]));
        w7.Position = 2;
        w7.Expand   = false;
        w7.Fill     = false;

        alignment5 = new Alignment(0.5F, 0.5F, 1F, 1F);
        alignment5.WidthRequest = 7;
        hbox1.Add(alignment5);
        Box.BoxChild w8 = ((Box.BoxChild)(hbox1[alignment5]));
        w8.Position = 3;
        w8.Expand   = false;
        w8.Fill     = false;

        eventbox_close = new EventBox();

        image_close        = new Image();
        image_close.Pixbuf = CloseImageNormal;
        eventbox_close.Add(image_close);
        hbox1.Add(eventbox_close);
        Box.BoxChild w10 = ((Box.BoxChild)(hbox1[eventbox_close]));
        w10.Position = 4;
        w10.Expand   = false;
        w10.Fill     = false;

        alignment6 = new Alignment(0.5F, 0.5F, 1F, 1F);
        alignment6.WidthRequest = 3;
        hbox1.Add(alignment6);
        Box.BoxChild w11 = ((Box.BoxChild)(hbox1[alignment6]));
        w11.Position = 5;
        w11.Expand   = false;
        w11.Fill     = false;
        eventbox_titlebar.Add(hbox1);
        vbox2.Add(eventbox_titlebar);
        Box.BoxChild w13 = ((Box.BoxChild)(vbox2[eventbox_titlebar]));
        w13.Position = 0;
        w13.Expand   = false;
        w13.Fill     = false;

        eventbox1 = new EventBox();
        vbox2.Add(eventbox1);
        Box.BoxChild w14 = ((Box.BoxChild)(vbox2[eventbox1]));
        w14.Position = 1;
        notebook1.Add(vbox2);
        Notebook.NotebookChild w15 = ((Notebook.NotebookChild)(notebook1[vbox2]));
        w15.Position = 1;

        label2 = new Label();
        notebook1.SetTabLabel(vbox2, label2);
        label2.ShowAll();
        Add(notebook1);
        Hide();

        eventbox_restore.EnterNotifyEvent += Restore_Enter;
        eventbox_restore.LeaveNotifyEvent += Restore_Leave;
        eventbox_restore.ButtonPressEvent += Restore_Pressed;

        eventbox_close.EnterNotifyEvent += Close_Enter;
        eventbox_close.LeaveNotifyEvent += Close_Leave;
        eventbox_close.ButtonPressEvent += Close_Pressed;
    }
Ejemplo n.º 27
0
        private void Build()
        {
            if (Toolkit.CurrentEngine.Type == ToolkitType.Wpf)
            {
                this.BackgroundColor = (new Button()).BackgroundColor;
            }

            vbox1 = new VBox();

            label1             = new Label("Select Font:");
            label1.MarginTop   = 4;
            label1.MarginRight = 4;
            label1.MarginLeft  = 4;
            vbox1.PackStart(label1);

            table1             = new Table();
            table1.MarginRight = 4;
            table1.MarginLeft  = 4;

            radioButton1 = new RadioButton("From System: ");
            table1.Add(radioButton1, 0, 0);

            combo_font = new ComboBox();

            List <string> fonts = new List <string>();

            foreach (System.Drawing.FontFamily font in System.Drawing.FontFamily.Families)
            {
                fonts.Add(font.Name);
            }
            fonts.Sort();
            foreach (string font in fonts)
            {
                combo_font.Items.Add(font);
            }

            if (combo_font.Items.Contains("Arial"))
            {
                combo_font.SelectedText = "Arial";
            }
            else if (combo_font.Items.Count > 0)
            {
                combo_font.SelectedIndex = 0;
            }
            combo_font.Font = Xwt.Drawing.Font.FromName(combo_font.SelectedText).WithSize(combo_font.Font.Size);

            table1.Add(combo_font, 1, 0, 1, 1, true);

            radioButton2           = new RadioButton();
            radioButton2.Label     = "From File: ";
            radioButton2.Sensitive = true;
            radioButton2.Group     = radioButton1.Group;
            table1.Add(radioButton2, 0, 1);

            hbox1 = new HBox();

            entry_font           = new TextEntry();
            entry_font.Sensitive = false;
            hbox1.PackStart(entry_font, true);

            button_font           = new Button("Browse");
            button_font.Sensitive = false;
            hbox1.PackStart(button_font);

            table1.Add(hbox1, 1, 1);

            vbox1.PackStart(table1);

            notebook1 = new Notebook();
            notebook1.ExpandHorizontal = true;
            notebook1.ExpandVertical   = true;

            table2        = new Table();
            table2.Margin = 4;

            label4 = new Label("Style:");
            table2.Add(label4, 0, 0);

            hbox2 = new HBox();

            check_bold = new CheckBox("Bold ");
            check_bold.BackgroundColor = Color.FromBytes(0, 0, 0, 0);
            hbox2.PackStart(check_bold);

            check_italic = new CheckBox("Italic ");
            check_italic.BackgroundColor = Color.FromBytes(0, 0, 0, 0);
            hbox2.PackStart(check_italic);

            check_kerning = new CheckBox("Kerning ");
            check_kerning.BackgroundColor = Color.FromBytes(0, 0, 0, 0);
            hbox2.PackStart(check_kerning);

            table2.Add(hbox2, 0, 1, 1, 1);

            label2 = new Label("Size:");
            table2.Add(label2, 0, 2);

            entry_size = new NumericEntry("0", "WARNING: Size needs to be a number");
            table2.Add(entry_size, 0, 3, 1, 1, true);

            label3 = new Label("Spacing:");
            table2.Add(label3, 0, 4);

            entry_spacing = new NumericEntry("0", "WARNING: Spacing needs to be a number");
            table2.Add(entry_spacing, 0, 5, 1, 1, true);

            check_defchar = new CheckBox("Default Character:");
            check_defchar.BackgroundColor = Color.FromBytes(0, 0, 0, 0);
            table2.Add(check_defchar, 0, 6);

            entry_defchar               = new TextEntry();
            entry_defchar.Sensitive     = false;
            entry_defchar.TextAlignment = Alignment.Center;
            table2.Add(entry_defchar, 0, 7, 1, 1, true);

            notebook1.Add(table2, "Global");

            hbox3 = new HBox();

            listView1 = new ListView();
            hbox3.PackStart(listView1, true);

            vbox2             = new VBox();
            vbox2.MarginRight = 5;
            vbox2.MarginTop   = 5;

            label8 = new Label(" Main:");
            vbox2.PackStart(label8);

            button_plus = new Button("Add");
            vbox2.PackStart(button_plus);

            button_minus           = new Button("Remove");
            button_minus.Sensitive = false;
            vbox2.PackStart(button_minus);

            button_edit           = new Button("Edit");
            button_edit.Sensitive = false;
            vbox2.PackStart(button_edit);

            vbox2.PackStart(new HSeparator());

            label9 = new Label(" Move:");
            vbox2.PackStart(label9);

            button_up           = new Button("Up");
            button_up.Sensitive = false;
            vbox2.PackStart(button_up);

            button_down           = new Button("Down");
            button_down.Sensitive = false;
            vbox2.PackStart(button_down);

            hbox3.PackStart(vbox2);

            notebook1.Add(hbox3, "Characters");

            var pa = new VBox();

            textEditor1 = new TextEditor();
            textEditor1.Document.MimeType = "application/xml";

            pa.PackStart(textEditor1, true);
            notebook1.Add(pa, "Xml");

            vbox3 = new VBox();

            hbox4        = new HBox();
            hbox4.Margin = 5;

            label5 = new Label("Font Color: ");
            hbox4.PackStart(label5);

            color_font               = new ColorPicker();
            color_font.Color         = Color.FromBytes(0, 0, 0);
            color_font.SupportsAlpha = false;
            hbox4.PackStart(color_font);

            label6 = new Label("Background Color: ");
            hbox4.PackStart(label6);

            color_back               = new ColorPicker();
            color_back.Color         = Color.FromBytes(224, 224, 209);
            color_back.SupportsAlpha = false;
            hbox4.PackStart(color_back);

            vbox3.PackStart(hbox4);

            hbox5             = new HBox();
            hbox5.MarginLeft  = 5;
            hbox5.MarginRight = 5;

            label7 = new Label("Text: ");
            hbox5.PackStart(label7);

            entry_text      = new TextEntry();
            entry_text.Text = "The quick brown fox jumps over the lazy dog";
            hbox5.PackStart(entry_text, true);

            button_preview = new Button("Preview");
            hbox5.PackStart(button_preview);

            vbox3.PackStart(hbox5);

            web1 = new WebView();

            scrollView2 = new ScrollView();
            scrollView2.HorizontalScrollPolicy = ScrollPolicy.Automatic;
            scrollView2.VerticalScrollPolicy   = ScrollPolicy.Automatic;

            if (Toolkit.CurrentEngine.Type != ToolkitType.Gtk)
            {
                scrollView2.Content = web1;
            }

            vbox3.PackStart(scrollView2, true);

            notebook1.Add(vbox3, "Preview");

            vbox1.PackStart(notebook1, true);

            this.Content = vbox1;
        }
Ejemplo n.º 28
0
        private void Build()
        {
            if(Toolkit.CurrentEngine.Type == ToolkitType.Wpf)
                this.BackgroundColor = (new Button()).BackgroundColor;

            vbox1 = new VBox();

            label1 = new Label("Select Font:");
            label1.MarginTop = 4;
            label1.MarginRight = 4;
            label1.MarginLeft = 4;
            vbox1.PackStart(label1);

            table1 = new Table();
            table1.MarginRight = 4;
            table1.MarginLeft = 4;

            radioButton1 = new RadioButton("From System: ");
            table1.Add(radioButton1, 0, 0);

            combo_font = new ComboBox();

            List<string> fonts = new List<string>();
            foreach (System.Drawing.FontFamily font in System.Drawing.FontFamily.Families)
                fonts.Add(font.Name);
            fonts.Sort();
            foreach (string font in fonts)
                combo_font.Items.Add(font);

            if(combo_font.Items.Contains("Arial"))
                combo_font.SelectedText = "Arial";
            else if(combo_font.Items.Count > 0)
                combo_font.SelectedIndex = 0;
            combo_font.Font = Xwt.Drawing.Font.FromName(combo_font.SelectedText).WithSize(combo_font.Font.Size);

            table1.Add(combo_font, 1, 0, 1, 1, true);

            radioButton2 = new RadioButton();
            radioButton2.Label = "From File: ";
            radioButton2.Sensitive = true;
            radioButton2.Group = radioButton1.Group;
            table1.Add(radioButton2, 0, 1);

            hbox1 = new HBox();

            entry_font = new TextEntry();
            entry_font.Sensitive = false;
            hbox1.PackStart(entry_font, true);

            button_font = new Button("Browse");
            button_font.Sensitive = false;
            hbox1.PackStart(button_font);

            table1.Add(hbox1, 1, 1);

            vbox1.PackStart(table1);

            notebook1 = new Notebook();
            notebook1.ExpandHorizontal = true;
            notebook1.ExpandVertical = true;

            table2 = new Table();
            table2.Margin = 4;

            label4 = new Label("Style:");
            table2.Add(label4, 0, 0);

            hbox2 = new HBox();

            check_bold = new CheckBox("Bold ");
            check_bold.BackgroundColor = Color.FromBytes(0, 0, 0, 0);
            hbox2.PackStart(check_bold);

            check_italic = new CheckBox("Italic ");
            check_italic.BackgroundColor = Color.FromBytes(0, 0, 0, 0);
            hbox2.PackStart(check_italic);

            check_kerning = new CheckBox("Kerning ");
            check_kerning.BackgroundColor = Color.FromBytes(0, 0, 0, 0);
            hbox2.PackStart(check_kerning);

            table2.Add(hbox2, 0, 1, 1, 1);

            label2 = new Label("Size:");
            table2.Add(label2, 0, 2);

            entry_size = new NumericEntry("0", "WARNING: Size needs to be a number");
            table2.Add(entry_size, 0, 3, 1, 1, true);

            label3 = new Label("Spacing:");
            table2.Add(label3, 0, 4);

            entry_spacing = new NumericEntry("0", "WARNING: Spacing needs to be a number");
            table2.Add(entry_spacing, 0, 5, 1, 1, true);

            check_defchar = new CheckBox("Default Character:");
            check_defchar.BackgroundColor = Color.FromBytes(0, 0, 0, 0);
            table2.Add(check_defchar, 0, 6);

            entry_defchar = new TextEntry();
            entry_defchar.Sensitive = false;
            entry_defchar.TextAlignment = Alignment.Center;
            table2.Add(entry_defchar, 0, 7, 1, 1, true);

            notebook1.Add(table2, "Global");

            hbox3 = new HBox();

            listView1 = new ListView();
            hbox3.PackStart(listView1, true);

            vbox2 = new VBox();
            vbox2.MarginRight = 5;
            vbox2.MarginTop = 5;

            label8 = new Label(" Main:");
            vbox2.PackStart(label8);

            button_plus = new Button("Add");
            vbox2.PackStart(button_plus);

            button_minus = new Button("Remove");
            button_minus.Sensitive = false;
            vbox2.PackStart(button_minus);

            button_edit = new Button("Edit");
            button_edit.Sensitive = false;
            vbox2.PackStart(button_edit);

            vbox2.PackStart(new HSeparator());

            label9 = new Label(" Move:");
            vbox2.PackStart(label9);

            button_up  = new Button("Up");
            button_up.Sensitive = false;
            vbox2.PackStart(button_up);

            button_down  = new Button("Down");
            button_down.Sensitive = false;
            vbox2.PackStart(button_down);

            hbox3.PackStart(vbox2);

            notebook1.Add(hbox3, "Characters");

            var pa = new VBox();

            textEditor1 = new TextEditor();
            textEditor1.Document.MimeType = "application/xml";

            pa.PackStart(textEditor1, true);
            notebook1.Add(pa, "Xml");

            vbox3 = new VBox();

            hbox4 = new HBox();
            hbox4.Margin = 5;

            label5 = new Label("Font Color: ");
            hbox4.PackStart(label5);

            color_font = new ColorPicker();
            color_font.Color = Color.FromBytes(0, 0, 0);
            color_font.SupportsAlpha = false;
            hbox4.PackStart(color_font);

            label6 = new Label("Background Color: ");
            hbox4.PackStart(label6);

            color_back = new ColorPicker();
            color_back.Color = Color.FromBytes(224, 224, 209);
            color_back.SupportsAlpha = false;
            hbox4.PackStart(color_back);

            vbox3.PackStart(hbox4);

            hbox5 = new HBox();
            hbox5.MarginLeft = 5;
            hbox5.MarginRight = 5;

            label7 = new Label("Text: ");
            hbox5.PackStart(label7);

            entry_text = new TextEntry();
            entry_text.Text = "The quick brown fox jumps over the lazy dog";
            hbox5.PackStart(entry_text, true);

            button_preview = new Button("Preview");
            hbox5.PackStart(button_preview);

            vbox3.PackStart(hbox5);

            web1 = new WebView();

            scrollView2 = new ScrollView();
            scrollView2.HorizontalScrollPolicy = ScrollPolicy.Automatic;
            scrollView2.VerticalScrollPolicy = ScrollPolicy.Automatic;

            if (Toolkit.CurrentEngine.Type != ToolkitType.Gtk)
                scrollView2.Content = web1;

            vbox3.PackStart(scrollView2, true);

            notebook1.Add(vbox3, "Preview");

            vbox1.PackStart(notebook1, true);

            this.Content = vbox1;
        }
Ejemplo n.º 29
0
        /// <summary>
        /// Initialize other components.
        /// </summary>
        public override void _initializeComponents()
        {
            ExpandVertical   = false;
            ExpandHorizontal = false;

            // Frame Request Name
            Frame RequestNameFrame = new Frame()
            {
                Label   = Director.Properties.Resources.RequestSettings,
                Padding = 10
            };
            VBox RequestNameBox = new VBox();

            RequestNameBox.PackStart(new Label(Director.Properties.Resources.RequestName));
            RequestName = new TextEntry()
            {
                ExpandHorizontal = true
            };
            RequestName.Changed += RequestName_Changed;
            RequestNameBox.PackStart(RequestName);
            RequestNameBox.PackStart(InvalidRequestName);
            RequestNameFrame.Content = RequestNameBox;
            PackStart(RequestNameFrame);

            // Init notebook
            RequestDetails = new Notebook()
            {
                ExpandHorizontal = true,
                ExpandVertical   = true,
                TabOrientation   = NotebookTabOrientation.Top
            };

            // Prepare tabs
            PackStart(RequestDetails, true, true);

            // Request overview
            RequestOverview = new VBox();
            ScrollView RequestOverviewSV = new ScrollView()
            {
                Content = RequestOverview, Margin = (Config.Windows()) ? 0 : 10
            };

            RequestDetails.Add(RequestOverviewSV, Director.Properties.Resources.RequestRequest);

            // Response overview
            RequestStatus = new VBox();
            ScrollView RequestStatusSV = new ScrollView()
            {
                Content = RequestStatus, Margin = (Config.Windows()) ? 0 : 10
            };

            RequestDetails.Add(RequestStatusSV, Director.Properties.Resources.RequestResponse);

            // Add edit button
            Button EditBtn = new Button(Image.FromResource(DirectorImages.EDIT_ICON),
                                        Director.Properties.Resources.MenuEditRequest)
            {
                WidthRequest     = 150,
                ExpandHorizontal = false,
                ExpandVertical   = false
            };

            EditBtn.Clicked += delegate { CurrentMainWindow.OpenEditRequest(ActiveRequest); };
            PackStart(EditBtn, expand: false, hpos: WidgetPlacement.End);
        }
Ejemplo n.º 30
0
        /// <summary>
        /// Initialize other components.
        /// </summary>
        public override void _initializeComponents()
        {
            ExpandVertical = false;
            ExpandHorizontal = false;

            // Frame Request Name
            Frame RequestNameFrame = new Frame()
            {
                Label = Director.Properties.Resources.RequestSettings,
                Padding = 10
            };
            VBox RequestNameBox = new VBox();
            RequestNameBox.PackStart(new Label(Director.Properties.Resources.RequestName));
            RequestName = new TextEntry()
            {
                ExpandHorizontal = true
            };
            RequestName.Changed += RequestName_Changed;
            RequestNameBox.PackStart(RequestName);
            RequestNameBox.PackStart(InvalidRequestName);
            RequestNameFrame.Content = RequestNameBox;
            PackStart(RequestNameFrame);

            // Init notebook
            RequestDetails = new Notebook()
            {
                ExpandHorizontal = true,
                ExpandVertical = true,
                TabOrientation = NotebookTabOrientation.Top
            };

            // Prepare tabs
            PackStart(RequestDetails, true, true);

            // Request overview
            RequestOverview = new VBox();
            ScrollView RequestOverviewSV = new ScrollView()
            {
                Content = RequestOverview, Margin = (Config.Windows()) ? 0 : 10
            };
            RequestDetails.Add(RequestOverviewSV, Director.Properties.Resources.RequestRequest);

            // Response overview
            RequestStatus = new VBox();
            ScrollView RequestStatusSV = new ScrollView()
            {
                Content = RequestStatus, Margin = (Config.Windows()) ? 0 : 10
            };
            RequestDetails.Add(RequestStatusSV, Director.Properties.Resources.RequestResponse);

            // Add edit button
            Button EditBtn = new Button(Image.FromResource(DirectorImages.EDIT_ICON),
                Director.Properties.Resources.MenuEditRequest)
            {
                WidthRequest = 150,
                ExpandHorizontal = false,
                ExpandVertical = false
            };
            EditBtn.Clicked += delegate { CurrentMainWindow.OpenEditRequest(ActiveRequest); };
            PackStart(EditBtn, expand: false, hpos: WidgetPlacement.End);
        }