Exemplo n.º 1
0
        private void UndoSelection()
        {
            MainWindow.arrayView.theSelection.selectedRectangles.Clear();
            SelectUndo s1 = new SelectUndo();

            foreach (SelectionRectangle nsr in selectionUndoInfo.Last().selectionState.selectedRectangles)
            {
                SelectionRectangle nsr1 = new SelectionRectangle(nsr.FirstSelectedNeuron, nsr.Height, nsr.Width);
                MainWindow.arrayView.theSelection.selectedRectangles.Add(nsr1);
            }
            selectionUndoInfo.RemoveAt(selectionUndoInfo.Count - 1);
        }
Exemplo n.º 2
0
        public void AddSelectionUndo()
        {
            SelectUndo s1 = new SelectUndo();

            s1.selectionState = new Selection();
            foreach (SelectionRectangle nsr in MainWindow.arrayView.theSelection.selectedRectangles)
            {
                SelectionRectangle nsr1 = new SelectionRectangle(nsr.FirstSelectedNeuron, nsr.Height, nsr.Width);
                s1.selectionState.selectedRectangles.Add(nsr1);
            }
            selectionUndoInfo.Add(s1);
        }