public TabButton(string header, DeleteTab methodDeleteTab) { InitializeComponent(); TextBlockInTabButton.Text = header; this.methodDeleteTab = methodDeleteTab; }
public async Task <Unit> ExecuteAsync(DeleteTab command) { var query = new QueryObject(TabQueries.DeleteTab, command); await _repository.ExecuteAsync(query); ApplicationEvents.Raise(new TabDeleted(command.Id)); return(Unit.Value); }
private void Delete() { var result = MessageBox.Show("Are you sure you wish to delete this tab? This action cannot be undone.", null, MessageBoxButton.YesNo, MessageBoxImage.Exclamation); if (result != MessageBoxResult.Yes) { return; } Modified?.Invoke(this, ParentTab); DeleteTab?.Invoke(this, ParentTab); }
public MainWindow() { InitializeComponent(); #region Subscribe to delegates AnalyzerFileSystem.UpdateHandler += OutputtingDateForContentArea; Presenter.NewTabHandler += NewTab; methodDeleteTab = TabItem_Delete; #endregion OutputTreeElement(); #region Output for default tab NewTab(); #endregion }