示例#1
0
        private void load_data(string file = "")
        {
            if (file == "")
            {
                return;
            }
            MySerializer serializer = new MySerializer();
            Data         d          = serializer.DeserializeObject(file).Data;

            tvlData.players = d.players;
            tvlData.games   = d.games;
            tvlData.zipped  = d.zipped;
            tvlData.unzipdata();
            tvlData.counted = d.counted;
            SystemResults_listBox.Items.AddRange(tvlData.counted.ToArray());

            System_count_btn.Enabled   = false;
            Nextbutton.Enabled         = false;
            Addbutton.Enabled          = false;
            Editbutton.Enabled         = false;
            Gone_button.Enabled        = false;
            Tour_numericUpDown.Maximum = tvlData.counted.Count;
            MessageBox.Show(String.Join("\n", tvlData.zipped.ToArray()), file);
            places_counted = true;
            refresh_game_table();
            Refresh_playerstable();
            if (tvlData.gametype == 3)
            {
                восстановлениеToolStripMenuItem.Enabled = true;
            }
        }
示例#2
0
        private void load_data(string file = "")
        {
            if (file == "")
            {
                return;
            }
            MySerializer serializer = new MySerializer();
            Data2        d2         = serializer.DeserializeObject(file).Data2;

            Rlist = d2.players;
            reLoad_data();
        }
示例#3
0
        private void append_data(string file = "")
        {
            if (file == "")
            {
                return;
            }
            MySerializer serializer = new MySerializer();
            Data2        d2         = serializer.DeserializeObject(file).Data2;

            Rlist = new List <Short_player>(tvlData.short_players.Union(d2.players, new PlComparer()));
            reLoad_data();
        }
示例#4
0
        private void save_data(string file = "")
        {
            if (file == "")
            {
                file = $"{AppDomain.CurrentDomain.BaseDirectory}Отчеты" + Path.DirectorySeparatorChar + "Турнир " + DateTime.Today.ToString("d") + " autosave.tvl";
            }
            tvlData.zipdata();
            Data d = new Data();
            SerializableObject obj = new SerializableObject();

            obj.Data = d;
            MySerializer serializer = new MySerializer();

            serializer.SerializeObject(file, obj);
        }
示例#5
0
        private void save_data(string file = "")
        {
            if (file == "")
            {
                file = $"{AppDomain.CurrentDomain.BaseDirectory}Отчеты" + Path.DirectorySeparatorChar + "Турнир " + DateTime.Now.ToString("dd-MM-yyyy hh.mm") + " Рейтинг-лист.tvrl";
            }
            Data2 d2 = new Data2();

            if (Rlist != null)
            {
                d2.players = Rlist;
            }
            SerializableObject obj = new SerializableObject();

            obj.Data2 = d2;
            MySerializer serializer = new MySerializer();

            serializer.SerializeObject(file, obj);
        }