コード例 #1
0
ファイル: EditMenu.cs プロジェクト: onelifeonelover/cstd
 private void MenuEditCut_Click(object sender, System.EventArgs e)
 {
     if (AppWorkspace.ActiveDocumentWorkspace != null)
     {
         CutAction cutAction = new CutAction();
         cutAction.PerformAction(AppWorkspace.ActiveDocumentWorkspace);
     }
 }
コード例 #2
0
 /// <summary>
 /// Triggered when wire is cut
 /// </summary>
 /// <param name="wire">Which wire was cut?</param>
 public void WireIsCut(CutAction wire)
 {
     //Check if wire cut is not the selected wire
     if (wire != wires[selectedWire])
     {
         CheckFailedGame();
     }
     else
     {
         PlayRobotSFX(4);
         door.CloseDoor();
     }
     wasCut = true;
 }