Exemplo n.º 1
0
        private void MdiContainer_Load(object sender, EventArgs e)
        {
            // Create the NotifyIcon.
            this.mNotifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
            // The Icon property sets the icon that will appear
            // in the systray for this application.
            mNotifyIcon.Icon = global::InkNote.Properties.Resources.Icon1;

            // The ContextMenu property sets the menu that will
            // appear when the systray icon is right clicked.
            mNotifyIcon.ContextMenuStrip = this.contextMenuStrip1;

            // The Text property sets the text that will be displayed,
            // in a tooltip, when the mouse hovers over the systray icon.
            mNotifyIcon.Text = "InkNote";
            mNotifyIcon.Visible = true;

            mNotifyIcon.MouseClick += new MouseEventHandler(NotifyIcon_MouseClick);

            this.TransparencyKey = Color.FromArgb(255, 220, 33, 55);
            MdiClient Client = new MdiClient();
            Client.Click += new EventHandler(Client_Click);
            this.Controls.Add(Client);
            Client.BackColor = Color.FromArgb(255, 220, 33, 55);

            mFormPalette = new Palette();
            mFormPalette.MdiParent = this;
            mFormPalette.Show();
        }
Exemplo n.º 2
0
 public FormNote(Palette palette)
 {
     InitializeComponent();
     mFormPalette = palette;
     this.panel1.MouseMove += new MouseEventHandler(panel1_MouseMove);
     this.panel1.MouseDown += new MouseEventHandler(panel1_MouseDown);
     this.panel1.MouseUp += new MouseEventHandler(panel1_MouseUp);
     mInkPicture = new InkPicture();
     Palette.DEFAULT_PEN_HEIGHT = mInkPicture.DefaultDrawingAttributes.Height;
     Palette.DEFAULT_PEN_WIDTH = mInkPicture.DefaultDrawingAttributes.Width;
     this.panel1.Controls.Add(mInkPicture);
     mInkPicture.Dock = DockStyle.Fill;
     mBmpSize = this.ClientSize;
     mInkPicture.SelectionChanged += new InkOverlaySelectionChangedEventHandler(mInkPicture_SelectionChanged);
     mInkPicture.Stroke += new InkCollectorStrokeEventHandler(mInkPicture_Stroke);
 }
Exemplo n.º 3
0
 public FormNote(Palette palette, string path)
     : this(palette)
 {
     dataPath = path;
 }
Exemplo n.º 4
0
 public void setInkMode(Palette.MODE mode)
 {
     switch (mode)
     {
         case Palette.MODE.INK_DRAW:
             mInkPicture.InkEnabled = true;
             mInkPicture.Enabled = true;
             mInkPicture.EditingMode = InkOverlayEditingMode.Ink;
             break;
         case Palette.MODE.INK_SEL:
             mInkPicture.InkEnabled = true;
             mInkPicture.Enabled = true;
             mInkPicture.EditingMode = InkOverlayEditingMode.Select;
             break;
         case Palette.MODE.INK_POINT_ERASE:
             mInkPicture.InkEnabled = true;
             mInkPicture.Enabled = true;
             mInkPicture.EditingMode = InkOverlayEditingMode.Delete;
             mInkPicture.EraserMode = InkOverlayEraserMode.PointErase;
             break;
         case Palette.MODE.INK_STROKE_ERASE:
             mInkPicture.InkEnabled = true;
             mInkPicture.Enabled = true;
             mInkPicture.EditingMode = InkOverlayEditingMode.Delete;
             mInkPicture.EraserMode = InkOverlayEraserMode.StrokeErase;
             break;
         case Palette.MODE.IMG_PICK:
             mInkPicture.InkEnabled = false;
             mInkPicture.Enabled = false;
             mInkPicture.EditingMode = InkOverlayEditingMode.Ink;
             break;
         default:
             break;
     }
 }