diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs index c36c37904c..87ec201088 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs @@ -31,12 +31,6 @@ namespace BizHawk.Client.EmuHawk Load, Update, Text, Remove, None } - public Action LoadedCallback { get; set; } - - public Action SavedCallback { get; set; } - - public Action RemovedCallback { get; set; } - public TAStudio Tastudio { get; set; } public IDialogController DialogController => Tastudio.MainForm; @@ -227,7 +221,7 @@ namespace BizHawk.Client.EmuHawk private void AddBranchToolStripMenuItem_Click(object sender, EventArgs e) { Branch(); - SavedCallback?.Invoke(Branches.Count - 1); + Tastudio.BranchSavedCallback?.Invoke(Branches.Count - 1); Tastudio.MainForm.AddOnScreenMessage($"Added branch {Branches.Current + 1}"); } @@ -235,7 +229,7 @@ namespace BizHawk.Client.EmuHawk { Branch(); EditBranchTextPopUp(Branches.Current); - SavedCallback?.Invoke(Branches.Count - 1); + Tastudio.BranchSavedCallback?.Invoke(Branches.Count - 1); Tastudio.MainForm.AddOnScreenMessage($"Added branch {Branches.Current + 1}"); } @@ -258,7 +252,7 @@ namespace BizHawk.Client.EmuHawk if (!BranchView.AnyRowsSelected) return false; // why'd we do all that then var success = LoadSelectedBranch(); - LoadedCallback?.Invoke(BranchView.FirstSelectedRowIndex); + Tastudio.BranchLoadedCallback?.Invoke(BranchView.FirstSelectedRowIndex); return success; } @@ -285,7 +279,7 @@ namespace BizHawk.Client.EmuHawk Branches.Replace(SelectedBranch, branch); Movie.TasStateManager.Capture(Tastudio.Emulator.Frame, new BufferedStatable(branch.CoreData)); Tastudio.RefreshDialog(); - SavedCallback?.Invoke(Branches.Current); + Tastudio.BranchSavedCallback?.Invoke(Branches.Current); Tastudio.MainForm.AddOnScreenMessage($"Saved branch {Branches.Current + 1}"); } @@ -330,7 +324,7 @@ namespace BizHawk.Client.EmuHawk { _backupBranch = branches[index].Clone(); Branches.Remove(branches[index]); - RemovedCallback?.Invoke(index); + Tastudio.BranchRemovedCallback?.Invoke(index); Tastudio.MainForm.AddOnScreenMessage($"Removed branch {index + 1}"); if (index == Branches.Current) @@ -358,7 +352,7 @@ namespace BizHawk.Client.EmuHawk if (_branchUndo == BranchUndo.Load) { LoadBranch(_backupBranch); - LoadedCallback?.Invoke(Branches.IndexOf(_backupBranch)); + Tastudio.BranchLoadedCallback?.Invoke(Branches.IndexOf(_backupBranch)); Tastudio.MainForm.AddOnScreenMessage("Branch Load canceled"); } else if (_branchUndo == BranchUndo.Update) @@ -367,7 +361,7 @@ namespace BizHawk.Client.EmuHawk if (branch != null) { Branches.Replace(branch, _backupBranch); - SavedCallback?.Invoke(Branches.IndexOf(_backupBranch)); + Tastudio.BranchSavedCallback?.Invoke(Branches.IndexOf(_backupBranch)); Tastudio.MainForm.AddOnScreenMessage("Branch Update canceled"); } } @@ -385,7 +379,7 @@ namespace BizHawk.Client.EmuHawk { Branches.Add(_backupBranch); BranchView.RowCount = Branches.Count; - SavedCallback?.Invoke(Branches.IndexOf(_backupBranch)); + Tastudio.BranchSavedCallback?.Invoke(Branches.IndexOf(_backupBranch)); Tastudio.MainForm.AddOnScreenMessage("Branch Removal canceled"); } diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Callbacks.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Callbacks.cs index 637837fbac..a8de69c7d0 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Callbacks.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Callbacks.cs @@ -18,20 +18,5 @@ namespace BizHawk.Client.EmuHawk { GreenzoneInvalidatedCallback?.Invoke(index); } - - private void BranchLoaded(int index) - { - BranchLoadedCallback?.Invoke(index); - } - - private void BranchSaved(int index) - { - BranchSavedCallback?.Invoke(index); - } - - private void BranchRemoved(int index) - { - BranchRemovedCallback?.Invoke(index); - } } } diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Designer.cs index 801a96f4b2..16e8260844 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Designer.cs @@ -1101,11 +1101,8 @@ namespace BizHawk.Client.EmuHawk // BookMarkControl // this.BookMarkControl.Dock = System.Windows.Forms.DockStyle.Fill; - this.BookMarkControl.LoadedCallback = null; this.BookMarkControl.Location = new System.Drawing.Point(0, 0); this.BookMarkControl.Name = "BookMarkControl"; - this.BookMarkControl.RemovedCallback = null; - this.BookMarkControl.SavedCallback = null; this.BookMarkControl.Size = new System.Drawing.Size(200, 183); this.BookMarkControl.TabIndex = 8; this.BookMarkControl.Tastudio = null; diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs index ac7988b824..4f9f76a780 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs @@ -145,9 +145,6 @@ namespace BizHawk.Client.EmuHawk TasView.PointedCellChanged += TasView_PointedCellChanged; LastPositionFrame = -1; - BookMarkControl.LoadedCallback = BranchLoaded; - BookMarkControl.SavedCallback = BranchSaved; - BookMarkControl.RemovedCallback = BranchRemoved; TasView.MouseLeave += TAStudio_MouseLeave; TasView.CellHovered += (_, e) => {