public void InitializeSystem(SplashForm SplashScreen) { // Initialize the .Net style menus SplashScreen.updateSplash("Initializing menu system...", 10); // Initialize MOG SplashScreen.updateSplash("Connecting MOG SQL\\Server...", 40); try { // Check to see if we can init the server? if (!MOG_Main.Init_Client("", "Event Viewer")) { string message = "Was unable to initialize because there is another viewer already running."; throw(new Exception(message)); } criticalEventViewerControl1.RefreshEvents(); } catch (Exception e) { string message = e.Message + "\n" + e.StackTrace; throw(new Exception(message)); } MOG_Prompt.ClientForm = this; SplashScreen.updateSplash("Connected...", 100); SplashScreen.updateSplash("Done", 1); SplashScreen.mInitializationComplete = true; MogUtils_Settings.CreateSettings(Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "EventViewerPrefs.ini")); }
public MainForm() { string PrefsLocation = String.Concat(Environment.CurrentDirectory, "\\MOGPrefs.ini"); MogUtils_Settings.CreateSettings(PrefsLocation); InitializeComponent(); InitializeMOG(); }