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

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

            DialogCancel = new Command(() =>
            {
                OnCancel?.Invoke(this, null);
            });
        }
Ejemplo 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);
            };
        }
Ejemplo 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);
 }
Ejemplo n.º 9
0
 private void _ok(object obj)
 {
     SaveToModel();
     OnOk?.Invoke(this, EventArgs.Empty);
 }
Ejemplo n.º 10
0
 private void InvokeOnOk()
 {
     OnOk?.Invoke(this, EventArgs.Empty);
 }
Ejemplo n.º 11
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     OnOk?.Invoke(this, new OnOkEventArgs(TopicName, Message));
 }