Ejemplo n.º 1
0
        /// <summary>
        /// Make sure to poll tables when the form loads
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Form1_Load(object sender, System.EventArgs e)
        {
            // Startup
            Log.Write("Startup");

            // Register autoit
            Process.Start("regsvr32", "/s \"" + Application.StartupPath + "\\AutoItX3.dll\"");

            // Fix preferences
            fixPrefs();

            // Show loadframe
            LoadFrame lf = new LoadFrame();

            lf.Show();

            // Set our position and size
            lf.SetProgress(35);
            Rectangle pos = Settings.MainWindowPosition;

            Win32.SetWindowPos((int)this.Handle, (int)Win32.HWND.NOTOPMOST, pos.X, pos.Y, 0, 0, (uint)Win32.SWP.NOSIZE | (uint)Win32.SWP.NOOWNERZORDER);
            this.Height = pos.Height;
            this.Width  = pos.Width;

            // Load the table list column options
            lf.SetProgress(40);
            loadTableListColumnHeaders();

            // Poll for initial tables
            lf.SetProgress(60);
            pollTables_Tick(sender, e);

            // Set the global key hook
            lf.SetProgress(80);
            actHook          = new UserActivityHook();
            actHook.KeyDown += new KeyEventHandler(MyKeyDown);

            // Set reference
            lf.SetProgress(90);
            FormReference = this;

            // Start voice listener
            lf.SetProgress(100);
            InitializeVoiceCommands();

            // Close the load frame
            lf.Close();
            lf.Dispose();

            setTitleTimer.Enabled = true;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Make sure to poll tables when the form loads
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Form1_Load(object sender, System.EventArgs e)
        {
            // Startup
            Log.Write("Startup");

            // Register autoit
            Process.Start("regsvr32", "/s \"" + Application.StartupPath + "\\AutoItX3.dll\"");

            // Fix preferences
            fixPrefs();

            // Show loadframe
            LoadFrame lf = new LoadFrame();
            lf.Show();

            // Set our position and size
            lf.SetProgress(35);
            Rectangle pos = Settings.MainWindowPosition;

            Win32.SetWindowPos((int)this.Handle, (int)Win32.HWND.NOTOPMOST, pos.X, pos.Y, 0, 0, (uint)Win32.SWP.NOSIZE | (uint)Win32.SWP.NOOWNERZORDER);
            this.Height = pos.Height;
            this.Width = pos.Width;

            // Load the table list column options
            lf.SetProgress(40);
            loadTableListColumnHeaders();

            // Poll for initial tables
            lf.SetProgress(60);
            pollTables_Tick(sender, e);

            // Set the global key hook
            lf.SetProgress(80);
            actHook = new UserActivityHook();
            actHook.KeyDown += new KeyEventHandler(MyKeyDown);

            // Set reference
            lf.SetProgress(90);
            FormReference = this;

            // Start voice listener
            lf.SetProgress(100);
            InitializeVoiceCommands();

            // Close the load frame
            lf.Close();
            lf.Dispose();

            setTitleTimer.Enabled = true;
        }