예제 #1
0
파일: SaveLoad.cs 프로젝트: dd84ai/MKE2LAB
        //Кнопка финального сохранения и загрузки
        private void button1_Click(object sender, EventArgs e)
        {
            int place = 0;

            switch (WinType)
            {
            case WindowType.Load:


                if (checkBox1.Checked == true)
                {
                    place = refered_sharp.GD.List_Of_Objects.Count();
                }
                else
                {
                    if (CheckNumberFromString(textBox2_NumberMatrix.Text, ref place) == false)
                    {
                        return;
                    }
                }
                refered_sharp.ReadMatrix("GraphicData_" + textBox1_NameMatrix.Text + ".txt", place);
                refered_sharp.Refresh_Window();


                //Close();
                break;

            case WindowType.Save:
                if (CheckNumberFromString(textBox2_NumberMatrix.Text, ref place) == false)
                {
                    return;
                }
                refered_sharp.WriteMatrix("GraphicData_" + textBox1_NameMatrix.Text + ".txt", place);

                //Close();
                break;
            }
            Refresher();
        }
예제 #2
0
 /// <summary>
 /// Записать матрицу в файл
 /// </summary>
 /// <param name="path">Путь к файлу</param>
 /// <param name="numObject">Номер матрицы в массиве объектов</param>
 static public void WriteMatrix(string path, int numObject)
 {
     SharpForm.WriteMatrix(path, numObject);
 }