From: syo68k Date: Tue, 25 Jan 2011 15:05:46 +0000 (+0000) Subject: API簡易計算においてUserStreamを考慮するように X-Git-Tag: Tween_v0.9.8.0~41 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=c88622022e39a6347d742b358341f0ea012003f1;p=opentween%2Fopen-tween.git API簡易計算においてUserStreamを考慮するように git-svn-id: http://svn.sourceforge.jp/svnroot/tween/trunk@1407 e39ad16e-3079-482e-bb30-4b4d378143b6 --- diff --git a/Tween/AppendSettingDialog.Designer.vb b/Tween/AppendSettingDialog.Designer.vb index de45940a..a7f82836 100644 --- a/Tween/AppendSettingDialog.Designer.vb +++ b/Tween/AppendSettingDialog.Designer.vb @@ -26,6 +26,8 @@ Partial Class AppendSettingDialog Me.SplitContainer1 = New System.Windows.Forms.SplitContainer() Me.TreeViewSetting = New System.Windows.Forms.TreeView() Me.GetPeriodPanel = New System.Windows.Forms.Panel() + Me.LabelApiUsingUserStreamEnabled = New System.Windows.Forms.Label() + Me.LabelUserStreamActive = New System.Windows.Forms.Label() Me.Label21 = New System.Windows.Forms.Label() Me.UserTimelinePeriod = New System.Windows.Forms.TextBox() Me.TimelinePeriod = New System.Windows.Forms.TextBox() @@ -328,6 +330,8 @@ Partial Class AppendSettingDialog ' 'GetPeriodPanel ' + Me.GetPeriodPanel.Controls.Add(Me.LabelApiUsingUserStreamEnabled) + Me.GetPeriodPanel.Controls.Add(Me.LabelUserStreamActive) Me.GetPeriodPanel.Controls.Add(Me.Label21) Me.GetPeriodPanel.Controls.Add(Me.UserTimelinePeriod) Me.GetPeriodPanel.Controls.Add(Me.TimelinePeriod) @@ -348,6 +352,16 @@ Partial Class AppendSettingDialog resources.ApplyResources(Me.GetPeriodPanel, "GetPeriodPanel") Me.GetPeriodPanel.Name = "GetPeriodPanel" ' + 'LabelApiUsingUserStreamEnabled + ' + resources.ApplyResources(Me.LabelApiUsingUserStreamEnabled, "LabelApiUsingUserStreamEnabled") + Me.LabelApiUsingUserStreamEnabled.Name = "LabelApiUsingUserStreamEnabled" + ' + 'LabelUserStreamActive + ' + resources.ApplyResources(Me.LabelUserStreamActive, "LabelUserStreamActive") + Me.LabelUserStreamActive.Name = "LabelUserStreamActive" + ' 'Label21 ' resources.ApplyResources(Me.Label21, "Label21") @@ -2189,4 +2203,6 @@ Partial Class AppendSettingDialog Friend WithEvents Label29 As System.Windows.Forms.Label Friend WithEvents ComboBoxEventNotifySound As System.Windows.Forms.ComboBox Friend WithEvents Label35 As System.Windows.Forms.Label + Friend WithEvents LabelUserStreamActive As System.Windows.Forms.Label + Friend WithEvents LabelApiUsingUserStreamEnabled As System.Windows.Forms.Label End Class diff --git a/Tween/AppendSettingDialog.resx b/Tween/AppendSettingDialog.resx index 62ff5941..ea7cbfe5 100644 --- a/Tween/AppendSettingDialog.resx +++ b/Tween/AppendSettingDialog.resx @@ -260,6 +260,62 @@ 0 + + True + + + 22, 292 + + + 23, 12 + + + 18 + + + 999 + + + LabelApiUsingUserStreamEnabled + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GetPeriodPanel + + + 0 + + + True + + + 22, 245 + + + 348, 36 + + + 17 + + + UserStreamが有効です。 +タイムライン/Mentions/DMの定期更新、投稿時取得は停止しています。 +これらはUserStreamによりリアルタイム更新されます。 + + + LabelUserStreamActive + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GetPeriodPanel + + + 1 + True @@ -285,7 +341,7 @@ GetPeriodPanel - 0 + 2 258, 163 @@ -306,7 +362,7 @@ GetPeriodPanel - 1 + 3 258, 21 @@ -327,7 +383,7 @@ GetPeriodPanel - 2 + 4 True @@ -357,13 +413,13 @@ GetPeriodPanel - 3 + 5 NoControl - 120, 241 + 205, 323 108, 23 @@ -384,7 +440,7 @@ GetPeriodPanel - 4 + 6 True @@ -393,7 +449,7 @@ NoControl - 27, 220 + 22, 220 285, 12 @@ -414,7 +470,7 @@ GetPeriodPanel - 5 + 7 True @@ -447,7 +503,7 @@ GetPeriodPanel - 6 + 8 True @@ -456,7 +512,7 @@ NoControl - 22, 138 + 22, 142 102, 12 @@ -477,7 +533,7 @@ GetPeriodPanel - 7 + 9 258, 135 @@ -498,7 +554,7 @@ GetPeriodPanel - 8 + 10 True @@ -507,7 +563,7 @@ NoControl - 22, 114 + 22, 117 137, 12 @@ -528,7 +584,7 @@ GetPeriodPanel - 9 + 11 258, 111 @@ -549,7 +605,7 @@ GetPeriodPanel - 10 + 12 True @@ -558,7 +614,7 @@ NoControl - 22, 66 + 22, 67 123, 12 @@ -579,7 +635,7 @@ GetPeriodPanel - 11 + 13 258, 63 @@ -600,7 +656,7 @@ GetPeriodPanel - 12 + 14 True @@ -630,7 +686,7 @@ GetPeriodPanel - 13 + 15 True @@ -663,7 +719,7 @@ GetPeriodPanel - 14 + 16 True @@ -672,7 +728,7 @@ NoControl - 22, 90 + 22, 92 94, 12 @@ -693,7 +749,7 @@ GetPeriodPanel - 15 + 17 258, 87 @@ -714,7 +770,7 @@ GetPeriodPanel - 16 + 18 Fill diff --git a/Tween/AppendSettingDialog.vb b/Tween/AppendSettingDialog.vb index 12794eb7..50b953bc 100644 --- a/Tween/AppendSettingDialog.vb +++ b/Tween/AppendSettingDialog.vb @@ -2168,6 +2168,9 @@ Public Class AppendSettingDialog Dim tmp As Integer Dim ListsTabNum As Integer = 0 Dim UserTimelineTabNum As Integer = 0 + Dim ApiLists As Integer = 0 + Dim ApiUserTimeline As Integer = 0 + Dim UsingApiUserStream As Integer = 0 Try ' 初回起動時などにNothingの場合あり @@ -2207,14 +2210,16 @@ Public Class AppendSettingDialog ' Listsタブ計算 0は手動更新 If Integer.TryParse(ListsPeriod.Text, tmp) Then If tmp <> 0 Then - UsingApi += (3600 \ tmp) * ListsTabNum + ApiLists = (3600 \ tmp) * ListsTabNum + UsingApi += ApiLists End If End If - ' Listsタブ計算 0は手動更新 + ' UserTimelineタブ計算 0は手動更新 If Integer.TryParse(UserTimelinePeriod.Text, tmp) Then If tmp <> 0 Then - UsingApi += (3600 \ tmp) * UserTimelineTabNum + ApiUserTimeline = (3600 \ tmp) * UserTimelineTabNum + UsingApi += ApiUserTimeline End If End If @@ -2236,8 +2241,11 @@ Public Class AppendSettingDialog End If - LabelPostAndGet.Visible = CheckPostAndGet.Checked + LabelPostAndGet.Visible = CheckPostAndGet.Checked AndAlso Not tw.UserStreamEnabled + LabelUserStreamActive.Visible = tw.UserStreamEnabled + LabelApiUsingUserStreamEnabled.Text = String.Format(My.Resources.SettingAPIUse2, (ApiLists + ApiUserTimeline).ToString) + LabelApiUsingUserStreamEnabled.Visible = tw.UserStreamEnabled End Sub Private Sub CheckPostAndGet_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckPostAndGet.CheckedChanged diff --git a/Tween/My Project/Resources.Designer.vb b/Tween/My Project/Resources.Designer.vb index b47e691d..6e25ea5a 100644 --- a/Tween/My Project/Resources.Designer.vb +++ b/Tween/My Project/Resources.Designer.vb @@ -2165,6 +2165,15 @@ Namespace My.Resources End Property ''' + ''' UserStream有効時の消費API数 : {0} / h に類似しているローカライズされた文字列を検索します。 + ''' + Friend ReadOnly Property SettingAPIUse2() As String + Get + Return ResourceManager.GetString("SettingAPIUse2", resourceCulture) + End Get + End Property + + ''' ''' IDとAPIキーの組み合わせが違います。IDと同時に設定するのはパスワードではなくAPIキーです。ご確認ください。 に類似しているローカライズされた文字列を検索します。 ''' Friend ReadOnly Property SettingSave_ClickText1() As String diff --git a/Tween/My Project/Resources.resx b/Tween/My Project/Resources.resx index 3dcbef45..3599a7f6 100644 --- a/Tween/My Project/Resources.resx +++ b/Tween/My Project/Resources.resx @@ -1054,4 +1054,7 @@ ja + + UserStream有効時の消費API数 : {0} / h + \ No newline at end of file