public MainForm(string[] args) { InitializeComponent(); app = new MainApplication(args); IConfig cfg = app.ConfigSource.Configs["PeerInfo"]; if (cfg != null) { peerName = cfg.Get("PeerName", "NoNamePeer"); peerDescription = cfg.Get("PeerDescription", "A generic peer description"); } this.Text = "Main Application for " + peerName + " : " + peerDescription; OnTraceOn(null, null); // Log an info level message if (log.IsDebugEnabled) { System.Threading.Thread.CurrentThread.Name = "Main(" + System.Threading.Thread.CurrentThread.ManagedThreadId + ")"; log.Debug("Tests Server Start"); } // Write output to the file and to the console screen. if (log.IsInfoEnabled) log.Info("Welcome to the Sxta Test Kit !"); if (rtiAmbassador == null) rtiAmbassador = new XrtiExecutiveAmbassador(app.ConfigSource); OnLoadPlugins(); showRightToLeft.Checked = (RightToLeft == RightToLeft.Yes); RightToLeftLayout = showRightToLeft.Checked; m_objectModelExplorer = new ObjectModelExplorer(rtiAmbassador.descriptorManager); m_objectModelExplorer.PropertyGrid = m_propertyWindow; m_objectModelExplorer.RightToLeftLayout = RightToLeftLayout; m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString); }
public void Init() { app = new MainApplication(new string[2] { @"-config=Resources\TestConfig1.xml", @"-dialog=false" }); // Log Debug level message if (log.IsDebugEnabled) log.Debug("Test " + System.Reflection.MethodBase.GetCurrentMethod().DeclaringType + " Start"); channelMngr = new ChannelsManager(); }
public void LogAndRtiInit() { app = new MainApplication(new string[] { "-dialog=false" }); FileInfo logFile = new System.IO.FileInfo("Log4Net.config"); if (logFile.Exists) { // Log4Net is configured using a DOMConfigurator. log4net.Config.XmlConfigurator.Configure(logFile); } else { // Set up a simple configuration that logs on the console. log4net.Config.BasicConfigurator.Configure(); } // Log an baseInfo level message if (log.IsDebugEnabled) { if (string.IsNullOrEmpty(System.Threading.Thread.CurrentThread.Name)) System.Threading.Thread.CurrentThread.Name = "Main(" + System.Threading.Thread.CurrentThread.ManagedThreadId + ")"; log.Debug(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType + " Tests Start"); } if (rtiAmbassador == null) rtiAmbassador = new XrtiExecutiveAmbassador(app.ConfigSource); }