private async void Run_Click(object sender, RoutedEventArgs e) { contentDialog.CloseButtonText = ""; PleaseWait.Text = "Please wait for the task to finish..."; contentDialog.ShowAsync(); ProgressIndicator.IsActive = true; OutputLines.Add("------------------"); OutputLines.Add("Started: Task Install, Variant " + Variant.SelectedValue); if (!await RunGradleTask("install")) { OutputLines.Add("Failed"); TaskDisplay.Text = "Build Failed"; } else { OutputLines.Add("Succeeded"); TaskDisplay.Text = "Build Succeeded"; } TaskDisplay.Text = "Launching on Control Hub..."; OutputLines.Add("Launching..."); var cmd = Command.Run(ASDKLoc.Text + "\\adb.exe", new string[] { "shell", "monkey", "-p", "com.qualcomm.ftcrobotcontroller", "1" }, options => options.DisposeOnExit()); cmd.StandardOutput.PipeToAsync(OutputLines); await cmd.Task; PleaseWait.Text = "Task finished."; contentDialog.CloseButtonText = "Close"; ProgressIndicator.IsActive = false; OutputLines.Add("Note: This tool cannot yet start Logcat."); OutputLines.Add("See madelson/MedallionShell#86 for more info."); //await Command.Run(@"C:\Windows\System32\conhost.exe", new string[] { ASDKLoc.Text + "\\adb.exe", "logcat" }, options => options.DisposeOnExit()).Task; OutputLines.Add("Finished!"); }
public MainViewModelSample() { OutputLines.Add("サンプル文字列1"); OutputLines.Add("サンプル文字列2"); OutputLines.Add("サンプル文字列3"); OutputLines.Add("サンプル文字列4"); }
public override void Output(EventSink.OutputType type, string format, params object[] p) { if (type == EventSink.OutputType.Debug && ShowDebugEvents.isFalse()) { return; } var outputLine = "{0} : {1}".format(type, format.format(p)); OutputLines.AppendLine(outputLine); "[CatNetEvents] {0}".info(outputLine); }
/// <summary> /// Pulses the PS/2 controller's output line. /// </summary> /// <param name="aPulseResetLine">The reset line.</param> /// <param name="aPulseSecondLine">The second line.</param> /// <param name="aPulseThirdLine">The third line.</param> /// <param name="aPulseFourthLine">The fourth line.</param> private void PulseOutputLine(OutputLines aOutputLines) { byte xMask = (byte)aOutputLines; mDebugger.SendInternal("(PS/2 Controller) Pulsing output line:"); mDebugger.SendInternal("Mask:"); mDebugger.SendInternal(xMask); WaitToWrite(); IO.Command.Byte = (byte)((byte)Command.PulseOutputLineBase | xMask); mDebugger.SendInternal("Output line pulsed."); }
private async void Build_Click(object sender, RoutedEventArgs e) { contentDialog.CloseButtonText = ""; PleaseWait.Text = "Please wait for the task to finish..."; contentDialog.ShowAsync(); ProgressIndicator.IsActive = true; OutputLines.Add("------------------"); OutputLines.Add("Started: Task Build, Variant " + Variant.SelectedValue); if (!await RunGradleTask("assemble")) { OutputLines.Add("Build Failed"); TaskDisplay.Text = "Build Failed"; } else { OutputLines.Add("Build Succeeded"); TaskDisplay.Text = "Build Succeeded"; } PleaseWait.Text = "Task finished."; contentDialog.CloseButtonText = "Close"; ProgressIndicator.IsActive = false; }
public void WriteLine(string text, Category category) { var line = new Tuple <string, Category>(text, category); OutputLines.Add(line); }
public bool HasOutput(string line) { return(OutputLines.Contains(line)); }
public void AddCMYKText(string text, string fontfam, double x, double y1, double height, double c, double m, double y, double k) { OutputLines.Add(String.Format("<text font-family=\"{0}\" font-size=\"{1}\" x=\"{2}\" y=\"{3}\" fill=\"{5}\">{4}</text>", fontfam, D(height), D(x), D(y1), text, GetCMYK(c, m, y, k))); }
public void FillCircleCMYK(double x1, double y1, double radius, double c, double m, double y, double k) { OutputLines.Add(String.Format("<circle cx=\"{0}\" cy=\"{1}\" r=\"{2}\" fill=\"{3}\"/>", D(x1), D(y1), D(radius), GetCMYK(c, m, y, k))); }
public void FillRectangleCMYK(double x1, double y1, double width, double height, double c, double m, double y, double k) { OutputLines.Add(String.Format("<rect x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\" fill=\"{4}\"/>", D(x1), D(y1), D(width), D(height), GetCMYK(c, m, y, k))); }
/// <summary> /// callback to Update the Display from the Appium Engine's output data event /// </summary> /// <param name="output">output string to display</param> private void _OutputDataReceived(string output) { OutputLines.Add(output); }
/// <summary>Clear the output string</summary> private void _ExecuteClearOutput() { OutputLines.Clear(); }