public TweenMain() { // この呼び出しは、Windows フォーム デザイナで必要です。 InitializeComponent(); // InitializeComponent() 呼び出しの後で初期化を追加します。 _hookGlobalHotkey = new HookGlobalHotkey(this); _hookGlobalHotkey.HotkeyPressed += HookGlobalHotkey_HotkeyPressed; _settingDialog.IntervalChanged += TimerInterval_Changed; _apiGauge.Control.Size = new Size(70, 22); _apiGauge.Control.Margin = new Padding(0, 3, 0, 2); _apiGauge.GaugeHeight = 8; _apiGauge.Control.DoubleClick += ApiInfoMenuItem_Click; StatusStrip1.Items.Insert(2, _apiGauge); _growlHelper = new GrowlHelper("Hoehoe"); _growlHelper.NotifyClicked += GrowlHelper_Callback; _timerTimeline = new System.Timers.Timer(); _timerTimeline.Elapsed += TimerTimeline_Elapsed; _securityManager = new InternetSecurityManager(PostBrowser); _thumbnail = new Thumbnail(this); MyCommon.TwitterApiInfo.Changed += TwitterApiInfo_Changed; Microsoft.Win32.SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged; }
private void GrowlHelper_Callback(object sender, GrowlHelper.NotifyCallbackEventArgs e) { if (ActiveForm == null) { BeginInvoke( new Action(() => { Visible = true; if (WindowState == FormWindowState.Minimized) { WindowState = FormWindowState.Normal; } Activate(); BringToFront(); if (e.NotifyType == GrowlHelper.NotifyType.DirectMessage) { if (!GoDirectMessage(e.StatusId)) { StatusText.Focus(); } } else { if (!GoStatus(e.StatusId)) { StatusText.Focus(); } } })); } }