Exemple #1
0
        public void Close()
        {
            Handler?.Dispose();
            Dispose();

            if (IsPlayList())
            {
                CloseRequest?.Invoke(this, EventArgs.Empty);
            }
            else
            {
                //VideoViewから削除 VideoViewに無かったらスルーされる
                App.ViewModelRoot.MainContent.RemoveVideoView(this);
            }
        }
Exemple #2
0
 public SettingsModel()
 {
     SaveCommand = new RelayCommand(_ =>
     {
         FiddlerApplication.Prefs.SetBoolPref(PreferenceNames.CHECK_FOR_UPDATED_PREF, CheckForUpdates);
         //saving - and changing - the settings should count as asking.
         FiddlerApplication.Prefs.SetBoolPref(PreferenceNames.ASK_CHECK_FOR_UPDATES_PREF, true);
         CloseRequest?.Invoke();
     });
     CancelCommand = new RelayCommand(_ =>
     {
         CloseRequest?.Invoke();
     });
     CheckForUpdates = FiddlerApplication.Prefs.GetBoolPref(PreferenceNames.CHECK_FOR_UPDATED_PREF, false);
 }
Exemple #3
0
        private void unlockClick(string Password)
        {
            WrongPassBlockVisibility = Visibility.Hidden;

            if (Password != _core.UserService.User.Password)
            {
                WrongPassBlockVisibility = Visibility.Visible;
                OnPropertyChanged(nameof(WrongPassBlockVisibility));
                //if (Password.Length != 4)
                //{
                //}
                return;
            }
            OnPropertyChanged(nameof(WrongPassBlockVisibility));
            CloseRequest?.Invoke(this, null);
        }
        private void SaveDocumentation(object obj)
        {
            if (DocumentationText.Trim() == "")
            {
                MessageBox.Show("Documentation can't be empty.");
                return;
            }

            if (_existingDocumentation)
            {
                Result = AddDocumentationResult.Save;
                CloseRequest?.Invoke();
                return;
            }

            var newDocFragment = new DocumentationFragment()
            {
                Documentation = DocumentationText,
                Selection     = this._selection,
            };

            try
            {
                string filepath = this._documentPath + Consts.CODY_DOCS_EXTENSION;
                DocumentationFileHandler.AddDocumentationFragment(newDocFragment, filepath);
                MessageBox.Show("Documentation added successfully.");
                EventAggregator.SendMessage <DocumentationAddedEvent>(
                    new DocumentationAddedEvent()
                {
                    Filepath = filepath,
                    DocumentationFragment = newDocFragment
                });
                Result = AddDocumentationResult.Save;
                CloseRequest?.Invoke();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Documentation add failed. Exception: " + ex.ToString());
            }
        }
 private void Deployment(object obj)
 {
     try
     {
         OutputWindowHelper.Log("Deployment Start..");
         CrmServiceClient  client = GetConnection(SelectedConfig);
         AssemblyLoaderCrm loader = new AssemblyLoaderCrm(new OutputLog(), GetPath(SelectedConfig.Path), client, SelectedConfig.IsolationMode, SelectedConfig.SourceType);
         loader.Run();
         _configReader.Save(Configs.ToDictionary(k => k.Name, v => (IConfigItem)v));
     }
     catch (Exception ex)
     {
         OutputWindowHelper.Log(ex.Message);
         OutputWindowHelper.Log(ex.ToString());
         throw;
     }
     finally
     {
         OutputWindowHelper.Log("Deployment Stop..");
         CloseRequest?.Invoke(false);
     }
 }
 public void Close(bool?result = null)
 {
     CloseRequest?.Invoke(this, result);
 }
Exemple #7
0
 /// <summary>
 /// Request the Close event for the window.
 /// This will close the window.
 /// </summary>
 public void Close()
 {
     Dispose();
     CloseRequest?.Invoke(this, EventArgs.Empty);
 }
Exemple #8
0
 protected void Close(bool?value)
 {
     CloseRequest?.Invoke(value);
 }
Exemple #9
0
 protected void OnCloseRequest()
 {
     CloseRequest?.Invoke(this);
 }
Exemple #10
0
 private void CloseButton_Click(object sender, RoutedEventArgs e)
 {
     CloseRequest?.Invoke(this, EventArgs.Empty);
 }
 private void SaveAndClose(object obj)
 {
     _configReader.Save(Configs.ToDictionary(k => k.Name, v => (IConfigItem)v));
     CloseRequest?.Invoke(false);
 }
Exemple #12
0
 protected virtual void OnCloseRequest()
 {
     CloseRequest?.Invoke(this, EventArgs.Empty);
 }
Exemple #13
0
 private void _toolPane_CloseRequest(object sender, EventArgs e)
 {
     CloseRequest?.Invoke(this, null);
 }
Exemple #14
0
 private static void SetEventPropagation()
 {
     _core.SetCursorRequest += arg => SetCursorRequest?.Invoke(arg);
     _core.FocusRequest     += () => FocusRequest?.Invoke();
     _core.CloseRequest     += () => CloseRequest?.Invoke();
 }
Exemple #15
0
 protected void FireCloseRequest()
 {
     CloseRequest?.Invoke(this, null);
 }
Exemple #16
0
 protected void Close() => CloseRequest?.Invoke(this, EventArgs.Empty);
 public virtual void Close()
 {
     CloseRequest?.Invoke();
 }
Exemple #18
0
        private async void SignoutClick()
        {
            await _core.UserService.LogoutAsync();

            CloseRequest?.Invoke(this, null);
        }
 private void Close()
 {
     CloseRequest.Invoke(this, EventArgs.Empty);
 }
Exemple #20
0
 private void OnClosing(object sender, CancelEventArgs cancelEventArgs)
 {
     CloseRequest?.Invoke(sender, new CloseViewEvent());
 }
Exemple #21
0
 public void Close()
 {
     CloseRequest?.Invoke(this, new EventArgs());
 }
Exemple #22
0
 public Tab()
 {
     CloseCommand = new ActionCommand(p => CloseRequest?.Invoke(this, EventArgs.Empty));
 }