Ejemplo n.º 1
0
        public void Close()
        {
            Handler?.Dispose();
            Dispose();

            if (IsPlayList())
            {
                CloseRequest?.Invoke(this, EventArgs.Empty);
            }
            else
            {
                //VideoViewから削除 VideoViewに無かったらスルーされる
                App.ViewModelRoot.MainContent.RemoveVideoView(this);
            }
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 6
0
 public void Close(bool?result = null)
 {
     CloseRequest?.Invoke(this, result);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 8
0
 protected void Close(bool?value)
 {
     CloseRequest?.Invoke(value);
 }
Ejemplo n.º 9
0
 protected void OnCloseRequest()
 {
     CloseRequest?.Invoke(this);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 12
0
 protected virtual void OnCloseRequest()
 {
     CloseRequest?.Invoke(this, EventArgs.Empty);
 }
Ejemplo n.º 13
0
 private void _toolPane_CloseRequest(object sender, EventArgs e)
 {
     CloseRequest?.Invoke(this, null);
 }
Ejemplo n.º 14
0
 private static void SetEventPropagation()
 {
     _core.SetCursorRequest += arg => SetCursorRequest?.Invoke(arg);
     _core.FocusRequest     += () => FocusRequest?.Invoke();
     _core.CloseRequest     += () => CloseRequest?.Invoke();
 }
Ejemplo n.º 15
0
 protected void FireCloseRequest()
 {
     CloseRequest?.Invoke(this, null);
 }
Ejemplo n.º 16
0
 protected void Close() => CloseRequest?.Invoke(this, EventArgs.Empty);
Ejemplo n.º 17
0
 public virtual void Close()
 {
     CloseRequest?.Invoke();
 }
Ejemplo n.º 18
0
        private async void SignoutClick()
        {
            await _core.UserService.LogoutAsync();

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