Ejemplo n.º 1
0
        // 라인 추가 버튼
        private void AddLine_Click(object sender, EventArgs e)
        {
            if (m_LDrawLine.Count >= 2)
            {
                MessageBox.Show("2개 이상 만들 수 없다.");
                return;
            }

            DrawLine drawline = new DrawLine(100, 50);

            m_LDrawLine.Add(drawline);
        }
Ejemplo n.º 2
0
        // 불러오기
        private void LoadFile_Click(object sender, EventArgs e)
        {
            this.openFileDialog1.InitialDirectory = Directory.GetCurrentDirectory();
            this.openFileDialog1.DefaultExt       = "SaveFile";
            this.openFileDialog1.Filter           = "Save Files(*.sav)|*.sav";

            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                FileManager.Instance.LoadFile(this.openFileDialog1.FileName);

                // 맵 파일이 있다면 불러오기
                if (FileManager.Instance.m_szMapFileName != null)
                {
                    m_szMapFilePath = FileManager.Instance.m_szMapFileName;
                    if (m_kMapImage != null)
                    {
                        m_kMapImage.Dispose();
                    }

                    m_kMapImage = new Bitmap(m_szMapFilePath);
                }

                m_LDrawLine.Clear();
                for (int i = 0; i < FileManager.Instance.m_LDataFile.Count; ++i)
                {
                    DataFile data = FileManager.Instance.m_LDataFile[i];

                    DrawLine draw = new DrawLine();
                    draw.m_ControlPoints = data.m_LPoint;

                    // 곡선 재 계산
                    draw.RecalcSpline();

                    m_LDrawLine.Add(draw);
                }
            }
        }
Ejemplo n.º 3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            DrawLine drawline = new DrawLine();

            m_LDrawLine.Add(drawline);
        }