public ViewInjectionManager(ViewInjectionMode mode) { Mode = mode; ServiceManager = new ServiceManagerHelper(); QueueManager = new QueueManagerHelper(this); Messenger = new MessengerEx(); }
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); }
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); }
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"); }
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); }
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(); }
void debugLogger_LogingDebug(object sender, Definitions.LogEventArguments e) { MessengerEx.Notify(TestEngineMessages.GetDebugLog, e.LogContent); }
private void Tb_FormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e) { MessengerEx.Notify(GolbalMessages.MainAppExit); }
void stationsettingsPanel_FormClosing(object sender, FormClosingEventArgs e) { MessengerEx.Notify(TestEngineMessages.StationConfigChanged); }
private void button_Start_Click(object sender, EventArgs e) { MessengerEx.Notify(TestEngineMessages.StartTest); }