Inheritance: ComboBox
Esempio n. 1
0
		void AddThenRemove_test (bool match_tick_numbers)
		{
			int b_count = 0;
			int c_count = 0;

			Canvas c = new Canvas ();
			MyComboBox b = new MyComboBox ();
			MyComboBox second = new MyComboBox ();

			b.Loaded += delegate { b_count++; };
			c.Loaded += delegate { c_count++; };
			
			c.Children.Add (b);

			TestPanel.Children.Add (c);
			EnqueueConditional (() => b_count == 1 && c_count == 1, "#1");

			// If an item with delayed loaded emission is added to the tree, the entire tree
			// will be walked to find Loaded handlers which have not been emitted and will emit
			// those. The handlers will be invoked the tick *after* the template is applied.
			Enqueue (() => {
				b.Loaded += delegate { b_count += 10; };
				c.Loaded += delegate { c_count += 10; };
				
				c.Children.Add (second);
				Assert.IsFalse (second.AppliedTemplate, "#AppliedTemplate 1");
			});
			Enqueue (() => {
				Assert.IsTrue (second.AppliedTemplate, "#AppliedTemplate 2");

				if (match_tick_numbers) {
					// in moonlight the c.Children.Add posts the
					// loaded event emission hook for async use, but the
					// render callback is invoked right after the Enqueue
					// which happens from a DispatcherTimer (an
					// animation clock).

					// therefore the properties are updated after the
					// previous Enqueue, but before this one.
					//
					Assert.AreEqual (1, b_count, "#2");
					Assert.AreEqual (1, c_count, "#3");
				}
			});
			// Adding an item with immediate loaded emission doesn't invoke new
			// Loaded handlers on its parent UIElements
			Enqueue (() => {
				Assert.AreEqual (11, b_count, "#4");
				Assert.AreEqual (11, c_count, "#5");

				b.Loaded += delegate { b_count += 100; };
				c.Loaded += delegate { c_count += 100; };
				c.Children.Add (new Canvas ());
			});
			Enqueue (() => {
				Assert.AreEqual (11, b_count, "#6");
				Assert.AreEqual (11, c_count, "#7");
			});
			EnqueueTestComplete ();
		}
Esempio n. 2
0
        public AdminSelectForm()
        {
            InitializeComponent();
            _administrators = _manhattanInfo?.Admins;
            var curenAdministrator = _manhattanInfo?.CurrentAdmin;

            label_Name.Text = curenAdministrator?.Name;

            // Заполняем именами Админов
            if (_administrators?.Count > 0)
            {
                MyComboBox.Initialize(comboBox_all_admins, _administrators.Select(x => x.Name).ToArray <object>());
            }

            // Выбираем активного админа в комбобоксе
            try
            {
                if (_administrators == null || _administrators.Count <= 0)
                {
                    return;
                }

                var isNameExist = curenAdministrator != null && _administrators.Select(x => x.Name).Contains(curenAdministrator.Name);
                comboBox_all_admins.SelectedItem = isNameExist ? curenAdministrator.Name : "Нет";
            }
            catch (Exception)
            {
                MessageBox.Show(@"Exception admins select");
            }
        }
Esempio n. 3
0
    /// <summary>
    /// Creates a new MyComboBox control inside MyGroupBox container, associated
    /// to a specified Enum type and at some location.
    /// </summary>
    /// <remarks>
    /// The control is added to the form container with its tab-index property
    /// automatically assigned (see <see cref="NextTabIndex"/>).
    /// </remarks>
    ///
    protected MyComboBox NewEnumField(MyGroupBox box, float left, float top,
                                      float width, Type type)
    {
        if (Em.IsTextUI)
        {
            --left;
        }

        MyComboBox combo = new MyComboBox()
        {
            AutoSize = width <= 0 ? true : false,
            Left     = (int)(left * Em.Width),
            Top      = (int)(top * Em.Height) - (Em.IsGUI ? 3 : 0),
            TabStop  = true,
            TabIndex = NextTabIndex,
            Parent   = box,
        };

        if (width > 0)
        {
            combo.Width = (int)(width * Em.Width);
        }

        combo.AddEnum(type);

        return(combo);
    }
Esempio n. 4
0
    /////////////////////////////////////////////////////////////////////////////////////

    /// <summary>
    /// Handles and re-raises the KeyDown event.
    /// </summary>
    ///
    protected override void OnKeyDown(KeyEventArgs e)
    {
        Control    active  = this.ActiveControl;
        MyComboBox combo   = active as MyComboBox;
        MyTextBox  textBox = active as MyTextBox;

        if (active != null && e.Modifiers == 0)
        {
            switch (e.KeyCode)
            {
            case Keys.Escape:
                this.Unload();
                e.Handled = true;
                break;

            case Keys.Scroll:
                this.DumpTabIndexes();
                break;

            case Keys.Enter:
                if (!(active is MyButton))
                {
                    goto case Keys.Down;
                }
                break;

            case Keys.Up:
            case Keys.Down:

                if (active is MyButton ||
                    active is MyCheckBox ||
                    active is MyTextBox && !textBox.Multiline ||
                    combo != null && (combo.ReadOnly || !combo.DroppedDown)
                    )
                {
                    goto case Keys.Tab;
                }
                break;

            case Keys.Tab:

                bool forward = e.KeyCode != Keys.Up;     // forward if not key Up

                this.SelectNextControl(active, forward,
                                       /*tabStopOnly*/ true, /*nested*/ true, /*wrap*/ true);

                combo = ActiveChild as MyComboBox;

                if (combo != null && !combo.ReadOnly && !combo.DroppedDown)
                {
                    combo.DroppedDown = true;
                }

                e.Handled = true;
                break;
            }
        }

        base.OnKeyDown(e);
    }
Esempio n. 5
0
        /// <summary>
        /// Assigns the value of the <paramref name="cell" /> to the <paramref name="control" />.
        /// </summary>
        /// <param name="control">The control to which to assign the cell's <see cref="P:Xceed.Grid.Cell.Value" />.</param>
        /// <param name="cell">The cell whose <see cref="P:Xceed.Grid.Cell.Value" /> to assign to the <paramref name="control" />.</param>
        protected override void SetControlValueCore(Control control, Cell cell)
        {
            MyComboBox box1 = control as MyComboBox;

            box1.AllowFreeText = false;
            base.SetControlValueCore(control, cell);
            box1.AllowFreeText = true;
        }
Esempio n. 6
0
        public HitbaseComboBox(MainCDUserControl dlg)
            : base(dlg)
        {
            comboBox = new MyComboBox(this);

            comboBox.IsEditable        = false;
            comboBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(comboBox_SelectionChanged);
        }
Esempio n. 7
0
        /// <summary>
        /// Устанавливает стартовые значения CheckedListBox при загрузке формы. Список строк и галочку.
        /// </summary>
        private void InitCBoxStatus()
        {
            var statuses = Enum.GetNames(typeof(StatusPerson)).ToArray <object>().ToList();

            statuses.Add(NotMatter);

            MyComboBox.Initialize(comboBox_Status, statuses.ToArray(), NotMatter);
        }
Esempio n. 8
0
        /// <summary>
        /// Faz a pesquisa em um webservice do cep.
        /// Retorna cidade, bairro, logradouro e tipo de logradouro modificadas.
        /// Utiliza os sites republicavirtual.com.br e viacep.com.br
        /// </summary>
        /// <param name="cep">O CEP a ser pesquisado</param>
        /// <param name="bairro"></param>
        /// <param name="logradouro"></param>
        /// <param name="tipologradouro"></param>
        public void buscadorAlternativo(string cep, MyComboBox bairro, MyTextBox logradouro, MyComboBox tipologradouro)
        {
            try
            {
                //alternativo http://cep.republicavirtual.com.br/web_cep.php?cep=32604170cep&formato=xml
                //ourtro alternativo https://api.postmon.com.br/v1/cep/32605100?format=xml
                //https://viacep.com.br/ws/32605100/json/

                WebRequest request = WebRequest.Create("https://viacep.com.br/ws/@cep/xml/".Replace("@cep", cep));

                request.Timeout = 20000;

                using (WebResponse response = request.GetResponse())
                {
                    using (Stream stream = response.GetResponseStream())
                    {
                        XDocument document = XDocument.Load(new StreamReader(stream ?? throw new InvalidOperationException("Strema não é válido!")));

                        try
                        {
                            XElement xElementlogradouro = document.Descendants("logradouro").First();
                            XElement xElementbairro     = document.Descendants("bairro").First();

                            XElement xElementLocalidade = document.Descendants("localidade").First();

                            if (xElementLocalidade.Value != "Betim")
                            {
                                throw new Exception($"CEP {cep} não foi encontrado ou não pertence a Betim!\nPor favor digite o endereço.");
                            }



                            bairro.Text = xElementbairro.Value.ToUpper();

                            logradouro.Text = xElementlogradouro.Value.ToUpper();
                            var tipo = logradouro.Text.Split(' ');
                            tipologradouro.Text = tipo[0];

                            var pos = logradouro.Text.IndexOf(' ') + 1;

                            logradouro.Text = logradouro.Text.Substring(pos, logradouro.Text.Length - pos);
                        }
                        catch (Exception e)
                        {
                            throw new Exception($"Cep {cep} não foi encontrado!\nPor favor digite o endereço.\n{e.Message}");
                        }
                    }
                }
            }
            catch (WebException erro)
            {
                throw new WebException("Não foi possível acessar o WebService!\n" + erro.Message + "\nVerifique sua conexão de rede.");
            }
            catch (XmlException erro)
            {
                throw new XmlException(erro.Message);
            }
        }
 ///// <summary>
 ///// Initializes a new instance of the ComboBoxEditor class.
 ///// </summary>
 //public MyComboBoxEditor() :
 //    this(new MyComboBox(MyComboBoxEditor.ComboBoxEditorType, EnhancedBorderStyle.None))
 //{
 //}
 /// <summary>
 /// Initializes a new instance of the ComboBoxEditor class specifying the WinComboBox
 /// control that will be used as a template.
 /// </summary>
 /// <param name="template">The WinComboBox to use as a template.</param>
 protected MyComboBoxEditor(MyComboBox template)
     : base(template)
 {
     if (this.TemplateControl.BorderStyle == EnhancedBorderStyle.None)
     {
         this.TemplateControl.ImagePadding = new Xceed.Editors.Margins(0, 1, 0, 0);
     }
     this.InitializeTemplateControl();
 }
Esempio n. 10
0
        ///// <summary>
        ///// Initializes a new instance of the ComboBoxEditor class.
        ///// </summary>
        //public MyComboBoxEditor() :
        //    this(new MyComboBox(MyComboBoxEditor.ComboBoxEditorType, EnhancedBorderStyle.None))
        //{
        //}

        /// <summary>
        /// Initializes a new instance of the ComboBoxEditor class specifying the WinComboBox
        /// control that will be used as a template.
        /// </summary>
        /// <param name="template">The WinComboBox to use as a template.</param>
        protected MyComboBoxEditor(MyComboBox template)
            : base(template)
        {
            if (this.TemplateControl.BorderStyle == EnhancedBorderStyle.None)
            {
                this.TemplateControl.ImagePadding = new Xceed.Editors.Margins(0, 1, 0, 0);
            }
            this.InitializeTemplateControl();
        }
    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    static void Main()
    {
        DataTable  dt;    // values here
        MyComboBox cb = new MyComboBox();

        cb.InitItems(dt);
        MyDataGridViewComboBoxColumn gvcb = new MyDataGridViewComboBoxColumn();

        cb.InitItems(dt);
    }
Esempio n. 12
0
        private void LoadUserData()
        {
            // Имя Клиента
            if (label_PersonName.Text != _person.Name)
            {
                label_PersonName.Text = _person.Name;
            }
            // Телефон
            if (maskedTextBox_PhoneNumber.Text != _person.Phone)
            {
                maskedTextBox_PhoneNumber.Text = _person.Phone;
            }
            // Паспорт
            if (maskedTextBox_Passport.Text != _person.Passport)
            {
                maskedTextBox_Passport.Text = _person.Passport;
            }
            // Права
            if (maskedTextBox_DriverID.Text != _person.DriverIdNum)
            {
                maskedTextBox_DriverID.Text = _person.DriverIdNum;
            }
            // Персональный Номер
            if (textBox_Number.Text != _person.IdString)
            {
                textBox_Number.Text = _person.IdString;
            }

            // День Рождения
            try
            {
                if (dateTimePicker_birthDate.Value != _person.BirthDate)
                {
                    dateTimePicker_birthDate.Value = _person.BirthDate;
                }
            }
            catch (Exception)
            {
                dateTimePicker_birthDate.Value = DateTime.Now;
            }

            // Пол
            var gendRange    = Enum.GetNames(typeof(Gender)).ToArray <object>();
            var gendSelected = _person.GenderType.ToString();

            MyComboBox.Initialize(comboBox_Gender, gendRange, gendSelected);

            // Особые Отметки
            if (_editedSpecialNote != _person.SpecialNotes)
            {
                _editedSpecialNote = _person.SpecialNotes;
            }

            MyRichTextBox.Load(richTextBox_notes, _person.SpecialNotes);
        }
Esempio n. 13
0
        protected override void DeactivateControlCore(Control control, Cell cell)
        {
            MyComboBox c = control as MyComboBox;

            foreach (Xceed.Editors.ColumnInfo column in this.TemplateControl.Columns)
            {
                column.Width = c.Columns[column.Name].Width;
            }

            base.DeactivateControlCore(control, cell);
        }
Esempio n. 14
0
        ///// <summary>
        ///// Initializes a new instance of the ComboBoxEditor class specifying its data binding information.
        ///// </summary>
        ///// <param name="dataSource">The data source used to populate the combobox.</param>
        ///// <param name="dataMember">The table to bind to within the <paramref name="dataSource" />.</param>
        ///// <param name="valueMember">A string that specifies the field of the <paramref name="dataSource" /> from which
        ///// to draw the value.</param>
        //public MyComboBoxEditor(object dataSource, string dataMember, string valueMember)
        //    : this(new MyComboBox(MyComboBoxEditor.ComboBoxEditorType, EnhancedBorderStyle.None, dataSource, dataMember, valueMember))
        //{
        //}

        ///// <summary>
        ///// Initializes a new instance of the ComboBoxEditor class specifying its data binding information.
        ///// </summary>
        ///// <param name="dataSource">The data source used to populate the combobox.</param>
        ///// <param name="dataMember">The table to bind to within the <paramref name="dataSource" />.</param>
        ///// <param name="valueMember">A string that specifies the field of the <paramref name="dataSource" /> from which
        ///// to draw the value.</param>
        ///// <param name="displayFormat">The format with which the selected item is displayed in the combobox.</param>
        ///// <remarks><para>
        ///// Only the column names specified by <paramref name="displayFormat" /> and the <paramref name="valueMember" />
        ///// parameters will be created in the dropdown. For example, setting <paramref name="displayFormat" />
        ///// to "%FirstName% %LastName%" will result in only the "FirstName" and "LastName" columns being
        ///// created in the dropdown and, for example, "Naomi Robitaille" when the item is selected.
        ///// The column specified by <paramref name="valueMember" /> will also be created, however it will not visible
        ///// unless it is also part of the <paramref name="displayFormat" />.
        ///// </para></remarks>
        //public MyComboBoxEditor(object dataSource, string dataMember, string valueMember, string displayFormat)
        //    : this(new MyComboBox(MyComboBoxEditor.ComboBoxEditorType, EnhancedBorderStyle.None, dataSource, dataMember, valueMember, displayFormat))
        //{
        //}

        ///// <summary>
        ///// Initializes a new instance of the ComboBoxEditor class specifying its data binding information.
        ///// </summary>
        ///// <remarks><para>
        ///// Only the column names specified by <paramref name="displayFormat" /> and the <paramref name="valueMember" />
        ///// parameters will be created in the dropdown. For example, setting <paramref name="displayFormat" />
        ///// to "%FirstName% %LastName%" will result in only the "FirstName" and "LastName" columns being
        ///// created in the dropdown and, for example, "Naomi Robitaille" when the item is selected.
        ///// The column specified by <paramref name="valueMember" /> will also be created, however it will not visible
        ///// unless it is also part of the <paramref name="displayFormat" />.
        ///// </para></remarks>
        ///// <param name="dataSource">The data source used to populate the combobox.</param>
        ///// <param name="dataMember">The table to bind to within the <paramref name="dataSource" />.</param>
        ///// <param name="valueMember">The field of the <paramref name="dataSource" /> from which
        ///// to draw the value.</param>
        ///// <param name="imageMember">A string that specifies the field of the <paramref name="dataSource" /> from which
        ///// to draw the image.</param>
        ///// <param name="imagePosition">An <see cref="T:Xceed.Editors.ImagePosition" /> value representing the position of the image.</param>
        ///// <param name="imageSize">A <see cref="T:System.Drawing.Size" /> structure representing the size of the editors's image.</param>
        ///// <param name="displayFormat">The format with which the selected item is displayed in the combobox.</param>
        //public MyComboBoxEditor(object dataSource, string dataMember, string valueMember, string imageMember,
        //                        Xceed.Editors.ImagePosition imagePosition, Size imageSize, string displayFormat)
        //    : this(new MyComboBox(MyComboBoxEditor.ComboBoxEditorType, EnhancedBorderStyle.None, dataSource, dataMember,
        //                       valueMember, imageMember, imagePosition, imageSize, displayFormat))
        //{
        //}
        #endregion

        //internal static void CommonSetControlAppearance(MyComboBox control, Cell cell)
        //{
        //    TextEditor.CommonSetControlAppearance(control, cell);
        //}

        /// <summary>
        /// Retrieves the value of the <paramref name="control" />.
        /// </summary>
        /// <param name="control">The control from which to retrieve the value.</param>
        /// <param name="cell">The cell currently being edited by the <paramref name="control" />.</param>
        /// <param name="returnDataType">A <see cref="T:System.Type" /> representing the datatype to which the
        /// <paramref name="control" />'s value must be converted.</param>
        /// <returns>The value that will be assigned to the cell being edited by the <paramref name="control" />, in the
        /// correct datatype.</returns>
        /// <remarks><para>
        /// If the cell's <see cref="P:Xceed.Grid.Cell.ParentRow" />'s <see cref="P:Xceed.Grid.CellRow.EnforceCellDataTypes" /> is <see langword="false" />,
        /// <paramref name="returnDataType" /> will be "object"; otherwise, <paramref name="returnDataType" /> will by equal to
        /// the parent column's <see cref="P:Xceed.Grid.Column.DataType" />.
        /// </para></remarks>
        protected override object GetControlValueCore(Control control, Cell cell, System.Type returnDataType)
        {
            MyComboBox box1 = control as MyComboBox;

            ((MyComboBoxTextBoxArea)box1.TextBoxArea).OwnTextValidating();

            box1.AllowFreeText = false;
            object res = base.GetControlValueCore(control, cell, returnDataType);

            box1.AllowFreeText = true;

            return(res);
        }
Esempio n. 15
0
        public BindBox()
        {
            InitializeComponent();
            FM = new MyWinForm(this);
            FM.SetDefaultStyle("选择");
            conA = MyDB.GetAccessConnection(AccessPath);
            conS = MyDB.GetSqlServerConnection("127.0.0.1", "111", "Northwind");

            CBB = new MyComboBox(comboBox1, "select CustomerID,ContactName from Customers", "ContactName", "CustomerID", conA);
            LB  = new MyListBox(listBox1, "select CustomerID,ContactName from Customers", "CustomerID", "ContactName", conA);
            CLB = new MyCheckedListBox(checkedListBox1, "select CustomerID,ContactName from Customers", "ContactName", "CustomerID", conA);
            //checkedListBox1.Items.Add("selection1", true);//添加选中状态的项
        }
Esempio n. 16
0
    public Form1()
    {
        InitializeComponent();
        var mcb = new MyComboBox()
        {
            Left = 6, Top = 6
        };

        this.Controls.Add(mcb);
        for (int i = 0; i < 20; i++)
        {
            mcb.AddItem("Item " + i.ToString());
        }
    }
Esempio n. 17
0
        public NumWorkoutForm(AbonementBasic abonement)
        {
            InitializeComponent();

            _abonement           = abonement;
            _selectedValue       = 1;
            _selectedTypeWorkout = TypeWorkout.Персональная;

            var numbersAvailable = Options.NumAvailTrenToBuy;// 1,5,10 тренировок

            MyComboBox.Initialize(comboBox_num, numbersAvailable, numbersAvailable[0]);

            radioButton_mini.Visible = (abonement is ClubCardA);
        }
Esempio n. 18
0
        public NodeTypeEditor()
        {
            InitializeComponent();

            using (Graphics g = CreateGraphics())
            {
                var textSize = g.MeasureString(TEXT, Font);
                m_textHeight = textSize.Height;
                m_textWidth  = textSize.Width;
            }

            m_textBox = new MyTextBox(drawWindow1, TextBoxArea, MyTextBox.InputFormEnum.Text);
            m_textBox.Colors.BorderPen      = Colors.ControlBorder;
            m_textBox.RequestedAreaChanged += () =>
            {
                Size        = m_textBox.RequestedArea.ToSize();
                MinimumSize = new Size(0, Size.Height);
            };

            m_comboBox = new MyComboBox <Guid>(drawWindow1, ComboBoxArea, false);
            m_comboBox.SetupCallbacks();
            m_comboBox.RequestedAreaChanged += () =>
            {
                MinimumSize = new Size(0, (int)m_comboBox.RequestedArea.Height);
                Size        = m_comboBox.RequestedArea.ToSize();
                Refresh();
            };
            m_comboBox.Colors.BorderPen = Colors.ControlBorder;
            m_comboBox.Renderer         = Colors.ContextMenu;

            drawWindow1.MouseDown  += (a, args) => m_textBox.MouseDown(args);
            drawWindow1.MouseUp    += (a, args) => m_textBox.MouseUp(args);
            drawWindow1.MouseMove  += (a, args) => m_textBox.MouseMove(args);
            drawWindow1.MouseClick += (a, args) => m_textBox.MouseClick(args);
            drawWindow1.KeyPress   += (a, args) => m_textBox.KeyPress(args);
            drawWindow1.KeyDown    += (a, args) => m_textBox.KeyDown(args);
            drawWindow1.Paint      += (a, args) => m_textBox.Paint(args.Graphics);
            drawWindow1.GotFocus   += (a, args) => m_textBox.GotFocus();
            drawWindow1.LostFocus  += (a, args) => m_textBox.LostFocus();

            drawWindow1.MouseDown  += (a, args) => m_comboBox.MouseDown(args);
            drawWindow1.MouseUp    += (a, args) => m_comboBox.MouseUp(args);
            drawWindow1.MouseMove  += (a, args) => m_comboBox.MouseMove(args);
            drawWindow1.MouseClick += (a, args) => m_comboBox.MouseClick(args);
            drawWindow1.KeyPress   += (a, args) => m_comboBox.KeyPress(args);
            drawWindow1.KeyDown    += (a, args) => m_comboBox.KeyDown(args);
            drawWindow1.Paint      += (a, args) => m_comboBox.Paint(args.Graphics);
            drawWindow1.GotFocus   += (a, args) => m_comboBox.GotFocus();
            drawWindow1.LostFocus  += (a, args) => m_comboBox.LostFocus();
        }
Esempio n. 19
0
        private void comboBox_TypeTren_SelectedValueChanged(object sender, EventArgs e)
        {
            var combo = (ComboBox)sender;

            try
            {
                _typeWorkout = MyComboBox.GetComboBoxValue <TypeWorkout>(combo);
            }
            catch (Exception)
            {
                MessageBox.Show(@"Exception 2");
            }

            UpdateCorrectFieldsEn();
        }
Esempio n. 20
0
        private void button_ok_Click(object sender, EventArgs e)
        {
            try
            {
                var selectedName = MyComboBox.GetComboBoxValue(comboBox_all_admins);
                _manhattanInfo.CurrentAdmin = _administrators.Find(x => x.Name.Equals(selectedName));
            }
            catch (Exception)
            {
                MessageBox.Show(@"Exception admins select");
            }

            DialogResult = DialogResult.OK;
            Close();
        }
Esempio n. 21
0
        private void UpdateCorrectFieldsEn()
        {
            // Выходим если не нужна корректировка
            if (!checkBox_Activated.Checked)
            {
                return;
            }

            comboBox_Tren.Enabled     = false;
            comboBox_Personal.Enabled = false;
            comboBox_Aerob.Enabled    = false;
            comboBox_freez.Enabled    = false;

            if (radioButton_Abonement.Checked)
            {
                if (comboBox_TypeTren.SelectedItem != null)
                {
                    _typeWorkout = MyComboBox.GetComboBoxValue <TypeWorkout>(comboBox_TypeTren);

                    switch (_typeWorkout)
                    {
                    case TypeWorkout.Тренажерный_Зал:
                        comboBox_Tren.Enabled = true;
                        break;

                    case TypeWorkout.Аэробный_Зал:
                        comboBox_Aerob.Enabled = true;
                        break;

                    case TypeWorkout.Персональная:
                        comboBox_Personal.Enabled = true;
                        break;

                    case TypeWorkout.МиниГруппа:
                        comboBox_Personal.Enabled = true;
                        break;
                    }
                    comboBox_freez.Enabled = true;
                }
            }

            if (radioButton_ClubCard.Checked)
            {
                comboBox_Personal.Enabled = true;
                comboBox_freez.Enabled    = true;
                comboBox_Aerob.Enabled    = true;
            }
        }
Esempio n. 22
0
        private void comboBox_Status_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (comboBox_Status.SelectedItem.ToString().Equals(NotMatter)) // Если не важен статус выводим всех элементов
            {
                _reqStatuses = _personsAll.Values;
            }
            else
            {
                var status = MyComboBox.GetComboBoxValue <StatusPerson>(comboBox_Status);
                _reqStatuses = _personsAll.Where(x => x.Value?.Status == status).Select(x => x.Value);
            }

            var result = GetUpdatedRequestsAsync();

            ShowPersons(result.Result);
        }
Esempio n. 23
0
 void DefineView()
 {
     LB  = new MyListBox(listBox1, "select * from NoteGroups order by GroupOrder", "GroupName", "GroupID", Global.con);
     CBB = new MyComboBox(comboBox1, "select * from NoteGroups order by GroupOrder", "GroupName", "GroupID", Global.con);
     try { LB.SelectedIndex = 0; }
     catch { LB.SelectedIndex = -1; }
     //====
     LV = new MyListViewA(listView1);
     LV.SetDB(Global.con, "Notes");
     LV.ColumnWidths = new int[] { 0, 0, 0, 150, 220 };//列宽(默认80)
     LV.RowHeight    = 30;
     //LV.AlignCenter = true;
     LV.SetStyle("Cambria", 14, FontStyle.Bold);
     LV.QueryFields = "NoteID,GroupID,Content,TimeOfRevision as 修改时间,Title as 笔记标题";
     LV.OrderBy("TimeOfRevision desc");
     ShowData();
 }
Esempio n. 24
0
        /// <summary>
        /// CreateControl
        /// </summary>
        /// <returns></returns>
        protected override Control CreateControl()
        {
            MyComboBox c = this.TemplateControl.Clone() as MyComboBox;

            //for (int i = 0; i < this.TemplateControl.DropDownControl.Columns.Count; ++i)
            //{
            //c.DropDownControl.Columns[i].Visible = this.TemplateControl.DropDownControl.Columns[i].Visible;
            //c.DropDownControl.Columns[i].ReadOnly = this.TemplateControl.DropDownControl.Columns[i].ReadOnly;
            //c.DropDownControl.Columns[i].Width = this.TemplateControl.DropDownControl.Columns[i].Width;
            //}
            //for (int i = 0; i < this.TemplateControl.DropDownControl.DataRows.Count; ++i)
            //{
            //    c.DropDownControl.DataRows[i].Visible = this.TemplateControl.DropDownControl.DataRows[i].Visible;
            //    c.DropDownControl.DataRows[i].ReadOnly = this.TemplateControl.DropDownControl.DataRows[i].ReadOnly;
            //    c.DropDownControl.DataRows[i].Height = this.TemplateControl.DropDownControl.DataRows[i].Height;
            //}

            return(c);
        }
Esempio n. 25
0
        public MainWindow()
        {
            InitializeComponent();

            var data = new List <HocSinh> {
                new HocSinh {
                    MSSV = 20172605, Name = "Le Quang Huy"
                },
                new HocSinh {
                    MSSV = 20172538, Name = "Nguyen Thi Hien"
                },
            };

            var sp = new StackPanel
            {
                Background  = Brushes.AliceBlue,
                Orientation = Orientation.Horizontal,
            };
            var mcb = new MyComboBox();

            foreach (var item in data)
            {
                var mcbi = new MyComboBoxItem(item, "Name", "MSSV");
                mcb.Add(mcbi);
            }

            var bt = new Button
            {
                Content = "Submit",
                Width   = 50,
                Height  = 25,
            };

            bt.Click += (s, e) =>
            {
                MessageBox.Show(mcb.SelectedItem.ReturnValue.ToString());
            };

            sp.Children.Add(mcb);
            sp.Children.Add(bt);
            Content = sp;
        }
Esempio n. 26
0
        private void CreatePersonForm_Load(object sender, EventArgs e)
        {
            // Инициализация полей по - умолчанию
            // Пол
            var gendRange = Enum.GetNames(typeof(Gender)).ToArray <object>();

            MyComboBox.Initialize(comboBox_Gender, gendRange, Gender.Неизвестен.ToString());

            // День Рождения
            dateTimePicker_birthDate.Value = new DateTime(1990, 01, 01);

            //Вызов для подсветки по-умолчанию
            comboBox_Names.BackColor            = Color.Pink;
            maskedTextBox_PhoneNumber.BackColor = Color.Pink;

            //ComboBox Persons
            var objects = _persons.Values.Select(c => c.Name).ToArray <object>();

            MyComboBox.Initialize(comboBox_Names, objects);
        }
Esempio n. 27
0
        private void ProcessComboBox(ComboBox cmbox)
        {
            if (cmbox.SelectedItem == null)
            {
                return;
            }
            var gender = MyComboBox.GetComboBoxValue <Gender>(cmbox);

            if (gender == Gender.Неизвестен)
            {
                _dataStateOk.Gender = false;
                cmbox.BackColor     = Color.Pink;
            }
            else
            {
                _dataStateOk.Gender = true;
                _dataStruct.Gender  = gender;
                cmbox.BackColor     = Color.PaleGreen;
            }
        }
Esempio n. 28
0
        private void PersonsListForm_Load(object sender, EventArgs e)
        {
            // Инициализация всех контролов

            //ComboBox Persons
            var objects = DataBaseLevel.GetPersonsList().Values.Select(c => c.Name).ToArray <object>();

            MyComboBox.Initialize(comboBox_Names, objects);

            // Пол
            var gendRange = Enum.GetNames(typeof(Gender)).ToArray <object>();

            MyComboBox.Initialize(comboBox_Gender, gendRange, Gender.Неизвестен);

            // ListBox
            listBox_persons.Items.AddRange(objects);

            // Подписка на событие
            SelectedNameСhanged += NameProcessing;
        }
        public static MyComboBox CreateMyComboBoxList <T>(this IList <T> listToUse, XmlNode objectNode, bool isGameFileSearchTree = true, string name = null)
        {
            MyComboBox newBox = new MyComboBox(objectNode, isGameFileSearchTree)
            {
                IsEditable = true,
                Background = BackgroundColorController.GetBackgroundColor()
            };

            if (name != null)
            {
                newBox.Name = name;
            }
            ObservableCollection <string> allItems = new ObservableCollection <string>();

            foreach (var nextString in listToUse.OrderBy(i => i))
            {
                allItems.Add(nextString.ToString());
            }
            newBox.ItemsSource = allItems;
            return(newBox);
        }
Esempio n. 30
0
        private async void comboBox_LastVisit_SelectedIndexChanged(object sender, EventArgs e)
        {
            var lVisit = MyComboBox.GetComboBoxValue(comboBox_LastVisit);

            // Если последний визит не важен -выходим
            if (lVisit.Equals(_lastVisits[0]))
            {
                _reqLastVisit = _personsAll.Values;
            }
            else
            {
                var dataInPast        = DateTime.Now.Subtract(new TimeSpan(30, 0, 0, 0)).Date;//Вычитаем 30 дней
                var fullJournal       = DataBaseLevel.GetPersonsVisitDict();
                var resultByCondition = fullJournal.Where(x => x.Value?.Last().DateTimeVisit.CompareTo(dataInPast) <= 0).Select(x => x.Key);
                var resultConverted   = resultByCondition.Select(PersonObject.GetLink);
                _reqLastVisit = resultConverted.ToList();
            }
            var result = await GetUpdatedRequestsAsync();

            ShowPersons(result);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="nvcName"></param>
        /// <param name="viewerName"></param>
        /// <param name="editorName"></param>
        /// <param name="editorFilter"></param>
        public void SetDataBinding(string nvcName, string viewerName, string editorName, string editorFilter)
        {
            if (NameValueMappingCollection.Instance[viewerName].ValueMember !=
                NameValueMappingCollection.Instance[editorName].ValueMember)
            {
                throw new ArgumentException(viewerName + "'s ValueMember and " + editorName + "' ValueMember should be same!", "viewerName");
            }
            string editTopNvName = NameValueMappingCollection.Instance.FindTopParentNv(editorName);

            //if (viewerName != editorName)
            //{
            //    string viewTopNvName = NameValueMappingCollection.Instance.FindTopParentNv(viewerName);
            //    if (editTopNvName != viewTopNvName)
            //    {
            //        throw new ArgumentException(viewerName + "'s TopNv and " + editorName + "' TopNv should be same!");
            //    }
            //}

            this.m_nvcName      = nvcName;
            this.m_editorNvName = editorName;
            this.m_layoutName   = MyComboBox.GetGridNameForNv(viewerName + "_" + editorName + "_" + editorFilter, true);

            this.SetDataBinding(NameValueMappingCollection.Instance.GetDataSource(nvcName, viewerName, string.Empty), string.Empty);

            m_editTopNv = NameValueMappingCollection.Instance[editTopNvName];

            // more call SetDataBinding
            m_editTopNv.DataSourceChanged -= new EventHandler(MyComboBox_DataTableChanged);
            m_editTopNv.DataSourceChanged += new EventHandler(MyComboBox_DataTableChanged);

            m_editTopNv.DataSourceChanging -= new System.ComponentModel.CancelEventHandler(MyComboBox_DataTableChanging);
            m_editTopNv.DataSourceChanging += new System.ComponentModel.CancelEventHandler(MyComboBox_DataTableChanging);

            if (viewerName != editorName || !string.IsNullOrEmpty(editorFilter))
            {
                m_needFilter = true;
                m_filterData = NameValueMappingCollection.Instance.GetDataSource(nvcName, editorName, editorFilter);
                FilterEditRow();
            }
        }
Esempio n. 32
0
        public EnumerationTypeEditor()
        {
            InitializeComponent();

            using (Graphics g = CreateGraphics())
            {
                var textSize = g.MeasureString(TEXT, Font);
                m_textHeight = textSize.Height;
                m_textWidth  = textSize.Width;
            }

            m_name = new MyTextBox(drawWindow1, NameArea, MyTextBox.InputFormEnum.Text);
            m_name.Colors.BorderPen = Colors.ControlBorder;

            m_default = new MyComboBox <Or <string, Guid> >(drawWindow1, DefaultArea, true);
            m_default.Colors.BorderPen = Colors.ControlBorder;
            m_default.Renderer         = Colors.ContextMenu;

            drawWindow1.MouseDown += (a, args) => drawWindow1.Focus(); //TODO: is this redundant?
            drawWindow1.Paint     += (a, args) => Paint(args.Graphics);
            drawWindow1.GotFocus  += (a, b) => { forwardTab.TabStop = false; backwardTab.TabStop = false; };
            forwardTab.GotFocus   += (a, b) => { MyControls.ForwardFocus(); drawWindow1.Focus(); };  //Focus draw window so we dont keep giving focus to forwardTab
            backwardTab.GotFocus  += (a, b) => { MyControls.BackwardFocus(); drawWindow1.Focus(); }; //Focus draw window so we dont keep giving focus to backwardTab
            this.Leave            += (a, b) => { forwardTab.TabStop = true; backwardTab.TabStop = true; };

            forwardTab.Size     = Size.Empty;
            forwardTab.Location = new Point(-1, -1);

            backwardTab.Size     = Size.Empty;
            backwardTab.Location = new Point(-1, -1);

            MyControls = new ControlSet(m_name, m_default, m_values);
            MyControls.RegisterCallbacks(drawWindow1);
            MyControls.RequestedAreaChanged += ResetSize;

            ResetSize();

            this.PaddingChanged += (a, b) => ResetSize();
        }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmCliente));
     this.label8 = new System.Windows.Forms.Label();
     this.groupBox1 = new System.Windows.Forms.GroupBox();
     this.cmb_estado = new Matriz.MyComboBox();
     this.label10 = new System.Windows.Forms.Label();
     this.tb_Cidade = new AutoPeçasUI.MyTextBox();
     this.label2 = new System.Windows.Forms.Label();
     this.mask_CEP = new Matriz.Msktextbox();
     this.tb_Bairro = new AutoPeçasUI.MyTextBox();
     this.label7 = new System.Windows.Forms.Label();
     this.tb_NumeroComplemento = new AutoPeçasUI.MyTextBox();
     this.label4 = new System.Windows.Forms.Label();
     this.tb_Logradouro = new AutoPeçasUI.MyTextBox();
     this.label3 = new System.Windows.Forms.Label();
     this.panel1 = new System.Windows.Forms.Panel();
     this.bt_Sair = new System.Windows.Forms.Button();
     this.bt_filtrar = new System.Windows.Forms.Button();
     this.Bt_busca1 = new System.Windows.Forms.Button();
     this.bt_Atualiza = new System.Windows.Forms.Button();
     this.bt_Deleta = new System.Windows.Forms.Button();
     this.bt_gravar = new System.Windows.Forms.Button();
     this.label1 = new System.Windows.Forms.Label();
     this.Titulo_Form_pecas = new System.Windows.Forms.Label();
     this.groupBox2 = new System.Windows.Forms.GroupBox();
     this.tb_CodigoCliente = new AutoPeçasUI.MyTextBox();
     this.lb_Cod = new System.Windows.Forms.Label();
     this.mask_CPFCNPJ = new Matriz.Msktextbox();
     this.label9 = new System.Windows.Forms.Label();
     this.radio_PJ = new System.Windows.Forms.RadioButton();
     this.radio_PF = new System.Windows.Forms.RadioButton();
     this.mask_TelefoneCelular = new Matriz.Msktextbox();
     this.label6 = new System.Windows.Forms.Label();
     this.mask_TelefoneFixo = new Matriz.Msktextbox();
     this.label5 = new System.Windows.Forms.Label();
     this.tb_NomeCliente = new AutoPeçasUI.MyTextBox();
     this.dtg_Cliente = new System.Windows.Forms.DataGridView();
     this.groupBox1.SuspendLayout();
     this.panel1.SuspendLayout();
     this.groupBox2.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.dtg_Cliente)).BeginInit();
     this.SuspendLayout();
     //
     // label8
     //
     this.label8.AutoSize = true;
     this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label8.Location = new System.Drawing.Point(297, 59);
     this.label8.Name = "label8";
     this.label8.Size = new System.Drawing.Size(45, 20);
     this.label8.TabIndex = 26;
     this.label8.Text = "CEP:";
     //
     // groupBox1
     //
     this.groupBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
     this.groupBox1.Controls.Add(this.cmb_estado);
     this.groupBox1.Controls.Add(this.label10);
     this.groupBox1.Controls.Add(this.tb_Cidade);
     this.groupBox1.Controls.Add(this.label2);
     this.groupBox1.Controls.Add(this.mask_CEP);
     this.groupBox1.Controls.Add(this.label8);
     this.groupBox1.Controls.Add(this.tb_Bairro);
     this.groupBox1.Controls.Add(this.label7);
     this.groupBox1.Controls.Add(this.tb_NumeroComplemento);
     this.groupBox1.Controls.Add(this.label4);
     this.groupBox1.Controls.Add(this.tb_Logradouro);
     this.groupBox1.Controls.Add(this.label3);
     this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.groupBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.groupBox1.Location = new System.Drawing.Point(12, 188);
     this.groupBox1.Margin = new System.Windows.Forms.Padding(0);
     this.groupBox1.Name = "groupBox1";
     this.groupBox1.Size = new System.Drawing.Size(871, 102);
     this.groupBox1.TabIndex = 6;
     this.groupBox1.TabStop = false;
     this.groupBox1.Text = "Endereço:";
     //
     // cmb_estado
     //
     this.cmb_estado.FormattingEnabled = true;
     this.cmb_estado.Items.AddRange(new object[] {
     "AC",
     "AL",
     "AP",
     "AM",
     "BA",
     "CE",
     "DF",
     "ES",
     "GO",
     "MA",
     "MT",
     "MS",
     "MG",
     "PA",
     "PB",
     "PR",
     "PE",
     "PI",
     "RJ",
     "RN",
     "RS",
     "RO",
     "RR",
     "RS",
     "SC",
     "SP",
     "SE",
     "TO"});
     this.cmb_estado.Location = new System.Drawing.Point(751, 55);
     this.cmb_estado.Name = "cmb_estado";
     this.cmb_estado.Size = new System.Drawing.Size(54, 24);
     this.cmb_estado.TabIndex = 11;
     //
     // label10
     //
     this.label10.AutoSize = true;
     this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label10.Location = new System.Drawing.Point(713, 59);
     this.label10.Name = "label10";
     this.label10.Size = new System.Drawing.Size(39, 20);
     this.label10.TabIndex = 30;
     this.label10.Text = "UF: ";
     //
     // tb_Cidade
     //
     this.tb_Cidade.Location = new System.Drawing.Point(520, 57);
     this.tb_Cidade.Name = "tb_Cidade";
     this.tb_Cidade.Size = new System.Drawing.Size(179, 22);
     this.tb_Cidade.TabIndex = 10;
     //
     // label2
     //
     this.label2.AutoSize = true;
     this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label2.Location = new System.Drawing.Point(456, 59);
     this.label2.Name = "label2";
     this.label2.Size = new System.Drawing.Size(67, 20);
     this.label2.TabIndex = 28;
     this.label2.Text = "Cidade: ";
     //
     // mask_CEP
     //
     this.mask_CEP.Location = new System.Drawing.Point(348, 57);
     this.mask_CEP.Mask = "00000-999";
     this.mask_CEP.Name = "mask_CEP";
     this.mask_CEP.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
     this.mask_CEP.Size = new System.Drawing.Size(72, 22);
     this.mask_CEP.TabIndex = 9;
     //
     // tb_Bairro
     //
     this.tb_Bairro.Location = new System.Drawing.Point(66, 57);
     this.tb_Bairro.Name = "tb_Bairro";
     this.tb_Bairro.Size = new System.Drawing.Size(207, 22);
     this.tb_Bairro.TabIndex = 8;
     //
     // label7
     //
     this.label7.AutoSize = true;
     this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label7.Location = new System.Drawing.Point(11, 59);
     this.label7.Name = "label7";
     this.label7.Size = new System.Drawing.Size(55, 20);
     this.label7.TabIndex = 24;
     this.label7.Text = "Bairro:";
     //
     // tb_NumeroComplemento
     //
     this.tb_NumeroComplemento.Location = new System.Drawing.Point(595, 21);
     this.tb_NumeroComplemento.Name = "tb_NumeroComplemento";
     this.tb_NumeroComplemento.Size = new System.Drawing.Size(104, 22);
     this.tb_NumeroComplemento.TabIndex = 7;
     //
     // label4
     //
     this.label4.AutoSize = true;
     this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label4.Location = new System.Drawing.Point(502, 18);
     this.label4.Name = "label4";
     this.label4.Size = new System.Drawing.Size(76, 20);
     this.label4.TabIndex = 1;
     this.label4.Text = "Nº/Comp:";
     //
     // tb_Logradouro
     //
     this.tb_Logradouro.Location = new System.Drawing.Point(66, 21);
     this.tb_Logradouro.Name = "tb_Logradouro";
     this.tb_Logradouro.Size = new System.Drawing.Size(419, 22);
     this.tb_Logradouro.TabIndex = 6;
     //
     // label3
     //
     this.label3.AutoSize = true;
     this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label3.Location = new System.Drawing.Point(11, 21);
     this.label3.Name = "label3";
     this.label3.Size = new System.Drawing.Size(49, 20);
     this.label3.TabIndex = 18;
     this.label3.Text = "Logr.:";
     //
     // panel1
     //
     this.panel1.Controls.Add(this.bt_Sair);
     this.panel1.Controls.Add(this.bt_filtrar);
     this.panel1.Controls.Add(this.Bt_busca1);
     this.panel1.Controls.Add(this.bt_Atualiza);
     this.panel1.Controls.Add(this.bt_Deleta);
     this.panel1.Controls.Add(this.bt_gravar);
     this.panel1.Location = new System.Drawing.Point(518, 12);
     this.panel1.Name = "panel1";
     this.panel1.Size = new System.Drawing.Size(373, 73);
     this.panel1.TabIndex = 32;
     //
     // bt_Sair
     //
     this.bt_Sair.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
     this.bt_Sair.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("bt_Sair.BackgroundImage")));
     this.bt_Sair.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
     this.bt_Sair.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.bt_Sair.Location = new System.Drawing.Point(320, 19);
     this.bt_Sair.Name = "bt_Sair";
     this.bt_Sair.Size = new System.Drawing.Size(45, 44);
     this.bt_Sair.TabIndex = 5;
     this.bt_Sair.UseVisualStyleBackColor = false;
     this.bt_Sair.Click += new System.EventHandler(this.bt_Sair_Click);
     //
     // bt_filtrar
     //
     this.bt_filtrar.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
     this.bt_filtrar.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("bt_filtrar.BackgroundImage")));
     this.bt_filtrar.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
     this.bt_filtrar.Enabled = false;
     this.bt_filtrar.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.bt_filtrar.Location = new System.Drawing.Point(226, 17);
     this.bt_filtrar.Name = "bt_filtrar";
     this.bt_filtrar.Size = new System.Drawing.Size(45, 45);
     this.bt_filtrar.TabIndex = 4;
     this.bt_filtrar.UseVisualStyleBackColor = false;
     this.bt_filtrar.Click += new System.EventHandler(this.bt_filtrar_Click);
     //
     // Bt_busca1
     //
     this.Bt_busca1.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
     this.Bt_busca1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("Bt_busca1.BackgroundImage")));
     this.Bt_busca1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
     this.Bt_busca1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Bt_busca1.Location = new System.Drawing.Point(175, 17);
     this.Bt_busca1.Name = "Bt_busca1";
     this.Bt_busca1.Size = new System.Drawing.Size(45, 46);
     this.Bt_busca1.TabIndex = 3;
     this.Bt_busca1.UseVisualStyleBackColor = false;
     this.Bt_busca1.Click += new System.EventHandler(this.Bt_busca1_Click);
     //
     // bt_Atualiza
     //
     this.bt_Atualiza.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
     this.bt_Atualiza.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("bt_Atualiza.BackgroundImage")));
     this.bt_Atualiza.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
     this.bt_Atualiza.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.bt_Atualiza.Location = new System.Drawing.Point(67, 18);
     this.bt_Atualiza.Name = "bt_Atualiza";
     this.bt_Atualiza.Size = new System.Drawing.Size(46, 45);
     this.bt_Atualiza.TabIndex = 1;
     this.bt_Atualiza.UseVisualStyleBackColor = false;
     this.bt_Atualiza.Click += new System.EventHandler(this.bt_Atualiza_Click);
     //
     // bt_Deleta
     //
     this.bt_Deleta.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
     this.bt_Deleta.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("bt_Deleta.BackgroundImage")));
     this.bt_Deleta.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
     this.bt_Deleta.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.bt_Deleta.Location = new System.Drawing.Point(119, 17);
     this.bt_Deleta.Name = "bt_Deleta";
     this.bt_Deleta.Size = new System.Drawing.Size(50, 46);
     this.bt_Deleta.TabIndex = 2;
     this.bt_Deleta.UseVisualStyleBackColor = false;
     this.bt_Deleta.Click += new System.EventHandler(this.bt_Deleta_Click);
     //
     // bt_gravar
     //
     this.bt_gravar.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
     this.bt_gravar.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("bt_gravar.BackgroundImage")));
     this.bt_gravar.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
     this.bt_gravar.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.bt_gravar.Location = new System.Drawing.Point(14, 17);
     this.bt_gravar.Name = "bt_gravar";
     this.bt_gravar.Size = new System.Drawing.Size(47, 44);
     this.bt_gravar.TabIndex = 0;
     this.bt_gravar.UseVisualStyleBackColor = false;
     this.bt_gravar.Click += new System.EventHandler(this.bt_gravar_Click);
     //
     // label1
     //
     this.label1.AutoSize = true;
     this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label1.Location = new System.Drawing.Point(24, 21);
     this.label1.Name = "label1";
     this.label1.Size = new System.Drawing.Size(55, 20);
     this.label1.TabIndex = 35;
     this.label1.Text = "Nome:";
     //
     // Titulo_Form_pecas
     //
     this.Titulo_Form_pecas.Dock = System.Windows.Forms.DockStyle.Top;
     this.Titulo_Form_pecas.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.Titulo_Form_pecas.Font = new System.Drawing.Font("Microsoft Sans Serif", 28F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Titulo_Form_pecas.Location = new System.Drawing.Point(0, 0);
     this.Titulo_Form_pecas.Name = "Titulo_Form_pecas";
     this.Titulo_Form_pecas.Size = new System.Drawing.Size(1029, 51);
     this.Titulo_Form_pecas.TabIndex = 34;
     this.Titulo_Form_pecas.Text = "Cliente";
     //
     // groupBox2
     //
     this.groupBox2.Controls.Add(this.tb_CodigoCliente);
     this.groupBox2.Controls.Add(this.lb_Cod);
     this.groupBox2.Controls.Add(this.mask_CPFCNPJ);
     this.groupBox2.Controls.Add(this.label9);
     this.groupBox2.Controls.Add(this.radio_PJ);
     this.groupBox2.Controls.Add(this.radio_PF);
     this.groupBox2.Controls.Add(this.mask_TelefoneCelular);
     this.groupBox2.Controls.Add(this.label6);
     this.groupBox2.Controls.Add(this.mask_TelefoneFixo);
     this.groupBox2.Controls.Add(this.label5);
     this.groupBox2.Controls.Add(this.tb_NomeCliente);
     this.groupBox2.Controls.Add(this.label1);
     this.groupBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F);
     this.groupBox2.Location = new System.Drawing.Point(12, 91);
     this.groupBox2.Name = "groupBox2";
     this.groupBox2.Size = new System.Drawing.Size(871, 94);
     this.groupBox2.TabIndex = 1;
     this.groupBox2.TabStop = false;
     this.groupBox2.Text = "Dados Pessoais";
     //
     // tb_CodigoCliente
     //
     this.tb_CodigoCliente.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.tb_CodigoCliente.Location = new System.Drawing.Point(795, 54);
     this.tb_CodigoCliente.Name = "tb_CodigoCliente";
     this.tb_CodigoCliente.ReadOnly = true;
     this.tb_CodigoCliente.Size = new System.Drawing.Size(63, 22);
     this.tb_CodigoCliente.TabIndex = 5;
     this.tb_CodigoCliente.Visible = false;
     //
     // lb_Cod
     //
     this.lb_Cod.AutoSize = true;
     this.lb_Cod.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.lb_Cod.Location = new System.Drawing.Point(747, 54);
     this.lb_Cod.Name = "lb_Cod";
     this.lb_Cod.Size = new System.Drawing.Size(42, 20);
     this.lb_Cod.TabIndex = 45;
     this.lb_Cod.Text = "Cod:";
     this.lb_Cod.Visible = false;
     //
     // mask_CPFCNPJ
     //
     this.mask_CPFCNPJ.Location = new System.Drawing.Point(586, 54);
     this.mask_CPFCNPJ.Mask = "000,000,000-00";
     this.mask_CPFCNPJ.Name = "mask_CPFCNPJ";
     this.mask_CPFCNPJ.Size = new System.Drawing.Size(141, 22);
     this.mask_CPFCNPJ.TabIndex = 4;
     this.mask_CPFCNPJ.TextMaskFormat = System.Windows.Forms.MaskFormat.IncludePromptAndLiterals;
     //
     // label9
     //
     this.label9.AutoSize = true;
     this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label9.Location = new System.Drawing.Point(492, 54);
     this.label9.Name = "label9";
     this.label9.Size = new System.Drawing.Size(88, 20);
     this.label9.TabIndex = 43;
     this.label9.Text = "CPF/CNPJ:";
     //
     // radio_PJ
     //
     this.radio_PJ.AutoSize = true;
     this.radio_PJ.Location = new System.Drawing.Point(732, 21);
     this.radio_PJ.Name = "radio_PJ";
     this.radio_PJ.Size = new System.Drawing.Size(126, 20);
     this.radio_PJ.TabIndex = 41;
     this.radio_PJ.Text = "Pessoa Jurídica:";
     this.radio_PJ.UseVisualStyleBackColor = true;
     //
     // radio_PF
     //
     this.radio_PF.AutoSize = true;
     this.radio_PF.Checked = true;
     this.radio_PF.Location = new System.Drawing.Point(611, 23);
     this.radio_PF.Name = "radio_PF";
     this.radio_PF.Size = new System.Drawing.Size(115, 20);
     this.radio_PF.TabIndex = 40;
     this.radio_PF.TabStop = true;
     this.radio_PF.Text = "Pessoa Fisica:";
     this.radio_PF.UseVisualStyleBackColor = true;
     this.radio_PF.CheckedChanged += new System.EventHandler(this.radio_PF_CheckedChanged);
     //
     // mask_TelefoneCelular
     //
     this.mask_TelefoneCelular.Location = new System.Drawing.Point(325, 54);
     this.mask_TelefoneCelular.Mask = "(99) 0000-0000";
     this.mask_TelefoneCelular.Name = "mask_TelefoneCelular";
     this.mask_TelefoneCelular.Size = new System.Drawing.Size(139, 22);
     this.mask_TelefoneCelular.TabIndex = 3;
     this.mask_TelefoneCelular.TextMaskFormat = System.Windows.Forms.MaskFormat.IncludePromptAndLiterals;
     //
     // label6
     //
     this.label6.AutoSize = true;
     this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label6.Location = new System.Drawing.Point(257, 54);
     this.label6.Name = "label6";
     this.label6.Size = new System.Drawing.Size(62, 20);
     this.label6.TabIndex = 39;
     this.label6.Text = "Celular:";
     //
     // mask_TelefoneFixo
     //
     this.mask_TelefoneFixo.Location = new System.Drawing.Point(85, 54);
     this.mask_TelefoneFixo.Mask = "(99) 0000-0000";
     this.mask_TelefoneFixo.Name = "mask_TelefoneFixo";
     this.mask_TelefoneFixo.Size = new System.Drawing.Size(139, 22);
     this.mask_TelefoneFixo.TabIndex = 2;
     this.mask_TelefoneFixo.TextMaskFormat = System.Windows.Forms.MaskFormat.IncludePromptAndLiterals;
     //
     // label5
     //
     this.label5.AutoSize = true;
     this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label5.Location = new System.Drawing.Point(11, 56);
     this.label5.Name = "label5";
     this.label5.Size = new System.Drawing.Size(75, 20);
     this.label5.TabIndex = 37;
     this.label5.Text = "Telefone:";
     //
     // tb_NomeCliente
     //
     this.tb_NomeCliente.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.tb_NomeCliente.Location = new System.Drawing.Point(85, 21);
     this.tb_NomeCliente.Name = "tb_NomeCliente";
     this.tb_NomeCliente.Size = new System.Drawing.Size(509, 22);
     this.tb_NomeCliente.TabIndex = 1;
     //
     // dtg_Cliente
     //
     this.dtg_Cliente.AllowUserToAddRows = false;
     this.dtg_Cliente.AllowUserToDeleteRows = false;
     this.dtg_Cliente.AllowUserToResizeColumns = false;
     this.dtg_Cliente.AllowUserToResizeRows = false;
     this.dtg_Cliente.BackgroundColor = System.Drawing.SystemColors.ActiveCaption;
     this.dtg_Cliente.BorderStyle = System.Windows.Forms.BorderStyle.None;
     this.dtg_Cliente.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     this.dtg_Cliente.Dock = System.Windows.Forms.DockStyle.Bottom;
     this.dtg_Cliente.Location = new System.Drawing.Point(0, 306);
     this.dtg_Cliente.MultiSelect = false;
     this.dtg_Cliente.Name = "dtg_Cliente";
     this.dtg_Cliente.ReadOnly = true;
     this.dtg_Cliente.Size = new System.Drawing.Size(1029, 224);
     this.dtg_Cliente.TabIndex = 35;
     this.dtg_Cliente.CellMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dtg_Cliente_CellMouseClick);
     //
     // Form_Cliente
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.BackColor = System.Drawing.SystemColors.ActiveCaption;
     this.ClientSize = new System.Drawing.Size(1029, 530);
     this.ControlBox = false;
     this.Controls.Add(this.dtg_Cliente);
     this.Controls.Add(this.groupBox2);
     this.Controls.Add(this.groupBox1);
     this.Controls.Add(this.panel1);
     this.Controls.Add(this.Titulo_Form_pecas);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.Name = "Form_Cliente";
     this.ShowInTaskbar = false;
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text = "Form_Cliente";
     this.Load += new System.EventHandler(this.Form_Cliente_Load);
     this.groupBox1.ResumeLayout(false);
     this.groupBox1.PerformLayout();
     this.panel1.ResumeLayout(false);
     this.groupBox2.ResumeLayout(false);
     this.groupBox2.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.dtg_Cliente)).EndInit();
     this.ResumeLayout(false);
 }