Ejemplo n.º 1
0
        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!");
        }
Ejemplo n.º 2
0
 public MainViewModelSample()
 {
     OutputLines.Add("サンプル文字列1");
     OutputLines.Add("サンプル文字列2");
     OutputLines.Add("サンプル文字列3");
     OutputLines.Add("サンプル文字列4");
 }
Ejemplo n.º 3
0
 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);
        }
Ejemplo n.º 5
0
 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)));
 }
Ejemplo n.º 6
0
 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)));
 }
Ejemplo n.º 7
0
 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)));
 }
Ejemplo n.º 8
0
 /// <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);
 }