private void InitEditor()
 {
     this.buttonOk.Label      = LanguageInfo.Dialog_ButtonOK;
     this.buttonOk.Name       = "MainButton";
     this.buttonCancel.Label  = LanguageInfo.Dialog_ButtonCancel;
     this.combox              = new ComboBoxEntry();
     this.combox.WidthRequest = 60;
     this.hbox1.Add((Widget)this.combox);
     Box.BoxChild boxChild1 = (Box.BoxChild) this.hbox1[(Widget)this.combox];
     this.colorButtonGtk = new ColorEx();
     this.colorButtonGtk.WidthRequest = 105;
     this.hbox1.Add((Widget)this.colorButtonGtk);
     Box.BoxChild boxChild2 = (Box.BoxChild) this.hbox1[(Widget)this.colorButtonGtk];
     this.textEntry = new Entry();
     this.textEntry.WidthRequest = 278;
     this.vbox2.Add((Widget)this.textEntry);
     ((Box.BoxChild) this.vbox2[(Widget)this.textEntry]).Position = 0;
     if (Platform.IsMac)
     {
         Box.BoxChild boxChild3 = (Box.BoxChild) this.hbox1[(Widget)this.buttonOk];
         Box.BoxChild boxChild4 = (Box.BoxChild) this.hbox1[(Widget)this.buttonCancel];
         boxChild1.Position = 1;
         boxChild2.Position = 2;
         boxChild3.Position = 3;
         boxChild4.Position = 4;
     }
     this.fontSizeSpinButton.SetRange(5.0, 100.0);
     this.ShowAll();
     this.fontSizeSpinButton.Hide();
     this.FontSizeComboxInit();
     this.InitText();
     this.InitEvent();
     this.textview.AcceptsTab = false;
 }
        private void ConfigureButtonReadFile()
        {
            MenuButton menuButton = new MenuButton {
                Label = "Прочитать данные из файла"
            };
            Menu childActionButtons = new Menu();

            _readTinkoff            = new MenuItem("Прочитать выгрузку Тинькова");
            _readTinkoff.Activated += (sender, args) => ReadTinkoffPayments();
            _readTinkoff.Sensitive  = !string.IsNullOrEmpty(fChooser.Filename);

            _readYookassa            = new MenuItem("Прочитать выгрузку Юкассы");
            _readYookassa.Activated += (sender, args) => ReadYookassaPayments();
            _readYookassa.Sensitive  = !string.IsNullOrEmpty(fChooser.Filename);

            childActionButtons.Add(_readTinkoff);
            childActionButtons.Add(_readYookassa);

            childActionButtons.ShowAll();
            menuButton.Menu = childActionButtons;
            _readFileButton = menuButton;
            _readFileButton.ShowAll();

            hboxButtons.Add(_readFileButton);
            Box.BoxChild readFileButtonBox = (Box.BoxChild)hboxButtons[_readFileButton];
            readFileButtonBox.Position = 0;
            readFileButtonBox.Expand   = false;
            readFileButtonBox.Fill     = false;
        }
Example #3
0
        public Widget ResolveEditor(PropertyItem item = null)
        {
            HBox hBox = new HBox();

            this.table  = new Table(1u, 2u, false);
            this.combox = new ComboBox();
            this.entry  = new EntryCallBackEx();
            this.combox.WidthRequest  = 90;
            this.entry.WidthRequest   = 115;
            this.combox.HeightRequest = 22;
            this.entry.HeightRequest  = 22;
            this.table.Attach(this.combox, 0u, 1u, 0u, 1u, AttachOptions.Fill, AttachOptions.Fill, 0u, 0u);
            this.table.Attach(this.entry, 1u, 2u, 0u, 1u, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Fill, 0u, 0u);
            this.table.ShowAll();
            Alignment alignment = new Alignment(0.5f, 0.5f, 1f, 1f);

            alignment.RightPadding = 30u;
            alignment.Add(this.table);
            alignment.ShowAll();
            this.entry.Show();
            hBox.Add(alignment);
            Box.BoxChild boxChild = hBox[alignment] as Box.BoxChild;
            boxChild.Position = 1;
            boxChild.Expand   = true;
            boxChild.Fill     = true;
            hBox.ShowAll();
            this.SetControl();
            this.table.ColumnSpacing    = 10u;
            this.combox.Changed        += new EventHandler(this.combox_Changed);
            this.entry.KeyReleaseEvent += new KeyReleaseEventHandler(this.entry_KeyReleaseEvent);
            this.entry.FocusOutEvent   += new FocusOutEventHandler(this.entry_FocusOutEvent);
            this.ReadLanuageConfigFile();
            return(hBox);
        }
Example #4
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();
        }
Example #5
0
        public Widget ResolveEditor(PropertyItem item = null)
        {
            this.widget = new DefaultEditorGtk();
            HBox      hbox      = new HBox();
            Alignment alignment = new Alignment(0.5f, 0.5f, 1f, 1f);

            alignment.RightPadding = 30U;
            alignment.Add((Widget)this.widget);
            alignment.ShowAll();
            this.widget.Show();
            hbox.Add((Widget)alignment);
            Box.BoxChild boxChild = hbox[(Widget)alignment] as Box.BoxChild;
            boxChild.Position = 1;
            boxChild.Expand   = true;
            boxChild.Fill     = true;
            hbox.ShowAll();
            if (item.DiaplayName == "Display_LabelFirstChar")
            {
                this.widget.MaxLength = 1;
            }
            this.SetControl();
            this.widget.KeyReleaseEvent += new KeyReleaseEventHandler(this.widget_KeyReleaseEvent);
            this.widget.FocusOutEvent   += new FocusOutEventHandler(this.widget_FocusOutEvent);
            return((Widget)hbox);
        }
        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();
        }
Example #7
0
 /// <summary>
 /// Puts a widget at the top of the page above the username entry.
 /// </summary>
 /// <param name="widget">
 /// A <see cref="Widget"/>
 /// </param>
 protected void InsertWidgetAtTop(Widget widget)
 {
     wrapper_vbox.Add(widget);
     Box.BoxChild wrapperSpace = (Box.BoxChild)wrapper_vbox[widget];
     wrapperSpace.Position = 0;
     wrapperSpace.Fill     = false;
     wrapperSpace.Expand   = false;
     wrapperSpace.Padding  = 5;
 }
Example #8
0
 public void Insert(Widget w, int pos)
 {
     PackStart(w, false, false, 0);
     if (pos != -1)
     {
         Box.BoxChild bc = (Box.BoxChild) this [w];
         bc.Position = pos;
     }
 }
Example #9
0
        private void ConfigureActions()
        {
            MenuButton addDocumentButton = new MenuButton();

            addDocumentButton.Label = "Добавить";
            Menu addDocumentActions = new Menu();

            foreach (var item in RepresentationModel.NewEntityActionsConfigs)
            {
                var menuItem = new MenuItem(item.Title);
                menuItem.Activated += (sender, e) => {
                    TabParent.OpenTab(DialogHelper.GenerateDialogHashName(item.EntityType, 0),
                                      item.GetNewEntityDlg,
                                      this
                                      );
                };
                SetCreateActionsSensitiveFunc(menuItem, item.EntityType);
                addDocumentActions.Add(menuItem);
            }
            addDocumentButton.Menu = addDocumentActions;
            addDocumentActions.ShowAll();
            hboxButtonActions.Add(addDocumentButton);
            Box.BoxChild addDocumentButtonBox = (Box.BoxChild)hboxButtonActions[addDocumentButton];
            addDocumentButtonBox.Expand = false;
            addDocumentButtonBox.Fill   = false;

            Button editDocumentbutton = new Button();

            editDocumentbutton.Label    = "Редактировать";
            editDocumentbutton.Clicked += (sender, e) => {
                OpenDocument();
            };
            SetOpenActionSensitiveFunc(editDocumentbutton);
            hboxButtonActions.Add(editDocumentbutton);
            Box.BoxChild editDocumentbuttonBox = (Box.BoxChild)hboxButtonActions[editDocumentbutton];
            editDocumentbuttonBox.Expand = false;
            editDocumentbuttonBox.Fill   = false;

            Button deleteDocumentbutton = new Button();

            deleteDocumentbutton.Label    = "Удалить";
            deleteDocumentbutton.Clicked += (sender, e) => {
                var selectedObject = tableview.GetSelectedObject();
                if (OrmMain.DeleteObject(RepresentationModel.GetEntityType(selectedObject), RepresentationModel.GetDocumentId(selectedObject)))
                {
                    RepresentationModel.UpdateNodes();
                }
            };
            SetDeleteActionSensitiveFunc(deleteDocumentbutton);
            hboxButtonActions.Add(deleteDocumentbutton);
            Box.BoxChild deleteDocumentbuttonBox = (Box.BoxChild)hboxButtonActions[deleteDocumentbutton];
            deleteDocumentbuttonBox.Expand = false;
            deleteDocumentbuttonBox.Fill   = false;

            hboxButtonActions.ShowAll();
        }
Example #10
0
 private void ChangeBtnPosion()
 {
     if (!Platform.IsMac)
     {
         Box.BoxChild boxChild  = (Box.BoxChild) this.hbox_cancelOKBox[this.buttonOk];
         Box.BoxChild boxChild2 = (Box.BoxChild) this.hbox_cancelOKBox[this.buttonCancel];
         boxChild.Position  = 0;
         boxChild2.Position = 1;
     }
 }
Example #11
0
 public Configuration()
 {
     Build();
     appkey_entry.Text = PingFM.Preferences.AppKey;
     appkey_btn        = new LinkButton("Get Your Ping.FM Application Key");
     info_hbox.Add(appkey_btn);
     Box.BoxChild wInt = info_hbox [appkey_btn] as Box.BoxChild;
     wInt.Position       = 1;
     appkey_btn.Clicked += OnAppKeyBtnClicked;
 }
        public DefaultPolicyOptionsDialog(Gtk.Window parentWindow)
            : base(parentWindow, new PolicySet(),
                   "/MonoDevelop/ProjectModel/Gui/DefaultPolicyPanels")
        {
            this.Title = GettextCatalog.GetString("Custom Policies");
            editingSet = (PolicySet)DataObject;

            HBox topBar = new HBox();

            topBar.Spacing = 3;
            topBar.PackStart(new Label(GettextCatalog.GetString("Editing Policy:")), false, false, 0);

            policiesCombo = ComboBox.NewText();
            topBar.PackStart(policiesCombo, false, false, 0);

            newButton = new Button(GettextCatalog.GetString("Add Policy"));
            topBar.PackEnd(newButton, false, false, 0);

            deleteButton = new Button(GettextCatalog.GetString("Delete Policy"));
            topBar.PackEnd(deleteButton, false, false, 0);

            Alignment align = new Alignment(0f, 0f, 1f, 1f);

            align.LeftPadding   = 9;
            align.TopPadding    = 9;
            align.RightPadding  = 9;
            align.BottomPadding = 9;
            align.Add(topBar);

            HeaderBox ebox = new HeaderBox();

            ebox.GradientBackround = true;
            ebox.SetMargins(0, 1, 0, 0);
            ebox.Add(align);

            ebox.ShowAll();

            VBox.PackStart(ebox, false, false, 0);
            VBox.BorderWidth = 0;
            Box.BoxChild c = (Box.BoxChild)VBox [ebox];
            c.Position = 0;

            foreach (PolicySet ps in PolicyService.GetUserPolicySets())
            {
                PolicySet copy = ps.Clone();
                originalSets [copy] = ps;
                sets.Add(copy);
            }
            FillPolicySets();

            policiesCombo.Changed += HandlePoliciesComboChanged;
            newButton.Clicked     += HandleNewButtonClicked;
            deleteButton.Clicked  += HandleDeleteButtonClicked;
        }
Example #13
0
        public FilterTextBox(Xwt.Drawing.Image background)
        {
            var hbox1 = new global::Gtk.HBox();

            hbox1.Spacing = 6;

            entry.CanFocus      = true;
            entry.IsEditable    = true;
            entry.InvisibleChar = '●';
            hbox1.Add(entry);
            Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(hbox1[entry]));
            w1.Position = 0;

            CSImageButton button1 = new CSImageButton();

            button1.Image = background;

            button1.CanFocus     = true;
            button1.WidthRequest = 20;
            hbox1.Add(button1);
            Box.BoxChild w2 = ((Box.BoxChild)(hbox1[button1]));
            w2.Position = 1;
            w2.Expand   = false;
            w2.Fill     = false;

            EventBox space = new EventBox();

            space.WidthRequest = 20;
            hbox1.Add(space);
            Box.BoxChild w3 = ((Box.BoxChild)(hbox1[space]));
            w3.Position = 2;
            w3.Expand   = false;
            w3.Fill     = false;

            this.Add(hbox1);

            if (this.Child != null)
            {
                this.Child.ShowAll();
            }

            entry.TextInserted += (o, s) => OnTextChangedHandle();
            entry.TextDeleted  += (o, s) => OnTextChangedHandle();

            button1.ButtonPressEvent += button1_ButtonPressEvent;

            entry.FocusInEvent  += FilterTextBox_FocusInEvent;
            entry.FocusOutEvent += FilterTextBox_FocusOutEvent;

            SetShowInfo(DefaultInfo);
        }
Example #14
0
        public FTPTerminal(string username, string password, string domain) : base(Gtk.WindowType.Toplevel)
        {
            this.Build();

            string windowAPath = @"/";
            string windowBPath = @"/Users/William";

            int i = 0;

            foreach (var file in System.IO.Directory.GetFiles(windowAPath))
            {
                Button fileButton = new Button();
                fileButton.Label = file;

                this.vbox9.Add(fileButton);
                Box.BoxChild w4 = ((Box.BoxChild)(this.vbox9[fileButton]));
                w4.Position = i;
                i++;

                System.Diagnostics.Debug.WriteLine(file);
                vbox9.Add(fileButton);
            }

            foreach (var dir in System.IO.Directory.GetDirectories(windowAPath))
            {
                Button fileButton = new Button();
                fileButton.Label = dir;

                this.vbox9.Add(fileButton);
                Box.BoxChild w4 = ((Box.BoxChild)(this.vbox9[fileButton]));
                w4.Position = i;
                i++;

                System.Diagnostics.Debug.WriteLine(dir);
                vbox9.Add(fileButton);
            }

            foreach (var file in System.IO.Directory.GetFiles(windowBPath))
            {
                Button fileButton = new Button(file);
                System.Diagnostics.Debug.WriteLine(file);
                vbox8.Add(fileButton);
            }

            foreach (var dir in System.IO.Directory.GetDirectories(windowBPath))
            {
                Button fileButton = new Button(dir);
                System.Diagnostics.Debug.WriteLine(dir);
                vbox8.Add(fileButton);
            }
        }
Example #15
0
        public void CreateTab <T> (DrawTheory dt, T widget) where T : Widget, IMediaObject
        {
            string name = dt.Name;

            this.mainhierarchy.Add(widget);
            Box.BoxChild w = ((Box.BoxChild)(this.mainhierarchy [widget]));
            w.Position = 0;
            w.Expand   = true;
            w.Fill     = true;
            this.sheets.Add(widget, dt);
            this.SetCurrent(widget);
            widget.HasFocus = true;
            this.tabcontrol.Open(name);
        }
Example #16
0
        public Expander CreateDockExpander()
        {
            Expander result = new Expander("Docked thing");

            dockExpanderVBox.Add(result);
            Box.BoxChild resultBoxChild = (Box.BoxChild)dockExpanderVBox[result];

            resultBoxChild.Expand = false;
            resultBoxChild.Fill   = false;

            result.CanFocus = true;

            return(result);
        }
Example #17
0
        /// <summary>
        /// Constructor. Creates a new link button point to the help page for filter
        /// Initialize the UI.
        /// </summary>
        public Configuration()
        {
            this.Build();
            rtm_ref_btn = new LinkButton("Visit Remember The Milk website for more information.",
                                         "List of available operators");
            info_hbox.Add(rtm_ref_btn);
            Box.BoxChild wInt = info_hbox [rtm_ref_btn] as Box.BoxChild;
            wInt.Position        = 1;
            rtm_ref_btn.Clicked += OnRtmRefBtnClicked;

            if (!System.String.IsNullOrEmpty(RTMPreferences.Token))
            {
                SetStateComplete();
            }
        }
Example #18
0
        private void GenerateDiscussionViews()
        {
            if (notebookDiscussions != null)
            {
                notebookDiscussions.Destroy();
            }
            notebookDiscussions = new Notebook();

            foreach (ComplaintDiscussionViewModel vm in ViewModel.ObservableComplaintDiscussionViewModels)
            {
                var  view = new ComplaintDiscussionView(vm);
                VBox complaintDiscussionViewsBox = new VBox();
                complaintDiscussionViewsBox.Add(view);
                Box.BoxChild viewBox = (Box.BoxChild)complaintDiscussionViewsBox[view];
                viewBox.Fill   = true;
                viewBox.Expand = true;
                var scrolledWindow = new ScrolledWindow();
                scrolledWindow.Add(complaintDiscussionViewsBox);

                Label tabLabel = new Label()
                {
                    UseMarkup = true,
                    Markup    = GetTabName(vm)
                };

                vm.Entity.PropertyChanged -= Vm_PropertyChanged;
                vm.Entity.PropertyChanged += Vm_PropertyChanged;

                void Vm_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
                {
                    if (e.PropertyName == nameof(vm.Entity.Status))
                    {
                        if (tabLabel == null)
                        {
                            vm.Entity.PropertyChanged += Vm_PropertyChanged;
                            return;
                        }

                        tabLabel.Markup = GetTabName(vm);
                    }
                }

                notebookDiscussions.AppendPage(scrolledWindow, tabLabel);
            }

            vboxSubdivisionItems.Add(notebookDiscussions);
            vboxSubdivisionItems.ShowAll();
        }
Example #19
0
        void Add(Control control, bool fill, int padding, int index)
        {
            int defaultPadding = 3;

            Gtk.Widget widget = control;
            if (widget is Button)
            {
                ((Button)widget).Relief       = ReliefStyle.None;
                ((Button)widget).FocusOnClick = false;
                defaultPadding = 0;
                ChangeColor(widget);
            }
            else if (widget is Entry)
            {
                ((Entry)widget).HasFrame = false;
            }
            else if (widget is ComboBox)
            {
                ((ComboBox)widget).HasFrame = false;
            }
            else if (widget is VSeparator)
            {
                ((VSeparator)widget).HeightRequest = 10;
                ChangeColor(widget);
            }
            else
            {
                ChangeColor(widget);
            }

            if (padding == -1)
            {
                padding = defaultPadding;
            }

            box.PackStart(widget, fill, fill, (uint)padding);
            if (empty)
            {
                empty = false;
                frame.Show();
            }
            if (index != -1)
            {
                Box.BoxChild bc = (Box.BoxChild)box [widget];
                bc.Position = index;
            }
        }
Example #20
0
        public Widget ResolveEditor(PropertyItem item = null)
        {
            HBox hbox = new HBox();

            this.entry = new EntryCallBackEx();
            Alignment alignment = new Alignment(0.5f, 0.5f, 1f, 1f);

            alignment.RightPadding = 30U;
            alignment.Add((Widget)this.entry);
            alignment.ShowAll();
            this.entry.Show();
            hbox.Add((Widget)alignment);
            Box.BoxChild boxChild = hbox[(Widget)alignment] as Box.BoxChild;
            boxChild.Position = 1;
            boxChild.Expand   = true;
            boxChild.Fill     = true;
            hbox.ShowAll();
            this.SetControl();
            this.entry.KeyReleaseEvent += new KeyReleaseEventHandler(this.entry_KeyReleaseEvent);
            this.entry.FocusOutEvent   += new FocusOutEventHandler(this.entry_FocusOutEvent);
            return((Widget)hbox);
        }
Example #21
0
        private void BuildDatePickerWindow()
        {
            Title             = "DatePicker";
            TypeHint          = Gdk.WindowTypeHint.Desktop;
            WindowPosition    = WindowPosition.Mouse;
            BorderWidth       = 1;
            Resizable         = false;
            AllowGrow         = false;
            Decorated         = false;
            DestroyWithParent = true;
            SkipPagerHint     = true;
            SkipTaskbarHint   = true;

            _datebox             = new VBox();
            _datebox.Spacing     = 6;
            _datebox.BorderWidth = 3;

            _calendar                = new RangeCalendar();
            _calendar.CanFocus       = true;
            _calendar.DisplayOptions = CalendarDisplayOptions.ShowHeading;
            _datebox.Add(_calendar);
            Box.BoxChild dateBoxChild = ((Box.BoxChild)(_datebox[_calendar]));
            dateBoxChild.Position = 0;

            Add(_datebox);

            if ((Child != null))
            {
                Child.ShowAll();
            }

            Show();

            ButtonPressEvent                 += new ButtonPressEventHandler(OnButtonPressEvent);
            _calendar.ButtonPressEvent       += new ButtonPressEventHandler(OnCalendarButtonPressEvent);
            _calendar.DaySelected            += new EventHandler(OnCalendarDaySelected);
            _calendar.DaySelectedDoubleClick += new EventHandler(OnCalendarDaySelectedDoubleClick);
        }
Example #22
0
        private Gtk.Widget CreateWorkspaceView()
        {
            ScrolledWindow sw = new ScrolledWindow();

            m_treeView = new Gtk.TreeView();

            //first column has workspaceUnit but presents its friendly name, 2nd column displays type and 3rd displays value
            m_workspaceStore = new Gtk.ListStore(typeof(WorkspaceUnit), typeof(WorkspaceUnit), typeof(WorkspaceUnit));
            m_treeView.Model = m_workspaceStore;

            //create columns with associated cell renderings
            CellRendererText nameRenderer = new CellRendererText();
            TreeViewColumn   nameColumn   = m_treeView.AppendColumn("Name", nameRenderer);

            nameColumn.SetCellDataFunc(nameRenderer, new TreeCellDataFunc(RenderName));

            CellRendererText typeRenderer = new CellRendererText();
            TreeViewColumn   typeColumn   = m_treeView.AppendColumn("Type", typeRenderer);

            typeColumn.SetCellDataFunc(typeRenderer, new TreeCellDataFunc(RenderType));

            TreeViewColumn valueColumn = new TreeViewColumn();

            valueColumn.Title = "Value";
            CellRendererPixbuf valueViewerIconCellRenderer = new CellRendererPixbuf();
            CellRendererText   valueTextRenderer           = new CellRendererText();

            valueViewerIconCellRenderer.Xalign = 0.0f;
            valueColumn.PackEnd(valueTextRenderer, true);
            valueColumn.PackStart(valueViewerIconCellRenderer, false);
            valueColumn.SetCellDataFunc(valueViewerIconCellRenderer, new TreeCellDataFunc(RenderViewerIcon));
            valueColumn.SetCellDataFunc(valueTextRenderer, new TreeCellDataFunc(RenderValue));
            m_treeView.AppendColumn(valueColumn);

            m_treeView.RowActivated += HandleRowActivated;

            // HERZUM SPRINT 3: TLAB-86
            VBox vbox1 = new VBox();

            sw.Add(m_treeView);
            vbox1.Add(sw);
            Box.BoxChild w1 = ((Box.BoxChild)(vbox1 [sw]));
            w1.Position = 0;

            baseline.CanFocus = false;

            Box.BoxChild w2 = ((Box.BoxChild)(vbox1 [baseline]));
            vbox1.Add(baseline);
            w2.Position = 2;
            w2.Expand   = false;
            w2.Fill     = false;


            vbox1.ShowAll();
            return(vbox1);

            //sw.Add(m_treeView);
            //sw.ShowAll();
            //return sw;

            // END HERZUM SPRINT 3: TLAB-86
        }
Example #23
0
        public DefaultPolicyOptionsDialog(Gtk.Window parentWindow)
            : base(parentWindow, new PolicySet(),
                   "/MonoDevelop/ProjectModel/Gui/DefaultPolicyPanels")
        {
            this.Title = GettextCatalog.GetString("Custom Policies");
            editingSet = (PolicySet)DataObject;

            HBox topBar = new HBox();

            topBar.Spacing = 3;
            topBar.PackStart(new Label(GettextCatalog.GetString("Editing Policy:")), false, false, 0);

            policiesCombo = ComboBox.NewText();
            topBar.PackStart(policiesCombo, false, false, 0);

            deleteButton = new Button(GettextCatalog.GetString("Delete Policy"));
            topBar.PackEnd(deleteButton, false, false, 0);

            exportButton             = new MenuButton();
            exportButton.Label       = GettextCatalog.GetString("Export");
            exportButton.MenuCreator = delegate {
                Gtk.Menu menu = new Gtk.Menu();
                MenuItem mi   = new MenuItem(GettextCatalog.GetString("To file..."));
                mi.Activated += HandleToFile;
                menu.Insert(mi, -1);
                mi            = new MenuItem(GettextCatalog.GetString("To project or solution..."));
                mi.Activated += HandleToProject;
                if (!IdeApp.Workspace.IsOpen)
                {
                    mi.Sensitive = false;
                }
                menu.Insert(mi, -1);
                menu.ShowAll();
                return(menu);
            };
            topBar.PackEnd(exportButton, false, false, 0);

            newButton             = new MenuButton();
            newButton.Label       = GettextCatalog.GetString("Add Policy");
            newButton.MenuCreator = delegate {
                Gtk.Menu menu = new Gtk.Menu();
                MenuItem mi   = new MenuItem(GettextCatalog.GetString("New policy..."));
                mi.Activated += HandleNewButtonClicked;
                menu.Insert(mi, -1);
                mi            = new MenuItem(GettextCatalog.GetString("From file..."));
                mi.Activated += HandleFromFile;
                menu.Insert(mi, -1);
                mi            = new MenuItem(GettextCatalog.GetString("From project or solution..."));
                mi.Activated += HandleFromProject;
                if (!IdeApp.Workspace.IsOpen)
                {
                    mi.Sensitive = false;
                }
                menu.Insert(mi, -1);
                menu.ShowAll();
                return(menu);
            };
            topBar.PackEnd(newButton, false, false, 0);

            Alignment align = new Alignment(0f, 0f, 1f, 1f);

            align.LeftPadding   = 9;
            align.TopPadding    = 9;
            align.RightPadding  = 9;
            align.BottomPadding = 9;
            align.Add(topBar);

            HeaderBox ebox = new HeaderBox();

            ebox.GradientBackround = true;
            ebox.SetMargins(0, 1, 0, 0);
            ebox.Add(align);

            ebox.ShowAll();

            VBox.PackStart(ebox, false, false, 0);
            VBox.BorderWidth = 0;
            Box.BoxChild c = (Box.BoxChild)VBox [ebox];
            c.Position = 0;

            foreach (PolicySet ps in PolicyService.GetUserPolicySets())
            {
                PolicySet copy = ps.Clone();
                originalSets [copy] = ps;
                sets.Add(copy);
            }
            FillPolicySets();

            policiesCombo.Changed += HandlePoliciesComboChanged;
            deleteButton.Clicked  += HandleDeleteButtonClicked;
        }
Example #24
0
        private void Build()
        {
            Gui.Initialize(this);

            // Widget Launchpad.Launcher.Interface.MainWindow
            this.UIManager = new UIManager();
            ActionGroup mainActionGroup = new ActionGroup("Default");

            this.MenuAction = new Action("MenuAction", LocalizationCatalog.GetString("Menu"), null, null)
            {
                ShortLabel = LocalizationCatalog.GetString("Menu")
            };
            mainActionGroup.Add(this.MenuAction, null);

            this.RepairGameAction = new Action(
                "repairGameAction",
                LocalizationCatalog.GetString("Repair Game"),
                LocalizationCatalog.GetString("Starts a repair process for the installed game."),
                "gtk-refresh")
            {
                ShortLabel = LocalizationCatalog.GetString("Repair Game")
            };
            mainActionGroup.Add(this.RepairGameAction, null);

            this.ReinstallGameAction = new Action(
                "reinstallGameAction",
                LocalizationCatalog.GetString("Reinstall Game"),
                LocalizationCatalog.GetString("Reinstalls the installed game."),
                "gtk-refresh")
            {
                ShortLabel = LocalizationCatalog.GetString("Reinstall Game")
            };
            mainActionGroup.Add(this.ReinstallGameAction, null);

            this.UIManager.InsertActionGroup(mainActionGroup, 0);
            AddAccelGroup(this.UIManager.AccelGroup);
            this.Name  = "Launchpad.Launcher.Interface.MainWindow";
            this.Title = LocalizationCatalog.GetString("Launchpad - {0}");

            if (SystemInformation.IsRunningOnUnix())
            {
                this.Icon = Pixbuf.LoadFromResource("Launchpad.Launcher.Resources.RocketIcon.ico");
            }
            else
            {
                this.Icon = Pixbuf.LoadFromResource("Launchpad.Launcher.Resources.RocketIcon_Grey.ico");
            }

            this.WindowPosition = (WindowPosition)4;
            this.DefaultWidth   = 745;
            this.DefaultHeight  = 415;
            this.Resizable      = false;

            // Container child Launchpad.Launcher.Interface.MainWindow.Gtk.Container+ContainerChild
            this.VBox1 = new VBox
            {
                Name    = "VBox1",
                Spacing = 6
            };

            // Container child VBox1.Gtk.Box+BoxChild
            this.UIManager.AddUiFromString
            (
                "<ui>" +
                "<menubar name='MainMenuBar'>" +
                "<menu name='MenuAction' action='MenuAction'>" +
                "<menuitem name='repairGameAction' action='repairGameAction'/>" +
                "<separator/>" +
                "<menuitem name='reinstallGameAction' action='reinstallGameAction'/>" +
                "</menu>" +
                "</menubar>" +
                "</ui>"
            );
            this.MainMenuBar      = (MenuBar)this.UIManager.GetWidget("/MainMenuBar");
            this.MainMenuBar.Name = "MainMenuBar";
            this.VBox1.Add(this.MainMenuBar);

            Box.BoxChild w2 = (Box.BoxChild) this.VBox1 [this.MainMenuBar];
            w2.Position = 0;
            w2.Expand   = false;
            w2.Fill     = false;

            // Container child VBox1.Gtk.Box+BoxChild
            this.HBox2 = new HBox
            {
                Name        = "HBox2",
                Spacing     = 6,
                BorderWidth = 4
            };

            // Container child HBox2.Gtk.Box+BoxChild
            this.BrowserContainer = new VBox
            {
                Name    = "browserContainer",
                Spacing = 6
            };

            // Container child browserContainer.Gtk.Box+BoxChild
            this.Alignment2 = new Alignment(0.5F, 0.5F, 1F, 1F)
            {
                WidthRequest = 310,
                Name         = "alignment2"
            };

            // Container child alignment2.Gtk.Container+ContainerChild
            this.BrowserWindow = new ScrolledWindow
            {
                CanFocus   = true,
                Name       = "browserWindow",
                ShadowType = ShadowType.In
            };
            this.Alignment2.Add(this.BrowserWindow);
            this.BrowserContainer.Add(this.Alignment2);

            Box.BoxChild w4 = (Box.BoxChild) this.BrowserContainer [this.Alignment2];
            w4.Position = 0;
            this.HBox2.Add(this.BrowserContainer);

            Box.BoxChild w5 = (Box.BoxChild) this.HBox2 [this.BrowserContainer];
            w5.Position = 0;
            w5.Expand   = false;

            // Container child HBox2.Gtk.Box+BoxChild
            this.Alignment5 = new Alignment(0.5F, 0.5F, 1F, 1F)
            {
                Name = "alignment5"
            };

            // Container child alignment5.Gtk.Container+ContainerChild
            this.GameBanner = new Image
            {
                WidthRequest  = 450,
                HeightRequest = 300,
                Name          = "gameBanner",
                Pixbuf        = Pixbuf.LoadFromResource("Launchpad.Launcher.Resources.RocketIcon.ico")
            };
            this.Alignment5.Add(this.GameBanner);
            this.HBox2.Add(this.Alignment5);

            Box.BoxChild w7 = (Box.BoxChild) this.HBox2 [this.Alignment5];
            w7.Position = 1;
            this.VBox1.Add(this.HBox2);

            Box.BoxChild w8 = (Box.BoxChild) this.VBox1 [this.HBox2];
            w8.Position = 1;
            w8.Expand   = false;
            w8.Fill     = false;

            // Container child VBox1.Gtk.Box+BoxChild
            this.Alignment1 = new Alignment(0.5F, 0.5F, 1F, 1F)
            {
                Name        = "alignment1",
                LeftPadding = 6
            };

            // Container child alignment1.Gtk.Container+ContainerChild
            this.IndicatorLabel = new Label
            {
                Name      = "IndicatorLabel",
                Xalign    = 0F,
                LabelProp = LocalizationCatalog.GetString("Idle")
            };
            this.Alignment1.Add(this.IndicatorLabel);
            this.VBox1.Add(this.Alignment1);

            Box.BoxChild w10 = (Box.BoxChild) this.VBox1 [this.Alignment1];
            w10.Position = 2;
            w10.Expand   = false;
            w10.Fill     = false;

            // Container child VBox1.Gtk.Box+BoxChild
            this.HBox3 = new HBox
            {
                Name        = "HBox3",
                Spacing     = 6,
                BorderWidth = 4
            };

            // Container child HBox3.Gtk.Box+BoxChild
            this.Alignment4 = new Alignment(0.5F, 0.5F, 1F, 1F)
            {
                Name = "alignment4"
            };

            // Container child alignment4.Gtk.Container+ContainerChild
            this.MainProgressBar = new ProgressBar
            {
                Name = "mainProgressBar"
            };
            this.Alignment4.Add(this.MainProgressBar);
            this.HBox3.Add(this.Alignment4);

            Box.BoxChild w12 = (Box.BoxChild) this.HBox3 [this.Alignment4];
            w12.Position = 0;

            // Container child HBox3.Gtk.Box+BoxChild
            this.HBox4 = new HBox
            {
                Name    = "HBox4",
                Spacing = 6
            };

            // Container child HBox4.Gtk.Box+BoxChild
            this.Alignment3 = new Alignment(0.5F, 0.5F, 1F, 1F)
            {
                WidthRequest = 100,
                Name         = "alignment3"
            };

            // Container child alignment3.Gtk.Container+ContainerChild
            this.PrimaryButton = new Button
            {
                Sensitive    = false,
                CanDefault   = true,
                CanFocus     = true,
                Name         = "primaryButton",
                UseUnderline = true,
                Label        = LocalizationCatalog.GetString("Inactive")
            };
            this.Alignment3.Add(this.PrimaryButton);
            this.HBox4.Add(this.Alignment3);

            Box.BoxChild w14 = (Box.BoxChild) this.HBox4 [this.Alignment3];
            w14.Position = 0;
            this.HBox3.Add(this.HBox4);

            Box.BoxChild w15 = (Box.BoxChild) this.HBox3 [this.HBox4];
            w15.Position = 1;
            w15.Expand   = false;
            w15.Fill     = false;
            this.VBox1.Add(this.HBox3);

            Box.BoxChild w16 = (Box.BoxChild) this.VBox1 [this.HBox3];
            w16.Position = 3;
            w16.Expand   = true;
            w16.Fill     = false;

            Add(this.VBox1);
            if ((this.Child != null))
            {
                this.Child.ShowAll();
            }

            this.PrimaryButton.HasDefault = true;
            Show();
            this.DeleteEvent += OnDeleteEvent;
            this.RepairGameAction.Activated    += OnRepairGameActionActivated;
            this.ReinstallGameAction.Activated += OnReinstallGameActionActivated;
            this.PrimaryButton.Clicked         += OnPrimaryButtonClicked;
        }
Example #25
0
        private void ConfigureActions()
        {
            if (actionsSensitivity == null)
            {
                actionsSensitivity = new List <System.Action>();
            }
            else
            {
                actionsSensitivity.Clear();
            }

            if (actionsVisibility == null)
            {
                actionsVisibility = new List <System.Action>();
            }
            else
            {
                actionsVisibility.Clear();
            }

            foreach (var action in ViewModel.NodeActions)
            {
                Widget actionWidget;

                if (action.ChildActions.Any())
                {
                    MenuButton menuButton = new MenuButton();
                    menuButton.Label = action.Title;
                    Menu childActionButtons = new Menu();
                    foreach (var childAction in action.ChildActions)
                    {
                        childActionButtons.Add(CreateMenuItemWidget(childAction));
                    }
                    menuButton.Menu = childActionButtons;
                    actionWidget    = menuButton;
                }
                else
                {
                    Button button = new Button();
                    button.Label = action.Title;

                    button.Clicked += (sender, e) => { action.ExecuteAction(GetSelectedItems()); };

                    actionsSensitivity.Add(() => {
                        button.Sensitive = action.GetSensitivity(GetSelectedItems());
                    });

                    actionsVisibility.Add(() => {
                        button.Visible = action.GetVisibility(GetSelectedItems());
                    });
                    actionWidget = button;
                }

                actionWidget.ShowAll();

                hboxButtons.Add(actionWidget);
                Box.BoxChild addDocumentButtonBox = (Box.BoxChild)hboxButtons[actionWidget];
                addDocumentButtonBox.Expand = false;
                addDocumentButtonBox.Fill   = false;
            }

            tableview.RowActivated += (o, args) => {
                ViewModel.RowActivatedAction?.ExecuteAction(GetSelectedItems());
            };
        }
Example #26
0
        void RebuildView()
        {
            // Remove the old items
            var children = ctlVBox.AllChildren.OfType <Bin>()
                           .Where(x => x is ThreadViewerMessageTile || x is ThreadViewerDivider)
                           .ToArray();

            foreach (var child in children)
            {
                ctlVBox.Remove(child);
            }
            tilesByMessageId.Clear();

            var oldReplyToMessage = ctlMessageComposer.MessageBeingRepliedTo;

            ctlMessageComposer.SetIdle();

            if (messagesToLoad == null || messagesToLoad.Count == 0)
            {
                return;
            }

            var trimmedList = messagesToLoad;

            // Don't show more than MaxMessagesToShow, since the rendering chokes
            // when there are too many controls.
            // TODO: Should we shown an ellipsis in this case?
            int trimIndex = trimmedList.Count - MaxMessagesToShow;

            if (trimIndex > 0)
            {
                trimmedList = messagesToLoad.Skip(trimIndex).ToArray();
            }

            long lastThreadId = -1;
            int  counter      = 0;
            ThreadViewerMessageTile tileWidget = null;

            foreach (var message in trimmedList)
            {
                if (counter > 0 && lastThreadId != message.ThreadId)
                {
                    // If the previous control is a tileWidget, then
                    // hide its separator
                    if (tileWidget != null)
                    {
                        tileWidget.ShowSeparator = false;
                    }

                    // Add a divider
                    var dividerWidget = new ThreadViewerDivider();
                    dividerWidget.Name   = "DividerTile" + counter.ToString();
                    dividerWidget.Events = EventMask.ButtonPressMask;

                    ctlVBox.Add(dividerWidget);

                    Box.BoxChild box2 = (Box.BoxChild) this.ctlVBox[dividerWidget];
                    box2.Position = counter;
                    box2.Expand   = false;
                    box2.Fill     = false;
                    ++counter;

                    dividerWidget.Show();
                }
                lastThreadId = message.ThreadId;

                tileWidget        = new ThreadViewerMessageTile(this);
                tileWidget.Name   = "MessageTile" + counter.ToString();
                tileWidget.Events = EventMask.ButtonPressMask;

                tileWidget.LoadMessage(message);

                if (messageToHighlight != null)
                {
                    if (message.MessageId == messageToHighlight.MessageId)
                    {
                        tileWidget.Highlighted = true;
                    }
                }

                ctlVBox.Add(tileWidget);
                tilesByMessageId.Add(message.MessageId, tileWidget);

                Box.BoxChild box = (Box.BoxChild) this.ctlVBox[tileWidget];
                box.Position = counter;
                box.Expand   = false;
                box.Fill     = false;
                ++counter;

                tileWidget.Show();

                // Attempt to restore the reply context
                if (message == oldReplyToMessage)
                {
                    ctlMessageComposer.ReplyToMessage(oldReplyToMessage);
                    oldReplyToMessage = null;
                }
            }

            if (ctlMessageComposer.ComposerMode == MessageComposerMode.Idle)
            {
                // If we lost our message, then default to replying to the whole thread
                ctlMessageComposer.ReplyToThread(trimmedList.Last().Thread);
            }

            SetThreadReadWithoutEvents(threadToLoad != null ? threadToLoad.Read : false);
            finishedLoading = false;
        }
        protected virtual void Build()
        {
            Gui.Initialize(this);
            base.HeightRequest  = 140;
            base.Name           = "CocoStudio.ControlLib.Windows.CoverPromptDialog";
            base.WindowPosition = WindowPosition.CenterOnParent;
            VBox vBox = base.VBox;

            vBox.Name                       = "dialog1_VBox";
            vBox.BorderWidth                = 2u;
            this.vbox2                      = new VBox();
            this.vbox2.Name                 = "vbox2";
            this.vbox2.Spacing              = 6;
            this.vbox2.BorderWidth          = 5u;
            this.label_Prompt               = new Label();
            this.label_Prompt.HeightRequest = 20;
            this.label_Prompt.Name          = "label_Prompt";
            this.label_Prompt.LabelProp     = Catalog.GetString("导出目录下存在A文件夹");
            this.vbox2.Add(this.label_Prompt);
            Box.BoxChild boxChild = (Box.BoxChild) this.vbox2[this.label_Prompt];
            boxChild.Position                          = 0;
            boxChild.Expand                            = false;
            boxChild.Fill                              = false;
            this.radiobutton_CoverFolder               = new RadioButton(Catalog.GetString("覆盖文件夹,警告:覆盖可能导致导出资源赘余!"));
            this.radiobutton_CoverFolder.CanFocus      = true;
            this.radiobutton_CoverFolder.Name          = "radiobutton_CoverFolder";
            this.radiobutton_CoverFolder.DrawIndicator = true;
            this.radiobutton_CoverFolder.UseUnderline  = true;
            this.radiobutton_CoverFolder.Group         = new SList(IntPtr.Zero);
            this.vbox2.Add(this.radiobutton_CoverFolder);
            Box.BoxChild boxChild2 = (Box.BoxChild) this.vbox2[this.radiobutton_CoverFolder];
            boxChild2.Position                          = 1;
            boxChild2.Expand                            = false;
            boxChild2.Fill                              = false;
            this.radiobutton_ChangeFolder               = new RadioButton(Catalog.GetString("_将导出文件夹名称:A_1 修改为A_1"));
            this.radiobutton_ChangeFolder.CanFocus      = true;
            this.radiobutton_ChangeFolder.Name          = "radiobutton_ChangeFolder";
            this.radiobutton_ChangeFolder.DrawIndicator = true;
            this.radiobutton_ChangeFolder.UseUnderline  = true;
            this.radiobutton_ChangeFolder.Group         = this.radiobutton_CoverFolder.Group;
            this.vbox2.Add(this.radiobutton_ChangeFolder);
            Box.BoxChild boxChild3 = (Box.BoxChild) this.vbox2[this.radiobutton_ChangeFolder];
            boxChild3.Position = 2;
            boxChild3.Expand   = false;
            boxChild3.Fill     = false;
            vBox.Add(this.vbox2);
            Box.BoxChild boxChild4 = (Box.BoxChild)vBox[this.vbox2];
            boxChild4.Position = 0;
            boxChild4.Expand   = false;
            boxChild4.Fill     = false;
            HButtonBox actionArea = base.ActionArea;

            actionArea.Name                = "dialog1_ActionArea";
            actionArea.Spacing             = 10;
            actionArea.BorderWidth         = 5u;
            actionArea.LayoutStyle         = ButtonBoxStyle.End;
            this.buttonCancel              = new Button();
            this.buttonCancel.CanDefault   = true;
            this.buttonCancel.CanFocus     = true;
            this.buttonCancel.Name         = "buttonCancel";
            this.buttonCancel.UseStock     = true;
            this.buttonCancel.UseUnderline = true;
            this.buttonCancel.Label        = "gtk-cancel";
            base.AddActionWidget(this.buttonCancel, -6);
            ButtonBox.ButtonBoxChild buttonBoxChild = (ButtonBox.ButtonBoxChild)actionArea[this.buttonCancel];
            buttonBoxChild.Expand      = false;
            buttonBoxChild.Fill        = false;
            this.buttonOk              = new Button();
            this.buttonOk.CanDefault   = true;
            this.buttonOk.CanFocus     = true;
            this.buttonOk.Name         = "buttonOk";
            this.buttonOk.UseStock     = true;
            this.buttonOk.UseUnderline = true;
            this.buttonOk.Label        = "gtk-ok";
            base.AddActionWidget(this.buttonOk, -5);
            ButtonBox.ButtonBoxChild buttonBoxChild2 = (ButtonBox.ButtonBoxChild)actionArea[this.buttonOk];
            buttonBoxChild2.Position = 1;
            buttonBoxChild2.Expand   = false;
            buttonBoxChild2.Fill     = false;
            if (base.Child != null)
            {
                base.Child.ShowAll();
            }
            base.DefaultWidth  = 500;
            base.DefaultHeight = 140;
            base.Show();
        }
Example #28
0
        public BugsViewWidget(BugzillaServer server)
        {
            this.Build();
            this.server = server;

            bugsStore = new TreeStore(
                typeof(BugInfo),
                typeof(string),                                 // Group
                typeof(int),                                    // Id
                typeof(int),                                    // Local priority
                typeof(string),                                 // Status
                typeof(string),                                 // Severity
                typeof(string),                                 // Target Milestone
                typeof(int),                                    // Age
                typeof(string),                                 // Assignee
                typeof(string),                                 // ColOS
                typeof(string),                                 // Component
                typeof(string),                                 // Summary
                typeof(int),                                    // Weight
                typeof(Gdk.Color),                              // Back color
                typeof(Gdk.Color),                              // Font color
                typeof(string)                                  // Summary
                );
            bugsList.Model = bugsStore;

/*			CellRendererSpin spin = new CellRendererSpin ();
 *                      spin.Digits = 1;
 */
            CellRendererText spin = new CellRendererText();

            spin.Editable = true;
            spin.Edited  += HandleSpinEdited;

            groupColumns = new TreeViewColumn [Enum.GetValues(typeof(GroupCommand)).Length - 1];

            groupColumn = bugsList.AppendColumn("Category", new CellRendererText(), "text", ColGroup);
            bugsList.AppendColumn("Id", new CellRendererText(), "text", ColId);
            bugsList.AppendColumn("Prio", spin, "text", ColPriority);
            groupColumns [(int)GroupCommand.GroupByStatus]    = bugsList.AppendColumn("Status", new CellRendererText(), "text", ColStatus);
            groupColumns [(int)GroupCommand.GroupBySeverity]  = bugsList.AppendColumn("Severity", new CellRendererText(), "text", ColSeverity);
            groupColumns [(int)GroupCommand.GroupByMilestone] = bugsList.AppendColumn("Milestone", new CellRendererText(), "text", ColTargetMilestone);
            bugsList.AppendColumn("Age", new CellRendererText(), "text", ColAge);
            groupColumns [(int)GroupCommand.GroupByOwner] = bugsList.AppendColumn("Assigned", new CellRendererText(), "text", ColAssignee);
            bugsList.AppendColumn("OS", new CellRendererText(), "text", ColOS);
            groupColumns [(int)GroupCommand.GroupByComponent] = bugsList.AppendColumn("Component", new CellRendererText(), "text", ColComponent);
            groupColumns [(int)GroupCommand.GroupByTag]       = bugsList.AppendColumn("Tags", new CellRendererText(), "text", ColTags);
            CellRendererText ct = new CellRendererText();

            bugsList.AppendColumn("Summary", ct, "text", ColSummary);

            int n = 1;

            foreach (TreeViewColumn col in bugsList.Columns)
            {
                col.SortColumnId = n++;
                col.Clickable    = true;
                col.Resizable    = true;
                col.Reorderable  = true;
                CellRendererText crt = (CellRendererText)col.CellRenderers[0];
                col.AddAttribute(crt, "weight", ColWeight);
                col.AddAttribute(crt, "background-gdk", ColBackColor);
                col.AddAttribute(crt, "foreground-gdk", ColFontColor);
            }

            bugsList.DragBegin        += HandleBugsListDragBegin;
            bugsList.DragDataReceived += HandleBugsListDragDataReceived;
            bugsList.DragEnd          += HandleBugsListDragEnd;
            bugsList.DragMotion       += HandleBugsListDragMotion;

            bugsList.Selection.Mode     = SelectionMode.Multiple;
            bugsList.Selection.Changed += HandleBugsListSelectionChanged;

            Gtk.TargetEntry[] targets = new Gtk.TargetEntry [] { new TargetEntry("bug", TargetFlags.Widget, 0) };
//			bugsList.EnableModelDragSource (Gdk.ModifierType.None, targets, Gdk.DragAction.Move);
            Gtk.Drag.SourceSet(bugsList, Gdk.ModifierType.Button1Mask, targets, Gdk.DragAction.Move);
            bugsList.EnableModelDragDest(targets, Gdk.DragAction.Move);

            ActionCommand setPrioHigh      = new ActionCommand(LocalCommands.SetPriorityHigh, GettextCatalog.GetString("Set High Priority (Bottom)"));
            ActionCommand setPrioMed       = new ActionCommand(LocalCommands.SetPriorityMed, GettextCatalog.GetString("Set Medium Priority (Bottom)"));
            ActionCommand setPrioLow       = new ActionCommand(LocalCommands.SetPriorityLow, GettextCatalog.GetString("Set Low Priority (Bottom)"));
            ActionCommand setPrioHighTop   = new ActionCommand(LocalCommands.SetPriorityHighTop, GettextCatalog.GetString("Set High Priority (Top)"));
            ActionCommand setPrioMedTop    = new ActionCommand(LocalCommands.SetPriorityMedTop, GettextCatalog.GetString("Set Medium Priority (Top)"));
            ActionCommand setPrioLowTop    = new ActionCommand(LocalCommands.SetPriorityLowTop, GettextCatalog.GetString("Set Low Priority (Top)"));
            ActionCommand toggleRead       = new ActionCommand(LocalCommands.ToggleNewMarker, GettextCatalog.GetString("Mark as Changed"));
            ActionCommand openInBrowser    = new ActionCommand(LocalCommands.OpenInBrowser, GettextCatalog.GetString("Open in Browser"));
            ActionCommand refreshBugInfo   = new ActionCommand(LocalCommands.RefreshFromSever, GettextCatalog.GetString("Refresh From Server"));
            ActionCommand setTagCommand    = new ActionCommand(LocalCommands.TagsList, GettextCatalog.GetString("Set tag"));
            ActionCommand clearTagsCommand = new ActionCommand(LocalCommands.ClearTags, GettextCatalog.GetString("Clear Tags"));
            ActionCommand editTagsCommand  = new ActionCommand(LocalCommands.EditTags, GettextCatalog.GetString("Edit Tags"));

            setTagCommand.CommandArray = true;
            setTagCommand.ActionType   = ActionType.Check;

            menuSet = new CommandEntrySet();
            menuSet.Add(openInBrowser);
            menuSet.AddSeparator();
            menuSet.Add(setPrioHighTop);
            menuSet.Add(setPrioHigh);
            menuSet.Add(setPrioMedTop);
            menuSet.Add(setPrioMed);
            menuSet.Add(setPrioLowTop);
            menuSet.Add(setPrioLow);
            menuSet.AddSeparator();

            CommandEntrySet tagsSet = menuSet.AddItemSet(GettextCatalog.GetString("Tags"));

            tagsSet.Add(setTagCommand);
            tagsSet.AddSeparator();
            tagsSet.Add(clearTagsCommand);
            tagsSet.Add(editTagsCommand);

            menuSet.Add(toggleRead);
            menuSet.AddSeparator();
            menuSet.Add(refreshBugInfo);

            // Manage menu

            ActionCommand   newServer    = new ActionCommand(LocalCommands.NewServer, GettextCatalog.GetString("Add Server..."));
            ActionCommand   deleteServer = new ActionCommand(LocalCommands.DeleteServer, GettextCatalog.GetString("Remove Server"));
            ActionCommand   editServer   = new ActionCommand(LocalCommands.EditServer, GettextCatalog.GetString("Edit Server"));
            CommandEntrySet adminMenuSet = new CommandEntrySet();

            adminMenuSet.Add(newServer);
            adminMenuSet.Add(deleteServer);
            adminMenuSet.Add(editServer);

            // Edit button

            MenuButton editButton = new MenuButton();

            editButton.Relief      = ReliefStyle.None;
            editButton.Label       = GettextCatalog.GetString("Manage");
            editButton.MenuCreator = delegate {
                return(IdeApp.CommandService.CreateMenu(adminMenuSet));
            };
            hboxHeader.PackStart(editButton, false, false, 0);
            Box.BoxChild ch = (Box.BoxChild)hboxHeader [editButton];
            ch.Position = 1;
            editButton.ShowAll();

            // Group by button

            CommandEntrySet groupByMenuSet = new CommandEntrySet();

            groupByMenuSet.Add(new ActionCommand(GroupCommand.GroupByNothing, GettextCatalog.GetString("Don't group")));
            groupByMenuSet.AddSeparator();
            groupByMenuSet.Add(new ActionCommand(GroupCommand.GroupByComponent, GettextCatalog.GetString("Component")));
            groupByMenuSet.Add(new ActionCommand(GroupCommand.GroupByMilestone, GettextCatalog.GetString("Target Milestone")));
            groupByMenuSet.Add(new ActionCommand(GroupCommand.GroupByOwner, GettextCatalog.GetString("Assigned To")));
            groupByMenuSet.Add(new ActionCommand(GroupCommand.GroupBySeverity, GettextCatalog.GetString("Severity")));
            groupByMenuSet.Add(new ActionCommand(GroupCommand.GroupByStatus, GettextCatalog.GetString("Status")));
            groupByMenuSet.Add(new ActionCommand(GroupCommand.GroupByTag, GettextCatalog.GetString("Tag")));

            MenuButton groupButton = new MenuButton();

            groupButton.Relief      = ReliefStyle.None;
            groupButton.Label       = GettextCatalog.GetString("Group By");
            groupButton.MenuCreator = delegate {
                return(IdeApp.CommandService.CreateMenu(groupByMenuSet));
            };
            hboxHeader.PackStart(groupButton, false, false, 0);
            ch          = (Box.BoxChild)hboxHeader [groupButton];
            ch.Position = 4;
            groupButton.ShowAll();

            // Load data

            FillServers();
            FillServer(null);
        }
Example #29
0
        protected virtual void Build()
        {
            Gui.Initialize((Widget)this);
            this.HeightRequest  = 175;
            this.Name           = "CocoStudio.ControlLib.Windows.LoginDialog";
            this.WindowPosition = WindowPosition.CenterOnParent;
            VBox vbox = this.VBox;

            vbox.Name                     = "dialog1_VBox";
            vbox.BorderWidth              = 2U;
            this.evtbx_border             = new EventBox();
            this.evtbx_border.Name        = "evtbx_border";
            this.evtbx_border.BorderWidth = 10U;
            this.table_main               = new Table(4U, 2U, false);
            this.table_main.Name          = "table_main";
            this.table_main.RowSpacing    = 6U;
            this.table_main.ColumnSpacing = 6U;
            this.hbox_firstRow            = new HBox();
            this.hbox_firstRow.Name       = "hbox_firstRow";
            this.hbox_firstRow.Spacing    = 6;
            this.entry_Name               = new Entry();
            this.entry_Name.WidthRequest  = 250;
            this.entry_Name.CanFocus      = true;
            this.entry_Name.Name          = "entry_Name";
            this.entry_Name.IsEditable    = true;
            this.entry_Name.InvisibleChar = '●';
            this.hbox_firstRow.Add((Widget)this.entry_Name);
            Box.BoxChild boxChild1 = (Box.BoxChild) this.hbox_firstRow[(Widget)this.entry_Name];
            boxChild1.Position               = 0;
            boxChild1.Expand                 = false;
            this.link_RegisterAccount        = new LabelLink((string)null);
            this.link_RegisterAccount.Events = EventMask.ButtonPressMask;
            this.link_RegisterAccount.Name   = "link_RegisterAccount";
            this.hbox_firstRow.Add((Widget)this.link_RegisterAccount);
            Box.BoxChild boxChild2 = (Box.BoxChild) this.hbox_firstRow[(Widget)this.link_RegisterAccount];
            boxChild2.Position = 1;
            boxChild2.Expand   = false;
            boxChild2.Fill     = false;
            this.table_main.Add((Widget)this.hbox_firstRow);
            Table.TableChild tableChild1 = (Table.TableChild) this.table_main[(Widget)this.hbox_firstRow];
            tableChild1.LeftAttach      = 1U;
            tableChild1.RightAttach     = 2U;
            tableChild1.XOptions        = AttachOptions.Fill;
            tableChild1.YOptions        = AttachOptions.Fill;
            this.hbox_fourthRow         = new HBox();
            this.hbox_fourthRow.Name    = "hbox_fourthRow";
            this.hbox_fourthRow.Spacing = 6;
            this.label_remark           = new Label();
            this.label_remark.Name      = "label_remark";
            this.label_remark.LabelProp = Catalog.GetString("(请使用CocoaChina账号登陆)");
            this.hbox_fourthRow.Add((Widget)this.label_remark);
            Box.BoxChild boxChild3 = (Box.BoxChild) this.hbox_fourthRow[(Widget)this.label_remark];
            boxChild3.Position = 0;
            boxChild3.Expand   = false;
            boxChild3.Fill     = false;
            this.table_main.Add((Widget)this.hbox_fourthRow);
            Table.TableChild tableChild2 = (Table.TableChild) this.table_main[(Widget)this.hbox_fourthRow];
            tableChild2.TopAttach             = 3U;
            tableChild2.BottomAttach          = 4U;
            tableChild2.LeftAttach            = 1U;
            tableChild2.RightAttach           = 2U;
            tableChild2.XOptions              = AttachOptions.Fill;
            tableChild2.YOptions              = AttachOptions.Fill;
            this.hbox_secondRow               = new HBox();
            this.hbox_secondRow.Name          = "hbox_secondRow";
            this.hbox_secondRow.Spacing       = 6;
            this.entry_PassWord               = new PassWordEntry();
            this.entry_PassWord.CanFocus      = true;
            this.entry_PassWord.Name          = "entry_PassWord";
            this.entry_PassWord.IsEditable    = true;
            this.entry_PassWord.InvisibleChar = '●';
            this.hbox_secondRow.Add((Widget)this.entry_PassWord);
            ((Box.BoxChild) this.hbox_secondRow[(Widget)this.entry_PassWord]).Position = 0;
            this.link_ForgotPassword        = new LabelLink((string)null);
            this.link_ForgotPassword.Events = EventMask.ButtonPressMask;
            this.link_ForgotPassword.Name   = "link_ForgotPassword";
            this.hbox_secondRow.Add((Widget)this.link_ForgotPassword);
            Box.BoxChild boxChild4 = (Box.BoxChild) this.hbox_secondRow[(Widget)this.link_ForgotPassword];
            boxChild4.Position = 1;
            boxChild4.Expand   = false;
            boxChild4.Fill     = false;
            this.table_main.Add((Widget)this.hbox_secondRow);
            Table.TableChild tableChild3 = (Table.TableChild) this.table_main[(Widget)this.hbox_secondRow];
            tableChild3.TopAttach                   = 1U;
            tableChild3.BottomAttach                = 2U;
            tableChild3.LeftAttach                  = 1U;
            tableChild3.RightAttach                 = 2U;
            tableChild3.XOptions                    = AttachOptions.Fill;
            tableChild3.YOptions                    = AttachOptions.Fill;
            this.hbox_thirdRow                      = new HBox();
            this.hbox_thirdRow.Name                 = "hbox_thirdRow";
            this.hbox_thirdRow.Spacing              = 6;
            this.checkbutton_password               = new CheckButton();
            this.checkbutton_password.CanFocus      = true;
            this.checkbutton_password.Name          = "checkbutton_password";
            this.checkbutton_password.Label         = Catalog.GetString("记住密码");
            this.checkbutton_password.DrawIndicator = true;
            this.checkbutton_password.UseUnderline  = true;
            this.hbox_thirdRow.Add((Widget)this.checkbutton_password);
            Box.BoxChild boxChild5 = (Box.BoxChild) this.hbox_thirdRow[(Widget)this.checkbutton_password];
            boxChild5.Position                       = 0;
            boxChild5.Expand                         = false;
            this.checkbutton_AutoLogin               = new CheckButton();
            this.checkbutton_AutoLogin.CanFocus      = true;
            this.checkbutton_AutoLogin.Name          = "checkbutton_AutoLogin";
            this.checkbutton_AutoLogin.Label         = Catalog.GetString("自动登陆");
            this.checkbutton_AutoLogin.DrawIndicator = true;
            this.checkbutton_AutoLogin.UseUnderline  = true;
            this.hbox_thirdRow.Add((Widget)this.checkbutton_AutoLogin);
            Box.BoxChild boxChild6 = (Box.BoxChild) this.hbox_thirdRow[(Widget)this.checkbutton_AutoLogin];
            boxChild6.Position = 1;
            boxChild6.Expand   = false;
            this.table_main.Add((Widget)this.hbox_thirdRow);
            Table.TableChild tableChild4 = (Table.TableChild) this.table_main[(Widget)this.hbox_thirdRow];
            tableChild4.TopAttach     = 2U;
            tableChild4.BottomAttach  = 3U;
            tableChild4.LeftAttach    = 1U;
            tableChild4.RightAttach   = 2U;
            tableChild4.XOptions      = AttachOptions.Fill;
            tableChild4.YOptions      = AttachOptions.Fill;
            this.label_Name           = new Label();
            this.label_Name.Name      = "label_Name";
            this.label_Name.Xalign    = 1f;
            this.label_Name.LabelProp = Catalog.GetString("用户名");
            this.table_main.Add((Widget)this.label_Name);
            Table.TableChild tableChild5 = (Table.TableChild) this.table_main[(Widget)this.label_Name];
            tableChild5.XOptions          = AttachOptions.Fill;
            tableChild5.YOptions          = AttachOptions.Fill;
            this.label_PassWord           = new Label();
            this.label_PassWord.Name      = "label_PassWord";
            this.label_PassWord.Xalign    = 1f;
            this.label_PassWord.LabelProp = Catalog.GetString("密码");
            this.table_main.Add((Widget)this.label_PassWord);
            Table.TableChild tableChild6 = (Table.TableChild) this.table_main[(Widget)this.label_PassWord];
            tableChild6.TopAttach    = 1U;
            tableChild6.BottomAttach = 2U;
            tableChild6.XOptions     = AttachOptions.Fill;
            tableChild6.YOptions     = AttachOptions.Fill;
            this.evtbx_border.Add((Widget)this.table_main);
            vbox.Add((Widget)this.evtbx_border);
            Box.BoxChild boxChild7 = (Box.BoxChild)vbox[(Widget)this.evtbx_border];
            boxChild7.Position = 0;
            boxChild7.Expand   = false;
            boxChild7.Fill     = false;
            HButtonBox actionArea = this.ActionArea;

            actionArea.Name                = "dialog1_ActionArea";
            actionArea.Spacing             = 10;
            actionArea.BorderWidth         = 5U;
            actionArea.LayoutStyle         = ButtonBoxStyle.End;
            this.buttonCancel              = new Button();
            this.buttonCancel.CanDefault   = true;
            this.buttonCancel.CanFocus     = true;
            this.buttonCancel.Name         = "buttonCancel";
            this.buttonCancel.UseStock     = true;
            this.buttonCancel.UseUnderline = true;
            this.buttonCancel.Label        = "gtk-cancel";
            this.AddActionWidget((Widget)this.buttonCancel, -6);
            ButtonBox.ButtonBoxChild buttonBoxChild1 = (ButtonBox.ButtonBoxChild)actionArea[(Widget)this.buttonCancel];
            buttonBoxChild1.Expand     = false;
            buttonBoxChild1.Fill       = false;
            this.buttonOk              = new Button();
            this.buttonOk.CanDefault   = true;
            this.buttonOk.CanFocus     = true;
            this.buttonOk.Name         = "buttonOk";
            this.buttonOk.UseStock     = true;
            this.buttonOk.UseUnderline = true;
            this.buttonOk.Label        = "gtk-ok";
            this.AddActionWidget((Widget)this.buttonOk, -5);
            ButtonBox.ButtonBoxChild buttonBoxChild2 = (ButtonBox.ButtonBoxChild)actionArea[(Widget)this.buttonOk];
            buttonBoxChild2.Position = 1;
            buttonBoxChild2.Expand   = false;
            buttonBoxChild2.Fill     = false;
            if (this.Child != null)
            {
                this.Child.ShowAll();
            }
            this.DefaultWidth  = 412;
            this.DefaultHeight = 191;
            this.Show();
        }
Example #30
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);
 }