public void Close() { Handler?.Dispose(); Dispose(); if (IsPlayList()) { CloseRequest?.Invoke(this, EventArgs.Empty); } else { //VideoViewから削除 VideoViewに無かったらスルーされる App.ViewModelRoot.MainContent.RemoveVideoView(this); } }
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); }
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); }
/// <summary> /// Request the Close event for the window. /// This will close the window. /// </summary> public void Close() { Dispose(); CloseRequest?.Invoke(this, EventArgs.Empty); }
protected void Close(bool?value) { CloseRequest?.Invoke(value); }
protected void OnCloseRequest() { CloseRequest?.Invoke(this); }
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); }
protected virtual void OnCloseRequest() { CloseRequest?.Invoke(this, EventArgs.Empty); }
private void _toolPane_CloseRequest(object sender, EventArgs e) { CloseRequest?.Invoke(this, null); }
private static void SetEventPropagation() { _core.SetCursorRequest += arg => SetCursorRequest?.Invoke(arg); _core.FocusRequest += () => FocusRequest?.Invoke(); _core.CloseRequest += () => CloseRequest?.Invoke(); }
protected void FireCloseRequest() { CloseRequest?.Invoke(this, null); }
protected void Close() => CloseRequest?.Invoke(this, EventArgs.Empty);
public virtual void Close() { CloseRequest?.Invoke(); }
private async void SignoutClick() { await _core.UserService.LogoutAsync(); CloseRequest?.Invoke(this, null); }
private void Close() { CloseRequest.Invoke(this, EventArgs.Empty); }
private void OnClosing(object sender, CancelEventArgs cancelEventArgs) { CloseRequest?.Invoke(sender, new CloseViewEvent()); }
public void Close() { CloseRequest?.Invoke(this, new EventArgs()); }
public Tab() { CloseCommand = new ActionCommand(p => CloseRequest?.Invoke(this, EventArgs.Empty)); }