Ejemplo n.º 1
0
        void UpdateSearchFilter(Entry e, Table table, bool onlyHighlight)
        {
            string      key            = e.Text;
            List <uint> toBeHiddenRows = new List <uint>();

            foreach (Widget w in table)
            {
                Table.TableChild c = table[w] as Table.TableChild;
                // by default show all widgets
                w.ShowAll();
                // search in second column
                if (c.LeftAttach == 1 && c.TopAttach > 0)
                {
                    IMySearchable s = (IMySearchable)(w as EventBox).Child;
                    if (!s.MatchesSearchString(key) && !onlyHighlight)
                    {
                        toBeHiddenRows.Add(c.TopAttach);
                    }
                }
            }
            // hide rows
            if (toBeHiddenRows.Count > 0)
            {
                foreach (Widget w in table)
                {
                    Table.TableChild c = table[w] as Table.TableChild;
                    // hide all conflict resolve buttons if filtering...
                    if (c.LeftAttach == 3 || c.LeftAttach == 4 || toBeHiddenRows.Contains(c.TopAttach))
                    {
                        w.HideAll();
                    }
                }
            }
        }
Ejemplo n.º 2
0
        void AddFeatures()
        {
            EmptyFeaturesTable();
            featuresTable.NColumns = (uint)ViewModel.Features.Count;
            featuresTable.NRows    = 2;
            uint leftAttach   = 0;
            uint rightAttach  = 1;
            uint topAttach    = 0;
            uint bottomAttach = 1;

            foreach (var feature in ViewModel.Features)
            {
                var image = new ImageView(App.Current.ResourcesLocator.LoadIcon("vas-apply-button", APPLY_SIZE));
                image.Xalign = 0;
                featuresTable.Add(image);
                Table.TableChild w1 = (Table.TableChild)(featuresTable [image]);
                w1.TopAttach    = topAttach;
                w1.BottomAttach = bottomAttach;
                w1.LeftAttach   = leftAttach;
                w1.RightAttach  = rightAttach;
                Label lbl = new Label(feature);
                lbl.Xalign  = 0;
                lbl.Justify = Justification.Left;
                lbl.ModifyFont(FontDescription.FromString($"{App.Current.Style.Font} light {FEATURE_LABEL_SIZE}px"));
                featuresTable.Add(lbl);
                Table.TableChild w2 = (Table.TableChild)(featuresTable [lbl]);
                w2.TopAttach    = topAttach;
                w2.BottomAttach = bottomAttach;
                w2.LeftAttach   = leftAttach + 1;
                w2.RightAttach  = rightAttach + 1;
                topAttach++;
                bottomAttach++;
            }
        }
Ejemplo n.º 3
0
 public static void RemoveTableColumns(Table table, uint start, uint n)
 {
     // delete affected widgets
     foreach (Widget w in table)
     {
         Table.TableChild c = table[w] as Table.TableChild;
         if (c.LeftAttach >= start && c.RightAttach <= start + n)
         {
             table.Remove(w);
         }
     }
     // reattach widgets
     foreach (Widget w in table)
     {
         Table.TableChild c = table[w] as Table.TableChild;
         // first left
         if (c.LeftAttach >= start + n)
         {
             c.LeftAttach -= n;
         }
         // then right!
         if (c.RightAttach > start + n)
         {
             c.RightAttach -= n;
         }
     }
     table.NColumns -= n;
 }
Ejemplo n.º 4
0
 void ResolveConflict(Table table, int i)
 {
     // swap it in data
     if (table == tableTeams)
     {
         SwapItems(teams, i);
     }
     else
     {
         SwapItems(speakers, i);
     }
     // i is one less than row (since header)
     MiscHelpers.SwapTableRows(table, (uint)i, (uint)i + 1);
     // update pos labels
     foreach (Widget w in table)
     {
         Table.TableChild c = table[w] as Table.TableChild;
         if (c.LeftAttach == 0 && c.TopAttach == i)
         {
             ((Label)(w as EventBox).Child).Text = i.ToString();
         }
         else if (c.LeftAttach == 0 && c.TopAttach == i + 1)
         {
             ((Label)(w as EventBox).Child).Text = (i + 1).ToString();
         }
     }
     // update all marking, this affects also speakers
     // if teams are switched...
     UpdateBreakroundMarking();
 }
Ejemplo n.º 5
0
 public static void MoveTableRow(Table table, uint source, uint dest)
 {
     if (source == dest)
     {
         return;
     }
     // assumes that only 1x1 cells are affected
     // and that dest is empty!
     foreach (Widget w in table)
     {
         Table.TableChild c = table[w] as Table.TableChild;
         if (c.TopAttach == source && c.BottomAttach == source + 1)
         {
             if (source < dest)
             {
                 // first bottom...
                 c.BottomAttach = dest + 1;
                 // ...then top
                 c.TopAttach = dest;
             }
             else
             {
                 // first top...
                 c.TopAttach = dest;
                 // .. then bottom
                 c.BottomAttach = dest + 1;
             }
         }
     }
 }
Ejemplo n.º 6
0
 public static void MoveTableCol(Table table, uint source, uint dest)
 {
     if (source == dest)
     {
         return;
     }
     // assumes that only 1x1 cells are affected
     // and that dest is empty!
     foreach (Widget w in table)
     {
         Table.TableChild c = table[w] as Table.TableChild;
         if (c.LeftAttach == source && c.RightAttach == source + 1)
         {
             if (source < dest)
             {
                 // first right...
                 c.RightAttach = dest + 1;
                 // ...then left
                 c.LeftAttach = dest;
             }
             else
             {
                 // first left...
                 c.LeftAttach = dest;
                 // .. then right
                 c.RightAttach = dest + 1;
             }
         }
     }
 }
Ejemplo n.º 7
0
        public EntryNumWidget()
        {
            this.table1                 = new Table(2U, 3U, false);
            this.table1.Name            = "table1";
            this.table1.ColumnSpacing   = 6U;
            this.entryNum               = new UndoEntryIntEx();
            this.entryNum.WidthRequest  = 10;
            this.entryNum.CanFocus      = true;
            this.entryNum.Name          = "entryNum";
            this.entryNum.IsEditable    = true;
            this.entryNum.InvisibleChar = '●';
            this.table1.Add((Widget)this.entryNum);
            Table.TableChild tableChild1 = (Table.TableChild) this.table1[(Widget)this.entryNum];
            tableChild1.XOptions = AttachOptions.Expand | AttachOptions.Fill;
            tableChild1.YOptions = AttachOptions.Fill;
            this.imageMenu       = new ImageCombox();
            this.imageMenu.Name  = "imageMenu";
            this.table1.Add((Widget)this.imageMenu);
            Table.TableChild tableChild2 = (Table.TableChild) this.table1[(Widget)this.imageMenu];
            tableChild2.LeftAttach  = 2U;
            tableChild2.RightAttach = 3U;
            tableChild2.XOptions    = AttachOptions.Fill;
            tableChild2.YOptions    = AttachOptions.Fill;
            this.labTxt             = new Label();
            this.labTxt.Name        = "labTxt";
            this.table1.Add((Widget)this.labTxt);
            Table.TableChild tableChild3 = (Table.TableChild) this.table1[(Widget)this.labTxt];
            tableChild3.LeftAttach  = 1U;
            tableChild3.RightAttach = 2U;
            tableChild3.XOptions    = AttachOptions.Fill;
            tableChild3.YOptions    = AttachOptions.Fill;
            this.lbName             = new Label();
            this.lbName.Name        = "lbName";
            this.table1.Add((Widget)this.lbName);
            Table.TableChild tableChild4 = (Table.TableChild) this.table1[(Widget)this.lbName];
            tableChild4.TopAttach    = 1U;
            tableChild4.BottomAttach = 2U;
            tableChild4.XOptions     = AttachOptions.Fill;
            tableChild4.YOptions     = AttachOptions.Fill;
            this.Add((Widget)this.table1);
            if (this.Child != null)
            {
                this.Child.ShowAll();
            }
            this.imageMenuNoVisible = new Label();
            this.imageMenuNoVisible.WidthRequest = 10;
            this.table1.Attach((Widget)this.imageMenuNoVisible, 2U, 3U, 0U, 1U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
            this.imageMenuNoVisible.Visible = false;
            this.labTxt.WidthRequest        = 30;
            this.table1.RowSpacing          = 4U;
            Color color = new Color((byte)165, (byte)168, (byte)176);

            this.labTxt.ModifyFg(StateType.Normal, color);
            this.lbName.ModifyFg(StateType.Normal, color);
            this.lbName.SetFontSize(10.0);
            this.labTxt.Text                 = LanguageInfo.NewFile_Pixel;
            this.imageMenu.MenuChanged      += new EventHandler(this.imageMenu_MenuChanged);
            this.entryNum.EntryValueChanged += new EventHandler <EntryIntEventArgs>(this.entryNum_EntryValueChanged);
        }
Ejemplo n.º 8
0
 public static void InsertTableColumns(Table table, uint start, uint n)
 {
     // make some space for judges
     table.NColumns += n;
     // reattach widgets
     foreach (Widget w in table)
     {
         Table.TableChild c = table[w] as Table.TableChild;
         // first right
         if (c.RightAttach > start)
         {
             c.RightAttach += n;
         }
         // then left!
         if (c.LeftAttach >= start)
         {
             c.LeftAttach += n;
         }
     }
 }
Ejemplo n.º 9
0
        protected void OnButtonDeleteClicked(object sender, EventArgs e)
        {
            Table.TableChild delButtonInfo = ((Table.TableChild)(this.datatableEmails[(Widget)sender]));
            yValidatedEntry  foundWidget   = null;

            foreach (Widget wid in datatableEmails.AllChildren)
            {
                if (wid is yValidatedEntry && delButtonInfo.TopAttach == (datatableEmails[wid] as Table.TableChild).TopAttach)
                {
                    foundWidget = (yValidatedEntry)wid;
                    break;
                }
            }
            if (foundWidget == null)
            {
                logger.Warn("Не найден виджет ассоциированный с удаленным телефоном.");
                return;
            }
            EmailsList.Remove((Email)foundWidget.Tag);
        }
Ejemplo n.º 10
0
        void OnPhoneListElementRemoved(object aList, int[] aIdx, object aObject)
        {
            Widget foundWidget = null;

            foreach (Widget wid in datatablePhones.AllChildren)
            {
                if (wid is yValidatedEntry && (wid as yValidatedEntry).Tag == aObject)
                {
                    foundWidget = wid;
                    break;
                }
            }
            if (foundWidget == null)
            {
                logger.Warn("Не найден виджет ассоциированный с удаленным телефоном.");
                return;
            }

            Table.TableChild child = ((Table.TableChild)(this.datatablePhones [foundWidget]));
            RemoveRow(child.TopAttach);
        }
Ejemplo n.º 11
0
        void OnPersonsListElementRemoved(object aList, int[] aIdx, object aObject)
        {
            Widget foundWidget = null;

            foreach (Widget wid in datatablePersons.AllChildren)
            {
                if (wid is IAdaptableContainer && (wid as IAdaptableContainer).Adaptor.Adaptor.FinalTarget == aObject)
                {
                    foundWidget = wid;
                    break;
                }
            }
            if (foundWidget == null)
            {
                logger.Warn("Не найден виджет ассоциированный с удаленным телефоном.");
                return;
            }

            Table.TableChild child = ((Table.TableChild)(this.datatablePersons [foundWidget]));
            RemoveRow(child.TopAttach);
        }
Ejemplo n.º 12
0
        protected void OnButtonDeleteClicked(object sender, EventArgs e)
        {
            Table.TableChild delButtonInfo = ((Table.TableChild)(this.datatablePersons [(Widget)sender]));
            Widget           foundWidget   = null;

            foreach (Widget wid in datatablePersons.AllChildren)
            {
                if (wid is IAdaptableContainer && delButtonInfo.TopAttach == (datatablePersons[wid] as Table.TableChild).TopAttach)
                {
                    foundWidget = wid;
                    break;
                }
            }
            if (foundWidget == null)
            {
                logger.Warn("Не найден виджет ассоциированный с удаленным человеком.");
                return;
            }

            PersonsList.Remove((Person)(foundWidget as IAdaptableContainer).Adaptor.Adaptor.FinalTarget);
        }
Ejemplo n.º 13
0
 public PasswordEditorWidget()
 {
     this.table2                          = new Table(1U, 2U, false);
     this.table2.Name                     = "table2";
     this.table2.ColumnSpacing            = 6U;
     this.checkBox_Password               = new CheckButton();
     this.checkBox_Password.CanFocus      = true;
     this.checkBox_Password.Name          = "checkBox_Password";
     this.checkBox_Password.Active        = true;
     this.checkBox_Password.DrawIndicator = true;
     this.checkBox_Password.UseUnderline  = true;
     this.table2.Add((Widget)this.checkBox_Password);
     Table.TableChild tableChild1 = (Table.TableChild) this.table2[(Widget)this.checkBox_Password];
     tableChild1.XOptions            = AttachOptions.Fill;
     tableChild1.YOptions            = AttachOptions.Fill;
     this.txt_Password               = new DefaultEditorGtk();
     this.txt_Password.WidthRequest  = 10;
     this.txt_Password.CanFocus      = true;
     this.txt_Password.Name          = "txt_Password";
     this.txt_Password.IsEditable    = true;
     this.txt_Password.MaxLength     = 1;
     this.txt_Password.InvisibleChar = '●';
     this.table2.Add((Widget)this.txt_Password);
     Table.TableChild tableChild2 = (Table.TableChild) this.table2[(Widget)this.txt_Password];
     tableChild2.TopAttach    = 0U;
     tableChild2.BottomAttach = 1U;
     tableChild2.LeftAttach   = 1U;
     tableChild2.RightAttach  = 2U;
     tableChild2.YOptions     = AttachOptions.Fill;
     this.Add((Widget)this.table2);
     if (this.Child != null)
     {
         this.Child.ShowAll();
     }
     this.Hide();
     this.ReadLanuageConfigFile();
     this.BeforeValueChanged += new System.Action(this.BeforEvent);
     this.AfterValueChanged  += new System.Action(this.AfterEvent);
     this.AfterEvent();
 }
Ejemplo n.º 14
0
 public FilpEditorWidget()
 {
     this.alignment1           = new Alignment(0.5f, 0.5f, 1f, 1f);
     this.alignment1.Name      = "alignment1";
     this.table1               = new Table(1U, 2U, false);
     this.table1.Name          = "table1";
     this.table1.ColumnSpacing = 6U;
     this.btnS = new ToggleButtonImage();
     this.btnS.CheckedImage   = ImageIcon.GetIcon("CocoStudio.DefaultResource.EditorResource.horizontalFilp.png");
     this.btnS.UnCheckedImage = ImageIcon.GetIcon("CocoStudio.DefaultResource.EditorResource.horizontalFilp.png");
     this.btnS.CanFocus       = true;
     this.btnS.Name           = "btnS";
     this.btnS.SetSizeRequest(22, 22);
     this.table1.Add((Widget)this.btnS);
     Table.TableChild tableChild1 = (Table.TableChild) this.table1[(Widget)this.btnS];
     tableChild1.XOptions     = AttachOptions.Fill;
     tableChild1.YOptions     = AttachOptions.Fill;
     this.btnV                = new ToggleButtonImage();
     this.btnV.CheckedImage   = ImageIcon.GetIcon("CocoStudio.DefaultResource.EditorResource.verticalFilp.png");
     this.btnV.UnCheckedImage = ImageIcon.GetIcon("CocoStudio.DefaultResource.EditorResource.verticalFilp.png");
     this.btnV.CanFocus       = true;
     this.btnV.Name           = "btnV";
     this.btnV.SetSizeRequest(22, 22);
     this.table1.Add((Widget)this.btnV);
     Table.TableChild tableChild2 = (Table.TableChild) this.table1[(Widget)this.btnV];
     tableChild2.LeftAttach  = 1U;
     tableChild2.RightAttach = 2U;
     tableChild2.XOptions    = AttachOptions.Fill;
     tableChild2.YOptions    = AttachOptions.Fill;
     this.alignment1.Add((Widget)this.table1);
     this.Add((Widget)this.alignment1);
     if (this.Child != null)
     {
         this.Child.ShowAll();
     }
     this.Hide();
     this.ReadLanuageConfigFile();
     this.btnS.CheckChanged += new EventHandler(this.btnS_Clicked);
     this.btnV.CheckChanged += new EventHandler(this.btnV_Clicked);
 }
Ejemplo n.º 15
0
 public AstrictLengthEditorWidget()
 {
     this.table2                           = new Table(1U, 2U, false);
     this.table2.Name                      = "table2";
     this.table2.ColumnSpacing             = 6U;
     this.checkBox_MaxLength               = new CheckButton();
     this.checkBox_MaxLength.CanFocus      = true;
     this.checkBox_MaxLength.Name          = "checkBox_MaxLength";
     this.checkBox_MaxLength.Active        = true;
     this.checkBox_MaxLength.DrawIndicator = true;
     this.checkBox_MaxLength.UseUnderline  = true;
     this.table2.Add((Widget)this.checkBox_MaxLength);
     Table.TableChild tableChild1 = (Table.TableChild) this.table2[(Widget)this.checkBox_MaxLength];
     tableChild1.XOptions        = AttachOptions.Fill;
     tableChild1.YOptions        = AttachOptions.Fill;
     this.numLength              = new UndoEntryIntEx();
     this.numLength.WidthRequest = 10;
     this.numLength.CanFocus     = true;
     this.numLength.Name         = "spinbutton1";
     this.numLength.IsInteger    = true;
     this.table2.Add((Widget)this.numLength);
     Table.TableChild tableChild2 = (Table.TableChild) this.table2[(Widget)this.numLength];
     tableChild2.TopAttach    = 0U;
     tableChild2.BottomAttach = 1U;
     tableChild2.LeftAttach   = 1U;
     tableChild2.RightAttach  = 2U;
     tableChild2.YOptions     = AttachOptions.Fill;
     this.Add((Widget)this.table2);
     if (this.Child != null)
     {
         this.Child.ShowAll();
     }
     this.Hide();
     this.ReadLanuageConfigFile();
     this.numLength.MinValue  = 1;
     this.BeforeValueChanged += new System.Action(this.BeforEvent);
     this.AfterValueChanged  += new System.Action(this.AfterEvent);
     this.AfterEvent();
 }
Ejemplo n.º 16
0
 public static void ClearTable(Table table, bool keepTopRow, bool keepLeftColumn)
 {
     // remove everything except headers
     foreach (Widget w in table)
     {
         Table.TableChild c = table[w] as Table.TableChild;
         if (keepTopRow && !keepLeftColumn && c.TopAttach > 0)
         {
             table.Remove(w);
         }
         else if (!keepTopRow && keepLeftColumn && c.LeftAttach > 0)
         {
             table.Remove(w);
         }
         else if (keepTopRow && keepLeftColumn && c.TopAttach > 0 && c.LeftAttach > 0)
         {
             table.Remove(w);
         }
         else if (!keepTopRow && !keepLeftColumn)
         {
             table.Remove(w);
         }
     }
 }
Ejemplo n.º 17
0
        protected virtual void Build()
        {
            // Widget BizeeBirdBoarding.Ui.AppointmentDialog
            Name           = "BizeeBirdBoarding.Ui.AppointmentDialog";
            Title          = "New Appointment";
            WindowPosition = WindowPosition.CenterOnParent;
            // Internal child BizeeBirdBoarding.Ui.AppointmentDialog.VBox
            VBox w1 = VBox;

            w1.Name        = "topLevelVbox";
            w1.BorderWidth = 2;
            // Container child topLevelVbox.Box+BoxChild
            topLevelTable               = new Table(7, 2, false);
            topLevelTable.Name          = "topLevelTable";
            topLevelTable.RowSpacing    = 6;
            topLevelTable.ColumnSpacing = 6;
            // Container child topLevelTable.Table+TableChild
            birdLabel           = new Label();
            birdLabel.Name      = "birdLabel";
            birdLabel.LabelProp = "Bird";
            topLevelTable.Add(birdLabel);
            Table.TableChild w2 = (Table.TableChild)topLevelTable[birdLabel];
            w2.TopAttach    = 1;
            w2.BottomAttach = 2;
            w2.XOptions     = AttachOptions.Fill;
            w2.YOptions     = AttachOptions.Fill;
            // Container child topLevelTable.Table+TableChild
            birdScrolledWindow = new ScrolledWindow();
            birdScrolledWindow.HeightRequest    = 125;
            birdScrolledWindow.CanFocus         = true;
            birdScrolledWindow.Name             = "birdScrolledWindow";
            birdScrolledWindow.VscrollbarPolicy = PolicyType.Never;
            birdScrolledWindow.ShadowType       = ShadowType.In;
            // Container child birdScrolledWindow.Container+ContainerChild
            Viewport w3 = new Viewport();

            w3.ShadowType = ShadowType.None;
            // Container child GtkViewport.Container+ContainerChild
            birdHBox         = new HBox();
            birdHBox.Name    = "birdHBox";
            birdHBox.Spacing = 6;
            w3.Add(birdHBox);
            birdScrolledWindow.Add(w3);
            topLevelTable.Add(birdScrolledWindow);
            Table.TableChild w6 = (Table.TableChild)topLevelTable[birdScrolledWindow];
            w6.TopAttach    = 1;
            w6.BottomAttach = 2;
            w6.LeftAttach   = 1;
            w6.RightAttach  = 2;
            w6.XOptions     = AttachOptions.Fill;
            w6.YOptions     = AttachOptions.Fill;
            // Container child topLevelTable.Table+TableChild
            boardingRateEntry            = new Entry();
            boardingRateEntry.Sensitive  = false;
            boardingRateEntry.CanFocus   = true;
            boardingRateEntry.Name       = "boardingRateEntry";
            boardingRateEntry.IsEditable = true;
            topLevelTable.Add(boardingRateEntry);
            Table.TableChild w7 = (Table.TableChild)topLevelTable[boardingRateEntry];
            w7.TopAttach    = 2;
            w7.BottomAttach = 3;
            w7.LeftAttach   = 1;
            w7.RightAttach  = 2;
            w7.XOptions     = AttachOptions.Fill;
            w7.YOptions     = AttachOptions.Fill;
            // Container child topLevelTable.Table+TableChild
            boardingRateLabel           = new Label();
            boardingRateLabel.Name      = "boardingRateLabel";
            boardingRateLabel.LabelProp = "Boarding Rate";
            topLevelTable.Add(boardingRateLabel);
            Table.TableChild w8 = (Table.TableChild)topLevelTable[boardingRateLabel];
            w8.TopAttach    = 2;
            w8.BottomAttach = 3;
            w8.XOptions     = AttachOptions.Fill;
            w8.YOptions     = AttachOptions.Fill;
            // Container child topLevelTable.Table+TableChild
            customerCombobox      = ComboBoxEntry.NewText();
            customerCombobox.Name = "customerCombobox";
            topLevelTable.Add(customerCombobox);
            Table.TableChild w9 = (Table.TableChild)topLevelTable[customerCombobox];
            w9.LeftAttach  = 1;
            w9.RightAttach = 2;
            w9.XOptions    = AttachOptions.Fill;
            w9.YOptions    = AttachOptions.Fill;
            // Container child topLevelTable.Table+TableChild
            customerLabel           = new Label();
            customerLabel.Name      = "customerLabel";
            customerLabel.LabelProp = "Customer";
            topLevelTable.Add(customerLabel);
            Table.TableChild w10 = (Table.TableChild)topLevelTable[customerLabel];
            w10.XOptions = AttachOptions.Fill;
            w10.YOptions = AttachOptions.Fill;
            // Container child topLevelTable.Table+TableChild
            endDateContainer      = new Alignment(0.5F, 0.5F, 1F, 1F);
            endDateContainer.Name = "endDateContainer";
            topLevelTable.Add(endDateContainer);
            Table.TableChild w11 = (Table.TableChild)topLevelTable[endDateContainer];
            w11.TopAttach    = 4;
            w11.BottomAttach = 5;
            w11.LeftAttach   = 1;
            w11.RightAttach  = 2;
            w11.XOptions     = AttachOptions.Fill;
            w11.YOptions     = AttachOptions.Fill;
            // Container child topLevelTable.Table+TableChild
            endDateLabel           = new Label();
            endDateLabel.Name      = "endDateLabel";
            endDateLabel.LabelProp = "End Date";
            topLevelTable.Add(endDateLabel);
            Table.TableChild w12 = (Table.TableChild)topLevelTable[endDateLabel];
            w12.TopAttach    = 4;
            w12.BottomAttach = 5;
            w12.XOptions     = AttachOptions.Fill;
            w12.YOptions     = AttachOptions.Fill;
            // Container child topLevelTable.Table+TableChild
            notesLabel           = new Label();
            notesLabel.Name      = "notesLabel";
            notesLabel.LabelProp = "Notes";
            topLevelTable.Add(notesLabel);
            Table.TableChild w13 = (Table.TableChild)topLevelTable[notesLabel];
            w13.TopAttach    = 6;
            w13.BottomAttach = 7;
            w13.XOptions     = AttachOptions.Fill;
            w13.YOptions     = AttachOptions.Fill;
            // Container child topLevelTable.Table+TableChild
            notesScrolledWindow            = new ScrolledWindow();
            notesScrolledWindow.Name       = "notesScrolledWindow";
            notesScrolledWindow.ShadowType = ShadowType.In;
            // Container child notesScrolledWindow.Container+ContainerChild
            notesTextView          = new TextView();
            notesTextView.CanFocus = true;
            notesTextView.Name     = "notesTextView";
            notesScrolledWindow.Add(notesTextView);
            topLevelTable.Add(notesScrolledWindow);
            Table.TableChild w15 = (Table.TableChild)topLevelTable[notesScrolledWindow];
            w15.TopAttach    = 6;
            w15.BottomAttach = 7;
            w15.LeftAttach   = 1;
            w15.RightAttach  = 2;
            w15.XOptions     = ((AttachOptions)(7));
            // Container child topLevelTable.Table+TableChild
            startDateContainer      = new Alignment(0.5F, 0.5F, 1F, 1F);
            startDateContainer.Name = "startDateContainer";
            topLevelTable.Add(startDateContainer);
            Table.TableChild w16 = (Table.TableChild)topLevelTable[startDateContainer];
            w16.TopAttach    = 3;
            w16.BottomAttach = 4;
            w16.LeftAttach   = 1;
            w16.RightAttach  = 2;
            w16.XOptions     = AttachOptions.Fill;
            w16.YOptions     = AttachOptions.Fill;
            // Container child topLevelTable.Table+TableChild
            startDateLabel           = new Label();
            startDateLabel.Name      = "startDateLabel";
            startDateLabel.LabelProp = "Start Date";
            topLevelTable.Add(startDateLabel);
            Table.TableChild w17 = (Table.TableChild)topLevelTable[startDateLabel];
            w17.TopAttach    = 3;
            w17.BottomAttach = 4;
            w17.XOptions     = AttachOptions.Fill;
            w17.YOptions     = AttachOptions.Fill;
            // Container child topLevelTable.Table+TableChild
            statusCombobox = ComboBox.NewText();
            statusCombobox.AppendText("Scheduled");
            statusCombobox.AppendText("Checked In");
            statusCombobox.AppendText("Checked Out");
            statusCombobox.AppendText("Cancelled");
            statusCombobox.AppendText("No-Show");
            statusCombobox.Name   = "statusCombobox";
            statusCombobox.Active = 0;
            topLevelTable.Add(statusCombobox);
            Table.TableChild w18 = (Table.TableChild)topLevelTable[statusCombobox];
            w18.TopAttach    = 5;
            w18.BottomAttach = 6;
            w18.LeftAttach   = 1;
            w18.RightAttach  = 2;
            w18.YOptions     = AttachOptions.Fill;
            // Container child topLevelTable.Table+TableChild
            statusLabel           = new Label();
            statusLabel.Name      = "statusLabel";
            statusLabel.LabelProp = "Status";
            topLevelTable.Add(statusLabel);
            Table.TableChild w19 = (Table.TableChild)topLevelTable[statusLabel];
            w19.TopAttach    = 5;
            w19.BottomAttach = 6;
            w19.XOptions     = AttachOptions.Fill;
            w19.YOptions     = AttachOptions.Fill;
            w1.Add(topLevelTable);
            Box.BoxChild w20 = (Box.BoxChild)w1[topLevelTable];
            w20.Position = 0;
            // Internal child BizeeBirdBoarding.Ui.AppointmentDialog.ActionArea
            HButtonBox w21 = ActionArea;

            w21.Name        = "actionArea";
            w21.Spacing     = 10;
            w21.BorderWidth = 5;
            w21.LayoutStyle = ButtonBoxStyle.End;
            // Container child actionArea.ButtonBox+ButtonBoxChild
            buttonCancel              = new Button();
            buttonCancel.CanDefault   = true;
            buttonCancel.CanFocus     = true;
            buttonCancel.Name         = "buttonCancel";
            buttonCancel.UseStock     = true;
            buttonCancel.UseUnderline = true;
            buttonCancel.Label        = "gtk-cancel";
            AddActionWidget(buttonCancel, -6);
            ButtonBox.ButtonBoxChild w22 = (ButtonBox.ButtonBoxChild)w21[buttonCancel];
            w22.Expand = false;
            w22.Fill   = false;
            // Container child actionArea.ButtonBox+ButtonBoxChild
            buttonOk              = new Button();
            buttonOk.CanDefault   = true;
            buttonOk.CanFocus     = true;
            buttonOk.Name         = "buttonOk";
            buttonOk.UseStock     = true;
            buttonOk.UseUnderline = true;
            buttonOk.Label        = "gtk-ok";
            AddActionWidget(buttonOk, -5);
            ButtonBox.ButtonBoxChild w23 = (ButtonBox.ButtonBoxChild)w21[buttonOk];
            w23.Position = 1;
            w23.Expand   = false;
            w23.Fill     = false;
            if (Child != null)
            {
                Child.ShowAll();
            }
            DefaultWidth  = 400;
            DefaultHeight = 684;
            Show();
            customerCombobox.Changed += new System.EventHandler(onCustomerComboChanged);
            buttonCancel.Clicked     += new System.EventHandler(onCancelButtonClicked);
            buttonOk.Clicked         += new System.EventHandler(onOkButtonClicked);
        }
Ejemplo n.º 18
0
        protected virtual void Build()
        {
            Gui.Initialize(this);
            base.Name           = "CocoStudio.ControlLib.Windows.NewProjectDialog";
            base.WindowPosition = WindowPosition.CenterOnParent;
            VBox vBox = base.VBox;

            vBox.Name                     = "dialog1_VBox";
            vBox.BorderWidth              = 2u;
            this.evtbx_border             = new EventBox();
            this.evtbx_border.Name        = "evtbx_border";
            this.evtbx_border.BorderWidth = 12u;
            this.table1                   = new Table(2u, 2u, false);
            this.table1.Name              = "table1";
            this.table1.RowSpacing        = 6u;
            this.table1.ColumnSpacing     = 6u;
            this.entry_Name               = new Entry();
            this.entry_Name.CanFocus      = true;
            this.entry_Name.Name          = "entry_Name";
            this.entry_Name.IsEditable    = true;
            this.entry_Name.InvisibleChar = '●';
            this.table1.Add(this.entry_Name);
            Table.TableChild tableChild = (Table.TableChild) this.table1[this.entry_Name];
            tableChild.LeftAttach         = 1u;
            tableChild.RightAttach        = 2u;
            tableChild.YOptions           = AttachOptions.Fill;
            this.hbox3                    = new HBox();
            this.hbox3.Name               = "hbox3";
            this.hbox3.Spacing            = 6;
            this.entry_Path               = new Entry();
            this.entry_Path.CanFocus      = true;
            this.entry_Path.Name          = "entry_Path";
            this.entry_Path.IsEditable    = true;
            this.entry_Path.InvisibleChar = '●';
            this.hbox3.Add(this.entry_Path);
            Box.BoxChild boxChild = (Box.BoxChild) this.hbox3[this.entry_Path];
            boxChild.Position               = 0;
            this.button_Browse              = new Button();
            this.button_Browse.CanFocus     = true;
            this.button_Browse.Name         = "button_Browse";
            this.button_Browse.UseUnderline = true;
            this.button_Browse.Label        = Catalog.GetString("浏览");
            this.hbox3.Add(this.button_Browse);
            Box.BoxChild boxChild2 = (Box.BoxChild) this.hbox3[this.button_Browse];
            boxChild2.Position = 1;
            boxChild2.Expand   = false;
            boxChild2.Fill     = false;
            this.table1.Add(this.hbox3);
            Table.TableChild tableChild2 = (Table.TableChild) this.table1[this.hbox3];
            tableChild2.TopAttach     = 1u;
            tableChild2.BottomAttach  = 2u;
            tableChild2.LeftAttach    = 1u;
            tableChild2.RightAttach   = 2u;
            tableChild2.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.table1.Add(this.label_Name);
            Table.TableChild tableChild3 = (Table.TableChild) this.table1[this.label_Name];
            tableChild3.XOptions      = AttachOptions.Fill;
            tableChild3.YOptions      = AttachOptions.Fill;
            this.label_Path           = new Label();
            this.label_Path.Name      = "label_Path";
            this.label_Path.Xalign    = 1f;
            this.label_Path.LabelProp = Catalog.GetString("项目路径");
            this.table1.Add(this.label_Path);
            Table.TableChild tableChild4 = (Table.TableChild) this.table1[this.label_Path];
            tableChild4.TopAttach    = 1u;
            tableChild4.BottomAttach = 2u;
            tableChild4.XOptions     = AttachOptions.Fill;
            tableChild4.YOptions     = AttachOptions.Fill;
            this.evtbx_border.Add(this.table1);
            vBox.Add(this.evtbx_border);
            Box.BoxChild boxChild3 = (Box.BoxChild)vBox[this.evtbx_border];
            boxChild3.Position = 0;
            boxChild3.Expand   = false;
            boxChild3.Fill     = false;
            HButtonBox actionArea = base.ActionArea;

            actionArea.Name                = "dialog1_ActionArea";
            actionArea.Spacing             = 10;
            actionArea.BorderWidth         = 5u;
            actionArea.LayoutStyle         = ButtonBoxStyle.End;
            this.hbox_cancelOKBox          = new HBox();
            this.hbox_cancelOKBox.Name     = "hbox_cancelOKBox";
            this.hbox_cancelOKBox.Spacing  = 6;
            this.buttonCancel              = new Button();
            this.buttonCancel.WidthRequest = 80;
            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.hbox_cancelOKBox.Add(this.buttonCancel);
            Box.BoxChild boxChild4 = (Box.BoxChild) this.hbox_cancelOKBox[this.buttonCancel];
            boxChild4.Position         = 0;
            boxChild4.Expand           = false;
            boxChild4.Fill             = false;
            this.buttonOk              = new Button();
            this.buttonOk.WidthRequest = 80;
            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.hbox_cancelOKBox.Add(this.buttonOk);
            Box.BoxChild boxChild5 = (Box.BoxChild) this.hbox_cancelOKBox[this.buttonOk];
            boxChild5.Position = 1;
            boxChild5.Expand   = false;
            boxChild5.Fill     = false;
            actionArea.Add(this.hbox_cancelOKBox);
            ButtonBox.ButtonBoxChild buttonBoxChild = (ButtonBox.ButtonBoxChild)actionArea[this.hbox_cancelOKBox];
            buttonBoxChild.Expand = false;
            buttonBoxChild.Fill   = false;
            if (base.Child != null)
            {
                base.Child.ShowAll();
            }
            base.DefaultWidth  = 363;
            base.DefaultHeight = 134;
            base.Show();
        }
Ejemplo n.º 19
0
        private EventBox CreateTable(string calegory, List <PropertyItem> propertyItem)
        {
            EventBox eventBox = new EventBox();
            Table    table    = new Table((uint)(propertyItem.Count + 1), 2u, false);
            Label    label    = new Label();

            label.HeightRequest = 16;
            table.Attach(label, 1u, 2u, 0u, 1u, AttachOptions.Expand, AttachOptions.Fill, 0u, 0u);
            label.Show();
            uint num = 1u;

            foreach (PropertyItem current in propertyItem)
            {
                ITypeEditor editor = this.em.GetEditor(current);
                Widget      widget;
                if (editor == null)
                {
                    widget = current.WidgetDate;
                }
                else
                {
                    current.TypeEditor = editor;
                    widget             = editor.ResolveEditor(current);
                }
                if (current.DiaplayName == "grid_sudoku_size" || current.DiaplayName == "Fill_color")
                {
                    if (widget == null)
                    {
                        num += 1u;
                    }
                    else
                    {
                        if (widget is Entry)
                        {
                            Entry entry = widget as Entry;
                            table.Add(entry);
                            entry.Show();
                        }
                        else
                        {
                            table.Add(widget);
                        }
                        widget.Show();
                        Table.TableChild tableChild = (Table.TableChild)table[widget];
                        tableChild.LeftAttach   = 0u;
                        tableChild.RightAttach  = 2u;
                        tableChild.TopAttach    = num;
                        tableChild.BottomAttach = num + 1u;
                        tableChild.XOptions     = (AttachOptions.Expand | AttachOptions.Fill);
                        tableChild.YOptions     = AttachOptions.Fill;
                        num += 1u;
                    }
                }
                else
                {
                    ContentLabel contentLabel = new ContentLabel(90);
                    contentLabel.SetLabelText(LanguageOption.GetValueBykey(current.DiaplayName));
                    table.Add(contentLabel);
                    contentLabel.Show();
                    Table.TableChild tableChild2 = (Table.TableChild)table[contentLabel];
                    tableChild2.TopAttach    = num;
                    tableChild2.BottomAttach = num + 1u;
                    tableChild2.XOptions     = AttachOptions.Fill;
                    tableChild2.YOptions     = AttachOptions.Fill;
                    if (widget == null)
                    {
                        num += 1u;
                    }
                    else
                    {
                        Alignment alignment = new Alignment(0.5f, 0.5f, 1f, 1f);
                        if (widget is Entry)
                        {
                            Entry entry = widget as Entry;
                            alignment.BottomPadding = 16u;
                            alignment.Add(entry);
                            entry.Show();
                            alignment.Show();
                            table.Add(alignment);
                        }
                        else
                        {
                            if (widget is INumberEntry)
                            {
                                if ((widget as INumberEntry).GetMenuVisble())
                                {
                                    alignment.BottomPadding = 8u;
                                }
                                else
                                {
                                    alignment.BottomPadding = 16u;
                                }
                            }
                            else
                            {
                                alignment.BottomPadding = 16u;
                            }
                            alignment.Add(widget);
                            widget.Show();
                            alignment.Show();
                            table.Add(alignment);
                        }
                        Table.TableChild tableChild = (Table.TableChild)table[alignment];
                        tableChild.LeftAttach   = 1u;
                        tableChild.RightAttach  = 2u;
                        tableChild.TopAttach    = num;
                        tableChild.BottomAttach = num + 1u;
                        tableChild.XOptions     = (AttachOptions.Expand | AttachOptions.Fill);
                        tableChild.YOptions     = AttachOptions.Fill;
                        num += 1u;
                    }
                }
            }
            table.ColumnSpacing = 10u;
            eventBox.Add(table);
            table.Show();
            eventBox.CanFocus = false;
            return(eventBox);
        }
Ejemplo n.º 20
0
        public UIControlSizeEditorWidget()
        {
            this.alignment1                   = new Alignment(0.5f, 0.5f, 1f, 1f);
            this.alignment1.Name              = "alignment1";
            this.table2                       = new Table(5U, 2U, false);
            this.table2.Name                  = "table2";
            this.table2.ColumnSpacing         = 6U;
            this.preSizeEnabled               = new CheckButtonEx();
            this.preSizeEnabled.CanFocus      = true;
            this.preSizeEnabled.Name          = "preSizeEnabled";
            this.preSizeEnabled.DrawIndicator = true;
            this.preSizeEnabled.UseUnderline  = true;
            this.table2.Add((Widget)this.preSizeEnabled);
            Table.TableChild tableChild1 = (Table.TableChild) this.table2[(Widget)this.preSizeEnabled];
            tableChild1.TopAttach    = 0U;
            tableChild1.BottomAttach = 1U;
            tableChild1.LeftAttach   = 1U;
            tableChild1.RightAttach  = 2U;
            tableChild1.XOptions     = AttachOptions.Fill;
            tableChild1.YOptions     = AttachOptions.Fill;
            this.rectSize            = new PointEditorWidget(false);
            this.rectSize.Events     = EventMask.ButtonPressMask;
            this.rectSize.Name       = "rectSize";
            this.table2.Add((Widget)this.rectSize);
            Table.TableChild tableChild2 = (Table.TableChild) this.table2[(Widget)this.rectSize];
            tableChild2.TopAttach            = 4U;
            tableChild2.BottomAttach         = 5U;
            tableChild2.LeftAttach           = 1U;
            tableChild2.RightAttach          = 2U;
            tableChild2.YOptions             = AttachOptions.Fill;
            this.scale9Enabled               = new CheckButtonEx();
            this.scale9Enabled.CanFocus      = true;
            this.scale9Enabled.Name          = "scale9Enabled";
            this.scale9Enabled.DrawIndicator = true;
            this.scale9Enabled.UseUnderline  = true;
            this.tableCheck.Attach((Widget)this.scale9Enabled, 0U, 1U, 0U, 1U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
            this.tableCheck.Attach((Widget) new Label(), 1U, 2U, 0U, 1U, AttachOptions.Expand, AttachOptions.Fill, 0U, 0U);
            this.tableCheck.ShowAll();
            this.table2.Add((Widget)this.tableCheck);
            Table.TableChild tableChild3 = (Table.TableChild) this.table2[(Widget)this.tableCheck];
            tableChild3.TopAttach     = 1U;
            tableChild3.BottomAttach  = 2U;
            tableChild3.LeftAttach    = 1U;
            tableChild3.RightAttach   = 2U;
            tableChild3.XOptions      = AttachOptions.Fill;
            tableChild3.YOptions      = AttachOptions.Fill;
            this.scaleOLRValue        = new PointEditorWidget(false);
            this.scaleOLRValue.Events = EventMask.ButtonPressMask;
            this.scaleOLRValue.Name   = "scaleOriginValue";
            this.table2.Add((Widget)this.scaleOLRValue);
            Table.TableChild tableChild4 = (Table.TableChild) this.table2[(Widget)this.scaleOLRValue];
            tableChild4.TopAttach    = 2U;
            tableChild4.BottomAttach = 3U;
            tableChild4.LeftAttach   = 1U;
            tableChild4.RightAttach  = 2U;
            tableChild4.XOptions     = AttachOptions.Fill;
            tableChild4.YOptions     = AttachOptions.Fill;
            this.scaleTBValue        = new PointEditorWidget(false);
            this.scaleTBValue.Events = EventMask.ButtonPressMask;
            this.scaleTBValue.Name   = "scaleSizeValue";
            this.table2.Add((Widget)this.scaleTBValue);
            Table.TableChild tableChild5 = (Table.TableChild) this.table2[(Widget)this.scaleTBValue];
            tableChild5.TopAttach    = 3U;
            tableChild5.BottomAttach = 4U;
            tableChild5.LeftAttach   = 1U;
            tableChild5.RightAttach  = 2U;
            tableChild5.XOptions     = AttachOptions.Fill;
            tableChild5.YOptions     = AttachOptions.Fill;
            this.txtSize             = new Label();
            Alignment alignment = new Alignment(1f, 0.0f, 0.0f, 0.0f);

            alignment.Add((Widget)this.txtSize);
            this.txtSize.Xalign = 1f;
            this.table2.Add((Widget)alignment);
            alignment.ShowAll();
            Table.TableChild tableChild6 = (Table.TableChild) this.table2[(Widget)alignment];
            tableChild6.TopAttach    = 4U;
            tableChild6.BottomAttach = 5U;
            tableChild6.XOptions     = (AttachOptions)0;
            tableChild6.YOptions     = AttachOptions.Fill;
            this.alignment1.Add((Widget)this.table2);
            this.scale9Lable = new Label();
            this.labelScale.Add((Widget)this.scale9Lable);
            this.labelScale.Xalign = 1f;
            this.labelScale.ShowAll();
            this.scale9Lable.Text = LanguageInfo.Display_Sudoku;
            this.table2.Attach((Widget)this.labelScale, 0U, 1U, 1U, 2U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
            this.alighAuto.Add((Widget)this.labelAuto);
            this.alighAuto.Xalign = 1f;
            this.table2.Attach((Widget)this.alighAuto, 0U, 1U, 0U, 1U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
            this.alighAuto.ShowAll();
            this.Add((Widget)this.alignment1);
            if (this.Child != null)
            {
                this.Child.ShowAll();
            }
            this.Hide();
            this.ReadLanuageConfigFile();
            this.AfterEvent();
            this.BeforeValueChanged  += new System.Action(this.BeforEvent);
            this.AfterValueChanged   += new System.Action(this.AfterEvent);
            this.txtSize.WidthRequest = 90;
            this.rectSize.SetMaxMin(int.MaxValue, 0);
            this.rectSize.SetLabel(LanguageInfo.NewFile_Width, LanguageInfo.NewFile_Height);
            this.scaleOLRValue.SetMaxMin(int.MaxValue, 0);
            this.scaleTBValue.SetMaxMin(int.MaxValue, 0);
            this.scaleOLRValue.SetLabel(LanguageInfo.TopEdge, LanguageInfo.BottomEdge);
            this.scaleTBValue.SetLabel(LanguageInfo.LeftEdge, LanguageInfo.RightEdge);
            this.scaleOLRValue.SetMenuVisble(false);
            this.scaleTBValue.SetMenuVisble(false);
            this.SetScale9(false);
        }
Ejemplo n.º 21
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();
        }
        protected virtual void Build()
        {
            // Widget BizeeBirdBoarding.Ui.CustomerDialog
            Name           = "BizeeBirdBoarding.Ui.CustomerDialog";
            Title          = "New Customer";
            WindowPosition = WindowPosition.CenterOnParent;
            // Internal child BizeeBirdBoarding.Ui.CustomerDialog.VBox
            VBox w1 = VBox;

            w1.Name        = "newCustomerDialog_VBox";
            w1.BorderWidth = 2;
            // Container child newCustomerDialog_VBox.Box+BoxChild
            toplevelVbox         = new VBox();
            toplevelVbox.Name    = "toplevelVbox";
            toplevelVbox.Spacing = 6;
            // Container child toplevelVbox.Box+BoxChild
            topTable               = new Table(5, 2, false);
            topTable.Name          = "topTable";
            topTable.RowSpacing    = 6;
            topTable.ColumnSpacing = 6;
            // Container child topTable.Table+TableChild
            boardingRateLabel           = new Label();
            boardingRateLabel.Name      = "boardingRateLabel";
            boardingRateLabel.LabelProp = "Boarding Rate";
            topTable.Add(boardingRateLabel);
            Table.TableChild w2 = (Table.TableChild)topTable[boardingRateLabel];
            w2.TopAttach    = 3;
            w2.BottomAttach = 4;
            w2.XOptions     = AttachOptions.Fill;
            w2.YOptions     = AttachOptions.Fill;
            // Container child topTable.Table+TableChild
            boardingRateSpinButton          = new SpinButton(0D, 100D, 1D);
            boardingRateSpinButton.CanFocus = true;
            boardingRateSpinButton.Name     = "boardingRateSpinButton";
            boardingRateSpinButton.Adjustment.PageIncrement = 10D;
            boardingRateSpinButton.ClimbRate = 1D;
            boardingRateSpinButton.Digits    = 2;
            boardingRateSpinButton.Numeric   = true;
            topTable.Add(boardingRateSpinButton);
            Table.TableChild w3 = (Table.TableChild)topTable[boardingRateSpinButton];
            w3.TopAttach    = 3;
            w3.BottomAttach = 4;
            w3.LeftAttach   = 1;
            w3.RightAttach  = 2;
            w3.YOptions     = AttachOptions.Fill;
            // Container child topTable.Table+TableChild
            customerNameEntry            = new Entry();
            customerNameEntry.CanFocus   = true;
            customerNameEntry.Name       = "customerNameEntry";
            customerNameEntry.IsEditable = true;
            topTable.Add(customerNameEntry);
            Table.TableChild w4 = ((Table.TableChild)(topTable[customerNameEntry]));
            w4.LeftAttach  = 1;
            w4.RightAttach = 2;
            w4.YOptions    = AttachOptions.Fill;
            // Container child topTable.Table+TableChild
            customerNotesLabel           = new Label();
            customerNotesLabel.Name      = "customerNotesLabel";
            customerNotesLabel.LabelProp = "Notes";
            topTable.Add(customerNotesLabel);
            Table.TableChild w5 = ((Table.TableChild)(topTable[customerNotesLabel]));
            w5.TopAttach    = 4;
            w5.BottomAttach = 5;
            w5.XOptions     = AttachOptions.Fill;
            w5.YOptions     = AttachOptions.Fill;
            // Container child topTable.Table+TableChild
            customerNotesScrolledWindow            = new ScrolledWindow();
            customerNotesScrolledWindow.Name       = "customerNotesScrolledWindow";
            customerNotesScrolledWindow.ShadowType = ShadowType.In;
            // Container child customerNotesScrolledWindow.Container+ContainerChild
            customerNotesTextView          = new TextView();
            customerNotesTextView.CanFocus = true;
            customerNotesTextView.Name     = "customerNotesTextView";
            customerNotesScrolledWindow.Add(customerNotesTextView);
            topTable.Add(customerNotesScrolledWindow);
            Table.TableChild w7 = ((Table.TableChild)(topTable[customerNotesScrolledWindow]));
            w7.TopAttach    = 4;
            w7.BottomAttach = 5;
            w7.LeftAttach   = 1;
            w7.RightAttach  = 2;
            // Container child topTable.Table+TableChild
            emailEntry            = new Entry();
            emailEntry.CanFocus   = true;
            emailEntry.Name       = "emailEntry";
            emailEntry.IsEditable = true;
            topTable.Add(emailEntry);
            Table.TableChild w8 = (Table.TableChild)topTable[emailEntry];
            w8.TopAttach    = 2;
            w8.BottomAttach = 3;
            w8.LeftAttach   = 1;
            w8.RightAttach  = 2;
            w8.YOptions     = AttachOptions.Fill;
            // Container child topTable.Table+TableChild
            emailLabel           = new Label();
            emailLabel.Name      = "emailLabel";
            emailLabel.LabelProp = "E-mail";
            topTable.Add(emailLabel);
            Table.TableChild w9 = (Table.TableChild)topTable[emailLabel];
            w9.TopAttach    = 2;
            w9.BottomAttach = 3;
            w9.XOptions     = AttachOptions.Fill;
            w9.YOptions     = AttachOptions.Fill;
            // Container child topTable.Table+TableChild
            nameLabel           = new Label();
            nameLabel.Name      = "nameLabel";
            nameLabel.LabelProp = "Name";
            topTable.Add(nameLabel);
            Table.TableChild w10 = (Table.TableChild)topTable[nameLabel];
            w10.XOptions = AttachOptions.Fill;
            w10.YOptions = AttachOptions.Fill;
            // Container child topTable.Table+TableChild
            phoneNumberContainerVbox         = new VBox();
            phoneNumberContainerVbox.Name    = "phoneNumberContainerVbox";
            phoneNumberContainerVbox.Spacing = 6;
            topTable.Add(phoneNumberContainerVbox);
            Table.TableChild w11 = (Table.TableChild)topTable[phoneNumberContainerVbox];
            w11.TopAttach    = 1;
            w11.BottomAttach = 2;
            w11.LeftAttach   = 1;
            w11.RightAttach  = 2;
            w11.XOptions     = AttachOptions.Fill;
            w11.YOptions     = AttachOptions.Fill;
            // Container child topTable.Table+TableChild
            phoneNumberLabel           = new Label();
            phoneNumberLabel.Name      = "phoneNumberLabel";
            phoneNumberLabel.LabelProp = "Phone Number";
            topTable.Add(phoneNumberLabel);
            Table.TableChild w12 = (Table.TableChild)topTable[phoneNumberLabel];
            w12.TopAttach    = 1;
            w12.BottomAttach = 2;
            w12.XOptions     = AttachOptions.Fill;
            w12.YOptions     = AttachOptions.Fill;
            toplevelVbox.Add(topTable);
            Box.BoxChild w13 = (Box.BoxChild)toplevelVbox[topTable];
            w13.Position = 0;
            // Container child toplevelVbox.Box+BoxChild
            birdsFrame            = new Frame();
            birdsFrame.Name       = "birdsFrame";
            birdsFrame.ShadowType = ShadowType.In;
            // Container child birdsFrame.Container+ContainerChild
            birdsGtkAlignment             = new Alignment(0F, 0F, 1F, 1F);
            birdsGtkAlignment.Name        = "birdsGtkAlignment";
            birdsGtkAlignment.LeftPadding = 12;
            // Container child birdsGtkAlignment.Container+ContainerChild
            birdsHbox         = new HBox();
            birdsHbox.Name    = "birdsHbox";
            birdsHbox.Spacing = 6;
            // Container child birdsHbox.Box+BoxChild
            birdsVBox         = new VBox();
            birdsVBox.Name    = "birdsVBox";
            birdsVBox.Spacing = 6;
            // Container child birdsVBox.Box+BoxChild
            GtkScrolledWindow            = new ScrolledWindow();
            GtkScrolledWindow.Name       = "GtkScrolledWindow";
            GtkScrolledWindow.ShadowType = ShadowType.In;
            // Container child GtkScrolledWindow.Container+ContainerChild
            birdsTreeView = new TreeView();
            birdsTreeView.WidthRequest = 300;
            birdsTreeView.CanFocus     = true;
            birdsTreeView.Name         = "birdsTreeView";
            GtkScrolledWindow.Add(birdsTreeView);
            birdsVBox.Add(GtkScrolledWindow);
            Box.BoxChild w15 = (Box.BoxChild)birdsVBox[GtkScrolledWindow];
            w15.Position = 0;
            // Container child birdsVBox.Box+BoxChild
            birdsButtonBox      = new HButtonBox();
            birdsButtonBox.Name = "birdsButtonBox";
            // Container child birdsButtonBox.ButtonBox+ButtonBoxChild
            addBirdButton              = new Button();
            addBirdButton.CanFocus     = true;
            addBirdButton.Name         = "addBirdButton";
            addBirdButton.UseStock     = true;
            addBirdButton.UseUnderline = true;
            addBirdButton.Label        = "gtk-add";
            birdsButtonBox.Add(addBirdButton);
            ButtonBox.ButtonBoxChild w16 = (ButtonBox.ButtonBoxChild)birdsButtonBox[addBirdButton];
            w16.Expand = false;
            w16.Fill   = false;
            // Container child birdsButtonBox.ButtonBox+ButtonBoxChild
            removeBirdButton              = new Button();
            removeBirdButton.CanFocus     = true;
            removeBirdButton.Name         = "removeBirdButton";
            removeBirdButton.UseStock     = true;
            removeBirdButton.UseUnderline = true;
            removeBirdButton.Label        = "gtk-remove";
            birdsButtonBox.Add(removeBirdButton);
            ButtonBox.ButtonBoxChild w17 = (ButtonBox.ButtonBoxChild)birdsButtonBox[removeBirdButton];
            w17.Position = 1;
            w17.Expand   = false;
            w17.Fill     = false;
            birdsVBox.Add(birdsButtonBox);
            Box.BoxChild w18 = (Box.BoxChild)birdsVBox[birdsButtonBox];
            w18.Position = 1;
            w18.Expand   = false;
            w18.Fill     = false;
            birdsHbox.Add(birdsVBox);
            Box.BoxChild w19 = (Box.BoxChild)birdsHbox[birdsVBox];
            w19.Position = 0;
            // Container child birdsHbox.Box+BoxChild
            birdsTable               = new Table(6, 2, false);
            birdsTable.Name          = "birdsTable";
            birdsTable.RowSpacing    = 6;
            birdsTable.ColumnSpacing = 6;
            // Container child birdsTable.Table+TableChild
            birdAgeLabel           = new Label();
            birdAgeLabel.Name      = "birdAgeLabel";
            birdAgeLabel.LabelProp = "Age";
            birdsTable.Add(birdAgeLabel);
            Table.TableChild w20 = (Table.TableChild)birdsTable[birdAgeLabel];
            w20.TopAttach    = 3;
            w20.BottomAttach = 4;
            w20.XOptions     = AttachOptions.Fill;
            w20.YOptions     = AttachOptions.Fill;
            // Container child birdsTable.Table+TableChild
            birdAgeSpinButton          = new SpinButton(0D, 100D, 1D);
            birdAgeSpinButton.CanFocus = true;
            birdAgeSpinButton.Name     = "birdAgeSpinButton";
            birdAgeSpinButton.Adjustment.PageIncrement = 10D;
            birdAgeSpinButton.ClimbRate = 1D;
            birdAgeSpinButton.Numeric   = true;
            birdsTable.Add(birdAgeSpinButton);
            Table.TableChild w21 = (Table.TableChild)birdsTable[birdAgeSpinButton];
            w21.TopAttach    = 3;
            w21.BottomAttach = 4;
            w21.LeftAttach   = 1;
            w21.RightAttach  = 2;
            w21.YOptions     = AttachOptions.Fill;
            // Container child birdsTable.Table+TableChild
            birdBreedEntry            = new Entry();
            birdBreedEntry.CanFocus   = true;
            birdBreedEntry.Name       = "birdBreedEntry";
            birdBreedEntry.IsEditable = true;
            birdsTable.Add(birdBreedEntry);
            Table.TableChild w22 = (Table.TableChild)birdsTable[birdBreedEntry];
            w22.TopAttach    = 1;
            w22.BottomAttach = 2;
            w22.LeftAttach   = 1;
            w22.RightAttach  = 2;
            w22.YOptions     = AttachOptions.Fill;
            // Container child birdsTable.Table+TableChild
            birdBreedLabel           = new Label();
            birdBreedLabel.Name      = "birdBreedLabel";
            birdBreedLabel.LabelProp = "Breed";
            birdsTable.Add(birdBreedLabel);
            Table.TableChild w23 = (Table.TableChild)birdsTable[birdBreedLabel];
            w23.TopAttach    = 1;
            w23.BottomAttach = 2;
            w23.XOptions     = AttachOptions.Fill;
            w23.YOptions     = AttachOptions.Fill;
            // Container child birdsTable.Table+TableChild
            birdColorEntry            = new Entry();
            birdColorEntry.CanFocus   = true;
            birdColorEntry.Name       = "birdColorEntry";
            birdColorEntry.IsEditable = true;
            birdsTable.Add(birdColorEntry);
            Table.TableChild w24 = (Table.TableChild)birdsTable[birdColorEntry];
            w24.TopAttach    = 2;
            w24.BottomAttach = 3;
            w24.LeftAttach   = 1;
            w24.RightAttach  = 2;
            w24.YOptions     = AttachOptions.Fill;
            // Container child birdsTable.Table+TableChild
            birdColorLabel           = new Label();
            birdColorLabel.Name      = "birdColorLabel";
            birdColorLabel.LabelProp = "Color";
            birdsTable.Add(birdColorLabel);
            Table.TableChild w25 = (Table.TableChild)birdsTable[birdColorLabel];
            w25.TopAttach    = 2;
            w25.BottomAttach = 3;
            w25.XOptions     = AttachOptions.Fill;
            w25.YOptions     = AttachOptions.Fill;
            // Container child birdsTable.Table+TableChild
            birdGenderHbox         = new HBox();
            birdGenderHbox.Name    = "birdGenderHbox";
            birdGenderHbox.Spacing = 6;
            // Container child birdGenderHbox.Box+BoxChild
            birdGenderMaleRadioButton               = new RadioButton("Male");
            birdGenderMaleRadioButton.CanFocus      = true;
            birdGenderMaleRadioButton.Name          = "birdGenderMaleRadioButton";
            birdGenderMaleRadioButton.DrawIndicator = true;
            birdGenderMaleRadioButton.UseUnderline  = true;
            birdGenderMaleRadioButton.Group         = new GLib.SList(System.IntPtr.Zero);
            birdGenderHbox.Add(birdGenderMaleRadioButton);
            Box.BoxChild w26 = (Box.BoxChild)birdGenderHbox[birdGenderMaleRadioButton];
            w26.Position = 0;
            // Container child birdGenderHbox.Box+BoxChild
            birdGenderFemaleRadioButton               = new RadioButton("Female");
            birdGenderFemaleRadioButton.CanFocus      = true;
            birdGenderFemaleRadioButton.Name          = "birdGenderFemaleRadioButton";
            birdGenderFemaleRadioButton.DrawIndicator = true;
            birdGenderFemaleRadioButton.UseUnderline  = true;
            birdGenderFemaleRadioButton.Group         = birdGenderMaleRadioButton.Group;
            birdGenderHbox.Add(birdGenderFemaleRadioButton);
            Box.BoxChild w27 = (Box.BoxChild)birdGenderHbox[birdGenderFemaleRadioButton];
            w27.Position = 1;
            birdsTable.Add(birdGenderHbox);
            Table.TableChild w28 = (Table.TableChild)birdsTable[birdGenderHbox];
            w28.TopAttach    = 4;
            w28.BottomAttach = 5;
            w28.LeftAttach   = 1;
            w28.RightAttach  = 2;
            w28.YOptions     = AttachOptions.Fill;
            // Container child birdsTable.Table+TableChild
            birdGenderLabel           = new Label();
            birdGenderLabel.Name      = "birdGenderLabel";
            birdGenderLabel.LabelProp = "Gender";
            birdsTable.Add(birdGenderLabel);
            Table.TableChild w29 = (Table.TableChild)birdsTable[birdGenderLabel];
            w29.TopAttach    = 4;
            w29.BottomAttach = 5;
            w29.XOptions     = AttachOptions.Fill;
            w29.YOptions     = AttachOptions.Fill;
            // Container child birdsTable.Table+TableChild
            birdNameEntry            = new Entry();
            birdNameEntry.CanFocus   = true;
            birdNameEntry.Name       = "birdNameEntry";
            birdNameEntry.IsEditable = true;
            birdsTable.Add(birdNameEntry);
            Table.TableChild w30 = (Table.TableChild)birdsTable[birdNameEntry];
            w30.LeftAttach  = 1;
            w30.RightAttach = 2;
            w30.YOptions    = AttachOptions.Fill;
            // Container child birdsTable.Table+TableChild
            birdNameLabel           = new Label();
            birdNameLabel.Name      = "birdNameLabel";
            birdNameLabel.LabelProp = "Name";
            birdsTable.Add(birdNameLabel);
            Table.TableChild w31 = (Table.TableChild)birdsTable[birdNameLabel];
            w31.XOptions = AttachOptions.Fill;
            w31.YOptions = AttachOptions.Fill;
            // Container child birdsTable.Table+TableChild
            birdNotesLabel           = new Label();
            birdNotesLabel.Name      = "birdNotesLabel";
            birdNotesLabel.LabelProp = "Notes";
            birdsTable.Add(birdNotesLabel);
            Table.TableChild w32 = (Table.TableChild)birdsTable[birdNotesLabel];
            w32.TopAttach    = 5;
            w32.BottomAttach = 6;
            w32.XOptions     = AttachOptions.Fill;
            w32.YOptions     = AttachOptions.Fill;
            // Container child birdsTable.Table+TableChild
            birdNotesScrolledWindow            = new ScrolledWindow();
            birdNotesScrolledWindow.Name       = "birdNotesScrolledWindow";
            birdNotesScrolledWindow.ShadowType = ShadowType.In;
            // Container child birdNotesScrolledWindow.Container+ContainerChild
            birdNotesTextView          = new TextView();
            birdNotesTextView.CanFocus = true;
            birdNotesTextView.Name     = "birdNotesTextView";
            birdNotesScrolledWindow.Add(birdNotesTextView);
            birdsTable.Add(birdNotesScrolledWindow);
            Table.TableChild w34 = (Table.TableChild)birdsTable[birdNotesScrolledWindow];
            w34.TopAttach    = 5;
            w34.BottomAttach = 6;
            w34.LeftAttach   = 1;
            w34.RightAttach  = 2;
            birdsHbox.Add(birdsTable);
            Box.BoxChild w35 = (Box.BoxChild)birdsHbox[birdsTable];
            w35.Position = 1;
            birdsGtkAlignment.Add(birdsHbox);
            birdsFrame.Add(birdsGtkAlignment);
            birdsFrameLabel           = new Label();
            birdsFrameLabel.Name      = "birdsFrameLabel";
            birdsFrameLabel.LabelProp = "<b>Birds</b>";
            birdsFrameLabel.UseMarkup = true;
            birdsFrame.LabelWidget    = birdsFrameLabel;
            toplevelVbox.Add(birdsFrame);
            Box.BoxChild w38 = (Box.BoxChild)toplevelVbox[birdsFrame];
            w38.Position = 1;
            w1.Add(toplevelVbox);
            Box.BoxChild w39 = (Box.BoxChild)w1[toplevelVbox];
            w39.Position = 0;
            // Internal child BizeeBirdBoarding.Ui.CustomerDialog.ActionArea
            HButtonBox w40 = ActionArea;

            w40.Name        = "newCustomerDialog_ActionArea";
            w40.Spacing     = 10;
            w40.BorderWidth = 5;
            w40.LayoutStyle = ButtonBoxStyle.End;
            // Container child newCustomerDialog_ActionArea.ButtonBox+ButtonBoxChild
            buttonCancel              = new Button();
            buttonCancel.CanDefault   = true;
            buttonCancel.CanFocus     = true;
            buttonCancel.Name         = "buttonCancel";
            buttonCancel.UseStock     = true;
            buttonCancel.UseUnderline = true;
            buttonCancel.Label        = "gtk-cancel";
            AddActionWidget(buttonCancel, -6);
            ButtonBox.ButtonBoxChild w41 = (ButtonBox.ButtonBoxChild)w40[buttonCancel];
            w41.Expand = false;
            w41.Fill   = false;
            // Container child newCustomerDialog_ActionArea.ButtonBox+ButtonBoxChild
            buttonOk              = new Button();
            buttonOk.CanDefault   = true;
            buttonOk.CanFocus     = true;
            buttonOk.Name         = "buttonOk";
            buttonOk.UseStock     = true;
            buttonOk.UseUnderline = true;
            buttonOk.Label        = "gtk-ok";
            AddActionWidget(buttonOk, -5);
            ButtonBox.ButtonBoxChild w42 = (ButtonBox.ButtonBoxChild)w40[buttonOk];
            w42.Position = 1;
            w42.Expand   = false;
            w42.Fill     = false;
            if ((Child != null))
            {
                Child.ShowAll();
            }
            DefaultWidth  = 551;
            DefaultHeight = 490;
            Show();
            addBirdButton.Clicked    += new System.EventHandler(onBirdAddButtonClicked);
            removeBirdButton.Clicked += new System.EventHandler(onBirdRemoveButtonClicked);
            buttonCancel.Clicked     += new System.EventHandler(onCancelButtonClicked);
            buttonOk.Clicked         += new System.EventHandler(onOkButtonClicked);
        }
Ejemplo n.º 23
0
        public CredentialsDialog(URIish uri, IEnumerable <CredentialItem> credentials)
        {
            this.Build();

            labelTop.Text = string.Format(labelTop.Text, uri.ToString());

            Gtk.Table table = new Gtk.Table(0, 0, false);
            table.ColumnSpacing = 6;
            vbox.PackStart(table, true, true, 0);

            uint   r           = 0;
            Widget firstEditor = null;

            foreach (CredentialItem c in credentials)
            {
                Label lab = new Label(c.GetPromptText() + ":");
                lab.Xalign = 0;
                table.Attach(lab, 0, 1, r, r + 1);
                Table.TableChild tc = (Table.TableChild)table [lab];
                tc.XOptions = AttachOptions.Shrink;

                Widget editor = null;

                if (c is CredentialItem.YesNoType)
                {
                    CredentialItem.YesNoType cred = (CredentialItem.YesNoType)c;
                    if (credentials.Count(i => i is CredentialItem.YesNoType) == 1)
                    {
                        singleYesNoCred = cred;
                        buttonOk.Hide();
                        buttonYes.Show();
                        buttonNo.Show();
                        // Remove the last colon
                        lab.Text = lab.Text.Substring(0, lab.Text.Length - 1);
                    }
                    else
                    {
                        CheckButton btn = new CheckButton();
                        editor       = btn;
                        btn.Toggled += delegate
                        {
                            cred.SetValue(btn.Active);
                        };
                    }
                }
                else if (c is CredentialItem.StringType || c is CredentialItem.CharArrayType)
                {
                    CredentialItem cred = c;
                    Entry          e    = new Entry();
                    editor             = e;
                    e.ActivatesDefault = true;
                    if (cred.IsValueSecure())
                    {
                        e.Visibility = false;
                    }
                    e.Changed += delegate
                    {
                        if (cred is CredentialItem.StringType)
                        {
                            ((CredentialItem.StringType)cred).SetValue(e.Text);
                        }
                        else
                        {
                            ((CredentialItem.CharArrayType)cred).SetValue(e.Text.ToCharArray());
                        }
                    };

                    if (c is CredentialItem.Username)
                    {
                        e.Text = uri.GetUser() ?? "";
                    }
                }
                if (editor != null)
                {
                    table.Attach(editor, 1, 2, r, r + 1);
                    tc          = (Table.TableChild)table [lab];
                    tc.XOptions = AttachOptions.Fill;
                    if (firstEditor == null)
                    {
                        firstEditor = editor;
                    }
                }

                r++;
            }
            table.ShowAll();
            Focus   = firstEditor;
            Default = buttonOk;
        }
Ejemplo n.º 24
0
        void MarkBreakroundOnRanking(int preset)
        {
            // by default it's consistent
            isConsistent = true;
            string pre = AppSettings.I.GenerateRound.breakConfigPresets[preset][1];

            // determine only max pos of team which breaks
            string[] nums = pre.Split(new char[] { '-', '\n' }, StringSplitOptions.RemoveEmptyEntries);
            int      max  = 0;

            foreach (string s in nums)
            {
                int n = int.Parse(s);
                if (max < n)
                {
                    max = n;
                }
            }
            // max is at least 2 and dividable by 2
            if (max == 0)
            {
                return;
            }
            if (max % 2 != 0)
            {
                return;
            }
            // mark first teams until max in teamList,
            // also gather breaking teams as speakers in teamSpeakers
            // this foreach loop does not iterate from top to bottom!
            foreach (Widget w in tableTeams)
            {
                Table.TableChild c = tableTeams[w] as Table.TableChild;
                int i = (int)c.TopAttach - 1;
                // colour first three columns, exclude header
                if (i >= 0 && c.LeftAttach < 3)
                {
                    // rows 1 to max
                    if (i < max)
                    {
                        w.ModifyBg(StateType.Normal, colBg[0]);
                        // only for one column: add to teamSpeakers
                        if (c.LeftAttach == 0)
                        {
                            mBreakingTeams.Add(i);
                            foreach (RoundDebater rd in (TeamData)teams[i].Data)
                            {
                                // find position in speakers and add this
                                AddToPositionList(speakers, mTeamSpeakers, rd);
                            }
                        }
                    }
                    // other rows
                    else
                    {
                        // check for equalPoints,
                        // iteration order is not defined, so use this
                        // to determine if points are equal
                        if (max < teams.Count &&
                            teams[i].TotalPoints
                            == teams[max - 1].TotalPoints)
                        {
                            w.ModifyBg(StateType.Normal, colBg[2]);
                            if (!teams[i].Resolved)
                            {
                                isConsistent = false;
                            }
                        }
                    }
                }
            }
            // determine freeSpeakers
            for (int i = 0; i < speakers.Count; i++)
            {
                // only add as freeSpeakers if not breaking as TeamSpeaker and
                // still some Speakers needed
                if (mFreeSpeakers.Count < mTeamSpeakers.Count / 2 &&
                    !mTeamSpeakers.Contains(i))
                {
                    mFreeSpeakers.Add(i);
                }
            }

            var minPointsForBreak = mFreeSpeakers.Count > 0 ?
                                    speakers[mFreeSpeakers[mFreeSpeakers.Count - 1]].TotalPoints :
                                    -1;

            // mark speakers
            foreach (Widget w in tableSpeakers)
            {
                Table.TableChild c = tableSpeakers[w] as Table.TableChild;
                // colour first three columns, exclude header
                if (c.TopAttach > 0 && c.LeftAttach < 3)
                {
                    int i = (int)c.TopAttach - 1;
                    if (mTeamSpeakers.Contains(i))
                    {
                        w.ModifyBg(StateType.Normal, colBg[0]);
                    }
                    else if (mFreeSpeakers.Contains(i))
                    {
                        w.ModifyBg(StateType.Normal, colBg[1]);
                    }
                    else if (speakers[i].TotalPoints == minPointsForBreak)
                    {
                        w.ModifyBg(StateType.Normal, colBg[2]);
                        if (!speakers[i].Resolved)
                        {
                            isConsistent = false;
                        }
                    }
                }
            }
        }
Ejemplo n.º 25
0
        public EntryComBoxEditorWidget()
        {
            this.table1                      = new Table(1U, 4U, false);
            this.table1.Name                 = "table1";
            this.table1.RowSpacing           = 6U;
            this.table1.ColumnSpacing        = 6U;
            this.comboboxentry1              = ComboBoxEntry.NewText();
            this.comboboxentry1.WidthRequest = 40;
            this.comboboxentry1.Name         = "comboboxentry1";
            this.table1.Add((Widget)this.comboboxentry1);
            Table.TableChild tableChild1 = (Table.TableChild) this.table1[(Widget)this.comboboxentry1];
            tableChild1.LeftAttach           = 1U;
            tableChild1.RightAttach          = 2U;
            tableChild1.YOptions             = AttachOptions.Fill;
            this.comboboxentry2              = ComboBoxEntry.NewText();
            this.comboboxentry2.WidthRequest = 40;
            this.comboboxentry2.Name         = "comboboxentry2";
            this.table1.Add((Widget)this.comboboxentry2);
            Table.TableChild tableChild2 = (Table.TableChild) this.table1[(Widget)this.comboboxentry2];
            tableChild2.LeftAttach  = 3U;
            tableChild2.RightAttach = 4U;
            tableChild2.YOptions    = AttachOptions.Fill;
            this.labelOne           = new Label();
            this.labelOne.Name      = "labelOne";
            this.labelOne.Xalign    = 1f;
            this.labelOne.LabelProp = Catalog.GetString("label1");
            this.table1.Add((Widget)this.labelOne);
            Table.TableChild tableChild3 = (Table.TableChild) this.table1[(Widget)this.labelOne];
            tableChild3.XOptions    = AttachOptions.Fill;
            tableChild3.YOptions    = AttachOptions.Fill;
            this.labelTwo           = new Label();
            this.labelTwo.Name      = "labelTwo";
            this.labelTwo.Xalign    = 1f;
            this.labelTwo.LabelProp = Catalog.GetString("label2");
            this.table1.Add((Widget)this.labelTwo);
            Table.TableChild tableChild4 = (Table.TableChild) this.table1[(Widget)this.labelTwo];
            tableChild4.LeftAttach  = 2U;
            tableChild4.RightAttach = 3U;
            tableChild4.XOptions    = AttachOptions.Fill;
            tableChild4.YOptions    = AttachOptions.Fill;
            this.Add((Widget)this.table1);
            if (this.Child != null)
            {
                this.Child.ShowAll();
            }
            this.Hide();
            this.ReadLanuageConfigFile();
            this.labelOne.Text = "W";
            this.labelTwo.Text = "H";
            ListStore listStore = new ListStore(new Type[1] {
                typeof(string)
            });

            foreach (int combox in this.comboxList)
            {
                listStore.AppendValues(new object[1]
                {
                    (object)combox.ToString()
                });
            }
            this.comboboxentry1.Model = (TreeModel)listStore;
            CellRendererText cellRendererText = new CellRendererText();

            this.comboboxentry1.PackStart((CellRenderer)cellRendererText, true);
            this.comboboxentry2.Model = (TreeModel)listStore;
            this.comboboxentry2.PackStart((CellRenderer)cellRendererText, true);
            this.comboboxentry1.Entry.MaxLength = 8;
            this.comboboxentry2.Entry.MaxLength = 8;
            this.comboboxentry2.HeightRequest   = 25;
        }
Ejemplo n.º 26
0
        void MarkBreakroundOnRound(int roundIndex)
        {
            // by default it's consistent
            isConsistent = true;
            RoundData rd = Tournament.I.Rounds[roundIndex];

            foreach (RoomData room in rd.Rooms)
            {
                if (room.ValidBest)
                {
                    TeamData winner = room.BestTeam == 0 ? room.Gov : room.Opp;
                    // find position in team ranking
                    AddToPositionList(teams, mBreakingTeams, winner);
                    // find position in speaker ranking
                    foreach (RoundDebater d in winner)
                    {
                        AddToPositionList(speakers, mTeamSpeakers, d);
                    }
                    // find position of best speaker, this is by definition not a
                    // member of winning team
                    AddToPositionList(speakers, mBestSpeakers,
                                      room.AsOrderedObjects()[room.BestSpeaker]);
                }
            }
            // mark teams, there are no conflicts here
            foreach (Widget w in tableTeams)
            {
                Table.TableChild c = tableTeams[w] as Table.TableChild;
                // colour first three columns, exclude header
                if (c.TopAttach > 0 && c.LeftAttach < 3)
                {
                    int i = (int)c.TopAttach - 1;
                    if (mBreakingTeams.Contains(i))
                    {
                        w.ModifyBg(StateType.Normal, colBg[0]);
                    }
                }
            }

            // determine freeSpeakers
            for (int i = 0; i < speakers.Count; i++)
            {
                // only add as freeSpeaker if not breaking
                // as TeamSpeaker or BestSpeaker and
                // still some Speakers needed
                if (mFreeSpeakers.Count < mBreakingTeams.Count / 2 &&
                    !mTeamSpeakers.Contains(i) &&
                    !mBestSpeakers.Contains(i))
                {
                    mFreeSpeakers.Add(i);
                }
            }
            var minPointsForBreak = mFreeSpeakers.Count > 0 ?
                                    speakers[mFreeSpeakers[mFreeSpeakers.Count - 1]].TotalPoints :
                                    -1;

            // mark speakers
            foreach (Widget w in tableSpeakers)
            {
                Table.TableChild c = tableSpeakers[w] as Table.TableChild;
                // colour first three columns, exclude header
                if (c.TopAttach > 0 && c.LeftAttach < 3)
                {
                    int i = (int)c.TopAttach - 1;
                    if (mTeamSpeakers.Contains(i))
                    {
                        w.ModifyBg(StateType.Normal, colBg[0]);
                    }
                    else if (mFreeSpeakers.Contains(i))
                    {
                        w.ModifyBg(StateType.Normal, colBg[1]);
                    }
                    else if (mBestSpeakers.Contains(i))
                    {
                        w.ModifyBg(StateType.Normal, colBg[3]);
                    }
                    else if (speakers[i].TotalPoints == minPointsForBreak)
                    {
                        w.ModifyBg(StateType.Normal, colBg[2]);
                        if (!speakers[i].Resolved)
                        {
                            isConsistent = false;
                        }
                    }
                }
            }
        }