예제 #1
0
파일: Program.cs 프로젝트: wpmyj/Zhuangkao
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Login_Form loginfrm = new Login_Form();

            loginfrm.ShowDialog();

            switch (loginfrm.DialogResult)
            {
            case DialogResult.OK:
                Application.Run(new Menu_Form(0, loginfrm.dq_sfzhm));
                break;

            case DialogResult.Yes:
                ModuleSettings settings;
                settings = new ModuleSettings();
                settings = ModuleConfig.GetSettings();
                CModel model = new CModel(settings);
                // CController ctrl = new CController(model);
                //mainview = new main_view(this, model);
                Application.Run(new main_view(model));
                break;

            case DialogResult.No:
                Application.Run(new Menu_Form(1, loginfrm.dq_sfzhm));
                break;
            }
        }
예제 #2
0
 public Menu_Form(int userclass, string dq_sfzhm)
 {
     InitializeComponent();
     settings = new ModuleSettings();
     settings = ModuleConfig.GetSettings();
     if (userclass > 0)
     {
         button1.Visible = false;
         button4.Visible = false;
     }
     this.dq_sfzhm = dq_sfzhm;
 }
예제 #3
0
        public string dq_sfzhm; //用户序列号

        public Login_Form()
        {
            InitializeComponent();
            ModuleSettings settings = ModuleConfig.GetSettings();

            if (settings.Useidcard == 1)
            {
                textBox1.Enabled = false;
                textBox2.Enabled = false;
            }
            userclass  = 1;
            invokeform = new InvokeDelegate(invokeformfun);
            idcardinfo = new CIDCardInfo();
            idcardinfo.InitIDcardDev();
            idcardinfo.OnIDCardReceived += new CIDCardInfo.IDCardRequest(idcardinfo_OnIDCardReceived);
            idcardinfo.Start();
        }
예제 #4
0
 public Setting_Form()
 {
     InitializeComponent();
     settings = new ModuleSettings();
     settings = ModuleConfig.GetSettings();
 }