Ejemplo n.º 1
0
        /// <summary>
        ///  返回按钮
        /// </summary>
        /// Author  : 俞立钢
        /// Company : 绍兴标点电子技术有限公司
        /// Created : 2014-12-10 15:47:26
        private void BtnReturn_Click(object sender, EventArgs e)
        {
            StartForm start = new StartForm();

            Hide();
            start.Show();
        }
Ejemplo n.º 2
0
        private void CancelLogInButton_Click(object sender, EventArgs e)
        {
            StartForm startForm = new StartForm();

            startForm.Show();
            this.Hide();
        }
Ejemplo n.º 3
0
        private void login()
        {
            bool      flagUser = false;
            bool      flagPass = false;
            string    User     = txtUser.Text;
            string    Password = txtPass.Text;
            DataTable dt       = new DataTable();

            dt = e005PHANQUYENTableAdapter1.GetData();
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DataRow dr   = dt.Rows[i];
                string  user = dr[0].ToString();
                if (User == user)
                {
                    flagUser = true;
                }
                string password = dr[1].ToString();

                if (Password == password)
                {
                    flagPass = true;
                }
            }
            if (flagUser == true && flagPass == true)
            {
                StartForm s = new StartForm();
                s.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Tên người sử dụng hoặc mật khẩu sai vui lòng đăng nhập lại");
            }
        }
        private void BackButton_Click(object sender, EventArgs e)
        {
            this.Hide();
            StartForm startForm = new StartForm();

            startForm.Show();
        }
Ejemplo n.º 5
0
        private void btnback_Click_1(object sender, EventArgs e)
        {
            StartForm frm = new StartForm();

            frm.Show();
            Hide();
        }
Ejemplo n.º 6
0
        void Form2_DoubleClick(object sender, EventArgs e)
        {
            this.Visible = false;
            StartForm start = new StartForm();

            start.Show();
        }
Ejemplo n.º 7
0
        private void LogOutButton_Click(object sender, EventArgs e)
        {
            StartForm startForm = new StartForm();

            startForm.Show();
            this.Hide();
            UserManager.WhoIsCurrentLoged = "";
        }
Ejemplo n.º 8
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     StartForm start = new StartForm();
     Application.Run(start);
     MessageBox.Show("Done");
     start.Show();
     //            Application.Run(new Transcript());
 }
Ejemplo n.º 9
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            StartForm start = new StartForm();

            Application.Run(start);
            MessageBox.Show("Done");
            start.Show();
//            Application.Run(new Transcript());
        }
Ejemplo n.º 10
0
        static void loginf_OnLoginSuccess(string UserName)
        {
            loginf.Hide();
            #region
            Linq.dbDataContext db = new Linq.dbDataContext(System.Configuration.ConfigurationManager.ConnectionStrings[GlobalParam.DataSourceName].ConnectionString);
            //db.ExecuteCommand("SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED");
            //db.ObjectTrackingEnabled = false;

            string ActiveCode = Linq.Util_Services.GetServicesSetting().ActiveCode;

            DateTime?EndDate = null;
            bool     Success = NetFramework.Util_MD5.MD5Success(ActiveCode, out EndDate, GlobalParam.UserKey);
            Success = true;
            EndDate = Convert.ToDateTime("2020-01-01");
            if (Success == false)
            {
                MessageBox.Show("激活码异常");
                Environment.Exit(0);
            }
            else
            {
                DateTime Now = db.ExecuteQuery <DateTime>("select getdate()").First();
                if (Now >= EndDate)
                {
                    MessageBox.Show("激活码已过期");
                    UpdateActiveCode uac = new UpdateActiveCode();
                    uac.ShowDialog();
                    MessageBox.Show("激活码已保存,重新启动");
                    Environment.Exit(0);
                }
            }
            #endregion
            StartForm sf = new StartForm();


            if (UserName == "sysadmin")
            {
                sf.SetMode("Admin", "");
            }
            else
            {
                sf.SetMode("User", "");
            }
            if (GlobalParam.DataSourceName != "Admin" && GlobalParam.DataSourceName != "User")
            {
                Linq.aspnet_UsersNewGameResultSend wsr = Linq.Util_Services.GetServicesSetting();
                sf.SetMode("EasyRobot", wsr.OpenMode == null ? "" : wsr.OpenMode);
            }



            sf.Show();
        }
Ejemplo n.º 11
0
        static void Main()
        {
            ServiceClient.Initialize();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var startForm = new StartForm();

            startForm.Show();

            Application.Run();
        }
Ejemplo n.º 12
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            StartForm startForm = new StartForm();
            DateTime  end       = DateTime.Now + TimeSpan.FromSeconds(5);

            startForm.Show();
            while (end > DateTime.Now)
            {
                Application.DoEvents();
            }
            startForm.Close();
            startForm.Dispose();
            Application.Run(new ContainerForm());
        }
Ejemplo n.º 13
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     if (startForm == null)
     {
         startForm = new StartForm(this, true);
     }
     if (UserService.CheckUser(txtName.Text, txtPassword.Text, 1))
     {
         this.Hide();
         startForm.SetLanDic(m_remoteLanDic, m_lanIndex, m_region, m_split);
         startForm.Show();
     }
     else
     {
         MessageBox.Show(TranslateCodeText("用户名或密码错误"));
     }
 }
Ejemplo n.º 14
0
        public static void Main(params string[] args)
        {
            try
            {
#if WINDOWS
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                StartForm v_start = new StartForm();
                v_start.Show();
                while (v_start.Created)
                {
                    Application.DoEvents();
                }
#elif ANDROID
#elif LINUX
#elif CONSOLE
                //   JGDB db = null;
                JGDB.StoreDb();

                Console.WriteLine("Demonstration : Welcome to JAMBO GAME");
                JGHumanPlayer player1 = new JGHumanPlayer();
                player1.Name    = "Bertrand";
                player1.Profile = JGDB.GetProfile("*****@*****.**");

                JGGameTablePlayerProfile prof1 = player1.CreateGameProfile(180);
                JGGameTablePlayerProfile prof2 =
                    new JGComputerPlayer()
                {
                    Name    = "Comp2",
                    Profile = JGDB.GetProfile("*****@*****.**")
                }.CreateGameProfile(60);

                JGPartyTable table = JGPartyTable.CreateTable(50, prof1, prof2);
                if (table != null)
                {
                    table.Party.Start();
                    JGParty party = table.Party;
                    JGHand  hand  = null;
                    while (!party.End)
                    {
                        hand = party.Hands.GetHand(party.SelectedPlayer);


                        Console.WriteLine("Tour: " + party.Tour);
                        Console.WriteLine("Jeu: " + party.SelectedPlayer);
                        if (party.Tour == 0)
                        {
                            if ((hand.IsSevenRule() | hand.IsTweentyOneRule()) != enuJGExceptionRule.None)
                            {
                                //Console.WriteLine (" REGLE DES 7 : "+ hand.IsSevenRule ());
                                party.CheckMyRules(party.SelectedPlayer);
                            }
                        }
                        if ((party.ControlCard == null) || (party.ControlUser == party.SelectedPlayer))
                        {
                            party.SelectedPlayer.Play(party, hand[0]);
                        }
                        else if (hand.ContainsCardType(party.ControlCard.CardType))
                        {
                            hand.SortByType();
                            party.SelectedPlayer.Play(party, hand.GetFirstCard(party.ControlCard.CardType));
                        }
                        else
                        {
                            party.SelectedPlayer.Play(party, hand[0]);
                        }
                    }
                }
                else
                {
                    Console.WriteLine("can't create a table .table mis error");
                }
                JGDB.Restore(prof1, prof2);
                Console.WriteLine("Party end");


                /*
                 *
                 * JGComputerPlayer player1 = new JGComputerPlayer();
                 * player1.Name = "Comp1";
                 * JGParty party = JGParty.CreateParty(player1,
                 *  new JGComputerPlayer[]{
                 *  new JGComputerPlayer(){
                 *      Name = "Comp2"
                 *  }
                 *  ,
                 *  new JGComputerPlayer(){
                 *      Name = "Comp3"
                 *  }
                 *  });
                 *
                 * Console.WriteLine("nouvelle party " + party.Players.Count);
                 *
                 * party.MixCard();
                 * party.CutAt(21);
                 *
                 * party.Start();
                 * JGHand hand = null;// party.Hands.GetHand(party.SelectedPlayer);
                 *
                 *
                 *
                 * while (!party.End)
                 * {
                 *  hand = party.Hands.GetHand(party.SelectedPlayer);
                 *
                 *
                 *  Console.WriteLine("Tour: " + party.Tour);
                 *  Console.WriteLine("Jeu: "+party.SelectedPlayer);
                 *  if (party.Tour== 0)
                 *  {
                 *      if ((hand.IsSevenRule() | hand.IsTweentyOneRule ()) != enuJGExceptionRule.None)
                 *      {
                 *          //Console.WriteLine (" REGLE DES 7 : "+ hand.IsSevenRule ());
                 *          party.CheckMyRules(party.SelectedPlayer );
                 *      }
                 *  }
                 *  if ((party.ControlCard == null) || (party.ControlUser == party.SelectedPlayer ))
                 *  {
                 *      party.SelectedPlayer.Play(party, hand[0]);
                 *  }
                 *  else if (hand.ContainsCardType (party.ControlCard.CardType))
                 *  {
                 *      hand.SortByType();
                 *      party.SelectedPlayer.Play(party, hand.GetFirstCard(party.ControlCard.CardType));
                 *  }
                 *  else {
                 *          party.SelectedPlayer.Play(party, hand[0]);
                 *  }
                 *
                 * }
                 * Console.WriteLine("party teminer:  ");
                 * Console.WriteLine ("Winner : "+ party.Winner);
                 * Console.WriteLine ("Card : "+ party.ControlCard );
                 *
                 *
                 *
                 * if ((party.Tour == 5))
                 * {
                 *  party.CheckCoraRule(party.Winner);
                 * }
                 */

                //Console.WriteLine("party teminer " + party.Winner);


                //  JGHand hand = party.Hands.GetHand(player1);

                // Console.WriteLine ("jour 1 jouer");

                //player1.Play(party, hand[0]);



                //Console.WriteLine("Couleur Rouge : " + GetColor(hand, enuJGCardColor.Red ));
                //Console.WriteLine("Couleur Black : " + GetColor(hand, enuJGCardColor.Black));

                //foreach (enuJGCardType item in Enum.GetValues (typeof (enuJGCardType)))
                //{
                //    Console.WriteLine("Carte " + item.ToString() + " " + GetCardType(hand, item));
                //}



                //party.Hands.SortHand(player1, enuJGSortType.Color   );
                //hand.SortByValue();



                Console.ReadLine();
#endif
            }
            catch (Exception ex) {
                MessageBox.Show("L'application s'est malheureusement arrêter : " + ex.Message);
            }
        }
Ejemplo n.º 15
0
 /// <summary>
 ///  返回按钮
 /// </summary>
 /// Author  : 俞立钢
 /// Company : 绍兴标点电子技术有限公司
 /// Created : 2014-12-10 15:47:26
 private void BtnReturn_Click(object sender, EventArgs e)
 {
     StartForm start = new StartForm();
     Hide();
     start.Show();
 }
Ejemplo n.º 16
0
        /// <summary>
        /// Sluit het project af.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnBezoekAfsluiten_Click(object sender, EventArgs e)
        {
            var startForm = new StartForm();

            this.Hide();
            startForm.Show();
        }