public MainForm() { InitializeComponent(); Device.SetAsLCDForegroundApp(true); if (!IsHandleCreated) CreateHandle(); _hooks = new Hooks(Device); Device.Menu += Device_Menu; Device.Ok += DeviceOnOk; _currentTheme = _themer.GetTheme(Settings.Default.ThemeIdx); ApplyTheme(); EnterChatroom(); }
public MainForm() { InitializeComponent(); Device.SetAsLCDForegroundApp(true); if (!IsHandleCreated) { CreateHandle(); } _hooks = new Hooks(Device); Device.Menu += Device_Menu; Device.Ok += DeviceOnOk; _currentTheme = _themer.GetTheme(Settings.Default.ThemeIdx); ApplyTheme(); EnterChatroom(); }
static void Main() { if (_mutex.WaitOne(TimeSpan.Zero, true)) { Application.EnableVisualStyles(); try { new MainForm(); Application.Run(); } catch { } finally { _mutex.ReleaseMutex(); } } else { Hooks.BroadcastForegroundRequest(); } }