Esempio n. 1
0
        private void Build()
        {
            EpisodeCounter = new HBox(false, 0);             // Put a SpinButton for episodes in here if needed
            HeaderTable    = new Table(0, 0, false);         // set column and row counts based on specific needs
            Header         = BuildHeader();
            Nb             = new Notebook();
            ListWindow     = new ScrolledWindow();
            ViewWindow     = new ScrolledWindow();
            ListTable      = BuildListTable();

            //Make the notebook
            ListWindow.Add(new Viewport()
            {
                ListTable
            });
            ViewWindow.Add(new Viewport()
            {
                ViewTable
            });
            if (Original.ListStatus != ApiEntry.ListStatuses.NotInList)
            {
                Nb.AppendPage(ListWindow, new Label("List"));
            }
            Nb.AppendPage(ViewWindow, new Label("Details"));

            // Pack everything
            VBox.PackStart(Header, false, false, 5);
            VBox.Add(Nb);
            ActionArea.PackEnd(BuildButtons());
        }
Esempio n. 2
0
        public CommonAboutDialog()
        {
            Title        = MainClass.Languages.Translate("moscrif_ide_title_f1");
            TransientFor = MainClass.MainWindow;
            AllowGrow    = false;
            HasSeparator = false;
            Modal        = true;

            VBox.BorderWidth = 0;

            aboutPictureScrollBox = new ScrollBox();

            VBox.PackStart(aboutPictureScrollBox, false, false, 0);

            Notebook notebook = new Notebook();

            notebook.BorderWidth = 6;
            notebook.AppendPage(new AboutTabPage(), new Label(Title));
            notebook.AppendPage(new VersionInformationTabPage(), new Label(MainClass.Languages.Translate("components")));
            var buildInfo = LoadBuildInfo();

            if (buildInfo != null)
            {
                notebook.AppendPage(buildInfo, new Label(MainClass.Languages.Translate("components")));
            }
            VBox.PackStart(notebook, true, true, 4);

            AddButton(Stock.Close, ResponseType.Close);

            //ShowAll();
        }
        /// <summary>
        /// Manejo del evento que provocado por el controlador cuando comienza
        /// a tratar una nueva imagen.
        /// </summary>
        /// <param name="sender">El objeto que provoca el evento.</param>
        /// <param name="arg">El argumento del evento.</param>
        private void OnControllerBitmapProcessedByDatabase(object sender,
                                                           BitmapProcessedArgs arg)
        {
            Gtk.Application.Invoke(sender, arg,
                                   delegate(object resender, EventArgs a)
            {
                if (treeview.NodeSelection.SelectedNodes.Length > 0)
                {
                    // Si hay un simbolo seleccionado,
                    // nos traemos sus imagenes procesadas.
                    SegmentedNode node =
                        (SegmentedNode)(treeview.NodeSelection.SelectedNode);


                    ImageArea imageAreaProcessed = new ImageArea();
                    imageAreaProcessed.Image     =
                        node.MathTextBitmap.LastProcessedImage.CreatePixbuf();
                    imageAreaProcessed.ImageMode = ImageAreaMode.Zoom;


                    processedImageNB.AppendPage(imageAreaProcessed,
                                                new Label(String.Format("BD {0}",
                                                                        processedImageNB.NPages + 1)));

                    processedImageNB.Page = processedImageNB.NPages - 1;

                    // Solo mostramos los tabs si hay mas de una imagen procesada
                    processedImageNB.ShowTabs =
                        node.MathTextBitmap.ProcessedImages.Count > 1;
                }
            });
        }
Esempio n. 4
0
        void BuildClient()
        {
            fixed5 = new Fixed();

            label1 = new Label("Hosts");
            fixed5.Put(label1, 5, 0);
            var btnStart = new Button();

            btnStart.WidthRequest = 109;
            btnStart.Label        = "ScanServers";
            btnStart.Clicked     += BtnStart_Clicked;
            fixed5.Put(btnStart, 5, 30);
            hbox1 = new Box(Orientation.Vertical, 30);
            fixed5.Put(hbox1, 5, 70);

            var label2 = new Label("Methods");
            var label3 = new Label("DataMethods");

            hbox2         = new Box(Orientation.Vertical, 10);
            hbox3         = new Box(Orientation.Vertical, 10);
            hbox2.Spacing = 5;
            hbox3.Spacing = 5;
            fixed5.Put(hbox2, 200, 40);
            fixed5.Put(hbox3, 350, 40);
            fixed5.Put(label2, 200, 10);
            fixed5.Put(label3, 350, 10);
            notebook.AppendPage(fixed5, new Label("StreamClient"));
        }
Esempio n. 5
0
		public AboutDialog () : base (string.Empty, PintaCore.Chrome.MainWindow, DialogFlags.Modal)
		{
			Title = Catalog.GetString ("About Pinta");
			//TransientFor = IdeApp.Workbench.RootWindow;
			AllowGrow = false;
			HasSeparator = false;
			Icon = PintaCore.Resources.GetIcon ("Pinta.png");

			VBox.BorderWidth = 0;

			aboutPictureScrollBox = new ScrollBox ();

			VBox.PackStart (aboutPictureScrollBox, false, false, 0);
			imageSep = PintaCore.Resources.GetIcon ("About.ImageSep.png");

			VBox.PackStart (new Gtk.Image (imageSep), false, false, 0);

			Notebook notebook = new Notebook ();
			notebook.BorderWidth = 6;
			notebook.AppendPage (new AboutPintaTabPage (), new Label (Title));
			notebook.AppendPage (new VersionInformationTabPage (), new Label (Catalog.GetString ("Version Info")));
			
			VBox.PackStart (notebook, true, true, 4);

			AddButton (Gtk.Stock.Close, (int)ResponseType.Close);

			ShowAll ();
		}
Esempio n. 6
0
        public CommonAboutDialog()
        {
            Title        = GettextCatalog.GetString("About MonoDevelop");
            TransientFor = IdeApp.Workbench.RootWindow;
            AllowGrow    = false;
            HasSeparator = false;

            VBox.BorderWidth = 0;

            aboutPictureScrollBox = new ScrollBox();

            VBox.PackStart(aboutPictureScrollBox, false, false, 0);
            imageSep = new Pixbuf(typeof(CommonAboutDialog).Assembly, "AboutImageSep.png");
            VBox.PackStart(new Gtk.Image(imageSep), false, false, 0);

            Notebook notebook = new Notebook();

            notebook.BorderWidth = 6;
            notebook.AppendPage(new AboutMonoDevelopTabPage(), new Label(Title));
            notebook.AppendPage(new VersionInformationTabPage(), new Label(GettextCatalog.GetString("Version Info")));
            var buildInfo = LoadBuildInfo();

            if (buildInfo != null)
            {
                notebook.AppendPage(buildInfo, new Label(GettextCatalog.GetString("Build Info")));
            }
            VBox.PackStart(notebook, true, true, 4);

            AddButton(Gtk.Stock.Close, (int)ResponseType.Close);

            ShowAll();
        }
Esempio n. 7
0
        public DemoMain()
        {
            SetupDefaultIcon();
            window = new Gtk.Window("Gtk# Code Demos");
            window.SetDefaultSize(600, 400);
            window.DeleteEvent += new DeleteEventHandler(WindowDelete);

            HBox hbox = new HBox(false, 0);

            window.Add(hbox);

            treeView = CreateTree();
            hbox.PackStart(treeView, false, false, 0);

            Notebook notebook = new Notebook();

            hbox.PackStart(notebook, true, true, 0);

            notebook.AppendPage(CreateText(infoBuffer, false), new Label("_Info"));
            TextTag heading = new TextTag("heading");

            heading.Font = "Sans 18";
            infoBuffer.TagTable.Add(heading);

            notebook.AppendPage(CreateText(sourceBuffer, true), new Label("_Source"));

            window.ShowAll();
        }
Esempio n. 8
0
    public ChangesetView(Driver driver, int stopAfter)
    {
        this.driver    = driver;
        this.stopAfter = stopAfter;

        InitializeChangesetList();

        ScrolledWindow scrolledWindow1 = new ScrolledWindow();

        scrolledWindow1.Add(changesetList);

        Add1(scrolledWindow1);

        viewChildren        = new Notebook();
        viewChildren.TabPos = PositionType.Bottom;
        Add2(viewChildren);

        changesetDetailView = new ChangesetDetailView(driver);
        viewChildren.AppendPage(changesetDetailView, new Label("Details"));

        changesetDiffView = new ChangesetDiffView(driver);
        viewChildren.AppendPage(changesetDiffView, new Label("Unified Diff"));

        int x, y, width, height, depth;

        RootWindow.GetGeometry(out x, out y, out width, out height, out depth);
        Position = Convert.ToInt32((height - 40) * 0.4);

        viewChildren.SwitchPage += OnSwitchPage;
    }
Esempio n. 9
0
    public static void Main()
    {
        uint   r;
        double theta;

        Application.Init();

        Gtk.Window win = new Gtk.Window("Polar Coordinate Container");
        win.DeleteEvent += new DeleteEventHandler(Window_Delete);

        Notebook notebook = new Notebook();

        win.Add(notebook);

        // Clock
        PolarFixed pf = new PolarFixed();

        notebook.AppendPage(pf, new Label("Clock"));

        for (int hour = 1; hour <= 12; hour++)
        {
            theta = (Math.PI / 2) - hour * (Math.PI / 6);
            if (theta < 0)
            {
                theta += 2 * Math.PI;
            }

            Label l = new Label("<big><b>" + hour.ToString() + "</b></big>");
            l.UseMarkup = true;
            pf.Put(l, theta, 200);
        }

        // Spiral
        pf = new PolarFixed();
        notebook.AppendPage(pf, new Label("Spiral"));

        r     = 0;
        theta = 0.0;

        foreach (string id in Gtk.Stock.ListIds())
        {
            StockItem item = Gtk.Stock.Lookup(id);
            if (item.Label == null)
            {
                continue;
            }

            pf.Put(new Gtk.Button(id), theta, r);

            // Logarithmic spiral: r = a*e^(b*theta)
            r    += 5;
            theta = 10 * Math.Log(10 * r);
        }

        win.ShowAll();

        Application.Run();
    }
Esempio n. 10
0
 /// <summary>
 /// Constructor
 /// </summary>
 public ManagerView(ViewBase owner) : base(owner)
 {
     notebook     = new Notebook();
     _mainWidget  = notebook;
     Grid         = new GridView(this);
     ScriptEditor = new EditorView(this);
     notebook.AppendPage(Grid.MainWidget, new Label("Properties"));
     notebook.AppendPage(ScriptEditor.MainWidget, new Label("Script"));
 }
Esempio n. 11
0
 /// <summary>
 /// Constructor
 /// </summary>
 public ManagerView(ViewBase owner) : base(owner)
 {
     notebook     = new Notebook();
     mainWidget   = notebook;
     grid         = new GridView(this);
     scriptEditor = new EditorView(this);
     notebook.AppendPage(grid.MainWidget, new Label("Properties"));
     notebook.AppendPage(scriptEditor.MainWidget, new Label("Script"));
     mainWidget.Destroyed += _mainWidget_Destroyed;
 }
        public void Initialize(TableSchemaCollection tables, TableSchema table, ColumnSchemaCollection columns, ConstraintSchemaCollection constraints, DataTypeSchemaCollection dataTypes)
        {
            if (columns == null)
            {
                throw new ArgumentNullException("columns");
            }
            if (constraints == null)
            {
                throw new ArgumentNullException("constraints");
            }
            if (table == null)
            {
                throw new ArgumentNullException("table");
            }
            if (tables == null)
            {
                throw new ArgumentNullException("tables");
            }

            IDbFactory fac = schemaProvider.ConnectionPool.DbFactory;

            if (fac.IsCapabilitySupported("Table", action, TableCapabilities.PrimaryKeyConstraint))
            {
                //not for column constraints, since they are already editable in the column editor
                pkEditor = new PrimaryKeyConstraintEditorWidget(schemaProvider, action, table, columns, constraints);
                pkEditor.ContentChanged += new EventHandler(OnContentChanged);
                notebook.AppendPage(pkEditor, new Label(GettextCatalog.GetString("Primary Key")));
            }

            if (fac.IsCapabilitySupported("Table", action, TableCapabilities.ForeignKeyConstraint) ||
                fac.IsCapabilitySupported("TableColumn", action, TableCapabilities.ForeignKeyConstraint))
            {
                fkEditor = new ForeignKeyConstraintEditorWidget(schemaProvider, action, tables, table, columns, constraints);
                fkEditor.ContentChanged += new EventHandler(OnContentChanged);
                notebook.AppendPage(fkEditor, new Label(GettextCatalog.GetString("Foreign Key")));
            }

            if (fac.IsCapabilitySupported("Table", action, TableCapabilities.CheckConstraint) ||
                fac.IsCapabilitySupported("TableColumn", action, TableCapabilities.CheckConstraint))
            {
                checkEditor = new CheckConstraintEditorWidget(schemaProvider, action, table, columns, constraints);
                checkEditor.ContentChanged += new EventHandler(OnContentChanged);
                notebook.AppendPage(checkEditor, new Label(GettextCatalog.GetString("Check")));
            }

            if (fac.IsCapabilitySupported("Table", action, TableCapabilities.UniqueConstraint) ||
                fac.IsCapabilitySupported("TableColumn", action, TableCapabilities.CheckConstraint))
            {
                uniqueEditor = new UniqueConstraintEditorWidget(schemaProvider, action, table, columns, constraints);
                uniqueEditor.ContentChanged += new EventHandler(OnContentChanged);
                notebook.AppendPage(uniqueEditor, new Label(GettextCatalog.GetString("Unique")));
            }

            ShowAll();
        }
Esempio n. 13
0
        /// <summary>
        /// Creates the tabbed notebook
        /// </summary>
        /// <returns>
        /// Widget to display
        /// </returns>
        private Widget CreateNotebook()
        {
            Notebook notebook = new Notebook();

            notebook.AppendPage(CreateServerPage(), new Label(Util.GS("Account")));
            notebook.AppendPage(CreateIdentityPage(), new Label(Util.GS("Identity")));
            notebook.AppendPage(CreateDiskSpacePage(), new Label(Util.GS("Disk Space")));

            notebook.ShowAll();
            return(notebook);
        }
Esempio n. 14
0
//		Entry sipServerAddressEntry;
//		Entry sipUsernameEntry;
//		Entry sipPasswordEntry;

        public PreferencesDialog() : base()
        {
            SetDefaultSize(600, 600);
            WindowPosition = WindowPosition.Center;
            IconName       = "rtc";
            HasSeparator   = false;
            BorderWidth    = 5;
            Resizable      = true;
            Title          = Catalog.GetString("Banter Preferences");

            VBox.Spacing      = 5;
            ActionArea.Layout = ButtonBoxStyle.End;

            // Notebook Tabs (General, Messages)...
            Gtk.Notebook notebook = new Notebook();
            notebook.TabPos      = PositionType.Top;
            notebook.BorderWidth = 5;
            notebook.Show();

//			notebook.AppendPage (MakeGeneralPage (),
//									new Label (Catalog.GetString ("General")));
            notebook.AppendPage(MakeAccountsPage(),
                                new Label(Catalog.GetString("Accounts")));
            notebook.AppendPage(MakeMessagesPage(),
                                new Label(Catalog.GetString("Messages")));

            VBox.PackStart(notebook, true, true, 0);

            // Close button...
            Button button = new Button(Stock.Close);

            button.CanDefault = true;
            button.Show();

            AccelGroup accelGroup = new AccelGroup();

            AddAccelGroup(accelGroup);

            button.AddAccelerator("activate",
                                  accelGroup,
                                  (uint)Gdk.Key.Escape,
                                  0,
                                  0);

            AddActionWidget(button, ResponseType.Close);
            DefaultResponse = ResponseType.Close;

            Realized += DialogRealized;

            Preferences.PreferenceChanged += PreferenceChanged;

            ShowAll();
        }
Esempio n. 15
0
		public EffectiveRatingsMultiview (PropertyInfo property, object obj, Context context, DisplayableAttribute attribute) {

			this.context = context;
			BorderWidth = 5;

			// Nest containers
			VBox mainBox = new VBox();
			HBox navigation = new HBox();
			SquareContainer square = new SquareContainer();
			notebook = new Notebook { ShowTabs = false, ShowBorder = false };
			square.Add(notebook);
			mainBox.PackStart(navigation, false, false, 5);
			mainBox.PackStart(square, true, true, 0);
			Add(mainBox);

			// Navigation
			Label pageLabel = new Label("Table (final)");
			ClickableEventBox leftArrow = new ClickableEventBox();
			leftArrow.Add(Graphics.GetIcon(IconTemplate.LeftArrow, new Gdk.Color(100, 100, 100), Graphics.textSize));
			leftArrow.Clicked += delegate {
				if (notebook.CurrentPage > 0) {
					notebook.CurrentPage--;
				} else {
					notebook.CurrentPage = notebook.NPages - 1;
				}
				pageLabel.Text = labels[notebook.CurrentPage];
			};
			ClickableEventBox rightArrow = new ClickableEventBox();
			rightArrow.Add(Graphics.GetIcon(IconTemplate.RightArrow, new Gdk.Color(100, 100, 100), Graphics.textSize));
			rightArrow.Clicked += delegate {
				if (notebook.CurrentPage < notebook.NPages - 1) {
					notebook.CurrentPage++;
				} else {
					notebook.CurrentPage = 0;
				}
				pageLabel.Text = labels[notebook.CurrentPage];
			};
			navigation.PackStart(leftArrow, false, false, 5);
			navigation.PackStart(pageLabel, true, true, 0);
			navigation.PackStart(rightArrow, false, false, 5);

			// Fill notebook
			EffectiveRatingsProfile erp = (EffectiveRatingsProfile)property.GetValue(obj);
			RatingsRadarChart radar1 = new RatingsRadarChart(context.butCompact, erp.final, erp.multipliers, erp.metamultipliers);
			RatingsTable table1 = new RatingsTable(context.butCompact, erp.final, erp.multipliers, erp.metamultipliers);
			RatingsRadarChart radar2 = new RatingsRadarChart(context.butCompact, erp.original);
			RatingsTable table2 = new RatingsTable(context.butCompact, erp.original);
			notebook.AppendPage(radar1, null);
			notebook.AppendPage(UIFactory.Align(table1, 0.5f, 0.5f, 0, 0), null);
			notebook.AppendPage(radar2, null);
			notebook.AppendPage(UIFactory.Align(table2, 0.5f, 0.5f, 0, 0), null);

		}
Esempio n. 16
0
        public ViewEditorDialog(ISchemaProvider schemaProvider, ViewSchema view, bool create)
        {
            if (schemaProvider == null)
            {
                throw new ArgumentNullException("schemaProvider");
            }
            if (view == null)
            {
                throw new ArgumentNullException("view");
            }

            this.schemaProvider = schemaProvider;
            this.view           = view;
            this.action         = create ? SchemaActions.Create : SchemaActions.Alter;

            this.Build();

            if (create)
            {
                Title = GettextCatalog.GetString("Create View");
            }
            else
            {
                Title = GettextCatalog.GetString("Alter View");
            }

            notebook = new Notebook();

            sqlEditor              = new SqlEditorWidget();
            sqlEditor.TextChanged += new EventHandler(SqlChanged);
            notebook.AppendPage(sqlEditor, new Label(GettextCatalog.GetString("Definition")));

            IDbFactory fac = schemaProvider.ConnectionPool.DbFactory;

            if (fac.IsCapabilitySupported("View", action, ViewCapabilities.Comment))
            {
                commentEditor = new CommentEditorWidget();
                notebook.AppendPage(commentEditor, new Label(GettextCatalog.GetString("Comment")));
            }

            notebook.Page = 0;

            entryName.Text = view.Name;
            if (!create)
            {
                sqlEditor.Text        = schemaProvider.GetViewAlterStatement(view);
                commentEditor.Comment = view.Comment;
            }

            vboxContent.PackStart(notebook, true, true, 0);
            vboxContent.ShowAll();
            SetWarning(null);
        }
Esempio n. 17
0
        public ConstraintsEditorWidget(ISchemaProvider schemaProvider, SchemaActions action, ConstraintEditorSettings settings)
        {
            if (schemaProvider == null)
            {
                throw new ArgumentNullException("schemaProvider");
            }

            this.schemaProvider = schemaProvider;
            this.action         = action;

            this.Build();

            notebook = new Notebook();
            Add(notebook);

            if (settings.ShowPrimaryKeyConstraints)
            {
                //not for column constraints, since they are already editable in the column editor
                pkEditor = new PrimaryKeyConstraintEditorWidget(schemaProvider, action);
                pkEditor.ContentChanged    += new EventHandler(OnContentChanged);
                pkEditor.PrimaryKeyChanged += delegate(object sender, EventArgs e) {
                    if (PrimaryKeyChanged != null)
                    {
                        PrimaryKeyChanged(this, new EventArgs());
                    }
                };
                notebook.AppendPage(pkEditor, new Label(AddinCatalog.GetString("Primary Key")));
            }

            if (settings.ShowForeignKeyConstraints)
            {
                fkEditor = new ForeignKeyConstraintEditorWidget(schemaProvider, action, settings.ForeignKeySettings);
                fkEditor.ContentChanged += new EventHandler(OnContentChanged);
                notebook.AppendPage(fkEditor, new Label(AddinCatalog.GetString("Foreign Key")));
            }

            if (settings.ShowCheckConstraints)
            {
                checkEditor = new CheckConstraintEditorWidget(schemaProvider, action, settings.CheckSettings);
                checkEditor.ContentChanged += new EventHandler(OnContentChanged);
                notebook.AppendPage(checkEditor, new Label(AddinCatalog.GetString("Check")));
            }

            if (settings.ShowUniqueConstraints)
            {
                uniqueEditor = new UniqueConstraintEditorWidget(schemaProvider, action);
                uniqueEditor.ContentChanged += new EventHandler(OnContentChanged);
                notebook.AppendPage(uniqueEditor, new Label(AddinCatalog.GetString("Unique")));
            }

            ShowAll();
        }
Esempio n. 18
0
        public CommonAboutDialog()
        {
            Name         = "wizard_dialog";
            Title        = string.Format(GettextCatalog.GetString("About {0}"), BrandingService.ApplicationLongName);
            TransientFor = IdeApp.Workbench.RootWindow;
            AllowGrow    = false;
            HasSeparator = false;
            BorderWidth  = 0;

            var notebook = new Notebook();

            notebook.ShowTabs    = false;
            notebook.ShowBorder  = false;
            notebook.BorderWidth = 0;
            notebook.AppendPage(new AboutMonoDevelopTabPage(), new Label(Title));
            notebook.AppendPage(new VersionInformationTabPage(), new Label(GettextCatalog.GetString("Version Information")));
            VBox.PackStart(notebook, true, true, 0);

            var copyButton = new Button()
            {
                Label = GettextCatalog.GetString("Copy Information")
            };

            copyButton.Clicked += (sender, e) => CopyBufferToClipboard();
            ActionArea.PackEnd(copyButton, false, false, 0);
            copyButton.NoShowAll = true;

            var backButton = new Button()
            {
                Label = GettextCatalog.GetString("Show Details")
            };

            ActionArea.PackEnd(backButton, false, false, 0);
            backButton.Clicked += (sender, e) => {
                if (notebook.Page == 0)
                {
                    backButton.Label = GettextCatalog.GetString("Hide Details");
                    copyButton.Show();
                    notebook.Page = 1;
                }
                else
                {
                    backButton.Label = GettextCatalog.GetString("Show Details");
                    copyButton.Hide();
                    notebook.Page = 0;
                }
            };

            AddButton(Gtk.Stock.Close, (int)ResponseType.Close);

            ShowAll();
        }
Esempio n. 19
0
        public DatabaseEditor(string filePath)
        {
            fileName = filePath;
            control  = new Notebook();

            control.TabPos = PositionType.Bottom;
            control.AppendPage(new StructureDatabaseView(filePath), new Label(MainClass.Languages.Translate("sql_structure")));
            control.AppendPage(new DataDatabaseView(filePath), new Label(MainClass.Languages.Translate("sql_data")));
            control.AppendPage(new SqlDatabaseView(filePath), new Label(MainClass.Languages.Translate("sql_sql")));

            control.SwitchPage += new SwitchPageHandler(OnSwitchPage);

            control.ShowAll();
        }
Esempio n. 20
0
 /// <summary>
 /// Constructor
 /// </summary>
 public ManagerView(ViewBase owner) : base(owner)
 {
     notebook       = new Notebook();
     mainWidget     = notebook;
     propertyEditor = new PropertyView(this);
     scriptEditor   = new EditorView(this)
     {
         ShowLineNumbers = true,
         Language        = "c-sharp",
     };
     notebook.AppendPage(propertyEditor.MainWidget, new Label("Parameters"));
     notebook.AppendPage(((ViewBase)scriptEditor).MainWidget, new Label("Script"));
     mainWidget.Destroyed += _mainWidget_Destroyed;
 }
Esempio n. 21
0
        public ClassBrowserPadWidget(ExtensibleTreeView treeView, IPadWindow window)
        {
            this.treeView = treeView;

            DockItemToolbar searchBox = window.GetToolbar(PositionType.Top);

            searchEntry = new Entry();
            searchBox.Add(searchEntry, true);
            buttonSearch              = new Button(new Gtk.Image(Gtk.Stock.Find, IconSize.Menu));
            buttonSearch.Relief       = ReliefStyle.None;
            buttonCancelSearch        = new Button(new Gtk.Image(Gtk.Stock.Stop, IconSize.Menu));
            buttonCancelSearch.Relief = ReliefStyle.None;
            searchBox.Add(buttonSearch);
            searchBox.Add(buttonCancelSearch);
            searchBox.ShowAll();

            notebook            = new Notebook();
            notebook.ShowTabs   = false;
            notebook.ShowBorder = false;
            this.PackEnd(notebook, true, true, 0);

            notebook.AppendPage(treeView, null);
            ScrolledWindow scrolledWindow = new ScrolledWindow();

            scrolledWindow.Add(searchResultsTreeView);
            notebook.AppendPage(scrolledWindow, null);

            list = new ListStore(new Type[] {
                typeof(Pixbuf),
                typeof(string),
                typeof(IType)
            });
            model = new TreeModelSort(list);
            searchResultsTreeView.Model = model;
            searchResultsTreeView.AppendColumn(string.Empty, new Gtk.CellRendererPixbuf(), "pixbuf", 0);
            searchResultsTreeView.AppendColumn(string.Empty, new Gtk.CellRendererText(), "text", 1);
            searchResultsTreeView.HeadersVisible  = false;
            searchResultsTreeView.RowActivated   += SearchRowActivated;
            IdeApp.Workspace.WorkspaceItemOpened += OnOpenCombine;
            IdeApp.Workspace.WorkspaceItemClosed += OnCloseCombine;

            this.searchEntry.Changed        += SearchEntryChanged;
            this.buttonCancelSearch.Clicked += CancelSearchClicked;
            this.searchEntry.Activated      += SearchClicked;
            this.searchEntry.KeyPressEvent  += SearchEntryKeyPressEvent;
            this.buttonSearch.Clicked       += SearchClicked;

            this.ShowAll();
        }
Esempio n. 22
0
        private Widget CreateWidgets()
        {
            contentVBox             = new VBox(false, 0);
            contentVBox.BorderWidth = 12;

            nameLabel = new Label(
                string.Format(
                    "<span size=\"x-large\">{0}</span>",
                    GLib.Markup.EscapeText(name)));
            contentVBox.PackStart(nameLabel, false, false, 0);
            nameLabel.UseMarkup    = true;
            nameLabel.UseUnderline = false;
            nameLabel.ModifyFg(StateType.Normal, this.Style.Base(StateType.Selected));
            nameLabel.Xalign = 0;

            QoutaLabel = new Label(
                string.Format(
                    "<span size=\"xx-small\">{0}</span>",
                    GLib.Markup.EscapeText(qouta)));
            contentVBox.PackStart(QoutaLabel, false, false, 0);
            QoutaLabel.UseMarkup    = true;
            QoutaLabel.UseUnderline = false;
            QoutaLabel.ModifyFg(StateType.Normal, this.Style.Base(StateType.Selected));
            QoutaLabel.Xalign = 0;

            groupNotebook = new Notebook();
            contentVBox.PackStart(groupNotebook, true, true, 0);
            groupNotebook.ShowTabs   = false;
            groupNotebook.ShowBorder = false;
            //groupNotebook.Homogeneous = false;

            groupNotebook.AppendPage(CreateMainPage(), null);
            groupNotebook.AppendPage(CreateEmptyPage(), null);
            groupNotebook.AppendPage(CreateEmptySearchPage(), null);

            groupNotebook.Page = 0;

            ///
            /// Register for TreeModel events
            ///
            model.RowChanged +=
                new RowChangedHandler(OnRowChanged);
            model.RowDeleted +=
                new RowDeletedHandler(OnRowDeleted);
            model.RowInserted +=
                new RowInsertedHandler(OnRowInserted);

            return(contentVBox);
        }
Esempio n. 23
0
    public ExploreView(Driver driver, int stopAfter) : base("Explore")
    {
        int x, y, width, height, depth;

        RootWindow.GetGeometry(out x, out y, out width, out height, out depth);
        SetDefaultSize(width - 50, height - 40);

        VBox vBox = new VBox(false, 1);

        Add(vBox);

        HPaned hPaned = new HPaned();

        vBox.Add(hPaned);

        ScrolledWindow scrolledWindow = new ScrolledWindow();

        //scrolledWindow.SetDefaultSize (Convert.ToInt32((width - 50) * 0.4), height -40);
        hPaned.Add1(scrolledWindow);

        repositoryView = new RepositoryView(driver);
        scrolledWindow.Add(repositoryView);

        viewChildren = new Notebook();

        changesetView = new ChangesetView(driver, stopAfter);
        viewChildren.AppendPage(changesetView, new Label("Changeset View"));

        directoryView = new DirectoryView(driver);
        viewChildren.AppendPage(directoryView, new Label("Directory View"));

        fileView = new FileView(driver);
        viewChildren.AppendPage(fileView, new Label("File View"));

        hPaned.Add2(viewChildren);
        hPaned.Position = (width - 50) / 3;

        // add status bar
        Statusbar sb = new Statusbar();

        sb.HasResizeGrip = false;
        vBox.PackEnd(sb, false, false, 1);

        ShowAll();

        repositoryView.Selection.Changed += OnPathSelectionChanged;
        viewChildren.SwitchPage          += OnSwitchPage;
    }
Esempio n. 24
0
        public static void Add(this Notebook notebook, Widget widget, string str, bool isVolatile)
        {
            try
            {
                widget.Name = str;
                Extensions.Tabs.Add(str, widget);

                ScrolledWindow scrolledWindow = new ScrolledWindow();
                scrolledWindow.Add(widget);
                scrolledWindow.Name = str;
                if (widget is CodeTabWidget tabWidget)
                {
                    notebook.AppendPage(scrolledWindow, (tabWidget.GetLabel()));

                    tabWidget.GetLabel().ShowAll();
                    tabWidget.GetLabel().CloseClicked += delegate
                    {
                        notebook.RemovePage(notebook.PageNum(notebook.Children.First(x => x == scrolledWindow)));
                        Extensions.Tabs.Remove(str);
                    };
                }
                else
                {
                    NotebookTabLabel notebookTabLabel = new NotebookTabLabel(str, widget);

                    notebookTabLabel.CloseClicked += delegate(object obj, EventArgs eventArgs)
                    {
                        notebook.RemovePage(notebook.PageNum(notebook.Children.First(x => x == scrolledWindow)));
                        Extensions.Tabs.Remove(str);
                    };
                    notebook.AppendPage(scrolledWindow, notebookTabLabel);
                    notebookTabLabel.ShowAll();
                }

                notebook.SetTabDetachable(scrolledWindow, isVolatile);
                notebook.SetTabReorderable(scrolledWindow, isVolatile);

                widget.ShowAll();
            }
            catch (ArgumentException)
            {
                notebook.Page = notebook.PageNum(Tabs.First(x => x.Key == str).Value);
            }
            catch (Exception e)
            {
                ExceptionWindow.Create(e, notebook).ShowAll();
            }
        }
Esempio n. 25
0
    void AddNewGroup(string name)
    {
        MenuItem mi = new MenuItem(name);

        mi.Show();
        mi.Activated += new EventHandler(OnGroupItemActivated);

        group_menu.Append(mi);

        ScrolledWindow sw = new ScrolledWindow();

        sw.Show();
        sw.HscrollbarPolicy = PolicyType.Automatic;
        sw.VscrollbarPolicy = PolicyType.Automatic;

        VBox box = new VBox();

        box.Show();
        box.Homogeneous = false;
        box.Spacing     = 2;
        sw.AddWithViewport(box);

        notebook.AppendPage(sw, new Gtk.Label("not shown"));
        group_widgets[name] = box;
        group_items[mi]     = notebook.NPages - 1;
    }
Esempio n. 26
0
        private ChatsPage()
        {
            base.FocusGrabbed += base_FocusGrabbed;

            closePixbuf = new Gdk.Pixbuf(null, "Meshwork.Client.GtkClient.smallclose.png");

            tabLabelPages = new Dictionary <Widget, ChatSubpageBase>();

            notebook                = new Notebook();
            notebook.TabPos         = PositionType.Bottom;
            notebook.SwitchPage    += notebook_SwitchPage;
            notebook.PageReordered += notebook_PageReordered;

            ScrolledWindow swindow = new ScrolledWindow();

            swindow.HscrollbarPolicy = PolicyType.Automatic;
            swindow.VscrollbarPolicy = PolicyType.Automatic;
            chatList = new TreeView();
            swindow.Add(chatList);

            chatTreeStore  = new NetworkGroupedTreeStore <ChatRoom>(chatList);
            chatList.Model = chatTreeStore;

            TreeViewColumn column;

            column        = chatList.AppendColumn("Room Name", new CellRendererText(), new TreeCellDataFunc(NameDataFunc));
            column.Expand = true;
            column.Sizing = TreeViewColumnSizing.Autosize;

            var pixbufCell = new CellRendererPixbuf();

            column.PackStart(pixbufCell, false);
            column.SetCellDataFunc(pixbufCell, new TreeCellDataFunc(RoomSecureDataFunc));

            column        = chatList.AppendColumn("Users", new CellRendererText(), new TreeCellDataFunc(RoomUsersDataFunc));
            column.Sizing = TreeViewColumnSizing.Autosize;

            chatList.RowActivated     += chatList_RowActivated;
            chatList.ButtonPressEvent += chatList_ButtonPressEvent;

            EventBox box = new EventBox();

            box.Add(new Label("Chatroom List"));
            box.ButtonPressEvent += HandleTabButtonPressEvent;
            box.ShowAll();
            notebook.AppendPage(swindow, box);

            this.PackStart(notebook, true, true, 0);
            notebook.ShowAll();

            foreach (Network network in Runtime.Core.Networks)
            {
                Core_NetworkAdded(network);
            }

            Runtime.Core.NetworkAdded +=
                (NetworkEventHandler)DispatchService.GuiDispatch(
                    new NetworkEventHandler(Core_NetworkAdded)
                    );
        }
        void GenerateTabs()
        {
            if (nbDistricts != null)
            {
                nbDistricts.Destroy();
            }
            nbDistricts = new Notebook();

            foreach (WageDistrictLevelRateViewModel vm in ViewModel.ObservableWageDistrictLevelRateViewModels)
            {
                var  view = new WageDistrictLevelRateView(vm, true);
                VBox vbx  = new VBox {
                    view
                };
                Box.BoxChild viewBox = (Box.BoxChild)vbx[view];
                viewBox.Fill   = true;
                viewBox.Expand = true;
                var scrolledWindow = new ScrolledWindow {
                    vbx
                };

                Label tabLabel = new Label {
                    UseMarkup = true,
                    Markup    = vm.Entity.WageDistrict.Name
                };

                nbDistricts.AppendPage(scrolledWindow, tabLabel);
            }

            hbxNotebooksWithDistricts.Add(nbDistricts);
            hbxNotebooksWithDistricts.ShowAll();
        }
Esempio n. 28
0
        void GenerateTabs()
        {
            _notebookDistricts?.Destroy();
            _notebookDistricts = new Notebook();

            foreach (WageDistrictLevelRateViewModel vm in ViewModel.ObservableWageDistrictLevelRateViewModels)
            {
                var  view = new WageDistrictLevelRateView(vm, true);
                VBox vbx  = new VBox
                {
                    view
                };
                Box.BoxChild viewBox = (Box.BoxChild)vbx[view];
                viewBox.Fill   = true;
                viewBox.Expand = true;
                var scrolledWindow = new ScrolledWindow
                {
                    vbx
                };

                Label tabLabel = new Label
                {
                    UseMarkup = true,
                    Markup    = $"{vm.Entity.CarTypeOfUse.GetEnumTitle()} {vm.Entity.WageDistrict.Name}"
                };

                _notebookDistricts.AppendPage(scrolledWindow, tabLabel);
            }

            hbxNotebooksWithDistricts.Add(_notebookDistricts);
            hbxNotebooksWithDistricts.ShowAll();
        }
Esempio n. 29
0
        public MySqlCreateDatabaseDialog(IDbFactory factory) : base(factory)
        {
            createDBWidget = new MySqlCreateDatabaseWidget();
            Notebook.AppendPage(createDBWidget,
                                new Label(AddinCatalog.GetString("Database Properties")));
            Notebook.ShowTabs = true;
            Gtk.Notebook nb = Notebook;

            nb.SwitchPage += delegate(object o, SwitchPageArgs args) {
                if (nb.CurrentPage == 1)
                {
                    if (!connectionWidget.ValidateFields())
                    {
                        nb.CurrentPage = 0;
                        MessageService.ShowError(this,
                                                 AddinCatalog.GetString("Set the connection properties before the database properties."));
                    }
                    else
                    {
                        Initialize(factory);
                        if (DatabaseConnection.ConnectionPool.HasErrors)
                        {
                            MessageService.ShowError(DatabaseConnection.ConnectionPool.Error);
                            nb.CurrentPage = 0;
                            return;
                        }
                        createDBWidget.Initialize((MySqlSchemaProvider)DatabaseConnection.SchemaProvider);
                    }
                }
            };

            Notebook.ShowAll();
        }
Esempio n. 30
0
        public TabbedSkin(BasilProject project, ITaskBuilder taskBuilder)
        {
            _project     = project;
            _tabsToTools = new System.Collections.Hashtable();

            window = new Gtk.Window("WeSay");
            window.SetDefaultSize(600, 400);
            window.DeleteEvent += new DeleteEventHandler(WindowDelete);

            HBox hbox = new HBox(false, 0);

            window.Add(hbox);

            Notebook notebook = new Notebook();

            notebook.SwitchPage += new SwitchPageHandler(OnNotebookSwitchPage);
            hbox.PackStart(notebook, true, true, 0);
            foreach (ITask t in taskBuilder.Tasks)
            {
                VBox container = new VBox();
                t.Container = container;
                int i = notebook.AppendPage(container, new Label(t.Label));
                _tabsToTools.Add(i, t);
            }

            window.ShowAll();
        }
            public ICSDetailsWidget()
                : base()
            {
                menubar = new ICSMenuBar ();
                menubar.disconnectMenuItem.Activated +=
                    on_disconnect_activate;
                menubar.connectMenuItem.Activated +=
                    on_connect_activate;
                menubar.ShowAll ();

                Image img = new Image ();
                img.Stock = Stock.Network;
                toolbutton =
                    new ToolButton (img,
                            Catalog.
                            GetString
                            ("Chess Server"));
                toolbutton.ShowAll ();

                client = new ICSClient ();
                title = String.Format (Catalog.GetString
                               ("ICS: {0}@{1}:{2}"),
                               client.User,
                               client.server,
                               client.port);
                book = new Notebook ();
                book.Show ();

                Add (book);

                obManager =
                    new GameObservationManager (client,
                                    this);

                observableGames =
                    new ObservableGamesWidget (obManager);

                graph = new GameAdvertisementGraph (client);
                book.AppendPage (graph,
                         new Label (Catalog.
                                GetString
                                ("Seek Graph")));
                ads = new GameAdvertisements (client);
                book.AppendPage (ads,
                         new Label (Catalog.
                                GetString
                                ("Game Seeks")));

                book.AppendPage (observableGames,
                         new Label (Catalog.
                                GetString
                                ("Watch Games")));

                shell = new ICSShell (client);
                book.AppendPage (shell,
                         new Label (Catalog.
                                GetString
                                ("Shell")));

                client.ChallengeEvent += OnChallengeEvent;

                client.AuthEvent += OnAuth;
                client.ConnectionErrorEvent +=
                    OnConnectionError;

                ShowConfigWidget ();

                menubar.disconnectMenuItem.Sensitive = false;
                GLib.Idle.Add (delegate ()
                           {
                           Authenticate (); return false;}
                );

                accel = new AccelGroup ();
                menubar.quitMenuItem.
                    AddAccelerator ("activate", accel,
                            new AccelKey (Gdk.Key.
                                      q,
                                      Gdk.
                                      ModifierType.
                                      ControlMask,
                                      AccelFlags.
                                      Visible));
                ShowAll ();
                CsBoardApp.Instance.QuitEvent += OnQuitEvent;
            }