• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision4df7778f41e192c70d9e7bedf1b90924361de49c (tree)
Time2011-01-22 20:44:57
Authorazyobuzin <azyobuzin@user...>
Commiterazyobuzin

Log Message

新着通知にバルーンを追加

Change Summary

  • delete: "\202\302\202\242\202\351\202\361\202\351\202\361/Controls/Tabs/TimelineTabPage.cs"
  • delete: "\202\302\202\242\202\351\202\361\202\351\202\361/Forms/MainForm.cs"
  • delete: "\202\302\202\242\202\351\202\361\202\351\202\361/Forms/NotifyForm.Designer.cs"
  • delete: "\202\302\202\242\202\351\202\361\202\351\202\361/ITwirunrunMainForm.cs"
  • delete: "\202\302\202\242\202\351\202\361\202\351\202\361/Settings/Settings.cs"

Incremental Difference

--- "a/\202\302\202\242\202\351\202\361\202\351\202\361/Controls/Tabs/TimelineTabPage.cs"
+++ "b/\202\302\202\242\202\351\202\361\202\351\202\361/Controls/Tabs/TimelineTabPage.cs"
@@ -1,6 +1,6 @@
1-using System;
2-using System.Collections.Generic;
1+using System.Collections.Generic;
32 using System.ComponentModel;
3+using System.Linq;
44 using System.Windows.Forms;
55
66 namespace Azyobuzi.Twirunrun
@@ -108,7 +108,21 @@ namespace Azyobuzi.Twirunrun
108108 this.Invoke((MethodInvoker)(() =>
109109 {
110110 if (TabSettings.NotifyNewTweet)
111- NotifyForm.ShowItems(newItems, this.FindForm());
111+ Settings.Instance.NotifyType.SelectCase()
112+ .Case(NotifyTypes.NotifyForm,
113+ () => NotifyForm.ShowItems(newItems, this.FindForm()))
114+ .Case(NotifyTypes.Balloon,
115+ () => this.GetMainForm().ShowBalloon(
116+ Settings.Instance.NotifyFormShowTime * 1000,
117+ TabSettings.Name + "の新着",
118+ string.Join("\n", newItems.Select(item =>
119+ string.Format("{0}:{1}", Settings.Instance.NameType == NameTypes.Name ?
120+ item.User.Name : item.User.Identifier.ScreenName,
121+ item.Text)
122+ )),
123+ ToolTipIcon.Info
124+ )
125+ );
112126 }));
113127 }
114128 }
--- "a/\202\302\202\242\202\351\202\361\202\351\202\361/Forms/MainForm.cs"
+++ "b/\202\302\202\242\202\351\202\361\202\351\202\361/Forms/MainForm.cs"
@@ -225,5 +225,10 @@ namespace Azyobuzi.Twirunrun
225225 {
226226 e.Cancel = e.CloseReason != CloseReason.UserClosing && !closing;
227227 }
228+
229+ public void ShowBalloon(int timeout, string tipTitle, string tipText, ToolTipIcon tipIcon)
230+ {
231+ notifyIcon1.ShowBalloonTip(timeout, tipTitle, tipText, tipIcon);
232+ }
228233 }
229234 }
--- "a/\202\302\202\242\202\351\202\361\202\351\202\361/Forms/NotifyForm.Designer.cs"
+++ "b/\202\302\202\242\202\351\202\361\202\351\202\361/Forms/NotifyForm.Designer.cs"
@@ -103,6 +103,7 @@
103103 this.Controls.Add(this.profileImg);
104104 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
105105 this.Name = "NotifyForm";
106+ this.Opacity = 0.8D;
106107 this.ShowInTaskbar = false;
107108 this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
108109 this.Text = "ついるんるん 通知画面";
--- "a/\202\302\202\242\202\351\202\361\202\351\202\361/ITwirunrunMainForm.cs"
+++ "b/\202\302\202\242\202\351\202\361\202\351\202\361/ITwirunrunMainForm.cs"
@@ -12,5 +12,6 @@ namespace Azyobuzi.Twirunrun
1212 void ShowDetailStatus(StatusInfo status);
1313 IEnumerable<TimelineTabPage> GetTabPages();
1414 void RefreshTimelines(IEnumerable<TimelineTabPage> tabs, bool first);
15+ void ShowBalloon(int timeout, string tipTitle, string tipText, ToolTipIcon tipIcon);
1516 }
1617 }
--- "a/\202\302\202\242\202\351\202\361\202\351\202\361/Settings/Settings.cs"
+++ "b/\202\302\202\242\202\351\202\361\202\351\202\361/Settings/Settings.cs"
@@ -615,7 +615,7 @@ namespace Azyobuzi.Twirunrun
615615 }
616616
617617 //
618- //新着通知表示時間
618+ //新着通知
619619 //
620620 private int notifyFormShowTime = 7;
621621 public int NotifyFormShowTime
@@ -633,6 +633,23 @@ namespace Azyobuzi.Twirunrun
633633 return notifyFormShowTime;
634634 }
635635 }
636+
637+ private NotifyTypes notifyType = NotifyTypes.NotifyForm;
638+ public NotifyTypes NotifyType
639+ {
640+ set
641+ {
642+ if (notifyType != value)
643+ {
644+ notifyType = value;
645+ OnPropertyChanged("NotifyType");
646+ }
647+ }
648+ get
649+ {
650+ return notifyType;
651+ }
652+ }
636653 }
637654
638655 public class FormSettings : IEquatable<FormSettings>
@@ -685,4 +702,10 @@ namespace Azyobuzi.Twirunrun
685702 Name,
686703 ScreenName
687704 }
705+
706+ public enum NotifyTypes
707+ {
708+ NotifyForm,
709+ Balloon
710+ }
688711 }