public Root() { SetDefaultPens(); SetDefaultConfig(); ReadOptions("pens.ini"); ReadOptions("config.ini"); trayMenu = new ContextMenu(); trayMenu.MenuItems.Add("About...", OnAbout); trayMenu.MenuItems.Add("Options...", OnOptions); trayMenu.MenuItems.Add("-"); trayMenu.MenuItems.Add("Exit", OnExit); Size size = SystemInformation.SmallIconSize; trayIcon = new NotifyIcon(); trayIcon.Text = "gInk"; trayIcon.ContextMenu = trayMenu; trayIcon.Visible = true; trayIcon.MouseClick += TrayIcon_Click; trayIcon.BalloonTipText = "Snapshot saved. Click here to browse snapshots."; trayIcon.BalloonTipClicked += TrayIcon_BalloonTipClicked; SetTrayIconColor(); SetHotkey(); TestMessageFilter mf = new TestMessageFilter(this); Application.AddMessageFilter(mf); FormCollection = null; FormDisplay = null; }
public void StartInk() { if (FormDisplay != null || FormCollection != null) { return; } //Docked = false; FormDisplay = new FormDisplay(this); FormCollection = new FormCollection(this); FormButtonHitter = new FormButtonHitter(this); if (CurrentPen <= 0) { CurrentPen = 1; } SelectPen(CurrentPen); FormDisplay.Show(); FormCollection.Show(); FormDisplay.DrawButtons(true); if (UndoStrokes == null) { UndoStrokes = new Ink[8]; UndoStrokes[0] = FormCollection.IC.Ink.Clone(); UndoDepth = 0; UndoP = 0; } //UponUndoStrokes = FormCollection.IC.Ink.Clone(); }
public int CurrentPen = 1; // defaut pen public Root() { SetDefaultPens(); SetDefaultConfig(); ReadOptions("pens.ini"); ReadOptions("config.ini"); trayMenu = new ContextMenu(); trayMenu.MenuItems.Add("About", OnAbout); trayMenu.MenuItems.Add("Pen Settings", OnPenSetting); trayMenu.MenuItems.Add("-"); trayMenu.MenuItems.Add("Exit", OnExit); Size size = SystemInformation.SmallIconSize; trayIcon = new NotifyIcon(); trayIcon.Text = "gInk"; if (WhiteTrayIcon) { trayIcon.Icon = new Icon(gInk.Properties.Resources.icon_white, size); } else { trayIcon.Icon = new Icon(gInk.Properties.Resources.icon_red, size); } trayIcon.ContextMenu = trayMenu; trayIcon.Visible = true; trayIcon.MouseClick += TrayIcon_Click; int modifier = 0; if (Hotkey_Control) { modifier |= 0x2; } if (Hotkey_Alt) { modifier |= 0x1; } if (Hotkey_Shift) { modifier |= 0x4; } if (Hotkey_Win) { modifier |= 0x8; } if (modifier != 0) { RegisterHotKey(IntPtr.Zero, 0, modifier, Hotkey); } TestMessageFilter mf = new TestMessageFilter(this); Application.AddMessageFilter(mf); FormCollection = null; FormDisplay = null; }
public void StopInk() { FormCollection.Close(); FormDisplay.Close(); FormButtonHitter.Close(); //FormCollection.Dispose(); //FormDisplay.Dispose(); GC.Collect(); FormCollection = null; FormDisplay = null; }
public void StopInk() { FormCollection.Close(); FormDisplay.Close(); FormButtonHitter.Close(); GC.Collect(); FormCollection = null; FormDisplay = null; if (UponBalloonSnap) { ShowBalloonSnapshot(); UponBalloonSnap = false; } }
public void StartInk() { if (FormDisplay != null || FormCollection != null) { return; } //Docked = false; FormDisplay = new FormDisplay(this); FormCollection = new FormCollection(this); FormButtonHitter = new FormButtonHitter(this); FormDisplay.Show(); FormCollection.Show(); FormDisplay.DrawButtons(true); }
public void StartInk() { if (FormDisplay != null || FormCollection != null) { return; } //Docked = false; FormDisplay = new FormDisplay(this); FormCollection = new FormCollection(this); FormButtonHitter = new FormButtonHitter(this); if (CurrentPen < 0) { CurrentPen = 0; } if (!PenEnabled[CurrentPen]) { CurrentPen = 0; while (CurrentPen < MaxPenCount && !PenEnabled[CurrentPen]) { CurrentPen++; } if (CurrentPen == MaxPenCount) { CurrentPen = -2; } } SelectPen(CurrentPen); SetInkVisible(true); FormCollection.ButtonsEntering = 1; FormDisplay.Show(); FormCollection.Show(); FormDisplay.DrawButtons(true); if (UndoStrokes == null) { UndoStrokes = new Ink[8]; UndoStrokes[0] = FormCollection.IC.Ink.Clone(); UndoDepth = 0; UndoP = 0; } //UponUndoStrokes = FormCollection.IC.Ink.Clone(); }
public string SnapshotFileFullPath = ""; // used to record the last snapshot file name, to select it when the balloon is clicked public Root() { for (int p = 0; p < MaxPenCount; p++) { Hotkey_Pens[p] = new Hotkey(); } trayMenu = new ContextMenu(); trayMenu.MenuItems.Add(Local.MenuEntryAbout + "...", OnAbout); trayMenu.MenuItems.Add(Local.MenuEntryOptions + "...", OnOptions); trayMenu.MenuItems.Add("-"); trayMenu.MenuItems.Add(Local.MenuEntryExit, OnExit); SetDefaultPens(); SetDefaultConfig(); ReadOptions("pens.ini"); ReadOptions("config.ini"); ReadOptions("hotkeys.ini"); Size size = SystemInformation.SmallIconSize; trayIcon = new NotifyIcon(); trayIcon.Text = "gInk"; trayIcon.ContextMenu = trayMenu; trayIcon.Visible = true; trayIcon.MouseClick += TrayIcon_Click; trayIcon.BalloonTipText = Local.NotificationSnapshot; trayIcon.BalloonTipClicked += TrayIcon_BalloonTipClicked; SetTrayIconColor(); SetHotkey(); TestMessageFilter mf = new TestMessageFilter(this); Application.AddMessageFilter(mf); FormCollection = null; FormDisplay = null; }
public int CurrentPen = 1; // defaut pen public Root() { SetDefaultPens(); SetDefaultConfig(); ReadOptions("pens.ini"); ReadOptions("config.ini"); trayMenu = new ContextMenu(); trayMenu.MenuItems.Add("About", OnAbout); trayMenu.MenuItems.Add("Pen Configurations", OnPenSetting); trayMenu.MenuItems.Add("Options", OnOptions); trayMenu.MenuItems.Add("-"); trayMenu.MenuItems.Add("Exit", OnExit); Size size = SystemInformation.SmallIconSize; trayIcon = new NotifyIcon(); trayIcon.Text = "gInk"; if (WhiteTrayIcon) trayIcon.Icon = new Icon(gInk.Properties.Resources.icon_white, size); else trayIcon.Icon = new Icon(gInk.Properties.Resources.icon_red, size); trayIcon.ContextMenu = trayMenu; trayIcon.Visible = true; trayIcon.MouseClick += TrayIcon_Click; int modifier = 0; if (Hotkey_Control) modifier |= 0x2; if (Hotkey_Alt) modifier |= 0x1; if (Hotkey_Shift) modifier |= 0x4; if (Hotkey_Win) modifier |= 0x8; if (modifier != 0) RegisterHotKey(IntPtr.Zero, 0, modifier, Hotkey); TestMessageFilter mf = new TestMessageFilter(this); Application.AddMessageFilter(mf); FormCollection = null; FormDisplay = null; }
public void StartInk() { if (FormDisplay != null || FormCollection != null) return; //Docked = false; FormDisplay = new FormDisplay(this); FormCollection = new FormCollection(this); FormButtonHitter = new FormButtonHitter(this); if (CurrentPen <= 0) CurrentPen = 1; SelectPen(CurrentPen); FormDisplay.Show(); FormCollection.Show(); FormDisplay.DrawButtons(true); UndoStrokes = new Ink[8]; UndoStrokes[0] = FormCollection.IC.Ink.Clone(); UndoDepth = 0; UndoP = 0; //UponUndoStrokes = FormCollection.IC.Ink.Clone(); }
public int CurrentPen = 1; // defaut pen public Root() { SetDefaultPens(); SetDefaultConfig(); ReadOptions("pens.ini"); ReadOptions("config.ini"); trayMenu = new ContextMenu(); trayMenu.MenuItems.Add("About", OnAbout); trayMenu.MenuItems.Add("Pen Configurations", OnPenSetting); trayMenu.MenuItems.Add("Options", OnOptions); trayMenu.MenuItems.Add("-"); trayMenu.MenuItems.Add("Exit", OnExit); Size size = SystemInformation.SmallIconSize; trayIcon = new NotifyIcon(); trayIcon.Text = "gInk"; if (WhiteTrayIcon) { trayIcon.Icon = new Icon("icon_white.ico"); } else { trayIcon.Icon = new Icon("icon_red.ico"); } trayIcon.ContextMenu = trayMenu; trayIcon.Visible = true; trayIcon.MouseClick += TrayIcon_Click; trayIcon.BalloonTipText = "Snapshot saved. Click here to browse snapshots."; trayIcon.BalloonTipClicked += TrayIcon_BalloonTipClicked; int modifier = 0; if (Hotkey_Control) { modifier |= 0x2; } if (Hotkey_Alt) { modifier |= 0x1; } if (Hotkey_Shift) { modifier |= 0x4; } if (Hotkey_Win) { modifier |= 0x8; } if (modifier != 0) { RegisterHotKey(IntPtr.Zero, 0, modifier, Hotkey); } TestMessageFilter mf = new TestMessageFilter(this); Application.AddMessageFilter(mf); FormCollection = null; FormDisplay = null; }