示例#1
0
        private void newPaint(string imgPath)
        {
            mChild.Add(new PaintForm());
            PaintForm c = mChild[mChild.Count - 1];

            c.MdiParent = this;
            c.mImgPath  = imgPath;
            if (c.mImgPath == null)
            { // new file
                c.Text        = "제목 없음";
                c.WindowState = FormWindowState.Maximized;
            }
            else
            {
                c.Text        = Path.GetFileName(imgPath);
                c.mImg        = Image.FromFile(imgPath);
                c.WindowState = FormWindowState.Normal;
                c.Width       = c.mImg.Width + 16;
                c.Height      = c.mImg.Height + 39;
            }
            c.Show();

            tsmiDeleteImage.Enabled = true;
            tsmiSave.Enabled        = true;
        }
示例#2
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PaintForm form = new PaintForm(pen, painter);

            form.MdiParent = this;
            form.Show();
        }
示例#3
0
 private void openToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     if (openFileDialog1.ShowDialog() == DialogResult.OK)
     {
         PaintForm form = new PaintForm(openFileDialog1.FileName, pen, painter);
         form.MdiParent = this;
         form.Show();
     }
 }
示例#4
0
        private void InitializeContent(PaintForm paintForm)
        {
            PaintingArea = paintForm.PaintingArea;
            Graphics = Graphics.FromImage(PaintingArea.Image);
            Graphics.Clear(Color.White);

            Pencil = new Pen(Color.Black);
            Pencil.StartCap = LineCap.Round;
            Pencil.EndCap = LineCap.Round;

            DrawingHistory = new DrawingHistory();
            DrawingState = DrawingState.DrawPencil;

            CurrentColorBox = new PictureBox();
        }
示例#5
0
        static void Main()
        {
            Application.EnableVisualStyles();
              Application.SetCompatibleTextRenderingDefault(false);

              PaintModel model = new PaintModel();

              PaintForm mainView = new PaintForm();
              PictureController pictureController =
              new PictureController(model, mainView);

              ToolBarController toolBarController =
              new ToolBarController(model, mainView.toolBarView);

              model.ShowImageOnView();
              Application.Run(mainView);
        }
示例#6
0
        public TabForm()
        {
            InitializeComponent();
            PaintForm paintForm = new PaintForm();
            LogForm logForm = new LogForm();
            paintForm.TopLevel = false;
            paintForm.Visible = true;
            paintForm.FormBorderStyle = FormBorderStyle.None;
            paintForm.Dock = DockStyle.Fill;
            Select.TabPages[0].Controls.Add(paintForm);

            logForm.TopLevel = false;
            logForm.Visible = true;
            logForm.FormBorderStyle = FormBorderStyle.None;
            logForm.Dock = DockStyle.Fill;
            Select.TabPages[1].Controls.Add(logForm);
        }
示例#7
0
        public FormManager(PaintForm paintForm)
        {
            _paintForm = paintForm;

            InitializeDrawingFeatures();
        }
示例#8
0
 public DrawingFeatures(PaintForm paintForm)
 {
     InitializeContent(paintForm);
 }
示例#9
0
 public MenuController(PaintForm view)
 {
     this.view = view;
       view.SetMenuController(this);
 }