コード例 #1
0
        public List <string> LoadAndExecuteControlHead(string pathDLL)
        {
            Queue <KeyValuePair <String, String> > testInfo             = new Queue <KeyValuePair <string, string> >();
            List <Dictionary <string, string> >    list_of_Dict_of_Logs = new List <Dictionary <string, string> >();
            List <string> logs_and_Path = new List <string>();

            testInfo = AppDomain.CurrentDomain.GetData("file_Data") as Queue <KeyValuePair <String, String> >;
            executor execute = new executor();

            Console.WriteLine("\n>> Looking up Directory: {0}, To Load TestDrivers.\n", pathDLL);
            " [[ Displaying Requirement 5 (can be verified from executor.cs -- lines 72-100 )]]".title('='); // Using the utilities.cs to print
            if (execute.LoadingTests(pathDLL, testInfo))                                                     // Loading Tests by call Executor
            {
                list_of_Dict_of_Logs = execute.run(testInfo, pathDLL);                                       // Running Test Drivers
            }
            else
            {
                Console.WriteLine("\n==================>>>>>   couldn't load tests");
            }


            // after everything is done, the loader will ask the logger to give back the location where logs are created..
            Logger.Logger logObj = new Logger.Logger();

            string logsPath = logObj.sendLogsDirectoryToLoader();

            logs_and_Path.Add(logsPath);
            for (int i = 0; i < list_of_Dict_of_Logs.Count; i++)
            {
                var dictToString = string.Join("; ", list_of_Dict_of_Logs[i].Select(p => string.Format("{0}, {1}", p.Key, p.Value)));
                logs_and_Path.Add(dictToString);
            }
            return(logs_and_Path);
        }
コード例 #2
0
        public ActionResult DeleteConfirmed(int id)
        {
            executor executor = db.executor.Find(id);

            db.executor.Remove(executor);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #3
0
 public ActionResult Edit([Bind(Include = "id,FIO,job_position")] executor executor)
 {
     if (ModelState.IsValid)
     {
         db.Entry(executor).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(executor));
 }
コード例 #4
0
        public ActionResult Create([Bind(Include = "id,FIO,job_position")] executor executor)
        {
            if (ModelState.IsValid)
            {
                db.executor.Add(executor);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(executor));
        }
コード例 #5
0
        // GET: executors/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            executor executor = db.executor.Find(id);

            if (executor == null)
            {
                return(HttpNotFound());
            }
            return(View(executor));
        }
コード例 #6
0
ファイル: Script.cs プロジェクト: mj3cheun/SE-Avionics
    public void executeInstructions()
    {
        for (int i = 0; i < displayPanels.Count; i++)
        {
            IMyTextPanel panel = (IMyTextPanel)displayPanels[i];
            string privateText = panel.GetPrivateText();
            executor thisDisplay = new executor();
            panel.WritePublicText(thisDisplay.executeInstruction(privateText), false);

            panel.ShowPublicTextOnScreen();
            panel.UpdateVisual();
            thisDisplay = null;
        }
    }