예제 #1
0
        public FrmLogin(FrmStart _frmstart)
        {
            InitializeComponent();
            try
            {
                this.frmStart          = _frmstart;
                this.tbPwd.Region      = new Region(GetRoundRectPath(new RectangleF(0, 0, this.tbPwd.Width, this.tbPwd.Height), 5f));
                this.tbUserName.Region = new Region(GetRoundRectPath(new RectangleF(0, 0, this.tbUserName.Width, this.tbUserName.Height), 5f));
                this.iniSysInfo(false);
                this.tbUserName.Text = string.Empty;
                this.tbPwd.Text      = string.Empty;
                this.ActiveControl   = this.tbUserName;
                this.tbUserName.Focus();
                Assembly assembly = Assembly.GetExecutingAssembly();
                //this.labelEdition.Text = assembly.FullName;

                // 获取程序集元数据
                AssemblyCopyrightAttribute copyright = (AssemblyCopyrightAttribute)
                                                       AssemblyCopyrightAttribute.GetCustomAttribute(Assembly.GetExecutingAssembly(),
                                                                                                     typeof(AssemblyCopyrightAttribute));
                AssemblyDescriptionAttribute description = (AssemblyDescriptionAttribute)
                                                           AssemblyDescriptionAttribute.GetCustomAttribute(System.Reflection.Assembly.GetExecutingAssembly(),
                                                                                                           typeof(AssemblyDescriptionAttribute));
            }
            catch (Exception ex)
            {
                LoggerHelper.Log("MsmkLogger", "FrmLogin--->FrmLogin-->Error:" + ex.ToString(), LogEnum.ExceptionLog);
            }
        }
예제 #2
0
        public FrmDoubleDisplay(FrmMain frmmain, FrmStart _frmStart)
        {
            this._listSaleFlow = null;
            this._frmMain      = null;
            this.currfil       = 0;
            this.curradp       = 0;
            this.components    = null;
            this.InitializeComponent();
            this._frmMain = frmmain;
            if (Gattr.IsDoubleSetwh)
            {
                try
                {
                    this.l_width  = Gattr.DoubleSetwidth;
                    this.l_height = Gattr.DoubleSetheight;
                }
                catch
                {
                    this.l_width  = this._frmMain.Width;
                    this.l_height = this._frmMain.Height;
                }
                base.Width    = this.l_width;
                base.Height   = this.l_height;
                base.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width, 0);
            }
            else
            {
                base.Width    = this._frmMain.Width;
                base.Height   = this._frmMain.Height;
                base.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width, 0);
            }

            this.plpay.Location       = new Point(2, (base.Height - this.plpay.Height) - 2);
            this.tblCardInfo.Location = new Point(2, ((base.Height - this.plpay.Height) - this.tblCardInfo.Height) - 3);
            this.tblCardInfo.Width    = this.plSale.Width;
            this.plSale.Location      = new Point(2, 0x29);
            this.plSale.Height        = ((base.Height - this.plpay.Height) - this.tblCardInfo.Height) - 6;
            this.plpay.Width          = this.plSale.Width;

            this.webBrowser1.Location = new Point((this.plSale.Location.X + this.plSale.Width) + 2, this.plSale.Location.Y);
            this.webBrowser1.Width    = (base.Width - this.webBrowser1.Location.X) - 2;
            this.webBrowser1.Height   = ((base.Height - this.plSale.Location.Y) - this.tbAd.Height) - 4;
            this.tbAd.Location        = new Point(this.webBrowser1.Location.X, (this.webBrowser1.Height + 2) + this.plSale.Location.Y);
            this.tbAd.Width           = this.webBrowser1.Width;
            this.av_file  = new List <string>();
            this.adp_list = new List <string>();
            try
            {
                //this.webBrowser1.Url = new Uri(Gattr.adUrl, UriKind.Absolute);
                if (_frmStart.InvokeRequired)
                {
                    _frmStart.Invoke(new EventHandler(delegate
                    {
                        this.webBrowser1.Navigate(Gattr.adUrl);
                    }));
                }
                else
                {
                    this.webBrowser1.Navigate(Gattr.adUrl);
                }
            }
            catch (Exception ex)
            {
                LoggerHelper.Log("MsmkLogger", "FrmDoubleDisplay--->Exception:" + ex.ToString(), LogEnum.ExceptionLog);
            }
        }