static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     startForm = new StartForm();
     Application.Run(startForm);
 }
Ejemplo n.º 2
0
        private void btnback_Click_1(object sender, EventArgs e)
        {
            StartForm frm = new StartForm();

            frm.Show();
            Hide();
        }
Ejemplo n.º 3
0
        private void TestConfigForm_Load(object sender, EventArgs e)
        {
            StartForm sf = new StartForm();

            sf.ShowDialog();

            if (!File.Exists(con_file_path))
            {
                File.Create(con_file_path);
            }
            using (StreamReader sr = new StreamReader(con_file_path))
            {
                try
                {
                    string sconfig = sr.ReadToEnd();
                    Dictionary <string, object> dic = JsonHelper.DeserializeJsonToObject <Dictionary <string, object> >(sconfig);
                    if (dic != null)
                    {
                        cbEncoding.SelectedItem         = dic["Encoding"];
                        txbMacQRcode.Text               = dic["MaxQR"].ToString();
                        tbBackUrl.Text                  = dic["BackUrl"].ToString();
                        txbUnqiueNumber.Text            = dic["ReqReserved"].ToString();
                        tbQRAPPIP.Text                  = dic["PhoneIp"].ToString();
                        tbQRPlatformUrl.Text            = dic["PlatformUrl"].ToString();
                        cbDeviceTypeSelect.SelectedItem = dic["DeviceType"].ToString();
                    }
                }
                catch (Exception ex)
                {
                    MetroMessageBox.Show(this, ex.Message);
                }
            }
        }
Ejemplo n.º 4
0
        void Form2_DoubleClick(object sender, EventArgs e)
        {
            this.Visible = false;
            StartForm start = new StartForm();

            start.Show();
        }
Ejemplo n.º 5
0
 public Game(StartForm startForm)
 {
     PlayerCount       = startForm.PlayerCount;
     ActivePlayerIndex = 1;
     CreatePlayers(startForm);
     Instance = this;
 }
Ejemplo n.º 6
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");
            }
        }
Ejemplo n.º 7
0
        private void Connect_Btn_Click(object sender, EventArgs e)
        {
            string connectionString = string.Format("Data Source={0};Initial Catalog={1};User ID={2};Password={3};", Server_cmbBox.Text, Database_TxtBox.Text, Username_TxtBox.Text, Password_TxtBox.Text);

            try
            {
                SqlHelper helper = new SqlHelper(connectionString);
                if (helper.IsConnection)
                {
                    StartForm.showBalloon("Sql Connection", "connection succeeded...");
                    StartForm.ConnectionString_main = connectionString;

                    connectionString = string.Format("metadata=res://*/myModel.csdl|res://*/myModel.ssdl|res://*/myModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source={0};initial catalog={1};persist security info=True;user id={2};password={3};MultipleActiveResultSets=True;App=EntityFramework&quot;", Server_cmbBox.Text, Database_TxtBox.Text, Username_TxtBox.Text, Password_TxtBox.Text);

                    AppSetting setting = new AppSetting();

                    string apps = setting.GetConnectionString("EmployeeCardentities");

                    setting.SaveConnectionString("EmployeeCardentities", connectionString);

                    StartForm.showBalloon("App Config", "Your connection string has been successfully saved.");

                    apps = setting.GetConnectionString("EmployeeCardentities");

                    this.Hide();
                    pass form = new pass();
                    form.Show();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 8
0
        public void CreatePlayers(StartForm start)
        {
            switch (PlayerCount)
            {
            case 8:
                Players.Add(new Player(start.Player8Name, start.Player8Color, 8));
                goto case 7;

            case 7:
                Players.Add(new Player(start.Player7Name, start.Player7Color, 7));
                goto case 6;

            case 6:
                Players.Add(new Player(start.Player6Name, start.Player6Color, 6));
                goto case 5;

            case 5:
                Players.Add(new Player(start.Player5Name, start.Player5Color, 5));
                goto case 4;

            case 4:
                Players.Add(new Player(start.Player4Name, start.Player4Color, 4));
                goto case 3;

            case 3:
                Players.Add(new Player(start.Player3Name, start.Player3Color, 3));
                goto default;

            default:
                Players.Add(new Player(start.Player2Name, start.Player2Color, 2));
                Players.Add(new Player(start.Player1Name, start.Player1Color, 1));
                break;
            }
        }
Ejemplo n.º 9
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.º 10
0
        private void CancelLogInButton_Click(object sender, EventArgs e)
        {
            StartForm startForm = new StartForm();

            startForm.Show();
            this.Hide();
        }
        private void BackButton_Click(object sender, EventArgs e)
        {
            this.Hide();
            StartForm startForm = new StartForm();

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

            startForm.Show();
            this.Hide();
            UserManager.WhoIsCurrentLoged = "";
        }
Ejemplo n.º 13
0
        private void galleryControl2_Gallery_ItemClick(object sender, DevExpress.XtraBars.Ribbon.GalleryItemClickEventArgs e)
        {
            string    MenuBtn = string.Format("{0}", e.Item.Tag);
            Form      frm1    = Application.OpenForms["StartForm"];
            StartForm s       = frm1 as StartForm;

            s.showFormDanhMuc(MenuBtn);
        }
Ejemplo n.º 14
0
        public void Start()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var menu = new StartForm(this);

            Application.Run(menu);
        }
Ejemplo n.º 15
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.º 16
0
        private void FBanHangPhaiThu_FormClosing(object sender, FormClosingEventArgs e)
        {
            Form      frm1 = Application.OpenForms["StartForm"];
            StartForm s    = frm1 as StartForm;

            s.k--;
            if (s.k == 0)
            {
                frm1.Show();
            }
        }
Ejemplo n.º 17
0
        private void FKhaiBaoDinhMucSp_FormClosing(object sender, FormClosingEventArgs e)
        {
            Form      frm1 = Application.OpenForms["StartForm"];
            StartForm s    = frm1 as StartForm;

            s.k--;
            if (s.k == 0)
            {
                frm1.Show();
            }
        }
Ejemplo n.º 18
0
        private void FButToanKetChuyen_FormClosing(object sender, FormClosingEventArgs e)
        {
            Form      frm1 = Application.OpenForms["StartForm"];
            StartForm s    = frm1 as StartForm;

            s.k--;
            if (s.k == 0)
            {
                frm1.Show();
            }
        }
Ejemplo n.º 19
0
        private void FMenuBaoCao_Load(object sender, FormClosingEventArgs e)
        {
            Form      frm1 = Application.OpenForms["StartForm"];
            StartForm s    = frm1 as StartForm;

            s.k--;
            if (s.k == 0)
            {
                frm1.Show();
            }
        }
Ejemplo n.º 20
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            LoadLanguage();
            StartForm startForm = new StartForm(null, false);

            startForm.SetLanDic(m_lanDic, m_lanIndex, m_region, m_split);
            Application.Run(startForm);
            return;
        }
Ejemplo n.º 21
0
        private void FPhieuXuatKhoTp_FormClosing(object sender, FormClosingEventArgs e)
        {
            Form      frm1 = Application.OpenForms["StartForm"];
            StartForm s    = frm1 as StartForm;

            s.k--;
            if (s.k == 0)
            {
                frm1.Show();
            }
        }
Ejemplo n.º 22
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.º 23
0
        static void Main()
        {
            ServiceClient.Initialize();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var startForm = new StartForm();

            startForm.Show();

            Application.Run();
        }
Ejemplo n.º 24
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.º 25
0
        public override void FromJson(JObject json)
        {
            var wId = json["white"].ToObject <int>();
            var bId = json["black"].ToObject <int>();

            if (wId != 0)
            {
                White = StartForm.GetPlayer(wId);
            }
            if (bId != 0)
            {
                Black = StartForm.GetPlayer(bId);
            }
            Waiting = json["wait"].ToObject <PlayerSide>();
            if (json.ContainsKey("board"))
            {
                var board = json["board"];
                var BOARD = StartForm.INSTANCE.GameForm.Board;
                foreach (var side in new PlayerSide[] { PlayerSide.White, PlayerSide.Black })
                {
                    var content = board[side.ToString()];
                    var PIECES  = BOARD.Pieces[side];
                    foreach (JProperty pieceMoved in content.Children())
                    {
                        var id    = int.Parse(pieceMoved.Name.Substring("P#".Length));
                        var piece = PIECES.FirstOrDefault(x => x.Id == id);
                        if (piece.Location != null)
                        {
                            piece.Location.PieceHere = null;
                        }
                        var info     = pieceMoved.ToObject <string>().Split('/');
                        var location = info[0];
                        if (location == "null")
                        { // piece was taken
                            piece.Location = null;
                        }
                        else
                        {
                            piece.Location           = BOARD.GetButtonAt(location);
                            piece.Location.PieceHere = piece;
                        }
                        if (info.Length > 1)
                        {
                            if (Enum.TryParse <PieceType>(info[1], out var type))
                            {
                                piece.Type = type;
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 26
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     product         = new Product();
     splashScreen    = new SplashScreen();
     startForm       = new StartForm();
     selectForm      = new SelectForm();
     productInfoForm = new ProductInfoForm();
     orderForm       = new OrderForm();
     aboutForm       = new AboutForm();
     Application.Run(splashScreen);
 }
Ejemplo n.º 27
0
 static void Main()
 {
     //instantiate all forms here
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     startForm       = new StartForm();
     splashForm      = new SplashForm();
     selectForm      = new SelectForm();
     orderForm       = new OrderForm();
     productInfoForm = new ProductInfoForm();
     aboutForm       = new AboutForm();
     product         = new Product();
     Application.Run(splashForm);
 }
Ejemplo n.º 28
0
        public static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            splashScreenForm        = new SplashScreenForm();
            startForm               = new StartForm();
            selectForm              = new SelectForm();
            productInfoForm         = new ProductInfoForm();
            orderForm               = new OrderForm();
            dollarComputersAboutBox = new DollarComputersAboutBox();

            product = new Product();

            Application.Run(new SplashScreenForm());
        }
Ejemplo n.º 29
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            product = new Product();
            //This intializes each of the forms
            splashScreenForm = new SplashScreenForm();
            startForm        = new StartForm();
            selectForm       = new SelectForm();
            productInfoForm  = new ProductInfoForm();
            orderForm        = new OrderForm();
            aboutForm        = new AboutForm();

            //Runs the Splash Screen First
            Application.Run(new SplashScreenForm());
        }
Ejemplo n.º 30
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.º 31
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.º 32
0
        public MainForm(byte playingWidth, byte playingHeight, StartForm startForm)
        {
            InitializeComponent();
            InitializeTasks();
            IsMdiContainer = true;
            this.playingHeight = playingHeight;
            this.playingWidth = playingWidth;
            this.startForm = startForm;

            model = new GameRecords(playingHeight, playingWidth, startForm.initialAmusementsFilename, startForm.initialPathsFilename, startForm.initialAccessoriesFilename, startForm.revealingRulesFilename);

            amusform = new AmusementsForm(model, mainDockPanel, amusementsToolStripMenuItem);
            pathform = new PathForm(model, pathToolStripMenuItem);
            accform = new AccessoriesForm(model, accessoriesToolStripMenuItem);
            view = new View2(model, this);
            mapform = new MapForm(model, view, playingWidth, playingHeight);

            amusform.Show(mainDockPanel);
            pathform.Show(mainDockPanel);
            accessoriesToolStripMenuItem.Checked = false;
            mapform.Show(mainDockPanel);
            timer.Enabled = true;
        }
Ejemplo n.º 33
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.º 34
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();
        }