public static int StartCore() { IZoneRenderer.ActiveZoneColor = Color.FromArgb(Int32.Parse(DropZone.Settings.ActiveColor.TrimStart('#'), System.Globalization.NumberStyles.HexNumber)); // IZoneRenderer.BackgroundOpacity = DropZone.Settings.BackgroundOpacity; IZoneRenderer.LabelColor = Color.FromArgb(Int32.Parse(DropZone.Settings.LabelColor.TrimStart('#'), System.Globalization.NumberStyles.HexNumber)); var dic = ScreenInfo.GetDisplays(); LayoutCollection = DropZone.Settings.Zones; renderer = new ZoneRenderer.GDI.GDIZone(LayoutCollection.ActiveLayout); var t = new SystemTray.TrayIcon(Process.GetCurrentProcess().Handle, "Exit Drop Zone", GetDropZoneIcon().GetHicon()); t.Events[SystemTray.TrayIcon.MouseMessages.WM_LBUTTONDOWN] += (s, e) => { System.Diagnostics.Process.Start(System.Reflection.Assembly.GetExecutingAssembly().Location, "management"); }; t.Events[SystemTray.TrayIcon.MouseMessages.WM_LBUTTONDBLCLK] += (s, e) => { System.Diagnostics.Process.Start(System.Reflection.Assembly.GetExecutingAssembly().Location, "management"); }; if (!Environment.GetCommandLineArgs().Any(x => x == "Silent")) { t.PostInfo("DropZone Running", "DropZone will run in the background, click the system try icon to close the process"); } #if DEBUG ShowConsole(); #else HideConsole(); #endif RegisterInputHooks(); return(MessagePump.Pump.Start((str, ex) => { t.PostInfo("DropZone Error", str); })); }
private void ApplyZonesTheme(IZoneRenderer theme) { if (null == theme) { return; } m_editorForm.Editor.CurrentZonesTheme = theme; }