Exemplo n.º 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;
        }
Exemplo n.º 2
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PaintForm form = new PaintForm(pen, painter);

            form.MdiParent = this;
            form.Show();
        }
Exemplo n.º 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();
     }
 }
Exemplo n.º 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();
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 7
0
        public FormManager(PaintForm paintForm)
        {
            _paintForm = paintForm;

            InitializeDrawingFeatures();
        }
Exemplo n.º 8
0
 public DrawingFeatures(PaintForm paintForm)
 {
     InitializeContent(paintForm);
 }
Exemplo n.º 9
0
 public MenuController(PaintForm view)
 {
     this.view = view;
       view.SetMenuController(this);
 }