示例#1
0
 /*
  * ----< Function > MainPage
  * ----< Description >
  * Program entry point, initializes the GUI and logger.
  * Also clears the API for usage during the current session.
  * ----< Description >
  * @Param None
  * @Return None
  */
 public MainPage()
 {
     this.InitializeComponent();
     API_Interface.TruncateTestFunctions(); // Will be used to remove any sort of misplaced data on the API side
     logger = new GuiLogger("Initializing Logger", ref this.Logger, ref this.logScrollViewer);
     logger.AddLogMessage("Initializing GUI");
 }
示例#2
0
        /*
         * ----< Function > Run_Test_Execution
         * ----< Description >
         * Clicking Run will take the testable items selected, send them to the harness
         * and wait for responses, both of which are handled asynchronously.
         * ----< Description >
         */
        private async void Run_Test_Execution(object sender, RoutedEventArgs e)
        {
            foreach (dllFunction func in functionsToHarness)
            {
                Debug.WriteLine("Sending Another");
                JObject jObject = JSONParser.dllFunctionToJSON(func);
                var     ID      = await API_Interface.PostTestFunctionAsync(jObject);

                logger.PostedTestFunctionLog(jObject, ID);
                Debug.WriteLine("Items in functionIDsSent: " + API_Interface.functionsIDsSent.Count());
            }
            API_Interface.GetResultsAsync(logger);
        }