Esempio n. 1
0
 public ViewInjectionManager(ViewInjectionMode mode)
 {
     Mode           = mode;
     ServiceManager = new ServiceManagerHelper();
     QueueManager   = new QueueManagerHelper(this);
     Messenger      = new MessengerEx();
 }
Esempio n. 2
0
        public void Initialize()
        {
            mainUI              = new MainUI();
            mainUI.FormClosing += Tb_FormClosing;

            MessengerEx.Register <TestSequence>(TestEngineMessages.TestSequenceLoaded, OnTestSequenceLoaded);
            MessengerEx.Register <string>(TestEngineMessages.GetDebugLog, OnGetDebugLog);
            MessengerEx.Register <string>(TestEngineMessages.GetWarning, OnGetWarning);
            MessengerEx.Register <string>(TestEngineMessages.GetError, OnGetError);
        }
Esempio n. 3
0
        public void Initialize()
        {
            te = new TestEngine();
            te.LoadStationConfig();
            te.LoadGlobalVariables();

            MessengerEx.Register <string>(TestEngineMessages.LoadTestSequence, OnLoadTestSequence);
            MessengerEx.Register(TestEngineMessages.StationConfigChanged, OnStationCfgChanged);
            MessengerEx.Register(TestEngineMessages.StartTest, OnStartTest);
        }
Esempio n. 4
0
        public void LoadTestSequence(string sequenceFilePath)
        {
            testEngineLogger.Log(string.Format("Loading TestSequence: {0}", sequenceFilePath), "LoadTestSequence");

            testSequence = XmlConfigHelper.Load <TestSequence>(sequenceFilePath);
            testModules.Clear();
            testModuleMgr.UnloadTestModules();
            // fetch used test modules of the sequence
            foreach (var item in testSequence.TestSteps)
            {
                if (!testModules.Contains(item.AssemblyName))
                {
                    testModules.Add(item.AssemblyName);
                }
            }
            LoadTestModules();
            MessengerEx.Notify(TestEngineMessages.TestSequenceLoaded, testSequence);
            testEngineLogger.Log("Success", "LoadTestSequence");
        }
Esempio n. 5
0
        private void toolStripMenuItem_LoadTestSequence_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.InitialDirectory = AppDomain.CurrentDomain.BaseDirectory;
            ofd.Filter           = "xml files (*.xml)|*.xml|seq files (*.seq)|*.seq";
            ofd.RestoreDirectory = true;
            string seqPath = string.Empty;

            if (ofd.ShowDialog() == DialogResult.OK)
            {
                seqPath = ofd.FileName;
            }
            else
            {
                return;
            }

            MessengerEx.Notify(TestEngineMessages.LoadTestSequence, seqPath);
        }
Esempio n. 6
0
        public static void StartUp()
        {
            if (plugMgr.Plugins.Count == 0)
            {
                throw new Exception("No Plugins loaded.");
            }

            var        appConfig     = ConfigurationManager.OpenExeConfiguration(Assembly.GetExecutingAssembly().Location);
            string     startupPlugin = appConfig.AppSettings.Settings["StartupPlugin"].Value;//ConfigurationManager.AppSettings["StartupPlugin"];
            PluginInfo pi            = plugMgr[startupPlugin];

            if (pi == null)
            {
                throw new Exception(string.Format("Not find startup Plugin:{0}", startupPlugin));
            }
            pi.Instance.Start();
            MessengerEx.Register(GolbalMessages.MainAppExit, OnMainAppExit);

            //WindowHide(Console.Title);

            Application.EnableVisualStyles();
            Application.Run();
        }
Esempio n. 7
0
 void debugLogger_LogingDebug(object sender, Definitions.LogEventArguments e)
 {
     MessengerEx.Notify(TestEngineMessages.GetDebugLog, e.LogContent);
 }
Esempio n. 8
0
 private void Tb_FormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e)
 {
     MessengerEx.Notify(GolbalMessages.MainAppExit);
 }
Esempio n. 9
0
 void stationsettingsPanel_FormClosing(object sender, FormClosingEventArgs e)
 {
     MessengerEx.Notify(TestEngineMessages.StationConfigChanged);
 }
Esempio n. 10
0
 private void button_Start_Click(object sender, EventArgs e)
 {
     MessengerEx.Notify(TestEngineMessages.StartTest);
 }