コード例 #1
0
 public void RunCommand(string command, DoneHandler done = null)
 {
     //AddText(command + "\r\n");
     this.runner.Run(command, () =>
     {
         done?.Invoke();
     });
 }
コード例 #2
0
        private static IEnumerator WaitWhileTrueCoroutine(Func <bool> condition, DoneHandler callback, float timeoutSeconds, bool reverseCondition = false)
        {
            while ((timeoutSeconds > 0) && (condition.Invoke() == !reverseCondition))
            {
                timeoutSeconds -= Time.deltaTime;
                yield return(null);
            }

            callback.Invoke(timeoutSeconds > 0);
        }
コード例 #3
0
 /// <summary>
 ///     Waits while condition is true
 ///     If timed out, callback will be invoked with false
 /// </summary>
 public static void WaitWhile(Func <bool> condiction, DoneHandler doneCallback, float timeoutSeconds)
 {
     CoroutineHelper.StartCoroutine(WaitWhileTrueCoroutine(condiction, doneCallback, timeoutSeconds));
 }
コード例 #4
0
 public DoneHandlerTests()
 {
     _subject = new DoneHandler(_taskRepository.Object);
 }
コード例 #5
0
 public static void WaitUntil(Func <bool> condiction, DoneHandler doneCallback, float timeoutSeconds)
 {
     _instance.StartCoroutine(WaitWhileTrueCoroutine(condiction, doneCallback, timeoutSeconds, true));
 }
コード例 #6
0
ファイル: MainWindow.cs プロジェクト: wwsmith2/mfpm
	public static void Destroy ()
	{
		if (_md != null)
		{
			_md.Response -= new ResponseHandler(RespHandler);

			_md.Destroy ();
			_md = null;
			_doneHandler = null;
		}
	}
コード例 #7
0
ファイル: MainWindow.cs プロジェクト: wwsmith2/mfpm
	public static void ShowModeless(string msg, DoneHandler dh)
	{
		_doneHandler = dh;
		_md = new MessageDialog (null, DialogFlags.DestroyWithParent, MessageType.Other, ButtonsType.Ok, msg);
		_md.Response += new ResponseHandler(RespHandler);
		_md.ShowNow();
		//_md.Run();
	}
コード例 #8
0
 public void RunInProject(string command, DoneHandler done = null)
 {
     this.RunCommand("\"cd /d " + package.ProjectPath + " && " + command + "\"", done);
 }
コード例 #9
0
 public void RunTruffleCommand(string command, DoneHandler done = null)
 {
     this.RunCommand("\"cd /d " + package.ProjectPath + " && .\\node_modules\\.bin\\truffle.cmd " + command + " --no-colors", done);
 }