예제 #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();
        }
예제 #2
0
        public void SelectBranchExternal(bool next)
        {
            if (SelectedBranch == null)
            {
                BranchView.SelectRow(Movie.CurrentBranch, true);
                BranchView.Refresh();
                return;
            }
            int sel = BranchView.SelectedRows.First();

            if (next)
            {
                if (GetBranch(sel + 1) != null)
                {
                    BranchView.SelectRow(sel, false);
                    BranchView.SelectRow(sel + 1, true);
                }
            }
            else             // previous
            {
                if (GetBranch(sel - 1) != null)
                {
                    BranchView.SelectRow(sel, false);
                    BranchView.SelectRow(sel - 1, true);
                }
            }
            BranchView.Refresh();
        }
예제 #3
0
 private void LoadSelectedBranch()
 {
     if (SelectedBranch != null)
     {
         CurrentBranch = BranchView.SelectedRows.First();
         BranchView.Refresh();
         LoadBranch(SelectedBranch);
     }
 }
예제 #4
0
        public void Branch()
        {
            TasBranch branch = CreateBranch();

            Movie.AddBranch(branch);
            BranchView.RowCount = Movie.BranchCount;
            CurrentBranch       = Movie.BranchCount - 1;
            BranchView.Refresh();
            Tastudio.RefreshDialog();
        }
예제 #5
0
 private void BranchView_MouseMove(object sender, MouseEventArgs e)
 {
     if (BranchView.CurrentCell?.RowIndex == null || BranchView.CurrentCell.Column == null)
     {
         Screenshot.FadeOut();
     }
     else if (BranchView.CurrentCell.Column.Name == BranchNumberColumnName)
     {
         BranchView.Refresh();
     }
 }
예제 #6
0
 private void LoadSelectedBranch()
 {
     if (SelectedBranch != null)
     {
         int index = BranchView.SelectedRows.First();
         Movie.CurrentBranch = index;
         LoadBranch(SelectedBranch);
         BranchView.Refresh();
         GlobalWin.OSD.AddMessage("Loaded branch " + Movie.CurrentBranch.ToString());
     }
 }
예제 #7
0
 private void BranchView_MouseMove(object sender, MouseEventArgs e)
 {
     if (BranchView.CurrentCell == null || !BranchView.CurrentCell.RowIndex.HasValue || BranchView.CurrentCell.Column == null)
     {
         CloseScreenShotPopUp();
     }
     else if (BranchView.CurrentCell.Column.Name == BranchNumberColumnName)
     {
         BranchView.Refresh();
     }
 }
예제 #8
0
 private void BranchView_MouseMove(object sender, MouseEventArgs e)
 {
     if (BranchView.CurrentCell == null || !BranchView.CurrentCell.RowIndex.HasValue || BranchView.CurrentCell.Column == null)
     {
         //not sure if we need to explicitly hide the screenshot here as well
     }
     else if (BranchView.CurrentCell.Column.Name == BranchNumberColumnName)
     {
         BranchView.Refresh();
     }
 }
예제 #9
0
        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();
        }
 public void SelectBranchExternal(int slot)
 {
     if (GetBranch(slot) != null)
     {
         BranchView.SelectRow(slot, true);
         BranchView.Refresh();
     }
     else
     {
         NonExistentBranchMessage(slot);
     }
 }
예제 #11
0
 private void LoadSelectedBranch()
 {
     if (SelectedBranch != null)
     {
         int index = BranchView.SelectedRows.First();
         //if (Movie.CurrentBranch == index) // if the current branch was edited, we should allow loading it. some day there might be a proper check
         //	return;
         Movie.CurrentBranch = index;
         LoadBranch(SelectedBranch);
         BranchView.Refresh();
         GlobalWin.OSD.AddMessage("Loaded branch " + Movie.CurrentBranch.ToString());
     }
 }
예제 #12
0
        public void SelectBranchExternal(int slot)
        {
            if (Tastudio.FloatEditingMode)
            {
                return;
            }

            if (GetBranch(slot) != null)
            {
                BranchView.SelectRow(slot, true);
                BranchView.Refresh();
            }
            else
            {
                NonExistentBranchMessage(slot);
            }
        }
예제 #13
0
        private void RemoveBranchContextMenuItem_Click(object sender, EventArgs e)
        {
            if (SelectedBranch != null)
            {
                int index = BranchView.SelectedRows.First();
                if (index == CurrentBranch)
                {
                    CurrentBranch = -1;
                }

                Movie.RemoveBranch(SelectedBranch);
                BranchView.RowCount = Movie.BranchCount;

                if (index == BranchView.SelectedRows.FirstOrDefault())
                {
                    BranchView.ClearSelectedRows();
                }

                BranchView.Refresh();
            }
        }
예제 #14
0
 private void UpdateBranch(TasBranch branch)
 {
     Movie.UpdateBranch(branch, CreateBranch());
     BranchView.Refresh();
 }
예제 #15
0
 public void Restart()
 {
     BranchView.DeselectAll();
     BranchView.RowCount = Movie.BranchCount;
     BranchView.Refresh();
 }
예제 #16
0
 public void UpdateValues()
 {
     BranchView.RowCount = Movie.BranchCount;
     BranchView.Refresh();
 }
예제 #17
0
 public void AddBranchExternal()
 {
     AddBranchToolStripMenuItem_Click(null, null);
     BranchView.SelectRow(Movie.CurrentBranch, true);
     BranchView.Refresh();
 }