Пример #1
0
 public AccountList(AccountListBiz biz)
     : base()
 {
     InitializeComponent();
     this._isExitMenuClicked = false;
     this._biz = biz;
     this.InitDataGrid();
     this.dgvLevel0.SizeChanged += new EventHandler(Grid_SizeChanged);
     this.addRowToolStripMenuItem.Click += new EventHandler(addRowToolStripMenuItem_Click);
     this.deleteRowToolStripMenuItem.Click += new EventHandler(deleteRowToolStripMenuItem_Click);
     this.dgvLevel0.CellEndEdit += new DataGridViewCellEventHandler(Grid_CellEndEdit);
     this.dgvLevel0.CellClick += new DataGridViewCellEventHandler(Grid_CellClick);
     this.RemovableDrivePulled += new DelegateRemovableDrivePulled(AccountList_RemovableDrivePulled);
     this.RemovableDriveArrived += new DelegateRemovableDriveArrived(AccountList_RemovableDriveArrived);
     this.exitToolStripMenuItem.Click += new EventHandler(exitToolStripMenuItem_Click);
 }
Пример #2
0
        static void Main()
        {
            try
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                LoginBiz loginBiz = new LoginBiz();
                if (loginBiz.Run() == LoginResult.Succeed)
                {
                    AccountListBiz accListBiz = new AccountListBiz();
                    accListBiz.Run();
                    accListBiz.Dispose();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }