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"));
        }
示例#2
0
        private void InitializeMOG()
        {
            // Check to see if we can init the server
            if (!MOG_Main.Init_Client("", "Remote Server Manager"))
            {
                // Inform the user that we failed to connect and will continue in an offline mode
                string message = "Failed to connect to the MOG Server.\n" +
                                 "Please be advised that you will most likely experience limited functionality during this session.";
                MOG_Report.ReportMessage("Connection Failed", message, "", MOG_ALERT_LEVEL.ALERT);
            }

            RemoteServerSettings.Initialize();
        }
示例#3
0
        public PriviledgesForm()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.OldWidth = this.Width;
            MOG_Main.Init_Client("");
            mMogProcess = new Thread(new ThreadStart(this.MogProcess));
            mMogProcess.Start();
            MOG_ControllerProject.LoginProject("BlackJupiter", "CURRENT");
            MOG_ControllerProject.LoginUser("Admin");
            mPriviledges = MOG_ControllerProject.GetPriviledges();

            InitializeMainTreeView(mPriviledges);
        }