Beispiel #1
0
        private void UndoBranchToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (_branchUndo == BranchUndo.Load)
            {
                LoadBranch(_backupBranch);
                CallLoadedCallback(Tastudio.CurrentTasMovie.Branches.IndexOf(_backupBranch));
                GlobalWin.OSD.AddMessage("Branch Load canceled");
            }
            else if (_branchUndo == BranchUndo.Update)
            {
                Movie.UpdateBranch(Movie.GetBranch(_backupBranch.UniqueIdentifier), _backupBranch);
                CallSavedCallback(Tastudio.CurrentTasMovie.Branches.IndexOf(_backupBranch));
                GlobalWin.OSD.AddMessage("Branch Update canceled");
            }
            else if (_branchUndo == BranchUndo.Text)
            {
                Movie.GetBranch(_backupBranch.UniqueIdentifier).UserText = _backupBranch.UserText;
                GlobalWin.OSD.AddMessage("Branch Text Edit canceled");
            }
            else if (_branchUndo == BranchUndo.Remove)
            {
                Movie.AddBranch(_backupBranch);
                BranchView.RowCount = Movie.BranchCount;
                CallSavedCallback(Tastudio.CurrentTasMovie.Branches.IndexOf(_backupBranch));
                GlobalWin.OSD.AddMessage("Branch Removal canceled");
            }

            UndoBranchToolStripMenuItem.Enabled = UndoBranchButton.Enabled = false;
            BranchView.Refresh();
            Tastudio.RefreshDialog();
        }
        public void Branch()
        {
            TasBranch branch = CreateBranch();

            Movie.AddBranch(branch);
            BranchView.RowCount = Movie.BranchCount;
            CurrentBranch       = Movie.BranchCount - 1;
            BranchView.Refresh();
            Tastudio.RefreshDialog();
        }
        public void Branch()
        {
            TasBranch branch = CreateBranch();

            Movie.NewBranchText = "";             // reset every time it's used
            Movie.AddBranch(branch);
            BranchView.RowCount = Movie.BranchCount;
            Movie.CurrentBranch = Movie.BranchCount - 1;
            BranchView.Refresh();
            Tastudio.RefreshDialog();
        }