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; }
private void openToolStripMenuItem_Click(object sender, EventArgs e) { PaintForm form = new PaintForm(pen, painter); form.MdiParent = this; form.Show(); }
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(); } }
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(); }
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); }
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); }
public FormManager(PaintForm paintForm) { _paintForm = paintForm; InitializeDrawingFeatures(); }
public DrawingFeatures(PaintForm paintForm) { InitializeContent(paintForm); }
public MenuController(PaintForm view) { this.view = view; view.SetMenuController(this); }