Beispiel #1
0
        /* Constructor to make the layout of the dialog and initialize the buttons, labels and combo box. In this constructor
        the combo box is also filled.*/
        public AddFunction()
        {
            InitializeComponent();

            _comboBoxFunctions.DropDownStyle = ComboBoxStyle.DropDownList;
            ComboboxItem item = new ComboboxItem();
            item.Text = "Opslag";
            item.Value = 0;
            ComboboxItem item1 = new ComboboxItem();
            item1.Text = "Les lokaal";
            item1.Value = 1;
            ComboboxItem item2 = new ComboboxItem();
            item2.Text = "Community lokaal";
            item2.Value = 2;
            ComboboxItem item3 = new ComboboxItem();
            item3.Text = "College zaal";
            item3.Value = 3;
            ComboboxItem item4 = new ComboboxItem();
            item4.Text = "Bespreek ruimte";
            item4.Value = 4;
            ComboboxItem item5 = new ComboboxItem();
            item5.Text = "Kantoor";
            item5.Value = 5;
            this._comboBoxFunctions.Items.Add(item);
            this._comboBoxFunctions.Items.Add(item1);
            this._comboBoxFunctions.Items.Add(item2);
            this._comboBoxFunctions.Items.Add(item3);
            this._comboBoxFunctions.Items.Add(item4);
            this._comboBoxFunctions.Items.Add(item5);
            this._comboBoxFunctions.SelectedIndex = 0;
        }
Beispiel #2
0
 public void FillNewObjectTypeComboBox()
 {
     if (this._itemTypeList != null && this._itemTypeList.Count > 0) {
         foreach (ItemType itemType in this._itemTypeList) {
             ComboboxItem comboBoxItem = new ComboboxItem();
             comboBoxItem.Value = itemType;
             comboBoxItem.Text = itemType.Description.ToString();
             this._newObjectTypeComboBox.Items.Add(comboBoxItem);
         }
         this._newObjectTypeComboBox.SelectedItem = this._itemTypeList.ElementAt(0);
     }
 }
Beispiel #3
0
 protected override void InitializeComponent()
 {
     base.InitializeComponent();
     this._addFunctionCancel = new System.Windows.Forms.Button();
     this._addFunctionAccept = new System.Windows.Forms.Button();
     this._comboBoxFunctions = new System.Windows.Forms.ComboBox();
     this._addFunctionLabel = new System.Windows.Forms.Label();
     this._addFunctionHint = new System.Windows.Forms.Label();
     //
     // _addFunctionCancel
     //
     this._addFunctionCancel.BackColor = System.Drawing.Color.DimGray;
     this._addFunctionCancel.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Gray;
     this._addFunctionCancel.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
     this._addFunctionCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold);
     this._addFunctionCancel.ForeColor = System.Drawing.Color.White;
     this._addFunctionCancel.Location = new System.Drawing.Point(7, 148);
     this._addFunctionCancel.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
     this._addFunctionCancel.Name = "_addFunctionCancel";
     this._addFunctionCancel.Size = new System.Drawing.Size(120, 46);
     this._addFunctionCancel.TabIndex = 4;
     this._addFunctionCancel.Text = "Sluiten";
     this._addFunctionCancel.UseVisualStyleBackColor = false;
     this._addFunctionCancel.Click += new System.EventHandler(this.CloseDialog_Click);
     //
     // _addFunctionAccept
     //
     this._addFunctionAccept.BackColor = System.Drawing.Color.DimGray;
     this._addFunctionAccept.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Gray;
     this._addFunctionAccept.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
     this._addFunctionAccept.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold);
     this._addFunctionAccept.ForeColor = System.Drawing.Color.White;
     this._addFunctionAccept.Location = new System.Drawing.Point(345, 148);
     this._addFunctionAccept.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
     this._addFunctionAccept.Name = "_addFunctionAccept";
     this._addFunctionAccept.Size = new System.Drawing.Size(148, 46);
     this._addFunctionAccept.TabIndex = 5;
     this._addFunctionAccept.Text = "Toevoegen";
     this._addFunctionAccept.UseVisualStyleBackColor = false;
     this._addFunctionAccept.Click += new System.EventHandler(this.ButtonAdd_Click);
     //
     // _comboBoxFunctions
     //
     this._comboBoxFunctions.FormattingEnabled = true;
     this._comboBoxFunctions.Location = new System.Drawing.Point(216, 75);
     this._comboBoxFunctions.Name = "_comboBoxFunctions";
     this._comboBoxFunctions.Size = new System.Drawing.Size(125, 24);
     this._comboBoxFunctions.TabIndex = 6;
     //
     // _addFunctionLabel
     //
     this._addFunctionLabel.AutoSize = true;
     this._addFunctionLabel.Location = new System.Drawing.Point(152, 78);
     this._addFunctionLabel.Name = "_addFunctionLabel";
     this._addFunctionLabel.Size = new System.Drawing.Size(58, 17);
     this._addFunctionLabel.TabIndex = 7;
     this._addFunctionLabel.Text = "Functie:";
     //
     // AddFunctionHint
     //
     this._addFunctionHint.AutoSize = true;
     this._addFunctionHint.Location = new System.Drawing.Point(129, 44);
     this._addFunctionHint.Name = "AddFunctionHint";
     this._addFunctionHint.Size = new System.Drawing.Size(244, 17);
     this._addFunctionHint.TabIndex = 8;
     this._addFunctionHint.Text = "Kies de functie voor de nieuwe ruimte";
     //
     // AddFunction
     //
     this._panel.Controls.Add(this._addFunctionHint);
     this._panel.Controls.Add(this._addFunctionLabel);
     this._panel.Controls.Add(this._comboBoxFunctions);
     this._panel.Controls.Add(this._addFunctionCancel);
     this._panel.Controls.Add(this._addFunctionAccept);
     this._comboBoxFunctions.DropDownStyle = ComboBoxStyle.DropDownList;
     ComboboxItem item = new ComboboxItem();
     item.Text = "Opslag";
     item.Value = 0;
     ComboboxItem item1 = new ComboboxItem();
     item1.Text = "Les lokaal";
     item1.Value = 1;
     ComboboxItem item2 = new ComboboxItem();
     item2.Text = "Community lokaal";
     item2.Value = 2;
     ComboboxItem item3 = new ComboboxItem();
     item3.Text = "College zaal";
     item3.Value = 3;
     ComboboxItem item4 = new ComboboxItem();
     item4.Text = "Bespreek ruimte";
     item4.Value = 4;
     ComboboxItem item5 = new ComboboxItem();
     item5.Text = "Kantoor";
     item5.Value = 5;
     this._comboBoxFunctions.Items.Add(item);
     this._comboBoxFunctions.Items.Add(item1);
     this._comboBoxFunctions.Items.Add(item2);
     this._comboBoxFunctions.Items.Add(item3);
     this._comboBoxFunctions.Items.Add(item4);
     this._comboBoxFunctions.Items.Add(item5);
     this._comboBoxFunctions.SelectedIndex = 0;
     this.build();
 }
Beispiel #4
0
 private void ObjectComboBx_SelectedIndexChanged(object sender, EventArgs e)
 {
     this._currentComboBoxItem = (ComboboxItem) this._newObjectTypeComboBox.SelectedItem;
     this._currentItemType = (ItemType) _currentComboBoxItem.Value;
 }
        /// <summary> 
        /// Required method for Designer support - do not modify 
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {

            this.selectFunctionButton = new System.Windows.Forms.Button();
            this.closeDialog = new System.Windows.Forms.Button();
            this.selectFunctionList = new System.Windows.Forms.ComboBox();
            this.selectFunctionLabel = new Label();
            
            //
            //Adding items to ComboBox
            //

            ComboboxItem item1 = new ComboboxItem();
            item1.Text = "Bespreek ruimte(8)";
            item1.Value = 1;
            ComboboxItem item2 = new ComboboxItem();
            item2.Text = "Les lokaal(16)";
            item2.Value = 2;
            ComboboxItem item3 = new ComboboxItem();
            item3.Text = "Community lokaal (32)";
            item3.Value = 3;
            ComboboxItem item4 = new ComboboxItem();
            item4.Text = "College zaal(64)";
            item4.Value = 4;
            ComboboxItem item5 = new ComboboxItem();
            item5.Text = "Opslag (0)";
            item5.Value = 5;
            
            this.selectFunctionList.Items.Add(item1);
            this.selectFunctionList.Items.Add(item2);
            this.selectFunctionList.Items.Add(item3);
            this.selectFunctionList.Items.Add(item4);
            this.selectFunctionList.Items.Add(item5);
            this.SuspendLayout();

            // 
            // Select function
            // 
            this.selectFunctionButton.BackColor = System.Drawing.Color.DimGray;
            this.selectFunctionButton.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Gray;
            this.selectFunctionButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.selectFunctionButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold);
            this.selectFunctionButton.ForeColor = System.Drawing.Color.White;
            this.selectFunctionButton.Location = new System.Drawing.Point(384, 158);
            this.selectFunctionButton.Margin = new System.Windows.Forms.Padding(5);
            this.selectFunctionButton.Name = "selectFunction";
            this.selectFunctionButton.Size = new System.Drawing.Size(111, 37);
            this.selectFunctionButton.TabIndex = 3;
            this.selectFunctionButton.Text = "Functie selecteren";
            this.selectFunctionButton.UseVisualStyleBackColor = false;
            this.selectFunctionButton.Click += new System.EventHandler(this.selectFunction_Click);
            this.selectFunctionButton.Click += new System.EventHandler(closeDialog_Click);
            this.selectFunctionButton.Click += new System.EventHandler(saveFunction);

          

            // 
            // closeDialog
            // 
            this.closeDialog.BackColor = System.Drawing.Color.DimGray;
            this.closeDialog.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Gray;
            this.closeDialog.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.closeDialog.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold);
            this.closeDialog.ForeColor = System.Drawing.Color.White;
            this.closeDialog.Location = new System.Drawing.Point(5, 158);
            this.closeDialog.Margin = new System.Windows.Forms.Padding(5);
            this.closeDialog.Name = "closeDialog";
            this.closeDialog.Size = new System.Drawing.Size(90, 37);
            this.closeDialog.TabIndex = 1;
            this.closeDialog.Text = "Sluiten";
            this.closeDialog.UseVisualStyleBackColor = false;
            this.closeDialog.Click += new System.EventHandler(this.closeDialog_Click);


            // 
            // AddFunctionLabel
            // 
            this.selectFunctionLabel.AutoSize = true;
            this.selectFunctionLabel.Location = new System.Drawing.Point(150,75 );
            this.selectFunctionLabel.Name = "AddFunctionLabel";
            this.selectFunctionLabel.Size = new System.Drawing.Size(58, 17);
            this.selectFunctionLabel.TabIndex = 7;
            this.selectFunctionLabel.Text = "U kunt hier een nieuwe functie selecteren:";

            //
            //SelectFunctionList
            //


            this.selectFunctionList.Location = new System.Drawing.Point(150, 100);
            this.selectFunctionList.IntegralHeight = false;
            this.selectFunctionList.MaxDropDownItems = 5;
            this.selectFunctionList.DropDownStyle = ComboBoxStyle.DropDownList;
            this.selectFunctionList.Name = "ComboBox1";
            this.selectFunctionList.Size = new System.Drawing.Size(200, 200);
            this.selectFunctionList.TabIndex = 0;

            this.SuspendLayout();
            // 
            // SelectFunction
            // 
            this.Name = "SelectFunction";
            this.Size = new System.Drawing.Size(456, 212);
            this.ResumeLayout(false);

            
            this.Controls.Add(selectFunctionButton);
            this.Controls.Add(closeDialog);
            this.Controls.Add(selectFunctionList);
            this.Controls.Add(selectFunctionLabel);


        }