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 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();
        }
 private void LoadSelectedBranch()
 {
     if (SelectedBranch != null)
     {
         CurrentBranch = BranchView.SelectedRows.First();
         BranchView.Refresh();
         LoadBranch(SelectedBranch);
     }
 }
        public void Branch()
        {
            TasBranch branch = CreateBranch();

            Movie.AddBranch(branch);
            BranchView.RowCount = Movie.BranchCount;
            CurrentBranch       = Movie.BranchCount - 1;
            BranchView.Refresh();
            Tastudio.RefreshDialog();
        }
Beispiel #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();
     }
 }
Beispiel #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());
     }
 }
 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();
     }
 }
Beispiel #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();
     }
 }
        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);
     }
 }
 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());
     }
 }
        public void SelectBranchExternal(int slot)
        {
            if (Tastudio.FloatEditingMode)
            {
                return;
            }

            if (GetBranch(slot) != null)
            {
                BranchView.SelectRow(slot, true);
                BranchView.Refresh();
            }
            else
            {
                NonExistentBranchMessage(slot);
            }
        }
        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();
            }
        }
 private void UpdateBranch(TasBranch branch)
 {
     Movie.UpdateBranch(branch, CreateBranch());
     BranchView.Refresh();
 }
 public void Restart()
 {
     BranchView.DeselectAll();
     BranchView.RowCount = Movie.BranchCount;
     BranchView.Refresh();
 }
 public void UpdateValues()
 {
     BranchView.RowCount = Movie.BranchCount;
     BranchView.Refresh();
 }
 public void AddBranchExternal()
 {
     AddBranchToolStripMenuItem_Click(null, null);
     BranchView.SelectRow(Movie.CurrentBranch, true);
     BranchView.Refresh();
 }