Example #1
0
        private void UserChange(object sender, EventArgs e)
        {
            UserBox ub   = (UserBox)sender;
            string  name = ub.name.Content.ToString();

            if (this.name == name)
            {
                return;
            }
            if (name == "添加账户")
            {
                InputMoney dlg = new InputMoney();
                dlg.ShowDialog();
                if (dlg.m == 0)
                {
                    return;
                }
                name = dlg.n;
                if (usersController.GetUserControler(name) == null)
                {
                    UserPanelController.Handler().AddUser(dlg.n, dlg.m);
                    MainWindow.ShowNotifyMessage("成功添加新账户\n账户名:" + dlg.n + "本金:" + dlg.m);
                }
                else
                {
                    MessageBox.Show("账户名已存在");
                    return;
                }
            }
            UserChange(name);
        }
Example #2
0
 public static UserPanelController Create(ref DBDelegateBridge.UIMoney uim, ref DBDelegateBridge.UIStockHold uis, ref InfoDelegate.SetWin setWin)
 {
     if (UPC == null)
     {
         UPC = new UserPanelController(ref uim, ref uis, ref setWin);
         return(UPC);
     }
     else
     {
         return(UPC);
     }
 }
Example #3
0
 public static UserPanelController Create(ref DBDelegateBridge.UIMoney uim, ref DBDelegateBridge.UIStockHold uis, ref InfoDelegate.SetWin setWin)
 {
     if (UPC == null)
     {
         UPC = new UserPanelController(ref uim, ref uis, ref setWin);
         return UPC;
     }
     else
         return UPC;
 }