Beispiel #1
0
        public SaveSetAndRez(StatisticsData statistics, MatrixSapperButton mainMatrix, bool needSave = false)
        {
            Statistics     = statistics.massAllTimeData;
            selectedBatton = mainMatrix.form.selectedBatton;

            save = needSave;
            if (save)               // надо ли сохранять прогресс
            {
                matrix      = mainMatrix.matrix;
                n           = mainMatrix.n;
                m           = mainMatrix.m;
                kol_min     = mainMatrix.kol_min;
                kol_ost_min = mainMatrix.kol_ost_min;
                time        = mainMatrix.seconds;
            }
        }
Beispiel #2
0
        public Form1()
        {
            InitializeComponent();
            try {
                Stream          file     = File.OpenRead("settimgs.txt");
                BinaryFormatter fileRead = new BinaryFormatter();

                SaveSetAndRez saveS_R = (SaveSetAndRez)fileRead.Deserialize(file);
                file.Close();

                statistiks = new StatisticsData();
                statistiks.massAllTimeData = saveS_R.Statistics;
                selectedBatton             = saveS_R.selectedBatton;
                supMatrix = saveS_R.createMatrixSapperButton(this);
            }
            catch {
                supMatrix      = new MatrixSapperButton(this, 16, 16, 40);            // соответствует Medium
                selectedBatton = radioButtonOption.Medium;
                statistiks     = new StatisticsData();
            }

            supMatrix.AddMatrixSapperButtonOnForm();
        }