Пример #1
0
        private void OkCreate(object sender, RoutedEventArgs e)
        {
            List <int> IDs = new List <int>();

            Common.UIElementCollectionToList(users.Children).Where((x) => ((CCheckUserItem)x).Selected).ToList().ForEach((x) => IDs.Add(((CCheckUserItem)x).User.ID));
            clin.Client.CreateGroup(groupName.Text, IDs.ToArray());
            OnOk?.Invoke();
        }
Пример #2
0
 public void OnOkCallback()
 {
     if (ConfirmLoading)
     {
         ShowLoading();
     }
     OnOk?.Invoke(this);
 }
Пример #3
0
        private void CloseFn(string output = null)
        {
            if (output != null && output.Length > 0)
            {
                OnOk?.Invoke(output);
            }

            Close();
        }
Пример #4
0
 /// <summary>
 /// Triggers on ok
 /// </summary>
 public void Ok(Object sender, EventArgs e)
 {
     if (Directory.Exists(ProjectLocation.Text))
     {
         OnOk?.Invoke(ProjectName.Text, ProjectLocation.Text);
         CloseForm();
     }
     else
     {
         ShowError("Location does not exist, or is invalid.\nPlease check the project save location and try again.");
     }
 }
Пример #5
0
        public InputDialogViewModel()
        {
            DialogOk = new Command(() =>
            {
                OnOk?.Invoke(this, null);
            });

            DialogCancel = new Command(() =>
            {
                OnCancel?.Invoke(this, null);
            });
        }
Пример #6
0
        protected override void OnInitDocument(Document document)
        {
            //add interactivity to the HTML.

            var okButton     = (HtmlButtonElement)document.GetElementById("ok");
            var cancelButton = (HtmlButtonElement)document.GetElementById("cancel");

            cancelButton.OnClick += arg =>
            {
                BeginInvoke(new Action(() => OnCancel?.Invoke(this, EventArgs.Empty)));
                return(true);
            };
            okButton.OnClick += arg =>
            {
                Login    = ((HtmlInputElement)document.GetElementById("username")).Value;
                Password = ((HtmlInputElement)document.GetElementById("password")).Value;
                BeginInvoke(new Action(() => OnOk?.Invoke(this, EventArgs.Empty)));
                return(true);
            };
        }
Пример #7
0
 private void _ok(object obj)
 {
     OnOk?.Invoke(this, EventArgs.Empty);
 }
 protected virtual bool CanOK(object parameter)
 {
     return(IsModified && OnOk?.Invoke(this) != false);
 }
Пример #9
0
 private void _ok(object obj)
 {
     SaveToModel();
     OnOk?.Invoke(this, EventArgs.Empty);
 }
Пример #10
0
 private void InvokeOnOk()
 {
     OnOk?.Invoke(this, EventArgs.Empty);
 }
Пример #11
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     OnOk?.Invoke(this, new OnOkEventArgs(TopicName, Message));
 }