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; } }
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; }
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(); }
public Setting_Form() { InitializeComponent(); settings = new ModuleSettings(); settings = ModuleConfig.GetSettings(); }