Пример #1
0
        public MainForm()
        {
            InitializeComponent();

            //fullScreen mode
            String     _ScreenMode = System.Configuration.ConfigurationManager.AppSettings["Screen Mode"];
            FullScreen fullScreen  = new FullScreen();

            if ((ScreenMode)Enum.Parse(typeof(ScreenMode), _ScreenMode) == ScreenMode.Full)
            {
                fullScreen.EnterFullScreenMode(this);
            }
            else
            {
                fullScreen.LeaveFullScreenMode(this);
            }

            //背景設定
            String root       = System.Configuration.ConfigurationManager.AppSettings["photo_root"];
            String backImgage = System.Configuration.ConfigurationManager.AppSettings["Background Image"];
            String biPath     = System.IO.Path.Combine(root, backImgage);

            if (System.IO.File.Exists(biPath))
            {
                this.BackgroundImage = System.Drawing.Image.FromFile(biPath);
            }
            else
            {
                //Message.showMessageOK("I99000");
            }

            //フォームのアイコンを設定する
            this.Icon = new System.Drawing.Icon(@"Asset\フォト君ForUser.ico");
        }
Пример #2
0
 private void DoFullscreen()
 {
     if (!infullscreen)
     {
         FullScreen.EnterFullScreenMode(this);
         menuStrip1.Visible = false;
         Cursor.Hide();
     }
     else
     {
         FullScreen.LeaveFullScreenMode(this);
         menuStrip1.Visible = true;
         Cursor.Show();
     }
     ImageTableSettings.Init(Properties.Settings.Default.Rows,
                             Properties.Settings.Default.Columns,
                             this.Height, this.Width, ImageTableSettings.Stretch, ImageTableSettings.CameraID, ImageTableSettings.OverlayImagePath);
     CreatePanels();
     infullscreen = !infullscreen;
 }
Пример #3
0
        /// <summary>
        ///     Adiciona os eventos de 'KeyDown' a todos os controls com a function KeyDowns
        /// </summary>
        private void KeyDowns(object sender, KeyEventArgs e)
        {
            //BeginInvoke(new Action(() =>
            //{
            //}));
            //e.SuppressKeyPress = true;

            switch (e.KeyCode)
            {
            case Keys.Escape:
                Close();
                e.SuppressKeyPress = true;
                break;

            case Keys.F2:
                e.SuppressKeyPress = true;
                break;

            case Keys.F5:
                //OptionBobinaA4 f = new OptionBobinaA4();
                //string tipo = "";
                //f.TopMost = true;
                //DialogResult formResult = f.ShowDialog();

                //if (formResult == DialogResult.OK)
                //{
                //    tipo = "Folha A4";
                //    new Controller.Pedido().Imprimir(Id, tipo);
                //}
                //else if (formResult == DialogResult.Cancel)
                //{
                //    tipo = "Bobina 80mm";
                //    new Controller.Pedido().Imprimir(Id, tipo);
                //}
                break;

            case Keys.F7:
                ModalClientes();
                e.SuppressKeyPress = true;
                break;

            case Keys.F8:
                ModalColaborador();
                e.SuppressKeyPress = true;
                break;

            case Keys.F10:

                e.SuppressKeyPress = true;
                break;

            case Keys.F11:
                var fullScreen = new FullScreen();

                if (fullScreenMode == FullScreenMode.No)
                {
                    fullScreen.EnterFullScreenMode(this);
                    fullScreenMode = FullScreenMode.Yes;
                }
                else
                {
                    fullScreen.LeaveFullScreenMode(this);
                    fullScreenMode = FullScreenMode.No;
                }

                break;
            }
        }