Ejemplo n.º 1
0
 public frmConfigDBSecurity()
 {
     InitializeComponent();
     this.Icon = FrameworkParams.ApplicationIcon;
     this.initData(true);
     PLKey key = new PLKey(this);
     key.Add(Keys.F9, ShowConfigFile);
     key.Add(Keys.F8, GetRuntimeDBConf);
 }
Ejemplo n.º 2
0
        public frmOldConfigDBSecurity()
        {
            InitializeComponent();
            this.Icon = FrameworkParams.ApplicationIcon;
            this.initData(true);
            PLKey key = new PLKey(this);
            key.Add(Keys.F9, ShowConfigFile);
            key.Add(Keys.F8, GetRuntimeDBConf);

            if (FrameworkParams.supportEMB == false)
            {
                this.embDB.Visible = false;
            }
        }
Ejemplo n.º 3
0
        public frmRibbonMain()
        {
            InitializeComponent();
            //this.Text = "www.protocolvn.com";
            this.Text = HelpApplication.getProductName();
            this.RibbonCtrl.ShowToolbarCustomizeItem = true;
            this.Icon = FrameworkParams.ApplicationIcon;
            this.Shown += new EventHandler(frmRibbonMain_Shown);
            this.FormClosing += new FormClosingEventHandler(frmRibbonMain_FormClosing);

            xtraTabbedMdiManager1.MouseUp += new MouseEventHandler(_tabbedMDIManager_MouseUp);
            SetTabbedMDI(true);  // this is normally controlled by a main menu option

            PLKey k = new PLKey(this);
            k.Add(Keys.F1, delegate(){
                if (File.Exists(RadParams.HELP_FILE)==false)
                {
                    frmPLAbout dlg = new frmPLAbout();
                    ProtocolForm.ShowModalDialog(this, dlg);
                }
                else
                {
                    PLHelp.openCHM();
                }
            });
            this.RibbonCtrl.RibbonStyle = FrameworkParams.style;
            this.Load += new EventHandler(frmRibbonMain_Load);
        }
Ejemplo n.º 4
0
        public frmPLAbout()
        {
            InitializeComponent();
            this.ShowIcon = false;

            HelpXtraForm.SetSlideEffect(this);
            this.TenCty.Text = FrameworkParams.CustomerName;
            this.SanPham.Text = FrameworkParams.ProductName;
            this.PhienBan.Text += HelpApplication.getVersion();
            PLKey key = new PLKey(this);
            key.Add(Keys.F5, showLicence);
        }
Ejemplo n.º 5
0
        public static void ExitApplication(ProtocolVN.Framework.Win.FrameworkParams.EXIT_STATUS status)
        {
            if (FrameworkParams.MainForm != null && FrameworkParams.MainForm.IsDisposed == false)
            {
                if (FrameworkParams.MainForm.MdiChildren.Length > 0)
                {
                    for (int i = 0; i < FrameworkParams.MainForm.MdiChildren.Length; )
                    {
                        FrameworkParams.MainForm.MdiChildren[i].Dispose();
                        //FrameworkParams.MainForm.MdiChildren[i].Close();
                    }
                }

                try
                {
                    FrameworkParams.MainForm.Hide();
                    FrameworkParams.MainForm.Dispose();
                }
                catch { }
            }

            if (status == ProtocolVN.Framework.Win.FrameworkParams.EXIT_STATUS.NORMAL_THANKS)
            {
                //                if (IsThanksMsg)
                //                {
                //                    PLMessageBoxWin box = new PLMessageBoxWin(@"
                //                        Cám ơn bạn đã sử dụng sản phẩm của công ty ProtocolVN.\n
                //                        Khi gặp sự cố sử dụng sản phẩm xin vui lòng liên hệ với ProtocolVN");
                //                }
            }
            else if (status == ProtocolVN.Framework.Win.FrameworkParams.EXIT_STATUS.NORMAL_NO_THANKS)
            {

            }
            else if (status == ProtocolVN.Framework.Win.FrameworkParams.EXIT_STATUS.ERROR)
            {
                PLMessageBox box = PLMessageBox.GetSystemErrorMessage(@"Cám ơn bạn đã sử dụng sản phẩm của công ty ProtocolVN. Alt-F10 Xem thông thêm.");
                PLKey key = new PLKey(box);
                key.Add(Keys.Alt | Keys.F10, delegate()
                {
                    PLDebug.ShowExceptionInfo();
                });

                box.ShowDialog();
            }

            ExitApplication();
        }
Ejemplo n.º 6
0
        private frmInputBarcode(XtraForm main, TraCuu traCuu, ThucHien thucHien, CapNhatGiaTriKhiBarCodeHopLe capNhat, BarcodeInputType type)
        {
            InitializeComponent();
            this._SoLg = "1";
            this._TraCuu = traCuu;
            this._ThucHien = thucHien;
            this._CapNhatGiaTriKhiBarCodeHopLe = capNhat;
            if(type == BarcodeInputType.TYPE1){
                this.barCode.KeyUp += new System.Windows.Forms.KeyEventHandler(this.barCode_KeyUp2);
                this.Slg.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Slg_KeyUp2);
                this.FormClosing += new FormClosingEventHandler(this.frmInputBarcode__FormClosing);
                this.Slg.TextChanged += new EventHandler(Slg_TextChanged);
            }

            this.Top = main.Top;
            this.Left = main.Left + (main.Width - this.Width) / 2;

            PLKey key = new PLKey(this);
            key.Add(Keys.F5, delegate(){
                this.Close();
            });
        }
Ejemplo n.º 7
0
 public static void setKey(XtraForm frm)
 {
     PLKey key = new PLKey(frm);
     key.Add(Keys.F12, frm.Close);
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Nhấn Tab | Enter dể đến control kế tiếp
 /// Đối với các control đã sử dụng Enter cho việc khác thì dùng chỉ phím Tab để di chuyển.
 /// </summary>
 /// <param name="form"></param>
 public static void setEnterAsTab(XtraForm form)
 {
     PLKey k = new PLKey(form);
     k.Add(Keys.Enter, SetFocusOnNextControl);
 }