Beispiel #1
0
        public MobileTextBox(MainForm Form, int left, int top, int width, string controlName, ControlsStyle style, OnEventHandlingDelegate ProcTarget, bool isPasswordField, bool isTextField)
        {
            Control.ForeColor = Color.DarkGreen;
            Control.Left = left;
            Control.Top = top;
            Control.BorderStyle = BorderStyle.None;
            Control.Width = width;
            Control.Name = controlName;
            Control.Height = 25;
            Control.Font = new Font("Arial", 12, FontStyle.Bold);
            if (isPasswordField)
            {
                Control.PasswordChar = '*';
            }
            if (ProcTarget != null)
            {
                OnChanged = ProcTarget;
                Control.Validated += new EventHandler(ProcTarget);
            }
            if (isTextField)
            {
                Control.KeyPress += (OnKeyPressedCheckingText);
            }
            else
            {
                Control.KeyPress += (OnKeyPressedCheckingNumber);
            }

            Form.Controls.Add(Control);
        }
Beispiel #2
0
        public MobileButton(MainForm Form, string text, int left, int top, int width, int height, string ControlName, MobileButtonClick mobileButtonClick, MobileSenderClick mobileSenderClick, object tag, bool enabled)
        {
            Control.Left = left;
            Control.Top = top;
            Control.Text = text;
            Control.ForeColor = GRAY_COLOR;
            Enabled = enabled;
            Tag = tag;
            MobileButtonClick = mobileButtonClick;
            MobileSenderClick = mobileSenderClick;
            Control.Click += Control_Click;

            if (width > 0)
                {
                Control.Width = width;
                }

            if (height > 0)
                {
                Control.Height = height;
                }

            Control.Name = ControlName;
            Form.Controls.Add(Control);
        }
Beispiel #3
0
 public MobileTable(MainForm Form, string controlName, int height, int top, Void2paramDelegate<object, OnRowSelectedEventArgs> onRowSelected)
     : this(Form, controlName, height, top)
 {
     if (onRowSelected != null)
         {
         OnRowSelected += onRowSelected;
         }
 }
Beispiel #4
0
 static void Main()
 {
     if (isExistedSameProcess())
         {
         return;
         }
     MainForm mform = new MainForm();
      //   mform.MinimizeBox = true;
      //   mform.WindowState = FormWindowState.Normal;
     Application.Run(mform);
 }
Beispiel #5
0
        public MobileLabel(MainForm Form, string text, int left, int top, int width, int exactHeight, ControlsStyle style, string ControlName)
        {
            ExactHeight = exactHeight;

            Control.Left = left;
            Control.Top = top;
            Control.Text = text;

            if (width > 0)
            {
                Control.Width = width;
            }

            Control.Name = ControlName;
            SetControlsStyle(style);
            Form.Controls.Add(Control);
        }
Beispiel #6
0
        public MobileLabel(MainForm Form, string text, int left, int top, int width, int exactHeight, MobileFontSize size, MobileFontPosition position, MobileFontColors color, FontStyle fontStyle, string ControlName)
        {
            ExactHeight = exactHeight;

            Control.Left = left;
            Control.Top = top;
            Control.Text = text;

            if (width > 0)
            {
                Control.Width = width;
            }

            Control.Name = ControlName;
            SetControlStyle(size, position, color, fontStyle);
            Form.Controls.Add(Control);
        }
Beispiel #7
0
        public HotKeyProcessing(MainForm form)
        {
            MainForm = form;

            if (!MainForm.IsTest)
            {
                for (int key = 112; key <= 135; key++)
                {
                    // Перебор кнопок с F1 (112) по F24 (135)
                    if (Enum.IsDefined(typeof (KeyAction), key))
                    {
                        SetHotKey((KeyAction) key);
                    }
                }

                SetHotKey(KeyAction.Esc);
            }
            //SetHotKey(KeyAction.No);
            //for (uint i = 0; i < 1000000; i++)
            //    RegisterHotKey(Hwnd, (int)i, (uint)65536, i);
                //SetHotKeyInt(i);

            #region Регистрация клавиш в режиме отладки

            bool IsDebugMode = false;
            #if DEBUG
            IsDebugMode = true;
            #endif
            if (IsDebugMode)
            {
                for (int key = 37; key <= 40; key++)
                {   // Перебор кнопок управления стрелками
                    if (Enum.IsDefined(typeof(KeyAction), key))
                    {
                        SetHotKey((KeyAction)key);/////////////////////////Настройка//////
                    }
                }
            }

            #endregion
        }
Beispiel #8
0
        public MobileTable(MainForm Form, string controlName, int height, int top)
        {
            Control = new DataGrid
                          {
                              ForeColor = System.Drawing.Color.Navy,
                              Left = 3,
                              Top = top,
                              Width = 234,
                              Height = height,
                              Name = controlName,
                              Visible = false,
                              Font = new System.Drawing.Font("Arial", 9, System.Drawing.FontStyle.Regular)
                          };
            Control.TableStyles.Add(new DataGridTableStyle());
            Control.TableStyles[0].MappingName = "Mobile";
            Control.PreferredRowHeight = 25;
            Form.Controls.Add(Control);

            Control.KeyPress += onKeyPressed;
            lastSelectedRowIndex = -1;
            DataGrid.CurrentCellChanged += DataGrid_CurrentCellChanged;
        }
Beispiel #9
0
 public WMSClient(MainForm Form, Type startProcess)
 {
     this.startProcess = startProcess;
     MainForm = Form;
     Current = this;
 }
Beispiel #10
0
 public MobileTable(MainForm Form, string controlName, int height, int top, Void2paramDelegate<object, OnChangeSelectedRowEventArgs> onChangeSelectedRow)
     : this(Form, controlName, height, top)
 {
     DataGrid.CurrentCellChanged += DataGrid_CurrentCellChanged;
 }
Beispiel #11
0
 public WMSClient(MainForm Form)
 {
     User = 0;
     MainForm = Form;
 }