Beispiel #1
0
        private void buttonSinhronizacia_Click(object sender, EventArgs e)
        {
            if (openFileSinhronizacia.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            List <List <Player> > SelectedListPlayer = MethodsWorkWithFile.CreateListPlayer(openFileSinhronizacia.SafeFileName);

            MethodsWorkWithFile.Sinhronizacia(GlobalVariables.ListPlayerInDiscypline, SelectedListPlayer);
            MessageBox.Show("Синхронизация прошла успешно", "ОК", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);

            GlobalVariables.ListPlayerInDiscypline = MethodsWorkWithFile.CreateListPlayer("ListPlayer.txt");

            MethodsWorkWithFile.CreateLists(GlobalVariables.ListPlayerInDiscypline);

            GlobalVariables.SearchFullTeam();

            Player[] MyProfiles = MethodsWorkWithFile.ReadMyProfile();
            GlobalVariables.MyProfileDota2 = (Dota2Player)MyProfiles[0];
            GlobalVariables.MyProfileCSGO  = (CSGOPlayer)MyProfiles[1];

            GlobalVariables.ListPlayerInDiscypline[0].Add(GlobalVariables.PlayerDota2Clear);
            GlobalVariables.ListPlayerInDiscypline[0].Add(GlobalVariables.MyProfileDota2);
            GlobalVariables.ListPlayerInDiscypline[1].Add(GlobalVariables.PlayerCSGOClear);
            GlobalVariables.ListPlayerInDiscypline[1].Add(GlobalVariables.MyProfileCSGO);
            GlobalVariables.ListPlayerInDiscyplineSearched = new List <List <Player> >(GlobalVariables.ListPlayerInDiscypline);
        }
Beispiel #2
0
        static void Main()
        {
            GlobalVariables.ListPlayerInDiscypline = MethodsWorkWithFile.CreateListPlayer("ListPlayer.txt");

            MethodsWorkWithFile.CreateLists(GlobalVariables.ListPlayerInDiscypline);

            GlobalVariables.SearchFullTeam();

            Player[] MyProfiles = MethodsWorkWithFile.ReadMyProfile();
            GlobalVariables.MyProfileDota2 = (Dota2Player)MyProfiles[0];
            GlobalVariables.MyProfileCSGO  = (CSGOPlayer)MyProfiles[1];

            GlobalVariables.ListPlayerInDiscypline[0].Add(GlobalVariables.PlayerDota2Clear);
            GlobalVariables.ListPlayerInDiscypline[0].Add(GlobalVariables.MyProfileDota2);
            GlobalVariables.ListPlayerInDiscypline[1].Add(GlobalVariables.PlayerCSGOClear);
            GlobalVariables.ListPlayerInDiscypline[1].Add(GlobalVariables.MyProfileCSGO);
            GlobalVariables.ListPlayerInDiscyplineSearched = new List <List <Player> >(GlobalVariables.ListPlayerInDiscypline);

            //MethodsWorkWithFile.WriteFile((Dota2Player)GlobalVariables.ListPlayerInDiscypline[0][5]);
            //MethodsWorkWithFile.WriteFile((Dota2Player)GlobalVariables.ListPlayerInDiscypline[0][0]);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            if (GlobalVariables.ListPlayerInDiscypline != null)
            {
                GlobalVariables.MainFormObject = new MainForm();
                Application.Run(GlobalVariables.MainFormObject);
            }
            //GlobalVariables.MainFormObject = new MainForm();
            //Application.Run(GlobalVariables.MainFormObject);
        }
Beispiel #3
0
        private void MainForm_Shown(object sender, EventArgs e)
        {
            GlobalVariables.ListPlayerInDiscypline = MethodsWorkWithFile.CreateListPlayer("ListPlayer.txt");

            MethodsWorkWithFile.CreateLists(GlobalVariables.ListPlayerInDiscypline);

            GlobalVariables.SearchFullTeam();

            Player[] MyProfiles = MethodsWorkWithFile.ReadMyProfile();
            GlobalVariables.MyProfileDota2 = (Dota2Player)MyProfiles[0];
            GlobalVariables.MyProfileCSGO  = (CSGOPlayer)MyProfiles[1];

            GlobalVariables.ListPlayerInDiscypline[0].Add(GlobalVariables.PlayerDota2Clear);
            GlobalVariables.ListPlayerInDiscypline[0].Add(GlobalVariables.MyProfileDota2);
            GlobalVariables.ListPlayerInDiscypline[1].Add(GlobalVariables.PlayerCSGOClear);
            GlobalVariables.ListPlayerInDiscypline[1].Add(GlobalVariables.MyProfileCSGO);
            GlobalVariables.ListPlayerInDiscyplineSearched = new List <List <Player> >(GlobalVariables.ListPlayerInDiscypline);
        }