Пример #1
0
        private void Yongan_Load(object sender, EventArgs e)
        {
            throw new Exception("Unknown Error!");
            LogoPicture.pictures pic = new LogoPicture.pictures();
            this.pictureBox1.Image = pic.pictureBox5.Image;
            //1初始化时间
            dtpSignDate.Value = System.DateTime.Now;
            dtpBegin.Value    = System.DateTime.Now;
            dtpEnd.Value      = System.DateTime.Now.AddDays(6);

            //2读配置:保单号YA2006WUH,经办人,打印边距,序号
            cfg_yongan cfg = new cfg_yongan();

            cfg.GetConfig();
            eNumberHead               = cfg.eNumberHead;
            this.tbSignature.Text     = cfg.Signature;
            this.numericUpDownX.Value = cfg.OffsetX;
            this.numericUpDownY.Value = cfg.OffsetY;
            this.tbInsuranceNo.Text   = cfg.SaveNo;
            //3初始化全局变量
            retstring = "";
            b_opened  = true;
            connect_4_Command.PrintWindowOpen = true;
            context = this;
            this.bt_Print.Enabled = false;
        }
Пример #2
0
        private void bt_SetToDefault_Click(object sender, EventArgs e)
        {
            Default yd = new Default();

            yd.xmlFirst = "YongAn";
            if (DialogResult.OK == yd.ShowDialog())
            {
                cfg_yongan cfg = new cfg_yongan();
                cfg.GetConfig();
                eNumberHead               = cfg.eNumberHead;
                this.tbSignature.Text     = cfg.Signature;
                this.numericUpDownX.Value = cfg.OffsetX;
                this.numericUpDownY.Value = cfg.OffsetY;
                this.tbInsuranceNo.Text   = cfg.SaveNo;
            }
        }