} // end of Copy() /// <summary> /// Paste the contents of the cut/paste buffer into the brain. /// </summary> public void Paste() { // Anything there? if (ReflexPanel.CutPasteBuffer == null || ReflexPanel.CutPasteBuffer.Count == 0) { return; } // We want to paste the reflexs bottom up into the current position. This // moves the current reflex and any subsequent ones down. Editor editor = InGame.inGame.Editor; ReflexPanel panel = editor.ActivePanel; for (int i = ReflexPanel.CutPasteBuffer.Count - 1; i >= 0; i--) { panel.InsertReflex(); // The newly inserted panel should have become the active one. panel = editor.ActivePanel; // Paste the cut/paste code into this new panel and tell it to rebuild. panel.Reflex.Paste(ReflexPanel.CutPasteBuffer[i]); panel.AnimatePanelIndent(true); panel.uiRebuild = true; } // Update block with info from cut/paste buffer. Size = ReflexPanel.CutPasteBuffer.Count; OriginalIndent = ReflexPanel.CutPasteBuffer[0].Indentation; // Ensure indent is correct. ValidateIndent(); } // end of Paste()
} // end of MoveReflex() public void InsertReflex(Object sender, EventArgs args) { ReflexPanel parentPanel = this.parent as ReflexPanel; parentPanel.InsertReflex(); }