public AddFormDriver ButtonAdd_EmulateClick() { var async = new Async(); ButtonAdd.EmulateClick(async); return(new AddFormDriver(Window.WaitForNextModal(), async)); }
private void TxtBoxGen_PreviewKeyDown(object sender, KeyEventArgs e) { try { if (e.Key == Key.Up) { e.Handled = true; TxtBoxRegion.Focus(); } else if (e.Key == Key.Down) { e.Handled = true; TxtBoxName.Focus(); } else if (e.Key == Key.Enter) { e.Handled = true; ButtonAdd.RaiseEvent(new RoutedEventArgs(System.Windows.Controls.Primitives.ButtonBase.ClickEvent)); } } catch (Exception) { LabelMessage.Content = "Error during keyboard navigation."; } }
void ReleaseDesignerOutlets() { if (ButtonAdd != null) { ButtonAdd.Dispose(); ButtonAdd = null; } if (ButtonLeft != null) { ButtonLeft.Dispose(); ButtonLeft = null; } if (ButtonRight != null) { ButtonRight.Dispose(); ButtonRight = null; } if (CollectionView != null) { CollectionView.Dispose(); CollectionView = null; } if (UILabelHeader != null) { UILabelHeader.Dispose(); UILabelHeader = null; } }
private void TextOrder_KeyDown(object sender, KeyRoutedEventArgs e) { if (e.Key == Windows.System.VirtualKey.Enter) { ButtonAdd.Focus(FocusState.Programmatic); } }
private void ListBox1_SelectedIndexChanged(object sender, EventArgs e) { PictureBox1.Image = Image.FromFile(@"..\..\foto\fotocap.jpg"); try { for (int i = 0; i < lstPerson.Count; i++) { if ((lstPerson[i].surname + " " + lstPerson[i].name) == ListBox1.SelectedItem.ToString()) { TextBoxSurname.Text = lstPerson[i].surname; TextBoxName.Text = lstPerson[i].name; MaskedTBPhone.Text = lstPerson[i].phone; TextBoxEmail.Text = lstPerson[i].email; LabelNumber.Text = lstPerson[i].number.ToString(); if (lstPerson[i].picture != "") { PictureBox1.Image = Image.FromFile(lstPerson[i].picture); PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage; } ButtonAdd.Hide(); ButtonCLear.Hide(); ButtonSave.Show(); ButtonDell.Show(); ButtonCancel.Show(); break; } } } catch (NullReferenceException) { } }
void ReleaseDesignerOutlets() { if (ButtonAdd != null) { ButtonAdd.Dispose(); ButtonAdd = null; } if (ButtonNext != null) { ButtonNext.Dispose(); ButtonNext = null; } if (PickerTime != null) { PickerTime.Dispose(); PickerTime = null; } if (TableViewDates != null) { TableViewDates.Dispose(); TableViewDates = null; } }
private void AddIntoBasket(int id) { CDirectoryUserControl directoryUserControl = _directoryUserControls[0]; List <CDirectionWithProfile> directionWithProfiles = new List <CDirectionWithProfile>(); foreach (CDirectoryUserControl localDirectoryUserControl in _directoryUserControls) { if (localDirectoryUserControl.DirectionWithProfile.ID == id) { directoryUserControl = localDirectoryUserControl; } else { directionWithProfiles.Add(localDirectoryUserControl.DirectionWithProfile); } } if (directoryUserControl.Added) { ButtonAdd?.Invoke(directoryUserControl.DirectionWithProfile); } else { Clear(); foreach (CDirectionWithProfile directionWithProfile in directionWithProfiles) { Add(directionWithProfile, false); } } }
void ReleaseDesignerOutlets() { if (ButtonAdd != null) { ButtonAdd.Dispose(); ButtonAdd = null; } if (ButtonChangeColor != null) { ButtonChangeColor.Dispose(); ButtonChangeColor = null; } if (ButtonChangePosition != null) { ButtonChangePosition.Dispose(); ButtonChangePosition = null; } if (ButtonChangeBorderColor != null) { ButtonChangeBorderColor.Dispose(); ButtonChangeBorderColor = null; } }
private void ButtonAdded_Click(object sender, RoutedEventArgs e) { try { ButtonAdd?.Invoke(DirectionWithProfile.ID); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
void Start() { classBtnAdd = buttonAdd.GetComponent <ButtonAdd>(); if (gameObject.name == "BtnES") { UpdateBar(); transform.GetChild(0).gameObject.SetActive(true); } }
public override void UpdateButtons(Form Window) { if (Buttons.Count() != 0) { Image Add = global.ScaleImage(FTR.Properties.Resources.VolumeAdd); Image Sub = global.ScaleImage(FTR.Properties.Resources.VolumeSubtract); ButtonBack.ChangePosition(new Vector((global.form_menu.Map.Width / 10) - BText.Size.Width / 2, global.form_menu.Map.Height - BText.Size.Height)); ButtonAdd.ChangePosition(new Vector(((global.form_menu.Map.Width / 2) + Bar.Width / 2 + Add.Width / 2), (global.form_menu.Map.Height / 2))); ButtonDistract.ChangePosition(new Vector(((global.form_menu.Map.Width / 2) - Bar.Width / 2 - Sub.Width * 1.5f), (global.form_menu.Map.Height / 2))); } }
private void ButtonCancel_Click(object sender, EventArgs e) { ListBox1.ClearSelected(); CLearFields(); ButtonAdd.Show(); ButtonCLear.Show(); ButtonSave.Hide(); ButtonDell.Hide(); ButtonCancel.Hide(); }
private void ButtonDell_Click(object sender, EventArgs e) { int tem = Convert.ToInt32(LabelNumber.Text); for (int i = 0; i < lstPerson.Count; i++) { if (lstPerson[i].number == tem) { lstPerson.RemoveAt(i); ListBox1.Items.RemoveAt(ListBox1.SelectedIndex); CLearFields(); ButtonAdd.Show(); ButtonCLear.Show(); ButtonSave.Hide(); ButtonDell.Hide(); ButtonCancel.Hide(); break; } } }
private void PictureBoxDraw_MouseClick(object sender, MouseEventArgs e) { if (CheckBoxMouseControl.Checked) { if (e.Button == MouseButtons.Left) { TextBoxX1.Text = e.X.ToString(); TextBoxY1.Text = e.Y.ToString(); } if (e.Button == MouseButtons.Right) { TextBoxX2.Text = e.X.ToString(); TextBoxY2.Text = e.Y.ToString(); } if (e.Button == MouseButtons.Middle) { ButtonAdd.PerformClick(); } } }
public void AwakeFromNib() { // set appearance of view LabelHeader.TextColor = NSColor.WhiteColor; LabelHeader.Font = FontManager.FontLarge; LabelTitle.TextColor = NSColor.WhiteColor; LabelTitle.Font = FontManager.FontMedium; LabelLocation.TextColor = NSColor.WhiteColor; LabelLocation.Font = FontManager.FontMedium; TextFieldTitle.BackgroundColor = NSColor.BlackColor; TextFieldTitle.TextColor = NSColor.WhiteColor; TextFieldTitle.Font = FontManager.FontMedium; TextFieldLocation.TextColor = NSColor.WhiteColor; TextFieldLocation.Font = FontManager.FontMedium; IButtonHoverType2 button = ButtonAdd.Initialise(); button.Text = NSString.StringWithUTF8String("Add"); ButtonAdd.EventClicked += ButtonAddClicked; ButtonAdd.KeyEquivalent = NSString.StringWithUTF8String("\r"); TextFieldTitle.Delegate = this; // set the data for the current location TextFieldTitle.StringValue = NSString.StringWithUTF8String(iBookmark.Title); List <string> titleTrail = new List <string>(); foreach (Breadcrumb bc in iBookmark.BreadcrumbTrail) { titleTrail.Add(bc.Title); } TextFieldLocation.StringValue = NSString.StringWithUTF8String(string.Join("/", titleTrail.ToArray())); }
void ReleaseDesignerOutlets() { if (TableView != null) { TableView.Dispose(); TableView = null; } if (TextFieldAdd != null) { TextFieldAdd.Dispose(); TextFieldAdd = null; } if (ButtonAdd != null) { ButtonAdd.Dispose(); ButtonAdd = null; } if (ButtonAll != null) { ButtonAll.Dispose(); ButtonAll = null; } if (ButtonFinished != null) { ButtonFinished.Dispose(); ButtonFinished = null; } if (ButtonUnfinished != null) { ButtonUnfinished.Dispose(); ButtonUnfinished = null; } }
private void ButtonSave_Click(object sender, EventArgs e) { int tem = Convert.ToInt32(LabelNumber.Text); for (int i = 0; i < lstPerson.Count; i++) { if (lstPerson[i].number == tem) { if (TextBoxName.Text == "" || TextBoxSurname.Text == "" || TextBoxEmail.Text == "" || MaskedTBPhone.Text == "") { MessageBox.Show("Заполнены не все данные!"); } else { lstPerson[i].surname = TextBoxSurname.Text; lstPerson[i].name = TextBoxName.Text; lstPerson[i].phone = MaskedTBPhone.Text; lstPerson[i].email = TextBoxEmail.Text; if (nameFoto != "") { lstPerson[i].picture = nameFoto; } ListBox1.Items[ListBox1.SelectedIndex] = lstPerson[i].surname + " " + lstPerson[i].name; CLearFields(); ButtonAdd.Show(); ButtonCLear.Show(); ButtonSave.Hide(); ButtonDell.Hide(); ButtonCancel.Hide(); break; } } } nameFoto = ""; PictureBox1.Image = Image.FromFile(@"..\..\foto\fotocap.jpg"); }
private void LoadClients() { ClientControl uc; bll.CountRows(); var clientes = bll.LoadClientes(); if (clientes.Count > 0) { foreach (ClientesDTO item in clientes) { uc = new ClientControl(item.Razao_Social, item.Nome_Fantasia, item.Categoria, item.Status); StackPanel1.Children.Add(uc); uc.btnEditar.Click += (s, e) => { MessageBox.Show(""); }; } if (dto.TotalRows > dto.Inicio && dto.RowsLeft > dto.Limite) { ButtonAdd bt = new ButtonAdd(); bt.btnAdd.Click += (s, e) => { dto.RowsLeft = dto.RowsLeft - dto.Limite; foreach (object ctrl in StackPanel1.Children) { if (ctrl is ButtonAdd) { if (!Dispatcher.CheckAccess()) { this.Dispatcher.BeginInvoke(new Action(delegate { StackPanel1.Children.Remove(((ButtonAdd)ctrl)); })); } else { StackPanel1.Children.Remove(((ButtonAdd)ctrl)); } } } dto.Inicio = dto.Inicio + dto.Limite; if (dto.Inicio >= dto.TotalRows) { dto.Inicio = dto.TotalRows; } LoadClients(); }; if (!Dispatcher.CheckAccess()) { this.Dispatcher.BeginInvoke(new Action(delegate { StackPanel1.Children.Add(bt); })); } else { StackPanel1.Children.Add(bt); } } } else { NoResults nr = new NoResults(); StackPanel1.Children.Add(nr); } }
private void ApplyButton_Click(object sender, RoutedEventArgs e) { ButtonAdd?.Invoke(); }