예제 #1
0
        private void MainForm_Load(object sender, System.EventArgs e)
        {
            //this.myActivateHandler = new System.EventHandler(this.listViewMain_ItemActivate);
//            this.listViewMain.ItemActivate += this.myActivateHandler;

            // Add MainMenu if Pocket PC
            if (Symbol.Win32.PlatformType.IndexOf("PocketPC") != -1)
            {
                this.Menu = new MainMenu();
            }

            // Initialize the ScanSampleAPI reference.
            this.myScanSampleAPI = new API();

            this.isBarcodeInitiated = this.myScanSampleAPI.InitBarcode();

            if (!(this.isBarcodeInitiated))// If the Barcode object has not been initialized
            {
                // Display a message & exit the application.
                MessageBox.Show(Resources.GetString("AppExitMsg"));
                Application.Exit();
            }
            else // If the Barcode object has been initialized
            {
                // Clear the statusbar where subsequent status information would be displayed.
                //statusBar.Text = "";

                // Attach a scan notification handler.
                this.myScanNotifyHandler = new Barcode2.OnScanHandler(myBarcode2_ScanNotify);
                myScanSampleAPI.AttachScanNotify(myScanNotifyHandler);

                // Attach a status notification handler.
                //this.myStatusNotifyHandler = new Barcode2.OnStatusHandler(myBarcode2_StatusNotify);
                //myScanSampleAPI.AttachStatusNotify(myStatusNotifyHandler);
            }



            // Ensure that the keyboard focus is set on a control.

            myFormActivatedEventHandler   = new EventHandler(MainForm_Activated);
            myFormDeactivatedEventHandler = new EventHandler(MainForm_Deactivate);
            this.Activated  += myFormActivatedEventHandler;
            this.Deactivate += myFormDeactivatedEventHandler;
            FullScreen.StartFullScreen(this);
        }
예제 #2
0
        private void Form2_Load(object sender, EventArgs e)
        {
            this.Width  = Screen.PrimaryScreen.Bounds.Width;
            this.Height = Screen.PrimaryScreen.Bounds.Height;
            this.Left   = 0;
            this.Top    = 0;

            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.ControlBox      = false;

            Cursor.Hide();
            parentForm.Hide();
            if (parentForm.FULLSCREEN)
            {
                FullScreen.StartFullScreen(this);
            }

            updateText();
        }