Esempio n. 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();
        }
Esempio n. 2
0
 public void OnOkCallback()
 {
     if (ConfirmLoading)
     {
         ShowLoading();
     }
     OnOk?.Invoke(this);
 }
Esempio n. 3
0
        private void CloseFn(string output = null)
        {
            if (output != null && output.Length > 0)
            {
                OnOk?.Invoke(output);
            }

            Close();
        }
Esempio n. 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.");
     }
 }
Esempio n. 5
0
        public InputDialogViewModel()
        {
            DialogOk = new Command(() =>
            {
                OnOk?.Invoke(this, null);
            });

            DialogCancel = new Command(() =>
            {
                OnCancel?.Invoke(this, null);
            });
        }
Esempio n. 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);
            };
        }
Esempio n. 7
0
 private void _ok(object obj)
 {
     OnOk?.Invoke(this, EventArgs.Empty);
 }
 protected virtual bool CanOK(object parameter)
 {
     return(IsModified && OnOk?.Invoke(this) != false);
 }
Esempio n. 9
0
 private void _ok(object obj)
 {
     SaveToModel();
     OnOk?.Invoke(this, EventArgs.Empty);
 }
Esempio n. 10
0
 private void InvokeOnOk()
 {
     OnOk?.Invoke(this, EventArgs.Empty);
 }
Esempio n. 11
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     OnOk?.Invoke(this, new OnOkEventArgs(TopicName, Message));
 }