Beispiel #1
0
        //private void dataGridView_CellValueChanged(object sender, DataGridViewCellEventArgs e)
        //{
        //    if (!IsHeaderCheckBoxClicked)
        //        RowCheckBoxClick((DataGridViewCheckBoxCell)dataGridView[e.ColumnIndex, e.RowIndex]);
        //}


        private void AddHeaderCheckBox()
        {
            HeaderCheckBox = new System.Windows.Forms.CheckBox();

            HeaderCheckBox.Size = new Size(15, 15);

            //Add the CheckBox into the DataGridView
            this.dataGridView.Controls.Add(HeaderCheckBox);
        }
Beispiel #2
0
 private void Temizle()
 {
     //Temizle metodunu form controllerini yakalayarak kodladım. refactoring yapılabilir....
     System.Windows.Forms.GroupBox T = (System.Windows.Forms.GroupBox) this.Controls["grpBxBilgiler"];
     foreach (Control item in T.Controls)
     {
         if (item is System.Windows.Forms.TextBox)
         {
             TextBox yakalananTextbox = (TextBox)item;
             yakalananTextbox.Text = string.Empty;
             if (yakalananTextbox.Name == "txtTarih")
             {
                 yakalananTextbox.Text = DateTime.Now.ToShortDateString().ToString();
             }
         }
         else if (item is MaskedTextBox)
         {
             MaskedTextBox maskedTextBox = (MaskedTextBox)item;
             if (maskedTextBox.Name == "txtTelefon")
             {
                 item.Text = string.Empty;
             }
             if (maskedTextBox.Name == "txtTc")
             {
                 item.Text = string.Empty;
             }
         }
         else if (item is ComboBox)
         {
             ComboBox comboBox = (ComboBox)item;
             if (comboBox.Name == "cmbMahalle")
             {
                 item.Text = "Mahalle Seçiniz.";
             }
         }
         else if (item is RichTextBox)
         {
             RichTextBox richTextBox = (RichTextBox)item;
             if (richTextBox.Name == "richtxtAciklama")
             {
                 item.Text = string.Empty;
             }
         }
         else if (item is System.Windows.Forms.CheckBox)
         {
             System.Windows.Forms.CheckBox checkBox = (System.Windows.Forms.CheckBox)item;
             if (checkBox.Name == "checkbxYeniKayit")
             {
                 checkBox.Checked = false;
             }
         }
     }
 }
Beispiel #3
0
            public SearchControls(MainForm form)
            {
                _form = form;
                _tab  = new TabPage(string.Format("Search {0}", _form.tabControlSearchText.TabCount + 1));
                _form.tabControlSearchText.Controls.Add(_tab);
                _form.tabControlSearchText.SelectedTab = _tab;
                Search = new Search(form.SourceDev);
                Search.SearchControls = this;

                SearchCriteriaTextEditorHost          = new System.Windows.Forms.Integration.ElementHost();
                SearchCriteriaTextEditorHost.Dock     = DockStyle.Fill;
                SearchCriteriaTextEditorHost.Location = new Point(0, 0);
                SearchCriteriaTextEditorHost.TabIndex = 1;
                SearchCriteriaTextEditorHost.Child    = Search.SearchCriteriaTextEditor;

                _tab.Tag = this;
                _tab.Controls.Add(SearchCriteriaTextEditorHost);
                _tab.UseVisualStyleBackColor = true;
                Search.SearchCriteriaTextEditor.Focus();

                Search.FillTreeView(TreeViewResults);
                TreeViewResults.CheckBoxes    = false;
                TreeViewResults.Dock          = DockStyle.Fill;
                TreeViewResults.HideSelection = false;
                TreeViewResults.Location      = new Point(0, 0);
                TreeViewResults.Margin        = new Padding(4);
                TreeViewResults.Name          = "treeViewResults";
                TreeViewResults.TabIndex      = 2121;
                TreeViewResults.AfterSelect  += new TreeViewEventHandler(form.TreeViewResultsAfterSelect);
                _form.panelTree.Controls.Add(TreeViewResults);

                TextEditorHost          = new System.Windows.Forms.Integration.ElementHost();
                TextEditorHost.Dock     = DockStyle.Fill;
                TextEditorHost.Location = new Point(0, 0);
                TextEditorHost.Margin   = new System.Windows.Forms.Padding(4);
                TextEditorHost.TabIndex = 150;
                TextEditorHost.Child    = Search.TextEditor;
                _form.panelISBLResult.Controls.Add(TextEditorHost);

                TextBoxFilterName              = new System.Windows.Forms.TextBox();
                TextBoxFilterName.Dock         = System.Windows.Forms.DockStyle.Fill;
                TextBoxFilterName.Location     = new System.Drawing.Point(0, 0);
                TextBoxFilterName.Margin       = new System.Windows.Forms.Padding(4);
                TextBoxFilterName.Name         = "textBoxFilter";
                TextBoxFilterName.Size         = new System.Drawing.Size(280, 22);
                TextBoxFilterName.TabIndex     = 2111;
                TextBoxFilterName.TextChanged += new System.EventHandler(form.TextBoxFilter_TextChanged);
                _form.panelFilterTreeName.Controls.Add(TextBoxFilterName);

                TextBoxFilterStartDate              = new System.Windows.Forms.DateTimePicker();
                TextBoxFilterStartDate.Format       = DateTimePickerFormat.Custom;
                TextBoxFilterStartDate.CustomFormat = "yyyy-MM-dd HH:mm";
                TextBoxFilterStartDate.Location     = new System.Drawing.Point(0, 0);
                TextBoxFilterStartDate.Margin       = new System.Windows.Forms.Padding(4);
                TextBoxFilterStartDate.Name         = "textBoxFilterStartDate";
                TextBoxFilterStartDate.Size         = new System.Drawing.Size(130, 22);
                TextBoxFilterStartDate.TabIndex     = 2112;
                TextBoxFilterStartDate.TextChanged += new System.EventHandler(form.TextBoxFilterStartDate_TextChanged);
                TextBoxFilterStartDate.Value        = DateTimePicker.MinimumDateTime.Date;
                _form.panelFilterTreeDate.Controls.Add(TextBoxFilterStartDate);

                TextBoxFilterEndDate              = new System.Windows.Forms.DateTimePicker();
                TextBoxFilterEndDate.Format       = DateTimePickerFormat.Custom;
                TextBoxFilterEndDate.CustomFormat = "yyyy-MM-dd HH:mm";
                TextBoxFilterEndDate.Location     = new System.Drawing.Point(150, 0);
                TextBoxFilterEndDate.Margin       = new System.Windows.Forms.Padding(4);
                TextBoxFilterEndDate.Name         = "textBoxFilterEndDate";
                TextBoxFilterEndDate.Size         = new System.Drawing.Size(130, 22);
                TextBoxFilterEndDate.TabIndex     = 2113;
                TextBoxFilterEndDate.TextChanged += new System.EventHandler(form.TextBoxFilterEndDate_TextChanged);
                TextBoxFilterEndDate.Value        = DateTimePicker.MaximumDateTime.Date.AddDays(-1).AddHours(23).AddMinutes(59);
                _form.panelFilterTreeDate.Controls.Add(TextBoxFilterEndDate);

                CheckBoxFindAll          = new System.Windows.Forms.CheckBox();
                CheckBoxFindAll.AutoSize = true;
                CheckBoxFindAll.Dock     = System.Windows.Forms.DockStyle.None;
                CheckBoxFindAll.Location = new System.Drawing.Point(320, 4);
                CheckBoxFindAll.Margin   = new System.Windows.Forms.Padding(4);
                CheckBoxFindAll.Name     = "checkBoxFindAll";
                CheckBoxFindAll.Size     = new System.Drawing.Size(146, 28);
                CheckBoxFindAll.TabIndex = 1226;
                CheckBoxFindAll.Text     = "satisfies all criteria";
                CheckBoxFindAll.UseVisualStyleBackColor = true;
                CheckBoxFindAll.CheckedChanged         += new System.EventHandler(form.checkBoxFindAll_CheckedChanged);
                _form.panelSearchButtons.Controls.Add(CheckBoxFindAll);

                CheckBoxFindRegExp          = new System.Windows.Forms.CheckBox();
                CheckBoxFindRegExp.AutoSize = true;
                CheckBoxFindRegExp.Dock     = System.Windows.Forms.DockStyle.None;
                CheckBoxFindRegExp.Location = new System.Drawing.Point(150, 4);
                CheckBoxFindRegExp.Margin   = new System.Windows.Forms.Padding(4);
                CheckBoxFindRegExp.Name     = "CheckBoxFindRegExp";
                CheckBoxFindRegExp.Size     = new System.Drawing.Size(170, 28);
                CheckBoxFindRegExp.TabIndex = 1225;
                CheckBoxFindRegExp.Text     = ".* (regular expression)";
                CheckBoxFindRegExp.UseVisualStyleBackColor = true;
                CheckBoxFindRegExp.CheckedChanged         += new System.EventHandler(form.checkBoxFindRegExp_CheckedChanged);
                _form.panelSearchButtons.Controls.Add(CheckBoxFindRegExp);

                CheckBoxFindCaseSensitive          = new System.Windows.Forms.CheckBox();
                CheckBoxFindCaseSensitive.AutoSize = true;
                CheckBoxFindCaseSensitive.Dock     = System.Windows.Forms.DockStyle.None;
                CheckBoxFindCaseSensitive.Location = new System.Drawing.Point(2, 4);
                CheckBoxFindCaseSensitive.Margin   = new System.Windows.Forms.Padding(4);
                CheckBoxFindCaseSensitive.Name     = "checkBoxFindCaseSensitive";
                CheckBoxFindCaseSensitive.Size     = new System.Drawing.Size(150, 28);
                CheckBoxFindCaseSensitive.TabIndex = 1224;
                CheckBoxFindCaseSensitive.Text     = "Aa (case sensitive)";
                CheckBoxFindCaseSensitive.UseVisualStyleBackColor = true;
                CheckBoxFindCaseSensitive.CheckedChanged         += new System.EventHandler(form.checkBoxFindCaseSensitive_CheckedChanged);
                _form.panelSearchButtons.Controls.Add(CheckBoxFindCaseSensitive);

                this.Activate();
            }