void vm_NewTemplateNotice(object sender, SimpleMvvmToolkit.NotificationEventArgs<bool, Core.Model.Setting> e)
        {
            bool isDone = false;
            var vm = new Setting();
            var win = new NewSettingsWindow();
            win.DataContext = vm;
            win.btnSave.Click += (ss, ee) =>
            {
                isDone = true;
                win.Close();
                e.Completed(vm);
            };

            win.ShowDialog();

            if (!isDone)
            {
                e.Completed(null);
            }
        }
Beispiel #2
0
        void vm_NewTemplateNotice(object sender, SimpleMvvmToolkit.NotificationEventArgs <bool, Core.Model.Setting> e)
        {
            bool isDone = false;
            var  vm     = new Setting();
            var  win    = new NewSettingsWindow();

            win.DataContext    = vm;
            win.btnSave.Click += (ss, ee) =>
            {
                isDone = true;
                win.Close();
                e.Completed(vm);
            };

            win.ShowDialog();

            if (!isDone)
            {
                e.Completed(null);
            }
        }