public OKBox(string question) : base("TextInputBox") { X = Pos.Center(); Y = Pos.Center(); Width = Dim.Percent(40); Height = Dim.Percent(20); ColorScheme = Colors.Menu; lbl = new(question) { Width = Dim.Fill(), Y = 1, TextAlignment = TextAlignment.Centered }; ok = new("OK") { X = Pos.Center(), Y = 5 }; ok.Clicked += () => { OkClicked?.Invoke(this, null); }; Add(lbl, ok); } }}
public TextCheckBox(string question, params ustring[] labels) : base("TextCheckBox") { var str = ""; X = Pos.Center(); Y = Pos.Center(); Width = Dim.Percent(40); Height = Dim.Percent(20); ColorScheme = Colors.Menu; lbl = new(question) { Width = Dim.Fill(), Y = 1, TextAlignment = TextAlignment.Centered }; input = new(labels) { Width = Dim.Fill(), Y = 3 }; ok = new("OK") { X = Pos.Center(), Y = 5 }; ok.Clicked += () => { OkClicked?.Invoke(this, input.SelectedItem); }; Add(lbl, input, ok); }
private void OkButtonClick(object sender, RoutedEventArgs e) { if (OkClicked != null) { OkClicked.Invoke(this, EventArgs.Empty); } }
public static void Handle(Exception error) { Sound.PlaySounds = false; if (MessageBox.Show(ErrorMessage(error), "There's been an error.", MessageBoxButtons.OK, MessageBoxIcon.Error) == (DialogResult.OK | DialogResult.None)) { OkClicked?.Invoke(); } }
public void Show(string title, string message) { var builder = new AlertDialog.Builder(_context); builder .SetMessage(message) .SetTitle(title) .SetNeutralButton("OK", (sender, args) => { OkClicked?.Invoke(this, EventArgs.Empty); }) .Show(); }
private void okRadButton_Click(object sender, RoutedEventArgs e) { if (Validate()) { OkClicked?.Invoke(); _viewModel.Add(); _viewModel.Save(); Close(); } }
public EditUserPasswordView(UserBase user) { InitializeComponent(); tbPassword.PasswordChanged += (o, e) => Validate(); tbPasswordRepeat.PasswordChanged += (o, e) => Validate(); btApply.Click += (o, e) => { user.PasswordHash = Lazurite.Windows.Utils.CryptoUtils.CreatePasswordHash(tbPassword.Password); OkClicked?.Invoke(); }; Validate(); }
public AddGroupView(UserGroupBase group) { InitializeComponent(); tbName.TextChanged += (o, e) => Validate(); btApply.Click += (o, e) => { group.Name = tbName.Text.Trim(); OkClicked?.Invoke(); }; tbName.Text = group.Name; Validate(); }
public Confirmation(string text, bool cancelButtonVisible = true) { var label = Scene._Title.It; label.OverflowMode = TextOverflowMode.Minify; label.Text = text; var cancel = Scene._BtnCancel.It; cancel.Visible = cancelButtonVisible; cancel.Clicked = Close; Scene._BtnOk.It.Clicked = () => { OkClicked?.Invoke(); Close(); }; }
public EditUserView(UserBase user) { InitializeComponent(); tbLogin.Validation = (v) => v.OutputString = v.InputString.Replace(" ", ""); tbLogin.TextChanged += (o, e) => Validate(); tbName.TextChanged += (o, e) => Validate(); btApply.Click += (o, e) => { user.Name = tbName.Text.Trim(); user.Login = tbLogin.Text; OkClicked?.Invoke(); }; tbLogin.Text = user.Login; tbName.Text = user.Name; Validate(); }
public void AfterClose() { int IndentSize; IndentSize = System.Diagnostics.Debug.IndentSize; System.Diagnostics.Debug.WriteLine(IndentSize); if (CloseReason == swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_Okay) { OkClicked?.Invoke(); CloseCommand?.Execute(null); } else { CloseCommand?.Execute(-1); } Closed?.Invoke(CloseReason); SldControls.ForEach(p => p.SldControlVisibility = false); this.Dispose(); }
public TextInputBox(string question) : base("TextInputBox") { var str = ""; X = Pos.Center(); Y = Pos.Center(); Width = Dim.Percent(40); Height = Dim.Percent(20); ColorScheme = Colors.Menu; lbl = new(question) { Width = Dim.Fill(), Y = 1, TextAlignment = TextAlignment.Centered }; input = new() { Width = Dim.Fill(), Y = 3 }; ok = new("OK") { X = Pos.Center(), Y = 5 }; ok.Clicked += () => { OkClicked?.Invoke(this, input.Text.ToString()); }; input.KeyUp += (k) => { if (k.KeyEvent.Key == Key.Enter) { OkClicked?.Invoke(this, input.Text.ToString()); } }; Add(lbl, input, ok); }
private void Ok_Clicked(object sender, EventArgs e) { OkClicked?.Invoke(); PopupNavigation.Instance.RemovePageAsync(this); }
private void btnOk_Click(object sender, RoutedEventArgs e) { ApplyChanges(); OkClicked?.Invoke(this, e); }
private void okRadButton_Click(object sender, RoutedEventArgs e) { OkClicked?.Invoke(); Close(); }
private void OnOkClicked(object sender, EventArgs e) { OkClicked?.Invoke(this, e); }
private void OKButton_Clicked(object sender, EventArgs e) { OkClicked?.Invoke(this, new AddHairLengthDialogEventArgs(mHairLengthControl.GetHairLength(), AddNewHairLength)); Navigation.PopPopupAsync(); }
/// <summary> /// Fires the ok clicked event. /// </summary> protected virtual void OnOkClicked() { OkClicked?.Invoke(this, EventArgs.Empty); }