Exemplo n.º 1
0
        private void CreateControls()
        {
            this.lblCategory = new ToolbarLabel(0, "lblCategory", "lbl_category");
            this.lblTypes    = new ToolbarLabel(1, "lblTypes", "lbl_types");

            this.btnAddType    = new TaxDataStore.Presentation.Controls.FlatButton(2, "btnAdd", "add", "add");
            this.btnDeleteType = new TaxDataStore.Presentation.Controls.FlatButton(3, "btnDelete", "delete", "delete");

            this.tlpButtons.Controls.Add(this.btnDeleteType, 2, 0);
            this.tlpButtons.Controls.Add(this.btnAddType, 1, 0);

            this.tlpToolbar.Controls.Add(this.lblCategory, 0, 0);
            this.tlpButtons.Controls.Add(this.lblTypes, 0, 0);


            this.flvclasses = new FlatGridView();
            this.flvclasses.ColumnHeadersVisible = false;
            this.flvclasses.Margin     = new Padding(0, 0, 0, 0);
            this.flvclasses.DataSource = DomainModel.Categories.GetAll();

            this.clvTypes = new CategoryListView();

            this.btnAddType.Click    += new System.EventHandler(btnAddType_Click);
            this.btnDeleteType.Click += new System.EventHandler(btnDeleteType_Click);
        }
Exemplo n.º 2
0
        private void SetupControls()
        {
            this.BackColor = Color.White;

            this.cbxPriceOperation        = new TourFormulaOperationComboBox();
            this.cbxPriceOperation.Anchor = AnchorStyles.Top |
                                            AnchorStyles.Left | AnchorStyles.Right;
            //this.cbxPriceOperation.FormattingEnabled = true;
            this.cbxPriceOperation.Location = new System.Drawing.Point(3, 3);
            this.cbxPriceOperation.Name     = "cbxPriceOperation";
            this.cbxPriceOperation.Size     = new System.Drawing.Size(72, 22);
            this.cbxPriceOperation.TabIndex = 3;
            this.tlpFormula.Controls.Add(this.cbxPriceOperation, 0, 0);

            this.btnConstraintsAdd.Click    += new EventHandler(btnConstraintsAdd_Click);
            this.btnConstraintsEdit.Click   += new EventHandler(btnConstraintsEdit_Click);
            this.btnConstraintsDelete.Click += new EventHandler(btnConstraintsDelete_Click);

            this.fgvConstraints = new FlatGridView();
            this.tlpConstraints.Controls.Add(this.fgvConstraints, 0, 1);
            this.fgvConstraints.SetDataSource(this.rule.Constraints);
            this.fgvConstraints.HiddenColumnNames.Add("ConstraintType");
            this.fgvConstraints.HiddenColumnNames.Add("Properties");
            this.fgvConstraints.ColumnHeadersVisible = false;

            SetupTexts();
        }
Exemplo n.º 3
0
        private void SetupControls()
        {
            this.fgvMembers        = new FlatGridView();
            this.lsvMemberContacts = new ContactsListView();
            this.Dock                   = DockStyle.Fill;
            this.tlpMain.Dock           = DockStyle.Fill;
            this.fgvMembers.Dock        = DockStyle.Fill;
            this.lsvMemberContacts.Dock = DockStyle.Fill;

            if (DomainModel.Application.ResourceManager != null)
            {
                this.editToolbar.Title = DomainModel.
                                         Application.ResourceManager.GetText("lbl_contacts");
            }

            if (Presentation.View.Theme != null)
            {
                this.BackColor             = Presentation.View.Theme.TourGroupItemBackColor;
                this.editToolbar.BackColor = this.BackColor;

                this.fgvMembers.Font = Presentation.View.Theme.FormLabelFont;
            }

            this.fgvMembers.HiddenColumnNames.Add("MemberShip");
            this.fgvMembers.HiddenColumnNames.Add("Title");
            this.fgvMembers.HiddenColumnNames.Add("FirstName");
            this.fgvMembers.HiddenColumnNames.Add("LastName");
            this.fgvMembers.HiddenColumnNames.Add("Contacts");
            this.fgvMembers.HiddenColumnNames.Add("IsInPhonebook");
            this.fgvMembers.HiddenColumnNames.Add("IsEmployee");
            this.fgvMembers.ColumnHeadersVisible = false;
            this.fgvMembers.Margin = new Padding(2, 2, 1, 2);

            this.lsvMemberContacts.Margin = new Padding(0, 2, 2, 2);

            this.tlpMain.Controls.Add(this.fgvMembers, 0, 1);
            this.tlpMain.Controls.Add(this.lsvMemberContacts, 1, 1);

            this.fgvMembers.SelectionChanged += new
                                                EventHandler(fgvMembers_SelectionChanged);

            /*
             * this.editToolbar.AddButtonClick += new
             *  EventHandler(editToolbar_AddButtonClick);*/

            this.editToolbar.EditButtonClick += new
                                                EventHandler(editToolbar_EditButtonClick);

            this.editToolbar.DeleteButtonClick += new
                                                  EventHandler(editToolbar_DeleteButtonClick);

            this.mnuContacts                = new ContactsMenu();
            this.mnuContacts.ClickAction    = OnContactMenu;
            this.mnuContacts.Persons        = DomainModel.Phonebook.GetAll();
            this.editToolbar.AddContextMenu = this.mnuContacts;
        }
Exemplo n.º 4
0
        private void SetupControls()
        {
            this.bstEmployees = new BindingSource();

            this.fgvEmployees = new FlatGridView();
            this.fgvEmployees.ColumnHeadersVisible = false;
            this.fgvEmployees.DataSource           = this.bstEmployees;

            this.mnuEmployees             = new EmployeesMenu();
            this.mnuEmployees.ClickAction = OnMenuItemClicked;

            if (DomainModel.Application.ResourceManager != null)
            {
                string title = DomainModel.Application.ResourceManager.GetText("lbl_employees");
                this.etbButtons          = new TaxDataStore.EditToolbar(title, true, false, true);
                this.etbButtons.Location = new System.Drawing.Point(0, 0);
                this.etbButtons.Name     = "etbButtons";
                this.etbButtons.TabIndex = 0;
                this.etbButtons.Anchor   = AnchorStyles.Left |
                                           AnchorStyles.Top | AnchorStyles.Right;
                this.etbButtons.AddContextMenu = this.mnuEmployees;

                this.tlpMain.Controls.Add(this.etbButtons, 0, 0);
            }

            if (Presentation.View.Theme != null)
            {
                this.BackColor            = Presentation.View.Theme.TourGroupItemBackColor;
                this.etbButtons.BackColor = this.BackColor;

                this.fgvEmployees.Font = Presentation.View.Theme.FormLabelFont;
            }

            this.tlpMain.Controls.Add(this.fgvEmployees, 0, 1);

            this.etbButtons.DeleteButtonClick += new System.EventHandler(etbButtons_DeleteButtonClick);
        }
Exemplo n.º 5
0
        private void SetupControls()
        {
            this.fgvMembers        = new FlatGridView();
            this.lsvMemberContacts = new ContactsListView();
            //this.Dock = DockStyle.Fill;
            this.tlpMain.Dock           = DockStyle.Fill;
            this.fgvMembers.Dock        = DockStyle.Fill;
            this.lsvMemberContacts.Dock = DockStyle.Fill;

            this.editToolbar = new EditToolbar();
            this.editToolbar.ButtonAutohide = false;
            this.editToolbar.Anchor         = AnchorStyles.Top |
                                              AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom;
            this.editToolbar.Title = "";

            /*
             * if (DomainModel.Application.ResourceManager != null)
             * {
             *  this.editToolbar.Title = DomainModel.
             *      Application.ResourceManager.GetText("lbl_contacts");
             * }*/

            if (Presentation.View.Theme != null)
            {
                this.BackColor             = Presentation.View.Theme.TourGroupItemBackColor;
                this.editToolbar.BackColor = this.BackColor;

                this.fgvMembers.Font = Presentation.View.Theme.FormLabelFont;
            }

            this.fgvMembers.HiddenColumnNames.Add("MemberShip");
            this.fgvMembers.HiddenColumnNames.Add("Title");
            this.fgvMembers.HiddenColumnNames.Add("FirstName");
            this.fgvMembers.HiddenColumnNames.Add("LastName");
            this.fgvMembers.HiddenColumnNames.Add("Contacts");
            this.fgvMembers.HiddenColumnNames.Add("IsInPhonebook");
            this.fgvMembers.HiddenColumnNames.Add("IsEmployee");
            this.fgvMembers.ColumnHeadersVisible = false;
            this.fgvMembers.Margin = new Padding(2, 2, 1, 2);

            this.lsvMemberContacts.Margin = new Padding(0, 2, 2, 2);

            this.tlpMain.Controls.Add(this.editToolbar, 0, 0);
            this.tlpMain.Controls.Add(this.fgvMembers, 0, 1);
            this.tlpMain.Controls.Add(this.lsvMemberContacts, 1, 1);

            this.tlpMain.SetColumnSpan(this.editToolbar, 2);

            this.fgvMembers.SelectionChanged += new
                                                EventHandler(fgvMembers_SelectionChanged);

            this.editToolbar.AddButtonClick += new
                                               EventHandler(editToolbar_AddButtonClick);

            this.editToolbar.EditButtonClick += new
                                                EventHandler(editToolbar_EditButtonClick);

            this.editToolbar.DeleteButtonClick += new
                                                  EventHandler(editToolbar_DeleteButtonClick);

            this.fgvMembers.SetDataSource(DomainModel.Phonebook.GetAll());
        }