예제 #1
0
 private void userAvatarClick(object sender, EventArgs e)
 {
     EventHandler onClick = new EventHandler(delegate(object s2, EventArgs e2)
     {
         MenuItem mi = (MenuItem)s2;
         m_ThinUser.m_icon = mi.Index;
         m_UserImage.BackgroundImage = m_UserBMPList[m_ThinUser.m_icon];
         SaveAccount();
     });
     ImageMenu menu = new ImageMenu(this,null, onClick);
     foreach (Bitmap bmp in m_UserBMPList)
     {
         menu.AddItem(bmp, "");
     }
     menu.Show();
 }
예제 #2
0
        private void userNewAccountClick(object sender, EventArgs e)
        {
            EventHandler onClick = new EventHandler(delegate(object s2, EventArgs e2)
            {
                MenuItem mi = (MenuItem)s2;
                switch (mi.Text)
                {
                    case "Create Normal Account":
                        {
                            m_RPCMutex.WaitOne();
                            m_ThinUser.AddNewAccount("New Account");
                            m_ThinUser.Save();
                            m_RPCMutex.ReleaseMutex();
                            CreateUserGUIAccounts();
                        }
                        break;
                    case "Repair Transaction History": RepairTransactionHistory(); break;
                    default: break;
                }
                //m_ThinUser.m_icon = mi.Index;
                //m_UserImage.BackgroundImage = m_UserBMPList[m_ThinUser.m_icon];
                //SaveAccount();
            });

            ImageMenu menu = new ImageMenu(this, new Font(Constants.FONTNAME,12), onClick);

            menu.AddItem(null, "Create Normal Account");
            menu.AddItem(null, "Create 2 Key Account");
            menu.AddItem(null, "Create Account with existing keys");
            menu.AddSeparator();
            menu.AddItem(null, "Repair Transaction History");
            menu.Show();

            /*

             */
        }
예제 #3
0
 public void DoAccountIconMenu(int nAccount)
 {
     EventHandler onClick=new EventHandler(delegate(object sender, EventArgs e)
         {
             MenuItem mi = (MenuItem)sender;
             m_ThinUser.m_Accounts[nAccount].m_icon = mi.Index;
             m_AccountItemsGUI[nAccount].SetIcon(mi.Index);
             SaveAccount();
         });
     ImageMenu menu = new ImageMenu(this,null, onClick);
     foreach (Bitmap bmp in m_AccountBMPList)
     {
         menu.AddItem(bmp,"");
     }
     menu.Show();
 }
예제 #4
0
        private void userMouseClick(object sender, EventArgs e)
        {
            EventHandler onClick = new EventHandler(delegate(object s2, EventArgs e2)
            {
                MenuItem mi = (MenuItem)s2;
                m_RPCMutex.WaitOne();
                m_ThinUser = m_ThinUsers[mi.Index];
                m_RPCMutex.ReleaseMutex();
                switchUser();

            });
            ImageMenu menu = new ImageMenu(this, m_UserText.Font, onClick);
            foreach (ThinUser user in m_ThinUsers)
            {
                menu.AddItem(m_UserBMPList[user.m_icon], user.m_name);
            }
            menu.Show();
        }