+++ /dev/null
-Option Strict On
-<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
-Partial Class FilterDialog
- Inherits System.Windows.Forms.Form
-
- 'フォームがコンポーネントの一覧をクリーンアップするために dispose をオーバーライドします。
- <System.Diagnostics.DebuggerNonUserCode()> _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
-
- 'Windows フォーム デザイナで必要です。
- Private components As System.ComponentModel.IContainer
-
- 'メモ: 以下のプロシージャは Windows フォーム デザイナで必要です。
- 'Windows フォーム デザイナを使用して変更できます。
- 'コード エディタを使って変更しないでください。
- <System.Diagnostics.DebuggerStepThrough()> _
- Private Sub InitializeComponent()
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FilterDialog))
- Me.ButtonClose = New System.Windows.Forms.Button()
- Me.ListFilters = New System.Windows.Forms.ListBox()
- Me.EditFilterGroup = New System.Windows.Forms.GroupBox()
- Me.Label11 = New System.Windows.Forms.Label()
- Me.GroupExclude = New System.Windows.Forms.GroupBox()
- Me.CheckExLambDa = New System.Windows.Forms.CheckBox()
- Me.TextExSource = New System.Windows.Forms.TextBox()
- Me.Label12 = New System.Windows.Forms.Label()
- Me.CheckExRetweet = New System.Windows.Forms.CheckBox()
- Me.CheckExCaseSensitive = New System.Windows.Forms.CheckBox()
- Me.RadioExAnd = New System.Windows.Forms.RadioButton()
- Me.Label1 = New System.Windows.Forms.Label()
- Me.CheckExURL = New System.Windows.Forms.CheckBox()
- Me.RadioExPLUS = New System.Windows.Forms.RadioButton()
- Me.CheckExRegex = New System.Windows.Forms.CheckBox()
- Me.Label2 = New System.Windows.Forms.Label()
- Me.Label3 = New System.Windows.Forms.Label()
- Me.Label4 = New System.Windows.Forms.Label()
- Me.ExUID = New System.Windows.Forms.TextBox()
- Me.ExMSG1 = New System.Windows.Forms.TextBox()
- Me.ExMSG2 = New System.Windows.Forms.TextBox()
- Me.GroupMatch = New System.Windows.Forms.GroupBox()
- Me.CheckLambda = New System.Windows.Forms.CheckBox()
- Me.TextSource = New System.Windows.Forms.TextBox()
- Me.Label5 = New System.Windows.Forms.Label()
- Me.CheckRetweet = New System.Windows.Forms.CheckBox()
- Me.CheckCaseSensitive = New System.Windows.Forms.CheckBox()
- Me.RadioAND = New System.Windows.Forms.RadioButton()
- Me.Label8 = New System.Windows.Forms.Label()
- Me.CheckURL = New System.Windows.Forms.CheckBox()
- Me.RadioPLUS = New System.Windows.Forms.RadioButton()
- Me.CheckRegex = New System.Windows.Forms.CheckBox()
- Me.Label9 = New System.Windows.Forms.Label()
- Me.Label7 = New System.Windows.Forms.Label()
- Me.Label6 = New System.Windows.Forms.Label()
- Me.UID = New System.Windows.Forms.TextBox()
- Me.MSG1 = New System.Windows.Forms.TextBox()
- Me.MSG2 = New System.Windows.Forms.TextBox()
- Me.GroupBox1 = New System.Windows.Forms.GroupBox()
- Me.CheckMark = New System.Windows.Forms.CheckBox()
- Me.OptCopy = New System.Windows.Forms.RadioButton()
- Me.OptMove = New System.Windows.Forms.RadioButton()
- Me.ButtonCancel = New System.Windows.Forms.Button()
- Me.ButtonOK = New System.Windows.Forms.Button()
- Me.ButtonNew = New System.Windows.Forms.Button()
- Me.ButtonDelete = New System.Windows.Forms.Button()
- Me.ButtonEdit = New System.Windows.Forms.Button()
- Me.GroupBox2 = New System.Windows.Forms.GroupBox()
- Me.ButtonRuleMove = New System.Windows.Forms.Button()
- Me.ButtonRuleCopy = New System.Windows.Forms.Button()
- Me.ButtonRuleDown = New System.Windows.Forms.Button()
- Me.ButtonRuleUp = New System.Windows.Forms.Button()
- Me.ListTabs = New System.Windows.Forms.ListBox()
- Me.ButtonAddTab = New System.Windows.Forms.Button()
- Me.ButtonDeleteTab = New System.Windows.Forms.Button()
- Me.ButtonRenameTab = New System.Windows.Forms.Button()
- Me.CheckManageRead = New System.Windows.Forms.CheckBox()
- Me.CheckNotifyNew = New System.Windows.Forms.CheckBox()
- Me.ComboSound = New System.Windows.Forms.ComboBox()
- Me.Label10 = New System.Windows.Forms.Label()
- Me.ButtonUp = New System.Windows.Forms.Button()
- Me.ButtonDown = New System.Windows.Forms.Button()
- Me.GroupTab = New System.Windows.Forms.GroupBox()
- Me.LabelTabType = New System.Windows.Forms.Label()
- Me.Label13 = New System.Windows.Forms.Label()
- Me.EditFilterGroup.SuspendLayout()
- Me.GroupExclude.SuspendLayout()
- Me.GroupMatch.SuspendLayout()
- Me.GroupBox1.SuspendLayout()
- Me.GroupBox2.SuspendLayout()
- Me.GroupTab.SuspendLayout()
- Me.SuspendLayout()
- '
- 'ButtonClose
- '
- resources.ApplyResources(Me.ButtonClose, "ButtonClose")
- Me.ButtonClose.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.ButtonClose.Name = "ButtonClose"
- Me.ButtonClose.UseVisualStyleBackColor = True
- '
- 'ListFilters
- '
- resources.ApplyResources(Me.ListFilters, "ListFilters")
- Me.ListFilters.FormattingEnabled = True
- Me.ListFilters.Name = "ListFilters"
- Me.ListFilters.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
- '
- 'EditFilterGroup
- '
- resources.ApplyResources(Me.EditFilterGroup, "EditFilterGroup")
- Me.EditFilterGroup.Controls.Add(Me.Label11)
- Me.EditFilterGroup.Controls.Add(Me.GroupExclude)
- Me.EditFilterGroup.Controls.Add(Me.GroupMatch)
- Me.EditFilterGroup.Controls.Add(Me.GroupBox1)
- Me.EditFilterGroup.Controls.Add(Me.ButtonCancel)
- Me.EditFilterGroup.Controls.Add(Me.ButtonOK)
- Me.EditFilterGroup.Name = "EditFilterGroup"
- Me.EditFilterGroup.TabStop = False
- '
- 'Label11
- '
- resources.ApplyResources(Me.Label11, "Label11")
- Me.Label11.Name = "Label11"
- '
- 'GroupExclude
- '
- resources.ApplyResources(Me.GroupExclude, "GroupExclude")
- Me.GroupExclude.Controls.Add(Me.CheckExLambDa)
- Me.GroupExclude.Controls.Add(Me.TextExSource)
- Me.GroupExclude.Controls.Add(Me.Label12)
- Me.GroupExclude.Controls.Add(Me.CheckExRetweet)
- Me.GroupExclude.Controls.Add(Me.CheckExCaseSensitive)
- Me.GroupExclude.Controls.Add(Me.RadioExAnd)
- Me.GroupExclude.Controls.Add(Me.Label1)
- Me.GroupExclude.Controls.Add(Me.CheckExURL)
- Me.GroupExclude.Controls.Add(Me.RadioExPLUS)
- Me.GroupExclude.Controls.Add(Me.CheckExRegex)
- Me.GroupExclude.Controls.Add(Me.Label2)
- Me.GroupExclude.Controls.Add(Me.Label3)
- Me.GroupExclude.Controls.Add(Me.Label4)
- Me.GroupExclude.Controls.Add(Me.ExUID)
- Me.GroupExclude.Controls.Add(Me.ExMSG1)
- Me.GroupExclude.Controls.Add(Me.ExMSG2)
- Me.GroupExclude.Name = "GroupExclude"
- Me.GroupExclude.TabStop = False
- '
- 'CheckExLambDa
- '
- resources.ApplyResources(Me.CheckExLambDa, "CheckExLambDa")
- Me.CheckExLambDa.Name = "CheckExLambDa"
- Me.CheckExLambDa.UseVisualStyleBackColor = True
- '
- 'TextExSource
- '
- resources.ApplyResources(Me.TextExSource, "TextExSource")
- Me.TextExSource.Name = "TextExSource"
- '
- 'Label12
- '
- resources.ApplyResources(Me.Label12, "Label12")
- Me.Label12.Name = "Label12"
- '
- 'CheckExRetweet
- '
- resources.ApplyResources(Me.CheckExRetweet, "CheckExRetweet")
- Me.CheckExRetweet.Name = "CheckExRetweet"
- Me.CheckExRetweet.UseVisualStyleBackColor = True
- '
- 'CheckExCaseSensitive
- '
- resources.ApplyResources(Me.CheckExCaseSensitive, "CheckExCaseSensitive")
- Me.CheckExCaseSensitive.Name = "CheckExCaseSensitive"
- Me.CheckExCaseSensitive.UseVisualStyleBackColor = True
- '
- 'RadioExAnd
- '
- resources.ApplyResources(Me.RadioExAnd, "RadioExAnd")
- Me.RadioExAnd.Checked = True
- Me.RadioExAnd.Name = "RadioExAnd"
- Me.RadioExAnd.TabStop = True
- Me.RadioExAnd.UseVisualStyleBackColor = True
- '
- 'Label1
- '
- resources.ApplyResources(Me.Label1, "Label1")
- Me.Label1.Name = "Label1"
- '
- 'CheckExURL
- '
- resources.ApplyResources(Me.CheckExURL, "CheckExURL")
- Me.CheckExURL.Name = "CheckExURL"
- Me.CheckExURL.UseVisualStyleBackColor = True
- '
- 'RadioExPLUS
- '
- resources.ApplyResources(Me.RadioExPLUS, "RadioExPLUS")
- Me.RadioExPLUS.Name = "RadioExPLUS"
- Me.RadioExPLUS.UseVisualStyleBackColor = True
- '
- 'CheckExRegex
- '
- resources.ApplyResources(Me.CheckExRegex, "CheckExRegex")
- Me.CheckExRegex.Name = "CheckExRegex"
- Me.CheckExRegex.UseVisualStyleBackColor = True
- '
- 'Label2
- '
- resources.ApplyResources(Me.Label2, "Label2")
- Me.Label2.Name = "Label2"
- '
- 'Label3
- '
- resources.ApplyResources(Me.Label3, "Label3")
- Me.Label3.Name = "Label3"
- '
- 'Label4
- '
- resources.ApplyResources(Me.Label4, "Label4")
- Me.Label4.Name = "Label4"
- '
- 'ExUID
- '
- resources.ApplyResources(Me.ExUID, "ExUID")
- Me.ExUID.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
- Me.ExUID.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.ExUID.Name = "ExUID"
- '
- 'ExMSG1
- '
- resources.ApplyResources(Me.ExMSG1, "ExMSG1")
- Me.ExMSG1.Name = "ExMSG1"
- '
- 'ExMSG2
- '
- resources.ApplyResources(Me.ExMSG2, "ExMSG2")
- Me.ExMSG2.Name = "ExMSG2"
- '
- 'GroupMatch
- '
- resources.ApplyResources(Me.GroupMatch, "GroupMatch")
- Me.GroupMatch.Controls.Add(Me.CheckLambda)
- Me.GroupMatch.Controls.Add(Me.TextSource)
- Me.GroupMatch.Controls.Add(Me.Label5)
- Me.GroupMatch.Controls.Add(Me.CheckRetweet)
- Me.GroupMatch.Controls.Add(Me.CheckCaseSensitive)
- Me.GroupMatch.Controls.Add(Me.RadioAND)
- Me.GroupMatch.Controls.Add(Me.Label8)
- Me.GroupMatch.Controls.Add(Me.CheckURL)
- Me.GroupMatch.Controls.Add(Me.RadioPLUS)
- Me.GroupMatch.Controls.Add(Me.CheckRegex)
- Me.GroupMatch.Controls.Add(Me.Label9)
- Me.GroupMatch.Controls.Add(Me.Label7)
- Me.GroupMatch.Controls.Add(Me.Label6)
- Me.GroupMatch.Controls.Add(Me.UID)
- Me.GroupMatch.Controls.Add(Me.MSG1)
- Me.GroupMatch.Controls.Add(Me.MSG2)
- Me.GroupMatch.Name = "GroupMatch"
- Me.GroupMatch.TabStop = False
- '
- 'CheckLambda
- '
- resources.ApplyResources(Me.CheckLambda, "CheckLambda")
- Me.CheckLambda.Name = "CheckLambda"
- Me.CheckLambda.UseVisualStyleBackColor = True
- '
- 'TextSource
- '
- resources.ApplyResources(Me.TextSource, "TextSource")
- Me.TextSource.Name = "TextSource"
- '
- 'Label5
- '
- resources.ApplyResources(Me.Label5, "Label5")
- Me.Label5.Name = "Label5"
- '
- 'CheckRetweet
- '
- resources.ApplyResources(Me.CheckRetweet, "CheckRetweet")
- Me.CheckRetweet.Name = "CheckRetweet"
- Me.CheckRetweet.UseVisualStyleBackColor = True
- '
- 'CheckCaseSensitive
- '
- resources.ApplyResources(Me.CheckCaseSensitive, "CheckCaseSensitive")
- Me.CheckCaseSensitive.Name = "CheckCaseSensitive"
- Me.CheckCaseSensitive.UseVisualStyleBackColor = True
- '
- 'RadioAND
- '
- resources.ApplyResources(Me.RadioAND, "RadioAND")
- Me.RadioAND.Checked = True
- Me.RadioAND.Name = "RadioAND"
- Me.RadioAND.TabStop = True
- Me.RadioAND.UseVisualStyleBackColor = True
- '
- 'Label8
- '
- resources.ApplyResources(Me.Label8, "Label8")
- Me.Label8.Name = "Label8"
- '
- 'CheckURL
- '
- resources.ApplyResources(Me.CheckURL, "CheckURL")
- Me.CheckURL.Name = "CheckURL"
- Me.CheckURL.UseVisualStyleBackColor = True
- '
- 'RadioPLUS
- '
- resources.ApplyResources(Me.RadioPLUS, "RadioPLUS")
- Me.RadioPLUS.Name = "RadioPLUS"
- Me.RadioPLUS.UseVisualStyleBackColor = True
- '
- 'CheckRegex
- '
- resources.ApplyResources(Me.CheckRegex, "CheckRegex")
- Me.CheckRegex.Name = "CheckRegex"
- Me.CheckRegex.UseVisualStyleBackColor = True
- '
- 'Label9
- '
- resources.ApplyResources(Me.Label9, "Label9")
- Me.Label9.Name = "Label9"
- '
- 'Label7
- '
- resources.ApplyResources(Me.Label7, "Label7")
- Me.Label7.Name = "Label7"
- '
- 'Label6
- '
- resources.ApplyResources(Me.Label6, "Label6")
- Me.Label6.Name = "Label6"
- '
- 'UID
- '
- resources.ApplyResources(Me.UID, "UID")
- Me.UID.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
- Me.UID.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.UID.Name = "UID"
- '
- 'MSG1
- '
- resources.ApplyResources(Me.MSG1, "MSG1")
- Me.MSG1.Name = "MSG1"
- '
- 'MSG2
- '
- resources.ApplyResources(Me.MSG2, "MSG2")
- Me.MSG2.Name = "MSG2"
- '
- 'GroupBox1
- '
- resources.ApplyResources(Me.GroupBox1, "GroupBox1")
- Me.GroupBox1.Controls.Add(Me.CheckMark)
- Me.GroupBox1.Controls.Add(Me.OptCopy)
- Me.GroupBox1.Controls.Add(Me.OptMove)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.TabStop = False
- '
- 'CheckMark
- '
- resources.ApplyResources(Me.CheckMark, "CheckMark")
- Me.CheckMark.Name = "CheckMark"
- Me.CheckMark.UseVisualStyleBackColor = True
- '
- 'OptCopy
- '
- resources.ApplyResources(Me.OptCopy, "OptCopy")
- Me.OptCopy.Name = "OptCopy"
- Me.OptCopy.TabStop = True
- Me.OptCopy.UseVisualStyleBackColor = True
- '
- 'OptMove
- '
- resources.ApplyResources(Me.OptMove, "OptMove")
- Me.OptMove.Name = "OptMove"
- Me.OptMove.TabStop = True
- Me.OptMove.UseVisualStyleBackColor = True
- '
- 'ButtonCancel
- '
- resources.ApplyResources(Me.ButtonCancel, "ButtonCancel")
- Me.ButtonCancel.Name = "ButtonCancel"
- Me.ButtonCancel.UseVisualStyleBackColor = True
- '
- 'ButtonOK
- '
- resources.ApplyResources(Me.ButtonOK, "ButtonOK")
- Me.ButtonOK.Name = "ButtonOK"
- Me.ButtonOK.UseVisualStyleBackColor = True
- '
- 'ButtonNew
- '
- resources.ApplyResources(Me.ButtonNew, "ButtonNew")
- Me.ButtonNew.Name = "ButtonNew"
- Me.ButtonNew.UseVisualStyleBackColor = True
- '
- 'ButtonDelete
- '
- resources.ApplyResources(Me.ButtonDelete, "ButtonDelete")
- Me.ButtonDelete.Name = "ButtonDelete"
- Me.ButtonDelete.UseVisualStyleBackColor = True
- '
- 'ButtonEdit
- '
- resources.ApplyResources(Me.ButtonEdit, "ButtonEdit")
- Me.ButtonEdit.Name = "ButtonEdit"
- Me.ButtonEdit.UseVisualStyleBackColor = True
- '
- 'GroupBox2
- '
- resources.ApplyResources(Me.GroupBox2, "GroupBox2")
- Me.GroupBox2.Controls.Add(Me.ButtonRuleMove)
- Me.GroupBox2.Controls.Add(Me.ButtonRuleCopy)
- Me.GroupBox2.Controls.Add(Me.ButtonRuleDown)
- Me.GroupBox2.Controls.Add(Me.ButtonRuleUp)
- Me.GroupBox2.Controls.Add(Me.ListFilters)
- Me.GroupBox2.Controls.Add(Me.ButtonEdit)
- Me.GroupBox2.Controls.Add(Me.ButtonDelete)
- Me.GroupBox2.Controls.Add(Me.ButtonNew)
- Me.GroupBox2.Controls.Add(Me.EditFilterGroup)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.TabStop = False
- '
- 'ButtonRuleMove
- '
- resources.ApplyResources(Me.ButtonRuleMove, "ButtonRuleMove")
- Me.ButtonRuleMove.Name = "ButtonRuleMove"
- Me.ButtonRuleMove.UseVisualStyleBackColor = True
- '
- 'ButtonRuleCopy
- '
- resources.ApplyResources(Me.ButtonRuleCopy, "ButtonRuleCopy")
- Me.ButtonRuleCopy.Name = "ButtonRuleCopy"
- Me.ButtonRuleCopy.UseVisualStyleBackColor = True
- '
- 'ButtonRuleDown
- '
- resources.ApplyResources(Me.ButtonRuleDown, "ButtonRuleDown")
- Me.ButtonRuleDown.Name = "ButtonRuleDown"
- Me.ButtonRuleDown.UseVisualStyleBackColor = True
- '
- 'ButtonRuleUp
- '
- resources.ApplyResources(Me.ButtonRuleUp, "ButtonRuleUp")
- Me.ButtonRuleUp.Name = "ButtonRuleUp"
- Me.ButtonRuleUp.UseVisualStyleBackColor = True
- '
- 'ListTabs
- '
- resources.ApplyResources(Me.ListTabs, "ListTabs")
- Me.ListTabs.FormattingEnabled = True
- Me.ListTabs.Name = "ListTabs"
- '
- 'ButtonAddTab
- '
- resources.ApplyResources(Me.ButtonAddTab, "ButtonAddTab")
- Me.ButtonAddTab.Name = "ButtonAddTab"
- Me.ButtonAddTab.UseVisualStyleBackColor = True
- '
- 'ButtonDeleteTab
- '
- resources.ApplyResources(Me.ButtonDeleteTab, "ButtonDeleteTab")
- Me.ButtonDeleteTab.Name = "ButtonDeleteTab"
- Me.ButtonDeleteTab.UseVisualStyleBackColor = True
- '
- 'ButtonRenameTab
- '
- resources.ApplyResources(Me.ButtonRenameTab, "ButtonRenameTab")
- Me.ButtonRenameTab.Name = "ButtonRenameTab"
- Me.ButtonRenameTab.UseVisualStyleBackColor = True
- '
- 'CheckManageRead
- '
- resources.ApplyResources(Me.CheckManageRead, "CheckManageRead")
- Me.CheckManageRead.Name = "CheckManageRead"
- Me.CheckManageRead.UseVisualStyleBackColor = True
- '
- 'CheckNotifyNew
- '
- resources.ApplyResources(Me.CheckNotifyNew, "CheckNotifyNew")
- Me.CheckNotifyNew.Name = "CheckNotifyNew"
- Me.CheckNotifyNew.UseVisualStyleBackColor = True
- '
- 'ComboSound
- '
- resources.ApplyResources(Me.ComboSound, "ComboSound")
- Me.ComboSound.FormattingEnabled = True
- Me.ComboSound.Name = "ComboSound"
- '
- 'Label10
- '
- resources.ApplyResources(Me.Label10, "Label10")
- Me.Label10.Name = "Label10"
- '
- 'ButtonUp
- '
- resources.ApplyResources(Me.ButtonUp, "ButtonUp")
- Me.ButtonUp.Name = "ButtonUp"
- Me.ButtonUp.UseVisualStyleBackColor = True
- '
- 'ButtonDown
- '
- resources.ApplyResources(Me.ButtonDown, "ButtonDown")
- Me.ButtonDown.Name = "ButtonDown"
- Me.ButtonDown.UseVisualStyleBackColor = True
- '
- 'GroupTab
- '
- resources.ApplyResources(Me.GroupTab, "GroupTab")
- Me.GroupTab.Controls.Add(Me.LabelTabType)
- Me.GroupTab.Controls.Add(Me.Label13)
- Me.GroupTab.Controls.Add(Me.ListTabs)
- Me.GroupTab.Controls.Add(Me.ButtonDown)
- Me.GroupTab.Controls.Add(Me.ButtonAddTab)
- Me.GroupTab.Controls.Add(Me.ButtonUp)
- Me.GroupTab.Controls.Add(Me.ButtonDeleteTab)
- Me.GroupTab.Controls.Add(Me.Label10)
- Me.GroupTab.Controls.Add(Me.ButtonRenameTab)
- Me.GroupTab.Controls.Add(Me.ComboSound)
- Me.GroupTab.Controls.Add(Me.CheckManageRead)
- Me.GroupTab.Controls.Add(Me.CheckNotifyNew)
- Me.GroupTab.Name = "GroupTab"
- Me.GroupTab.TabStop = False
- '
- 'LabelTabType
- '
- resources.ApplyResources(Me.LabelTabType, "LabelTabType")
- Me.LabelTabType.Name = "LabelTabType"
- '
- 'Label13
- '
- resources.ApplyResources(Me.Label13, "Label13")
- Me.Label13.Name = "Label13"
- '
- 'FilterDialog
- '
- resources.ApplyResources(Me, "$this")
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.CancelButton = Me.ButtonClose
- Me.ControlBox = False
- Me.Controls.Add(Me.GroupTab)
- Me.Controls.Add(Me.GroupBox2)
- Me.Controls.Add(Me.ButtonClose)
- Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
- Me.KeyPreview = True
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "FilterDialog"
- Me.ShowInTaskbar = False
- Me.TopMost = True
- Me.EditFilterGroup.ResumeLayout(False)
- Me.GroupExclude.ResumeLayout(False)
- Me.GroupExclude.PerformLayout()
- Me.GroupMatch.ResumeLayout(False)
- Me.GroupMatch.PerformLayout()
- Me.GroupBox1.ResumeLayout(False)
- Me.GroupBox1.PerformLayout()
- Me.GroupBox2.ResumeLayout(False)
- Me.GroupTab.ResumeLayout(False)
- Me.GroupTab.PerformLayout()
- Me.ResumeLayout(False)
-
- End Sub
- Friend WithEvents ButtonClose As System.Windows.Forms.Button
- Friend WithEvents ListFilters As System.Windows.Forms.ListBox
- Friend WithEvents EditFilterGroup As System.Windows.Forms.GroupBox
- Friend WithEvents RadioPLUS As System.Windows.Forms.RadioButton
- Friend WithEvents RadioAND As System.Windows.Forms.RadioButton
- Friend WithEvents MSG2 As System.Windows.Forms.TextBox
- Friend WithEvents Label9 As System.Windows.Forms.Label
- Friend WithEvents MSG1 As System.Windows.Forms.TextBox
- Friend WithEvents Label8 As System.Windows.Forms.Label
- Friend WithEvents Label7 As System.Windows.Forms.Label
- Friend WithEvents ButtonCancel As System.Windows.Forms.Button
- Friend WithEvents ButtonOK As System.Windows.Forms.Button
- Friend WithEvents UID As System.Windows.Forms.TextBox
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents ButtonNew As System.Windows.Forms.Button
- Friend WithEvents ButtonDelete As System.Windows.Forms.Button
- Friend WithEvents ButtonEdit As System.Windows.Forms.Button
- Friend WithEvents CheckURL As System.Windows.Forms.CheckBox
- Friend WithEvents CheckRegex As System.Windows.Forms.CheckBox
- Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
- Friend WithEvents OptMove As System.Windows.Forms.RadioButton
- Friend WithEvents OptCopy As System.Windows.Forms.RadioButton
- Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
- Friend WithEvents ListTabs As System.Windows.Forms.ListBox
- Friend WithEvents GroupMatch As System.Windows.Forms.GroupBox
- Friend WithEvents GroupExclude As System.Windows.Forms.GroupBox
- Friend WithEvents RadioExAnd As System.Windows.Forms.RadioButton
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents CheckExURL As System.Windows.Forms.CheckBox
- Friend WithEvents RadioExPLUS As System.Windows.Forms.RadioButton
- Friend WithEvents CheckExRegex As System.Windows.Forms.CheckBox
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents ExUID As System.Windows.Forms.TextBox
- Friend WithEvents ExMSG1 As System.Windows.Forms.TextBox
- Friend WithEvents ExMSG2 As System.Windows.Forms.TextBox
- Friend WithEvents CheckMark As System.Windows.Forms.CheckBox
- Friend WithEvents ButtonAddTab As System.Windows.Forms.Button
- Friend WithEvents ButtonDeleteTab As System.Windows.Forms.Button
- Friend WithEvents ButtonRenameTab As System.Windows.Forms.Button
- Friend WithEvents CheckManageRead As System.Windows.Forms.CheckBox
- Friend WithEvents CheckNotifyNew As System.Windows.Forms.CheckBox
- Friend WithEvents ComboSound As System.Windows.Forms.ComboBox
- Friend WithEvents Label10 As System.Windows.Forms.Label
- Friend WithEvents Label11 As System.Windows.Forms.Label
- Friend WithEvents ButtonUp As System.Windows.Forms.Button
- Friend WithEvents ButtonDown As System.Windows.Forms.Button
- Friend WithEvents GroupTab As System.Windows.Forms.GroupBox
- Friend WithEvents CheckExCaseSensitive As System.Windows.Forms.CheckBox
- Friend WithEvents CheckCaseSensitive As System.Windows.Forms.CheckBox
- Friend WithEvents CheckRetweet As System.Windows.Forms.CheckBox
- Friend WithEvents TextExSource As System.Windows.Forms.TextBox
- Friend WithEvents Label12 As System.Windows.Forms.Label
- Friend WithEvents CheckExRetweet As System.Windows.Forms.CheckBox
- Friend WithEvents TextSource As System.Windows.Forms.TextBox
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents ButtonRuleDown As System.Windows.Forms.Button
- Friend WithEvents ButtonRuleUp As System.Windows.Forms.Button
- Friend WithEvents ButtonRuleMove As System.Windows.Forms.Button
- Friend WithEvents ButtonRuleCopy As System.Windows.Forms.Button
- Friend WithEvents LabelTabType As System.Windows.Forms.Label
- Friend WithEvents Label13 As System.Windows.Forms.Label
- Friend WithEvents CheckExLambDa As System.Windows.Forms.CheckBox
- Friend WithEvents CheckLambda As System.Windows.Forms.CheckBox
-
-End Class
+++ /dev/null
-' Tween - Client of Twitter
-' Copyright (c) 2007-2011 kiri_feather (@kiri_feather) <kiri.feather@gmail.com>
-' (c) 2008-2011 Moz (@syo68k)
-' (c) 2008-2011 takeshik (@takeshik) <http://www.takeshik.org/>
-' (c) 2010-2011 anis774 (@anis774) <http://d.hatena.ne.jp/anis774/>
-' (c) 2010-2011 fantasticswallow (@f_swallow) <http://twitter.com/f_swallow>
-' All rights reserved.
-'
-' This file is part of Tween.
-'
-' This program is free software; you can redistribute it and/or modify it
-' under the terms of the GNU General Public License as published by the Free
-' Software Foundation; either version 3 of the License, or (at your option)
-' any later version.
-'
-' This program is distributed in the hope that it will be useful, but
-' WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-' or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-' for more details.
-'
-' You should have received a copy of the GNU General Public License along
-' with this program. If not, see <http://www.gnu.org/licenses/>, or write to
-' the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
-' Boston, MA 02110-1301, USA.
-
-Imports System.Collections.Specialized
-Imports System.Linq.Expressions
-
-Public Class FilterDialog
-
- Private _mode As EDITMODE
- Private _directAdd As Boolean
- Private _sts As TabInformations
- Private _cur As String
- Private idlist As New List(Of String)
-
- Private tabdialog As New TabsDialog(True)
-
- Private Enum EDITMODE
- AddNew
- Edit
- None
- End Enum
-
- Private Sub SetFilters(ByVal tabName As String)
- If ListTabs.Items.Count = 0 Then Exit Sub
-
- ListFilters.Items.Clear()
- ListFilters.Items.AddRange(_sts.Tabs(tabName).GetFilters())
- If ListFilters.Items.Count > 0 Then ListFilters.SelectedIndex = 0
-
- CheckManageRead.Checked = _sts.Tabs(tabName).UnreadManage
- CheckNotifyNew.Checked = _sts.Tabs(tabName).Notify
-
- Dim idx As Integer = ComboSound.Items.IndexOf(_sts.Tabs(tabName).SoundFile)
- If idx = -1 Then idx = 0
- ComboSound.SelectedIndex = idx
-
- If _directAdd Then Exit Sub
-
- ListTabs.Enabled = True
- GroupTab.Enabled = True
- ListFilters.Enabled = True
- If ListFilters.SelectedIndex <> -1 Then
- ShowDetail()
- End If
- EditFilterGroup.Enabled = False
- Select Case TabInformations.GetInstance.Tabs(tabName).TabType
- Case TabUsageType.Home, TabUsageType.DirectMessage, TabUsageType.Favorites, TabUsageType.PublicSearch, TabUsageType.Lists, TabUsageType.Related, TabUsageType.UserTimeline
- ButtonNew.Enabled = False
- ButtonEdit.Enabled = False
- ButtonDelete.Enabled = False
- ButtonRuleUp.Enabled = False
- ButtonRuleDown.Enabled = False
- ButtonRuleCopy.Enabled = False
- ButtonRuleMove.Enabled = False
- Case Else
- ButtonNew.Enabled = True
- If ListFilters.SelectedIndex > -1 Then
- ButtonEdit.Enabled = True
- ButtonDelete.Enabled = True
- ButtonRuleUp.Enabled = True
- ButtonRuleDown.Enabled = True
- ButtonRuleCopy.Enabled = True
- ButtonRuleMove.Enabled = True
- Else
- ButtonEdit.Enabled = False
- ButtonDelete.Enabled = False
- ButtonRuleUp.Enabled = False
- ButtonRuleDown.Enabled = False
- ButtonRuleCopy.Enabled = False
- ButtonRuleMove.Enabled = False
- End If
- End Select
- Select Case TabInformations.GetInstance.Tabs(tabName).TabType
- Case TabUsageType.Home
- LabelTabType.Text = My.Resources.TabUsageTypeName_Home
- Case TabUsageType.Mentions
- LabelTabType.Text = My.Resources.TabUsageTypeName_Mentions
- Case TabUsageType.DirectMessage
- LabelTabType.Text = My.Resources.TabUsageTypeName_DirectMessage
- Case TabUsageType.Favorites
- LabelTabType.Text = My.Resources.TabUsageTypeName_Favorites
- Case TabUsageType.UserDefined
- LabelTabType.Text = My.Resources.TabUsageTypeName_UserDefined
- Case TabUsageType.PublicSearch
- LabelTabType.Text = My.Resources.TabUsageTypeName_PublicSearch
- Case TabUsageType.Lists
- LabelTabType.Text = My.Resources.TabUsageTypeName_Lists
- Case TabUsageType.Related
- LabelTabType.Text = My.Resources.TabUsageTypeName_Related
- Case TabUsageType.UserTimeline
- LabelTabType.Text = My.Resources.TabUsageTypeName_UserTimeline
- Case Else
- LabelTabType.Text = "UNKNOWN"
- End Select
- ButtonRenameTab.Enabled = True
- If TabInformations.GetInstance.IsDefaultTab(tabName) Then
- ButtonDeleteTab.Enabled = False
- Else
- ButtonDeleteTab.Enabled = True
- End If
- ButtonClose.Enabled = True
- End Sub
-
- Public Sub SetCurrent(ByVal TabName As String)
- _cur = TabName
- End Sub
-
- Public Sub AddNewFilter(ByVal id As String, ByVal msg As String)
- '元フォームから直接呼ばれる
- ButtonNew.Enabled = False
- ButtonEdit.Enabled = False
- ButtonRuleUp.Enabled = False
- ButtonRuleDown.Enabled = False
- ButtonRuleCopy.Enabled = False
- ButtonRuleMove.Enabled = False
- ButtonDelete.Enabled = False
- ButtonClose.Enabled = False
- EditFilterGroup.Enabled = True
- ListTabs.Enabled = False
- GroupTab.Enabled = False
- ListFilters.Enabled = False
-
- RadioAND.Checked = True
- RadioPLUS.Checked = False
- UID.Text = id
- UID.SelectAll()
- MSG1.Text = msg
- MSG1.SelectAll()
- MSG2.Text = id + msg
- MSG2.SelectAll()
- TextSource.Text = ""
- UID.Enabled = True
- MSG1.Enabled = True
- MSG2.Enabled = False
- CheckRegex.Checked = False
- CheckURL.Checked = False
- CheckCaseSensitive.Checked = False
- CheckRetweet.Checked = False
- CheckLambda.Checked = False
-
- RadioExAnd.Checked = True
- RadioExPLUS.Checked = False
- ExUID.Text = ""
- ExUID.SelectAll()
- ExMSG1.Text = ""
- ExMSG1.SelectAll()
- ExMSG2.Text = ""
- ExMSG2.SelectAll()
- TextExSource.Text = ""
- ExUID.Enabled = True
- ExMSG1.Enabled = True
- ExMSG2.Enabled = False
- CheckExRegex.Checked = False
- CheckExURL.Checked = False
- CheckExCaseSensitive.Checked = False
- CheckExRetweet.Checked = False
- CheckExLambDa.Checked = False
-
- OptCopy.Checked = True
- CheckMark.Checked = True
- UID.Focus()
- _mode = EDITMODE.AddNew
- _directAdd = True
- End Sub
-
- Private Sub ButtonNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonNew.Click
- ButtonNew.Enabled = False
- ButtonEdit.Enabled = False
- ButtonClose.Enabled = False
- ButtonRuleUp.Enabled = False
- ButtonRuleDown.Enabled = False
- ButtonRuleCopy.Enabled = False
- ButtonRuleMove.Enabled = False
- ButtonDelete.Enabled = False
- ButtonClose.Enabled = False
- EditFilterGroup.Enabled = True
- ListTabs.Enabled = False
- GroupTab.Enabled = False
- ListFilters.Enabled = False
-
- RadioAND.Checked = True
- RadioPLUS.Checked = False
- UID.Text = ""
- MSG1.Text = ""
- MSG2.Text = ""
- TextSource.Text = ""
- UID.Enabled = True
- MSG1.Enabled = True
- MSG2.Enabled = False
- CheckRegex.Checked = False
- CheckURL.Checked = False
- CheckCaseSensitive.Checked = False
- CheckRetweet.Checked = False
- CheckLambda.Checked = False
-
- RadioExAnd.Checked = True
- RadioExPLUS.Checked = False
- ExUID.Text = ""
- ExMSG1.Text = ""
- ExMSG2.Text = ""
- TextExSource.Text = ""
- ExUID.Enabled = True
- ExMSG1.Enabled = True
- ExMSG2.Enabled = False
- CheckExRegex.Checked = False
- CheckExURL.Checked = False
- CheckExCaseSensitive.Checked = False
- CheckExRetweet.Checked = False
- CheckExLambDa.Checked = False
-
- OptCopy.Checked = True
- CheckMark.Checked = True
- UID.Focus()
- _mode = EDITMODE.AddNew
- End Sub
-
- Private Sub ButtonEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonEdit.Click
- If ListFilters.SelectedIndex = -1 Then Exit Sub
-
- ShowDetail()
-
- Dim idx As Integer = ListFilters.SelectedIndex
- ListFilters.SelectedIndex = -1
- ListFilters.SelectedIndex = idx
- ListFilters.Enabled = False
-
- ButtonNew.Enabled = False
- ButtonEdit.Enabled = False
- ButtonDelete.Enabled = False
- ButtonClose.Enabled = False
- ButtonRuleUp.Enabled = False
- ButtonRuleDown.Enabled = False
- ButtonRuleCopy.Enabled = False
- ButtonRuleMove.Enabled = False
- EditFilterGroup.Enabled = True
- ListTabs.Enabled = False
- GroupTab.Enabled = False
-
- _mode = EDITMODE.Edit
- End Sub
-
- Private Sub ButtonDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonDelete.Click
- If ListFilters.SelectedIndex = -1 Then Exit Sub
- Dim tmp As String = ""
- Dim rslt As Windows.Forms.DialogResult
-
- If ListFilters.SelectedIndices.Count = 1 Then
- tmp = String.Format(My.Resources.ButtonDelete_ClickText1, vbCrLf, ListFilters.SelectedItem.ToString)
- rslt = MessageBox.Show(tmp, My.Resources.ButtonDelete_ClickText2, _
- MessageBoxButtons.OKCancel, MessageBoxIcon.Question)
- Else
- tmp = String.Format(My.Resources.ButtonDelete_ClickText3, ListFilters.SelectedIndices.Count.ToString)
- rslt = MessageBox.Show(tmp, My.Resources.ButtonDelete_ClickText2, _
- MessageBoxButtons.OKCancel, MessageBoxIcon.Question)
- End If
- If rslt = Windows.Forms.DialogResult.Cancel Then Exit Sub
-
- For idx As Integer = ListFilters.Items.Count - 1 To 0 Step -1
- If ListFilters.GetSelected(idx) Then
- _sts.Tabs(ListTabs.SelectedItem.ToString()).RemoveFilter(DirectCast(ListFilters.Items(idx), FiltersClass))
- ListFilters.Items.RemoveAt(idx)
- End If
- Next
- End Sub
-
- Private Sub ButtonCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonCancel.Click
- ListTabs.Enabled = True
- GroupTab.Enabled = True
- ListFilters.Enabled = True
- ListFilters.Focus()
- If ListFilters.SelectedIndex <> -1 Then
- ShowDetail()
- End If
- EditFilterGroup.Enabled = False
- ButtonNew.Enabled = True
- If ListFilters.SelectedIndex > -1 Then
- ButtonEdit.Enabled = True
- ButtonDelete.Enabled = True
- ButtonRuleUp.Enabled = True
- ButtonRuleDown.Enabled = True
- ButtonRuleCopy.Enabled = True
- ButtonRuleMove.Enabled = True
- Else
- ButtonEdit.Enabled = False
- ButtonDelete.Enabled = False
- ButtonRuleUp.Enabled = False
- ButtonRuleDown.Enabled = False
- ButtonRuleCopy.Enabled = False
- ButtonRuleMove.Enabled = False
- End If
- ButtonClose.Enabled = True
- If _directAdd Then
- Me.Close()
- End If
- End Sub
-
- Private Sub ShowDetail()
-
- If _directAdd Then Exit Sub
-
- If ListFilters.SelectedIndex > -1 Then
- Dim fc As FiltersClass = DirectCast(ListFilters.SelectedItem, FiltersClass)
- If fc.SearchBoth Then
- RadioAND.Checked = True
- RadioPLUS.Checked = False
- UID.Enabled = True
- MSG1.Enabled = True
- MSG2.Enabled = False
- UID.Text = fc.NameFilter
- UID.SelectAll()
- MSG1.Text = ""
- MSG2.Text = ""
- For Each bf As String In fc.BodyFilter
- MSG1.Text += bf + " "
- Next
- MSG1.Text = MSG1.Text.Trim
- MSG1.SelectAll()
- Else
- RadioPLUS.Checked = True
- RadioAND.Checked = False
- UID.Enabled = False
- MSG1.Enabled = False
- MSG2.Enabled = True
- UID.Text = ""
- MSG1.Text = ""
- MSG2.Text = ""
- For Each bf As String In fc.BodyFilter
- MSG2.Text += bf + " "
- Next
- MSG2.Text = MSG2.Text.Trim
- MSG2.SelectAll()
- End If
- TextSource.Text = fc.Source
- CheckRegex.Checked = fc.UseRegex
- CheckURL.Checked = fc.SearchUrl
- CheckCaseSensitive.Checked = fc.CaseSensitive
- CheckRetweet.Checked = fc.IsRt
- CheckLambda.Checked = fc.UseLambda
-
- If fc.ExSearchBoth Then
- RadioExAnd.Checked = True
- RadioExPLUS.Checked = False
- ExUID.Enabled = True
- ExMSG1.Enabled = True
- ExMSG2.Enabled = False
- ExUID.Text = fc.ExNameFilter
- ExUID.SelectAll()
- ExMSG1.Text = ""
- ExMSG2.Text = ""
- For Each bf As String In fc.ExBodyFilter
- ExMSG1.Text += bf + " "
- Next
- ExMSG1.Text = ExMSG1.Text.Trim
- ExMSG1.SelectAll()
- Else
- RadioExPLUS.Checked = True
- RadioExAnd.Checked = False
- ExUID.Enabled = False
- ExMSG1.Enabled = False
- ExMSG2.Enabled = True
- ExUID.Text = ""
- ExMSG1.Text = ""
- ExMSG2.Text = ""
- For Each bf As String In fc.ExBodyFilter
- ExMSG2.Text += bf + " "
- Next
- ExMSG2.Text = ExMSG2.Text.Trim
- ExMSG2.SelectAll()
- End If
- TextExSource.Text = fc.ExSource
- CheckExRegex.Checked = fc.ExUseRegex
- CheckExURL.Checked = fc.ExSearchUrl
- CheckExCaseSensitive.Checked = fc.ExCaseSensitive
- CheckExRetweet.Checked = fc.IsExRt
- CheckExLambDa.Checked = fc.ExUseLambda
-
- If fc.MoveFrom Then
- OptMove.Checked = True
- Else
- OptCopy.Checked = True
- End If
- CheckMark.Checked = fc.SetMark
-
- ButtonEdit.Enabled = True
- ButtonDelete.Enabled = True
- ButtonRuleUp.Enabled = True
- ButtonRuleDown.Enabled = True
- ButtonRuleCopy.Enabled = True
- ButtonRuleMove.Enabled = True
- Else
- RadioAND.Checked = True
- RadioPLUS.Checked = False
- UID.Enabled = True
- MSG1.Enabled = True
- MSG2.Enabled = False
- UID.Text = ""
- MSG1.Text = ""
- MSG2.Text = ""
- TextSource.Text = ""
- CheckRegex.Checked = False
- CheckURL.Checked = False
- CheckCaseSensitive.Checked = False
- CheckRetweet.Checked = False
- CheckLambda.Checked = False
-
- RadioExAnd.Checked = True
- RadioExPLUS.Checked = False
- ExUID.Enabled = True
- ExMSG1.Enabled = True
- ExMSG2.Enabled = False
- ExUID.Text = ""
- ExMSG1.Text = ""
- ExMSG2.Text = ""
- TextExSource.Text = ""
- CheckExRegex.Checked = False
- CheckExURL.Checked = False
- CheckExCaseSensitive.Checked = False
- CheckExRetweet.Checked = False
- CheckExLambDa.Checked = False
-
- OptCopy.Checked = True
- CheckMark.Checked = True
-
- ButtonEdit.Enabled = False
- ButtonDelete.Enabled = False
- ButtonRuleUp.Enabled = False
- ButtonRuleDown.Enabled = False
- ButtonRuleCopy.Enabled = False
- ButtonRuleMove.Enabled = False
- End If
- End Sub
-
- Private Sub RadioAND_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioAND.CheckedChanged
- Dim flg As Boolean = RadioAND.Checked
- UID.Enabled = flg
- MSG1.Enabled = flg
- MSG2.Enabled = Not flg
- End Sub
-
- Private Sub ButtonOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonOK.Click
- Dim isBlankMatch As Boolean = False
- Dim isBlankExclude As Boolean = False
-
- '入力チェック
- If Not CheckMatchRule(isBlankMatch) OrElse _
- Not CheckExcludeRule(isBlankExclude) Then
- Exit Sub
- End If
- If isBlankMatch AndAlso isBlankExclude Then
- MessageBox.Show(My.Resources.ButtonOK_ClickText1, My.Resources.ButtonOK_ClickText2, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
- Exit Sub
- End If
-
- Dim i As Integer = ListFilters.SelectedIndex
- Dim ft As FiltersClass
-
- ft = New FiltersClass()
-
- ft.MoveFrom = OptMove.Checked
- ft.SetMark = CheckMark.Checked
-
- Dim bdy As String = ""
- If RadioAND.Checked Then
- ft.NameFilter = UID.Text
- Dim cnt As Integer = TweenMain.AtIdSupl.ItemCount
- TweenMain.AtIdSupl.AddItem("@" + ft.NameFilter)
- If cnt <> TweenMain.AtIdSupl.ItemCount Then
- TweenMain.ModifySettingAtId = True
- End If
- ft.SearchBoth = True
- bdy = MSG1.Text
- Else
- ft.NameFilter = ""
- ft.SearchBoth = False
- bdy = MSG2.Text
- End If
- ft.Source = TextSource.Text.Trim
-
- If CheckRegex.Checked OrElse CheckLambda.Checked Then
- ft.BodyFilter.Add(bdy)
- Else
- Dim bf() As String = bdy.Trim.Split(Chr(32))
- For Each bfs As String In bf
- If bfs <> "" Then ft.BodyFilter.Add(bfs.Trim)
- Next
- End If
-
- ft.UseRegex = CheckRegex.Checked
- ft.SearchUrl = CheckURL.Checked
- ft.CaseSensitive = CheckCaseSensitive.Checked
- ft.IsRt = CheckRetweet.Checked
- ft.UseLambda = CheckLambda.Checked
-
- bdy = ""
- If RadioExAnd.Checked Then
- ft.ExNameFilter = ExUID.Text
- ft.ExSearchBoth = True
- bdy = ExMSG1.Text
- Else
- ft.ExNameFilter = ""
- ft.ExSearchBoth = False
- bdy = ExMSG2.Text
- End If
- ft.ExSource = TextExSource.Text.Trim
-
- If CheckExRegex.Checked OrElse CheckExLambDa.Checked Then
- ft.ExBodyFilter.Add(bdy)
- Else
- Dim bf() As String = bdy.Trim.Split(Chr(32))
- For Each bfs As String In bf
- If bfs <> "" Then ft.ExBodyFilter.Add(bfs.Trim)
- Next
- End If
-
- ft.ExUseRegex = CheckExRegex.Checked
- ft.ExSearchUrl = CheckExURL.Checked
- ft.ExCaseSensitive = CheckExCaseSensitive.Checked
- ft.IsExRt = CheckExRetweet.Checked
- ft.ExUseLambda = CheckExLambDa.Checked
-
- If _mode = EDITMODE.AddNew Then
- If Not _sts.Tabs(ListTabs.SelectedItem.ToString()).AddFilter(ft) Then
- MessageBox.Show(My.Resources.ButtonOK_ClickText4, My.Resources.ButtonOK_ClickText2, MessageBoxButtons.OK, MessageBoxIcon.Error)
- End If
- Else
- _sts.Tabs(ListTabs.SelectedItem.ToString()).EditFilter(DirectCast(ListFilters.SelectedItem, FiltersClass), ft)
- End If
-
- SetFilters(ListTabs.SelectedItem.ToString)
- ListFilters.SelectedIndex = -1
- If _mode = EDITMODE.AddNew Then
- ListFilters.SelectedIndex = ListFilters.Items.Count - 1
- Else
- ListFilters.SelectedIndex = i
- End If
- _mode = EDITMODE.None
-
-
- If _directAdd Then
- Me.Close()
- End If
- End Sub
-
- Private Function IsValidLambdaExp(ByVal text As String) As Boolean
- If text = "" Then Return True
- Try
- Dim expr As LambdaExpression
- expr = ParseLambda(Of PostClass, Boolean)(text, New PostClass)
- Catch ex As ParseException
- MessageBox.Show(My.Resources.IsValidLambdaExpText1 + ex.Message,
- My.Resources.IsValidLambdaExpText2, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
- Return False
- End Try
- Return True
- End Function
-
- Private Function IsValidRegexp(ByVal text As String) As Boolean
- Try
- Dim rgx As New System.Text.RegularExpressions.Regex(text)
- Catch ex As Exception
- MessageBox.Show(My.Resources.ButtonOK_ClickText3 + ex.Message, My.Resources.ButtonOK_ClickText2, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
- Return False
- End Try
- Return True
- End Function
-
- Private Function CheckMatchRule(ByRef isBlank As Boolean) As Boolean
- isBlank = False
- TextSource.Text = TextSource.Text.Trim()
- If RadioAND.Checked Then
- MSG1.Text = MSG1.Text.Trim
- UID.Text = UID.Text.Trim()
- If Not CheckRegex.Checked AndAlso Not CheckLambda.Checked Then MSG1.Text = MSG1.Text.Replace(" ", " ")
-
- If UID.Text = "" AndAlso MSG1.Text = "" AndAlso TextSource.Text = "" AndAlso CheckRetweet.Checked = False Then
- isBlank = True
- Return True
- End If
- If CheckLambda.Checked Then
- If Not IsValidLambdaExp(UID.Text) Then
- Return False
- End If
- If Not IsValidLambdaExp(MSG1.Text) Then
- Return False
- End If
- ElseIf CheckRegex.Checked Then
- If Not IsValidRegexp(UID.Text) Then
- Return False
- End If
- If Not IsValidRegexp(MSG1.Text) Then
- Return False
- End If
- End If
- Else
- MSG2.Text = MSG2.Text.Trim
- If Not CheckRegex.Checked AndAlso Not CheckLambda.Checked Then MSG2.Text = MSG2.Text.Replace(" ", " ")
- If MSG2.Text = "" AndAlso TextSource.Text = "" AndAlso CheckRetweet.Checked = False Then
- isBlank = True
- Return True
- End If
- If CheckLambda.Checked AndAlso Not IsValidLambdaExp(MSG2.Text) Then
- Return False
- ElseIf CheckRegex.Checked AndAlso Not IsValidRegexp(MSG2.Text) Then
- Return False
- End If
- End If
-
- If CheckRegex.Checked AndAlso Not IsValidRegexp(TextSource.Text) Then
- Return False
- End If
- Return True
- End Function
-
- Private Function CheckExcludeRule(ByRef isBlank As Boolean) As Boolean
- isBlank = False
- TextExSource.Text = TextExSource.Text.Trim
- If RadioExAnd.Checked Then
- ExMSG1.Text = ExMSG1.Text.Trim
- If Not CheckExRegex.Checked AndAlso Not CheckExLambDa.Checked Then ExMSG1.Text = ExMSG1.Text.Replace(" ", " ")
- ExUID.Text = ExUID.Text.Trim()
- If ExUID.Text = "" AndAlso ExMSG1.Text = "" AndAlso TextExSource.Text = "" AndAlso CheckExRetweet.Checked = False Then
- isBlank = True
- Return True
- End If
- If CheckExLambDa.Checked Then
- If Not IsValidLambdaExp(ExUID.Text) Then
- Return False
- End If
- If Not IsValidLambdaExp(ExMSG1.Text) Then
- Return False
- End If
- ElseIf CheckExRegex.Checked Then
- If Not IsValidRegexp(ExUID.Text) Then
- Return False
- End If
- If Not IsValidRegexp(ExMSG1.Text) Then
- Return False
- End If
- End If
- Else
- ExMSG2.Text = ExMSG2.Text.Trim
- If Not CheckExRegex.Checked AndAlso Not CheckExLambDa.Checked Then ExMSG2.Text = ExMSG2.Text.Replace(" ", " ")
- If ExMSG2.Text = "" AndAlso TextExSource.Text = "" AndAlso CheckExRetweet.Checked = False Then
- isBlank = True
- Return True
- End If
- If CheckExLambDa.Checked AndAlso Not IsValidLambdaExp(ExMSG2.Text) Then
- Return False
- ElseIf CheckExRegex.Checked AndAlso Not IsValidRegexp(ExMSG2.Text) Then
- Return False
- End If
- End If
-
- If CheckExRegex.Checked AndAlso Not IsValidRegexp(TextExSource.Text) Then
- Return False
- End If
-
- Return True
- End Function
-
- Private Sub ListFilters_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListFilters.SelectedIndexChanged
- ShowDetail()
- End Sub
-
- Private Sub ButtonClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonClose.Click
- Me.Close()
- End Sub
-
- Private Sub FilterDialog_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
- _directAdd = False
- End Sub
-
- Private Sub FilterDialog_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
- If e.KeyCode = Keys.Escape Then
- If EditFilterGroup.Enabled Then
- ButtonCancel_Click(Nothing, Nothing)
- Else
- ButtonClose_Click(Nothing, Nothing)
- End If
- End If
- End Sub
-
- Private Sub ListFilters_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListFilters.DoubleClick
- If ListFilters.SelectedItem Is Nothing Then
- Exit Sub
- End If
-
- If ListFilters.IndexFromPoint(ListFilters.PointToClient(Control.MousePosition)) = ListBox.NoMatches Then
- Exit Sub
- End If
-
- If ListFilters.Items(ListFilters.IndexFromPoint(ListFilters.PointToClient(Control.MousePosition))) Is Nothing Then
- Exit Sub
- End If
- ButtonEdit_Click(sender, e)
- End Sub
-
- Private Sub FilterDialog_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown
- _sts = TabInformations.GetInstance()
- ListTabs.Items.Clear()
- For Each key As String In _sts.Tabs.Keys
- ListTabs.Items.Add(key)
- Next
- SetTabnamesToDialog()
-
- ComboSound.Items.Clear()
- ComboSound.Items.Add("")
- Dim oDir As IO.DirectoryInfo = New IO.DirectoryInfo(My.Application.Info.DirectoryPath + IO.Path.DirectorySeparatorChar)
- If IO.Directory.Exists(IO.Path.Combine(My.Application.Info.DirectoryPath, "Sounds")) Then
- oDir = oDir.GetDirectories("Sounds")(0)
- End If
- For Each oFile As IO.FileInfo In oDir.GetFiles("*.wav")
- ComboSound.Items.Add(oFile.Name)
- Next
-
- idlist.Clear()
- For Each tmp As String In TweenMain.AtIdSupl.GetItemList
- idlist.Add(tmp.Remove(0, 1)) ' @文字削除
- Next
- UID.AutoCompleteCustomSource.Clear()
- UID.AutoCompleteCustomSource.AddRange(idlist.ToArray)
-
- ExUID.AutoCompleteCustomSource.Clear()
- ExUID.AutoCompleteCustomSource.AddRange(idlist.ToArray)
-
- '選択タブ変更
- If ListTabs.Items.Count > 0 Then
- If _cur.Length > 0 Then
- For i As Integer = 0 To ListTabs.Items.Count - 1
- If _cur = ListTabs.Items(i).ToString() Then
- ListTabs.SelectedIndex = i
- 'tabdialog.TabList.Items.Remove(_cur)
- Exit For
- End If
- Next
- End If
- End If
- End Sub
-
- Private Sub SetTabnamesToDialog()
- tabdialog.ClearTab()
- For Each key As String In _sts.Tabs.Keys
- If TabInformations.GetInstance.IsDistributableTab(key) Then tabdialog.AddTab(key)
- Next
- End Sub
-
- Private Sub ListTabs_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListTabs.SelectedIndexChanged
- If ListTabs.SelectedIndex > -1 Then
- SetFilters(ListTabs.SelectedItem.ToString)
- Else
- ListFilters.Items.Clear()
- End If
- End Sub
-
- Private Sub ButtonAddTab_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonAddTab.Click
- Dim tabName As String = Nothing
- Dim tabType As TabUsageType
- Using inputName As New InputTabName()
- inputName.TabName = _sts.GetUniqueTabName
- inputName.IsShowUsage = True
- inputName.ShowDialog()
- If inputName.DialogResult = Windows.Forms.DialogResult.Cancel Then Exit Sub
- tabName = inputName.TabName
- tabType = inputName.Usage
- End Using
- If tabName <> "" Then
- 'List対応
- Dim list As ListElement = Nothing
- If tabType = TabUsageType.Lists Then
- Dim rslt As String = DirectCast(Me.Owner, TweenMain).TwitterInstance.GetListsApi()
- If rslt <> "" Then
- MessageBox.Show("Failed to get lists. (" + rslt + ")")
- End If
- Using listAvail As New ListAvailable
- If listAvail.ShowDialog(Me) = Windows.Forms.DialogResult.Cancel Then Exit Sub
- If listAvail.SelectedList Is Nothing Then Exit Sub
- list = listAvail.SelectedList
- End Using
- End If
- If Not _sts.AddTab(tabName, tabType, list) OrElse Not DirectCast(Me.Owner, TweenMain).AddNewTab(tabName, False, tabType, list) Then
- Dim tmp As String = String.Format(My.Resources.AddTabMenuItem_ClickText1, tabName)
- MessageBox.Show(tmp, My.Resources.AddTabMenuItem_ClickText2, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
- Exit Sub
- Else
- '成功
- ListTabs.Items.Add(tabName)
- SetTabnamesToDialog()
- End If
- End If
- End Sub
-
- Private Sub ButtonDeleteTab_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonDeleteTab.Click
- If ListTabs.SelectedIndex > -1 AndAlso ListTabs.SelectedItem.ToString <> "" Then
- Dim tb As String = ListTabs.SelectedItem.ToString
- Dim idx As Integer = ListTabs.SelectedIndex
- If DirectCast(Me.Owner, TweenMain).RemoveSpecifiedTab(tb, True) Then
- ListTabs.Items.RemoveAt(idx)
- idx -= 1
- If idx < 0 Then idx = 0
- ListTabs.SelectedIndex = idx
- SetTabnamesToDialog()
- End If
- End If
- End Sub
-
- Private Sub ButtonRenameTab_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRenameTab.Click
- If ListTabs.SelectedIndex > -1 AndAlso ListTabs.SelectedItem.ToString <> "" Then
- Dim tb As String = ListTabs.SelectedItem.ToString
- Dim idx As Integer = ListTabs.SelectedIndex
- If DirectCast(Me.Owner, TweenMain).TabRename(tb) Then
- ListTabs.Items.RemoveAt(idx)
- ListTabs.Items.Insert(idx, tb)
- ListTabs.SelectedIndex = idx
- SetTabnamesToDialog()
- End If
- End If
- End Sub
-
- Private Sub CheckManageRead_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckManageRead.CheckedChanged
- If ListTabs.SelectedIndex > -1 AndAlso ListTabs.SelectedItem.ToString <> "" Then
- DirectCast(Me.Owner, TweenMain).ChangeTabUnreadManage( _
- ListTabs.SelectedItem.ToString, _
- CheckManageRead.Checked)
- End If
- End Sub
-
- Private Sub ButtonUp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonUp.Click
- If ListTabs.SelectedIndex > 0 AndAlso ListTabs.SelectedItem.ToString <> "" Then
- Dim selName As String = ListTabs.SelectedItem.ToString
- Dim tgtName As String = ListTabs.Items(ListTabs.SelectedIndex - 1).ToString
- DirectCast(Me.Owner, TweenMain).ReOrderTab( _
- selName, _
- tgtName, _
- True)
- Dim idx As Integer = ListTabs.SelectedIndex
- ListTabs.Items.RemoveAt(idx - 1)
- ListTabs.Items.Insert(idx, tgtName)
- End If
- End Sub
-
- Private Sub ButtonDown_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonDown.Click
- If ListTabs.SelectedIndex > -1 AndAlso ListTabs.SelectedIndex < ListTabs.Items.Count - 1 AndAlso Not String.IsNullOrEmpty(ListTabs.SelectedItem.ToString) Then
- Dim selName As String = ListTabs.SelectedItem.ToString
- Dim tgtName As String = ListTabs.Items(ListTabs.SelectedIndex + 1).ToString
- DirectCast(Me.Owner, TweenMain).ReOrderTab( _
- selName, _
- tgtName, _
- False)
- Dim idx As Integer = ListTabs.SelectedIndex
- ListTabs.Items.RemoveAt(idx + 1)
- ListTabs.Items.Insert(idx, tgtName)
- End If
- End Sub
-
- Private Sub CheckNotifyNew_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckNotifyNew.CheckedChanged
- If ListTabs.SelectedIndex > -1 AndAlso ListTabs.SelectedItem.ToString <> "" Then
- _sts.Tabs(ListTabs.SelectedItem.ToString).Notify = CheckNotifyNew.Checked
- End If
- End Sub
-
- Private Sub ComboSound_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboSound.SelectedIndexChanged
- If ListTabs.SelectedIndex > -1 AndAlso ListTabs.SelectedItem.ToString <> "" Then
- Dim filename As String = ""
- If ComboSound.SelectedIndex > -1 Then filename = ComboSound.SelectedItem.ToString
- _sts.Tabs(ListTabs.SelectedItem.ToString).SoundFile = filename
- End If
- End Sub
-
- Private Sub RadioExAnd_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioExAnd.CheckedChanged
- Dim flg As Boolean = RadioExAnd.Checked
- ExUID.Enabled = flg
- ExMSG1.Enabled = flg
- ExMSG2.Enabled = Not flg
- End Sub
-
- Private Sub OptMove_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OptMove.CheckedChanged
- CheckMark.Enabled = Not OptMove.Checked
- End Sub
-
- Private Sub ButtonRuleUp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRuleUp.Click
- If ListTabs.SelectedIndex > -1 AndAlso ListFilters.SelectedItem IsNot Nothing AndAlso ListFilters.SelectedIndex > 0 Then
- Dim tabname As String = ListTabs.SelectedItem.ToString
- Dim selected As FiltersClass = _sts.Tabs(tabname).Filters(ListFilters.SelectedIndex)
- Dim target As FiltersClass = _sts.Tabs(tabname).Filters(ListFilters.SelectedIndex - 1)
- Dim idx As Integer = ListFilters.SelectedIndex
- ListFilters.Items.RemoveAt(idx - 1)
- ListFilters.Items.Insert(idx, target)
- _sts.Tabs(tabname).Filters.RemoveAt(idx - 1)
- _sts.Tabs(tabname).Filters.Insert(idx, target)
- End If
- End Sub
-
- Private Sub ButtonRuleDown_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRuleDown.Click
- If ListTabs.SelectedIndex > -1 AndAlso ListFilters.SelectedItem IsNot Nothing AndAlso ListFilters.SelectedIndex < ListFilters.Items.Count - 1 Then
- Dim tabname As String = ListTabs.SelectedItem.ToString
- Dim selected As FiltersClass = _sts.Tabs(tabname).Filters(ListFilters.SelectedIndex)
- Dim target As FiltersClass = _sts.Tabs(tabname).Filters(ListFilters.SelectedIndex + 1)
- Dim idx As Integer = ListFilters.SelectedIndex
- ListFilters.Items.RemoveAt(idx + 1)
- ListFilters.Items.Insert(idx, target)
- _sts.Tabs(tabname).Filters.RemoveAt(idx + 1)
- _sts.Tabs(tabname).Filters.Insert(idx, target)
- End If
- End Sub
-
- Private Sub ButtonRuleCopy_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRuleCopy.Click
- If ListTabs.SelectedIndex > -1 AndAlso ListFilters.SelectedItem IsNot Nothing Then
- tabdialog.Text = My.Resources.ButtonRuleCopy_ClickText1
- If tabdialog.ShowDialog = Windows.Forms.DialogResult.Cancel Then
- Exit Sub
- End If
- Dim tabname As String = ListTabs.SelectedItem.ToString
- Dim tabs As StringCollection = tabdialog.SelectedTabNames
- Dim filters As New Generic.List(Of FiltersClass)
-
- For Each idx As Integer In ListFilters.SelectedIndices
- filters.Add(_sts.Tabs(tabname).Filters(idx).CopyTo(New FiltersClass))
- Next
- For Each tb As String In tabs
- If tb <> tabname Then
- For Each flt As FiltersClass In filters
- If Not _sts.Tabs(tb).Filters.Contains(flt) Then
- _sts.Tabs(tb).AddFilter(flt.CopyTo(New FiltersClass))
- End If
- Next
- End If
- Next
- SetFilters(tabname)
- End If
- End Sub
-
- Private Sub ButtonRuleMove_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRuleMove.Click
- If ListTabs.SelectedIndex > -1 AndAlso ListFilters.SelectedItem IsNot Nothing Then
- tabdialog.Text = My.Resources.ButtonRuleMove_ClickText1
- If tabdialog.ShowDialog = Windows.Forms.DialogResult.Cancel Then
- Exit Sub
- End If
- Dim tabname As String = ListTabs.SelectedItem.ToString
- Dim tabs As StringCollection = tabdialog.SelectedTabNames
- Dim filters As New Generic.List(Of FiltersClass)
-
- For Each idx As Integer In ListFilters.SelectedIndices
- filters.Add(_sts.Tabs(tabname).Filters(idx).CopyTo(New FiltersClass))
- Next
- If tabs.Count = 1 AndAlso tabs(0) = tabname Then Exit Sub
- For Each tb As String In tabs
- If tb <> tabname Then
- For Each flt As FiltersClass In filters
- If Not _sts.Tabs(tb).Filters.Contains(flt) Then
- _sts.Tabs(tb).AddFilter(flt.CopyTo(New FiltersClass))
- End If
- Next
- End If
- Next
- For idx As Integer = ListFilters.Items.Count - 1 To 0 Step -1
- If ListFilters.GetSelected(idx) Then
- _sts.Tabs(ListTabs.SelectedItem.ToString()).RemoveFilter(DirectCast(ListFilters.Items(idx), FiltersClass))
- ListFilters.Items.RemoveAt(idx)
- End If
- Next
- SetFilters(tabname)
- End If
- End Sub
-
- Private Sub FilterTextBox_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MSG1.KeyDown, MSG2.KeyDown, ExMSG1.KeyDown, ExMSG2.KeyDown
- If e.KeyCode = Keys.Space AndAlso e.Modifiers = (Keys.Shift Or Keys.Control) Then
- Dim main As TweenMain = DirectCast(Me.Owner, TweenMain)
- Dim tbox As TextBox = DirectCast(sender, TextBox)
- If tbox.SelectionStart > 0 Then
- Dim endidx As Integer = tbox.SelectionStart - 1
- Dim startstr As String = ""
- For i As Integer = tbox.SelectionStart - 1 To 0 Step -1
- Dim c As Char = tbox.Text.Chars(i)
- If Char.IsLetterOrDigit(c) OrElse c = "_" Then
- Continue For
- End If
- If c = "@" Then
- startstr = tbox.Text.Substring(i + 1, endidx - i)
- main.ShowSuplDialog(tbox, main.AtIdSupl, startstr.Length + 1, startstr)
- ElseIf c = "#" Then
- startstr = tbox.Text.Substring(i + 1, endidx - i)
- main.ShowSuplDialog(tbox, main.HashSupl, startstr.Length + 1, startstr)
- Else
- Exit For
- End If
- Next
- e.Handled = True
- End If
- End If
- End Sub
-
- Private Sub FilterTextBox_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles MSG1.KeyPress, MSG2.KeyPress, ExMSG1.KeyPress, ExMSG2.KeyPress
- Dim main As TweenMain = DirectCast(Me.Owner, TweenMain)
- Dim tbox As TextBox = DirectCast(sender, TextBox)
- If e.KeyChar = "@" Then
- 'If Not SettingDialog.UseAtIdSupplement Then Exit Sub
- '@マーク
- main.ShowSuplDialog(tbox, main.AtIdSupl)
- e.Handled = True
- ElseIf e.KeyChar = "#" Then
- 'If Not SettingDialog.UseHashSupplement Then Exit Sub
- main.ShowSuplDialog(tbox, main.HashSupl)
- e.Handled = True
- End If
- End Sub
-End Class
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
- <Compile Include="FilterDialog.Designer.vb">
- <DependentUpon>FilterDialog.vb</DependentUpon>
- </Compile>
- <Compile Include="FilterDialog.vb">
- <SubType>Form</SubType>
- </Compile>
<Compile Include="TabsDialog.Designer.vb">
<DependentUpon>TabsDialog.vb</DependentUpon>
</Compile>
<DependentUpon>DialogAsShieldIcon.vb</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
- <EmbeddedResource Include="FilterDialog.zh-CHS.resx">
- <DependentUpon>FilterDialog.vb</DependentUpon>
- <SubType>Designer</SubType>
- </EmbeddedResource>
<EmbeddedResource Include="HashtagManage.en.resx">
<SubType>Designer</SubType>
<DependentUpon>HashtagManage.vb</DependentUpon>
<EmbeddedResource Include="My Project\Resources.zh-CHS.resx">
<SubType>Designer</SubType>
</EmbeddedResource>
- <EmbeddedResource Include="FilterDialog.en.resx">
- <DependentUpon>FilterDialog.vb</DependentUpon>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="FilterDialog.resx">
- <DependentUpon>FilterDialog.vb</DependentUpon>
- <SubType>Designer</SubType>
- </EmbeddedResource>
<EmbeddedResource Include="TabsDialog.en.resx">
<DependentUpon>TabsDialog.vb</DependentUpon>
<SubType>Designer</SubType>
--- /dev/null
+namespace Tween
+{
+ partial class FilterDialog
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FilterDialog));
+ this.Label5 = new System.Windows.Forms.Label();
+ this.ButtonClose = new System.Windows.Forms.Button();
+ this.ButtonRuleMove = new System.Windows.Forms.Button();
+ this.CheckRetweet = new System.Windows.Forms.CheckBox();
+ this.ButtonRuleCopy = new System.Windows.Forms.Button();
+ this.TextSource = new System.Windows.Forms.TextBox();
+ this.ButtonRuleDown = new System.Windows.Forms.Button();
+ this.CheckLambda = new System.Windows.Forms.CheckBox();
+ this.ButtonRuleUp = new System.Windows.Forms.Button();
+ this.CheckCaseSensitive = new System.Windows.Forms.CheckBox();
+ this.CheckMark = new System.Windows.Forms.CheckBox();
+ this.ButtonCancel = new System.Windows.Forms.Button();
+ this.OptCopy = new System.Windows.Forms.RadioButton();
+ this.OptMove = new System.Windows.Forms.RadioButton();
+ this.RadioAND = new System.Windows.Forms.RadioButton();
+ this.Label8 = new System.Windows.Forms.Label();
+ this.CheckURL = new System.Windows.Forms.CheckBox();
+ this.ButtonOK = new System.Windows.Forms.Button();
+ this.RadioPLUS = new System.Windows.Forms.RadioButton();
+ this.CheckRegex = new System.Windows.Forms.CheckBox();
+ this.LabelTabType = new System.Windows.Forms.Label();
+ this.ListTabs = new System.Windows.Forms.ListBox();
+ this.ButtonDown = new System.Windows.Forms.Button();
+ this.ButtonAddTab = new System.Windows.Forms.Button();
+ this.ButtonNew = new System.Windows.Forms.Button();
+ this.ButtonUp = new System.Windows.Forms.Button();
+ this.ButtonDeleteTab = new System.Windows.Forms.Button();
+ this.Label10 = new System.Windows.Forms.Label();
+ this.ButtonRenameTab = new System.Windows.Forms.Button();
+ this.GroupTab = new System.Windows.Forms.GroupBox();
+ this.Label13 = new System.Windows.Forms.Label();
+ this.ComboSound = new System.Windows.Forms.ComboBox();
+ this.CheckManageRead = new System.Windows.Forms.CheckBox();
+ this.CheckNotifyNew = new System.Windows.Forms.CheckBox();
+ this.ButtonEdit = new System.Windows.Forms.Button();
+ this.ButtonDelete = new System.Windows.Forms.Button();
+ this.GroupBox2 = new System.Windows.Forms.GroupBox();
+ this.ListFilters = new System.Windows.Forms.ListBox();
+ this.EditFilterGroup = new System.Windows.Forms.GroupBox();
+ this.Label11 = new System.Windows.Forms.Label();
+ this.GroupExclude = new System.Windows.Forms.GroupBox();
+ this.CheckExLambDa = new System.Windows.Forms.CheckBox();
+ this.TextExSource = new System.Windows.Forms.TextBox();
+ this.Label12 = new System.Windows.Forms.Label();
+ this.CheckExRetweet = new System.Windows.Forms.CheckBox();
+ this.CheckExCaseSensitive = new System.Windows.Forms.CheckBox();
+ this.RadioExAnd = new System.Windows.Forms.RadioButton();
+ this.Label1 = new System.Windows.Forms.Label();
+ this.CheckExURL = new System.Windows.Forms.CheckBox();
+ this.RadioExPLUS = new System.Windows.Forms.RadioButton();
+ this.CheckExRegex = new System.Windows.Forms.CheckBox();
+ this.Label2 = new System.Windows.Forms.Label();
+ this.Label3 = new System.Windows.Forms.Label();
+ this.Label4 = new System.Windows.Forms.Label();
+ this.ExUID = new System.Windows.Forms.TextBox();
+ this.ExMSG1 = new System.Windows.Forms.TextBox();
+ this.ExMSG2 = new System.Windows.Forms.TextBox();
+ this.GroupMatch = new System.Windows.Forms.GroupBox();
+ this.Label9 = new System.Windows.Forms.Label();
+ this.Label7 = new System.Windows.Forms.Label();
+ this.Label6 = new System.Windows.Forms.Label();
+ this.UID = new System.Windows.Forms.TextBox();
+ this.MSG1 = new System.Windows.Forms.TextBox();
+ this.MSG2 = new System.Windows.Forms.TextBox();
+ this.GroupBox1 = new System.Windows.Forms.GroupBox();
+ this.GroupTab.SuspendLayout();
+ this.GroupBox2.SuspendLayout();
+ this.EditFilterGroup.SuspendLayout();
+ this.GroupExclude.SuspendLayout();
+ this.GroupMatch.SuspendLayout();
+ this.GroupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // Label5
+ //
+ resources.ApplyResources(this.Label5, "Label5");
+ this.Label5.Name = "Label5";
+ //
+ // ButtonClose
+ //
+ resources.ApplyResources(this.ButtonClose, "ButtonClose");
+ this.ButtonClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.ButtonClose.Name = "ButtonClose";
+ this.ButtonClose.UseVisualStyleBackColor = true;
+ this.ButtonClose.Click += new System.EventHandler(this.ButtonClose_Click);
+ //
+ // ButtonRuleMove
+ //
+ resources.ApplyResources(this.ButtonRuleMove, "ButtonRuleMove");
+ this.ButtonRuleMove.Name = "ButtonRuleMove";
+ this.ButtonRuleMove.UseVisualStyleBackColor = true;
+ this.ButtonRuleMove.Click += new System.EventHandler(this.ButtonRuleMove_Click);
+ //
+ // CheckRetweet
+ //
+ resources.ApplyResources(this.CheckRetweet, "CheckRetweet");
+ this.CheckRetweet.Name = "CheckRetweet";
+ this.CheckRetweet.UseVisualStyleBackColor = true;
+ //
+ // ButtonRuleCopy
+ //
+ resources.ApplyResources(this.ButtonRuleCopy, "ButtonRuleCopy");
+ this.ButtonRuleCopy.Name = "ButtonRuleCopy";
+ this.ButtonRuleCopy.UseVisualStyleBackColor = true;
+ this.ButtonRuleCopy.Click += new System.EventHandler(this.ButtonRuleCopy_Click);
+ //
+ // TextSource
+ //
+ resources.ApplyResources(this.TextSource, "TextSource");
+ this.TextSource.Name = "TextSource";
+ //
+ // ButtonRuleDown
+ //
+ resources.ApplyResources(this.ButtonRuleDown, "ButtonRuleDown");
+ this.ButtonRuleDown.Name = "ButtonRuleDown";
+ this.ButtonRuleDown.UseVisualStyleBackColor = true;
+ this.ButtonRuleDown.Click += new System.EventHandler(this.ButtonRuleDown_Click);
+ //
+ // CheckLambda
+ //
+ resources.ApplyResources(this.CheckLambda, "CheckLambda");
+ this.CheckLambda.Name = "CheckLambda";
+ this.CheckLambda.UseVisualStyleBackColor = true;
+ //
+ // ButtonRuleUp
+ //
+ resources.ApplyResources(this.ButtonRuleUp, "ButtonRuleUp");
+ this.ButtonRuleUp.Name = "ButtonRuleUp";
+ this.ButtonRuleUp.UseVisualStyleBackColor = true;
+ this.ButtonRuleUp.Click += new System.EventHandler(this.ButtonRuleUp_Click);
+ //
+ // CheckCaseSensitive
+ //
+ resources.ApplyResources(this.CheckCaseSensitive, "CheckCaseSensitive");
+ this.CheckCaseSensitive.Name = "CheckCaseSensitive";
+ this.CheckCaseSensitive.UseVisualStyleBackColor = true;
+ //
+ // CheckMark
+ //
+ resources.ApplyResources(this.CheckMark, "CheckMark");
+ this.CheckMark.Name = "CheckMark";
+ this.CheckMark.UseVisualStyleBackColor = true;
+ //
+ // ButtonCancel
+ //
+ resources.ApplyResources(this.ButtonCancel, "ButtonCancel");
+ this.ButtonCancel.Name = "ButtonCancel";
+ this.ButtonCancel.UseVisualStyleBackColor = true;
+ this.ButtonCancel.Click += new System.EventHandler(this.ButtonCancel_Click);
+ //
+ // OptCopy
+ //
+ resources.ApplyResources(this.OptCopy, "OptCopy");
+ this.OptCopy.Name = "OptCopy";
+ this.OptCopy.TabStop = true;
+ this.OptCopy.UseVisualStyleBackColor = true;
+ //
+ // OptMove
+ //
+ resources.ApplyResources(this.OptMove, "OptMove");
+ this.OptMove.Name = "OptMove";
+ this.OptMove.TabStop = true;
+ this.OptMove.UseVisualStyleBackColor = true;
+ this.OptMove.CheckedChanged += new System.EventHandler(this.OptMove_CheckedChanged);
+ //
+ // RadioAND
+ //
+ resources.ApplyResources(this.RadioAND, "RadioAND");
+ this.RadioAND.Checked = true;
+ this.RadioAND.Name = "RadioAND";
+ this.RadioAND.TabStop = true;
+ this.RadioAND.UseVisualStyleBackColor = true;
+ this.RadioAND.CheckedChanged += new System.EventHandler(this.RadioAND_CheckedChanged);
+ //
+ // Label8
+ //
+ resources.ApplyResources(this.Label8, "Label8");
+ this.Label8.Name = "Label8";
+ //
+ // CheckURL
+ //
+ resources.ApplyResources(this.CheckURL, "CheckURL");
+ this.CheckURL.Name = "CheckURL";
+ this.CheckURL.UseVisualStyleBackColor = true;
+ //
+ // ButtonOK
+ //
+ resources.ApplyResources(this.ButtonOK, "ButtonOK");
+ this.ButtonOK.Name = "ButtonOK";
+ this.ButtonOK.UseVisualStyleBackColor = true;
+ this.ButtonOK.Click += new System.EventHandler(this.ButtonOK_Click);
+ //
+ // RadioPLUS
+ //
+ resources.ApplyResources(this.RadioPLUS, "RadioPLUS");
+ this.RadioPLUS.Name = "RadioPLUS";
+ this.RadioPLUS.UseVisualStyleBackColor = true;
+ //
+ // CheckRegex
+ //
+ resources.ApplyResources(this.CheckRegex, "CheckRegex");
+ this.CheckRegex.Name = "CheckRegex";
+ this.CheckRegex.UseVisualStyleBackColor = true;
+ //
+ // LabelTabType
+ //
+ resources.ApplyResources(this.LabelTabType, "LabelTabType");
+ this.LabelTabType.Name = "LabelTabType";
+ //
+ // ListTabs
+ //
+ this.ListTabs.FormattingEnabled = true;
+ resources.ApplyResources(this.ListTabs, "ListTabs");
+ this.ListTabs.Name = "ListTabs";
+ this.ListTabs.SelectedIndexChanged += new System.EventHandler(this.ListTabs_SelectedIndexChanged);
+ //
+ // ButtonDown
+ //
+ resources.ApplyResources(this.ButtonDown, "ButtonDown");
+ this.ButtonDown.Name = "ButtonDown";
+ this.ButtonDown.UseVisualStyleBackColor = true;
+ this.ButtonDown.Click += new System.EventHandler(this.ButtonDown_Click);
+ //
+ // ButtonAddTab
+ //
+ resources.ApplyResources(this.ButtonAddTab, "ButtonAddTab");
+ this.ButtonAddTab.Name = "ButtonAddTab";
+ this.ButtonAddTab.UseVisualStyleBackColor = true;
+ this.ButtonAddTab.Click += new System.EventHandler(this.ButtonAddTab_Click);
+ //
+ // ButtonNew
+ //
+ resources.ApplyResources(this.ButtonNew, "ButtonNew");
+ this.ButtonNew.Name = "ButtonNew";
+ this.ButtonNew.UseVisualStyleBackColor = true;
+ this.ButtonNew.Click += new System.EventHandler(this.ButtonNew_Click);
+ //
+ // ButtonUp
+ //
+ resources.ApplyResources(this.ButtonUp, "ButtonUp");
+ this.ButtonUp.Name = "ButtonUp";
+ this.ButtonUp.UseVisualStyleBackColor = true;
+ this.ButtonUp.Click += new System.EventHandler(this.ButtonUp_Click);
+ //
+ // ButtonDeleteTab
+ //
+ resources.ApplyResources(this.ButtonDeleteTab, "ButtonDeleteTab");
+ this.ButtonDeleteTab.Name = "ButtonDeleteTab";
+ this.ButtonDeleteTab.UseVisualStyleBackColor = true;
+ this.ButtonDeleteTab.Click += new System.EventHandler(this.ButtonDeleteTab_Click);
+ //
+ // Label10
+ //
+ resources.ApplyResources(this.Label10, "Label10");
+ this.Label10.Name = "Label10";
+ //
+ // ButtonRenameTab
+ //
+ resources.ApplyResources(this.ButtonRenameTab, "ButtonRenameTab");
+ this.ButtonRenameTab.Name = "ButtonRenameTab";
+ this.ButtonRenameTab.UseVisualStyleBackColor = true;
+ this.ButtonRenameTab.Click += new System.EventHandler(this.ButtonRenameTab_Click);
+ //
+ // GroupTab
+ //
+ this.GroupTab.Controls.Add(this.LabelTabType);
+ this.GroupTab.Controls.Add(this.Label13);
+ this.GroupTab.Controls.Add(this.ListTabs);
+ this.GroupTab.Controls.Add(this.ButtonDown);
+ this.GroupTab.Controls.Add(this.ButtonAddTab);
+ this.GroupTab.Controls.Add(this.ButtonUp);
+ this.GroupTab.Controls.Add(this.ButtonDeleteTab);
+ this.GroupTab.Controls.Add(this.Label10);
+ this.GroupTab.Controls.Add(this.ButtonRenameTab);
+ this.GroupTab.Controls.Add(this.ComboSound);
+ this.GroupTab.Controls.Add(this.CheckManageRead);
+ this.GroupTab.Controls.Add(this.CheckNotifyNew);
+ resources.ApplyResources(this.GroupTab, "GroupTab");
+ this.GroupTab.Name = "GroupTab";
+ this.GroupTab.TabStop = false;
+ //
+ // Label13
+ //
+ resources.ApplyResources(this.Label13, "Label13");
+ this.Label13.Name = "Label13";
+ //
+ // ComboSound
+ //
+ this.ComboSound.FormattingEnabled = true;
+ resources.ApplyResources(this.ComboSound, "ComboSound");
+ this.ComboSound.Name = "ComboSound";
+ this.ComboSound.SelectedIndexChanged += new System.EventHandler(this.ComboSound_SelectedIndexChanged);
+ //
+ // CheckManageRead
+ //
+ resources.ApplyResources(this.CheckManageRead, "CheckManageRead");
+ this.CheckManageRead.Name = "CheckManageRead";
+ this.CheckManageRead.UseVisualStyleBackColor = true;
+ this.CheckManageRead.CheckedChanged += new System.EventHandler(this.CheckManageRead_CheckedChanged);
+ //
+ // CheckNotifyNew
+ //
+ resources.ApplyResources(this.CheckNotifyNew, "CheckNotifyNew");
+ this.CheckNotifyNew.Name = "CheckNotifyNew";
+ this.CheckNotifyNew.UseVisualStyleBackColor = true;
+ this.CheckNotifyNew.CheckedChanged += new System.EventHandler(this.CheckNotifyNew_CheckedChanged);
+ //
+ // ButtonEdit
+ //
+ resources.ApplyResources(this.ButtonEdit, "ButtonEdit");
+ this.ButtonEdit.Name = "ButtonEdit";
+ this.ButtonEdit.UseVisualStyleBackColor = true;
+ this.ButtonEdit.Click += new System.EventHandler(this.ButtonEdit_Click);
+ //
+ // ButtonDelete
+ //
+ resources.ApplyResources(this.ButtonDelete, "ButtonDelete");
+ this.ButtonDelete.Name = "ButtonDelete";
+ this.ButtonDelete.UseVisualStyleBackColor = true;
+ this.ButtonDelete.Click += new System.EventHandler(this.ButtonDelete_Click);
+ //
+ // GroupBox2
+ //
+ resources.ApplyResources(this.GroupBox2, "GroupBox2");
+ this.GroupBox2.Controls.Add(this.ButtonRuleMove);
+ this.GroupBox2.Controls.Add(this.ButtonRuleCopy);
+ this.GroupBox2.Controls.Add(this.ButtonRuleDown);
+ this.GroupBox2.Controls.Add(this.ButtonRuleUp);
+ this.GroupBox2.Controls.Add(this.ListFilters);
+ this.GroupBox2.Controls.Add(this.ButtonEdit);
+ this.GroupBox2.Controls.Add(this.ButtonDelete);
+ this.GroupBox2.Controls.Add(this.ButtonNew);
+ this.GroupBox2.Controls.Add(this.EditFilterGroup);
+ this.GroupBox2.Name = "GroupBox2";
+ this.GroupBox2.TabStop = false;
+ //
+ // ListFilters
+ //
+ this.ListFilters.FormattingEnabled = true;
+ resources.ApplyResources(this.ListFilters, "ListFilters");
+ this.ListFilters.Name = "ListFilters";
+ this.ListFilters.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
+ this.ListFilters.SelectedIndexChanged += new System.EventHandler(this.ListFilters_SelectedIndexChanged);
+ this.ListFilters.DoubleClick += new System.EventHandler(this.ListFilters_DoubleClick);
+ //
+ // EditFilterGroup
+ //
+ resources.ApplyResources(this.EditFilterGroup, "EditFilterGroup");
+ this.EditFilterGroup.Controls.Add(this.Label11);
+ this.EditFilterGroup.Controls.Add(this.GroupExclude);
+ this.EditFilterGroup.Controls.Add(this.GroupMatch);
+ this.EditFilterGroup.Controls.Add(this.GroupBox1);
+ this.EditFilterGroup.Controls.Add(this.ButtonCancel);
+ this.EditFilterGroup.Controls.Add(this.ButtonOK);
+ this.EditFilterGroup.Name = "EditFilterGroup";
+ this.EditFilterGroup.TabStop = false;
+ //
+ // Label11
+ //
+ resources.ApplyResources(this.Label11, "Label11");
+ this.Label11.Name = "Label11";
+ //
+ // GroupExclude
+ //
+ this.GroupExclude.Controls.Add(this.CheckExLambDa);
+ this.GroupExclude.Controls.Add(this.TextExSource);
+ this.GroupExclude.Controls.Add(this.Label12);
+ this.GroupExclude.Controls.Add(this.CheckExRetweet);
+ this.GroupExclude.Controls.Add(this.CheckExCaseSensitive);
+ this.GroupExclude.Controls.Add(this.RadioExAnd);
+ this.GroupExclude.Controls.Add(this.Label1);
+ this.GroupExclude.Controls.Add(this.CheckExURL);
+ this.GroupExclude.Controls.Add(this.RadioExPLUS);
+ this.GroupExclude.Controls.Add(this.CheckExRegex);
+ this.GroupExclude.Controls.Add(this.Label2);
+ this.GroupExclude.Controls.Add(this.Label3);
+ this.GroupExclude.Controls.Add(this.Label4);
+ this.GroupExclude.Controls.Add(this.ExUID);
+ this.GroupExclude.Controls.Add(this.ExMSG1);
+ this.GroupExclude.Controls.Add(this.ExMSG2);
+ resources.ApplyResources(this.GroupExclude, "GroupExclude");
+ this.GroupExclude.Name = "GroupExclude";
+ this.GroupExclude.TabStop = false;
+ //
+ // CheckExLambDa
+ //
+ resources.ApplyResources(this.CheckExLambDa, "CheckExLambDa");
+ this.CheckExLambDa.Name = "CheckExLambDa";
+ this.CheckExLambDa.UseVisualStyleBackColor = true;
+ //
+ // TextExSource
+ //
+ resources.ApplyResources(this.TextExSource, "TextExSource");
+ this.TextExSource.Name = "TextExSource";
+ //
+ // Label12
+ //
+ resources.ApplyResources(this.Label12, "Label12");
+ this.Label12.Name = "Label12";
+ //
+ // CheckExRetweet
+ //
+ resources.ApplyResources(this.CheckExRetweet, "CheckExRetweet");
+ this.CheckExRetweet.Name = "CheckExRetweet";
+ this.CheckExRetweet.UseVisualStyleBackColor = true;
+ //
+ // CheckExCaseSensitive
+ //
+ resources.ApplyResources(this.CheckExCaseSensitive, "CheckExCaseSensitive");
+ this.CheckExCaseSensitive.Name = "CheckExCaseSensitive";
+ this.CheckExCaseSensitive.UseVisualStyleBackColor = true;
+ //
+ // RadioExAnd
+ //
+ resources.ApplyResources(this.RadioExAnd, "RadioExAnd");
+ this.RadioExAnd.Checked = true;
+ this.RadioExAnd.Name = "RadioExAnd";
+ this.RadioExAnd.TabStop = true;
+ this.RadioExAnd.UseVisualStyleBackColor = true;
+ this.RadioExAnd.CheckedChanged += new System.EventHandler(this.RadioExAnd_CheckedChanged);
+ //
+ // Label1
+ //
+ resources.ApplyResources(this.Label1, "Label1");
+ this.Label1.Name = "Label1";
+ //
+ // CheckExURL
+ //
+ resources.ApplyResources(this.CheckExURL, "CheckExURL");
+ this.CheckExURL.Name = "CheckExURL";
+ this.CheckExURL.UseVisualStyleBackColor = true;
+ //
+ // RadioExPLUS
+ //
+ resources.ApplyResources(this.RadioExPLUS, "RadioExPLUS");
+ this.RadioExPLUS.Name = "RadioExPLUS";
+ this.RadioExPLUS.UseVisualStyleBackColor = true;
+ //
+ // CheckExRegex
+ //
+ resources.ApplyResources(this.CheckExRegex, "CheckExRegex");
+ this.CheckExRegex.Name = "CheckExRegex";
+ this.CheckExRegex.UseVisualStyleBackColor = true;
+ //
+ // Label2
+ //
+ resources.ApplyResources(this.Label2, "Label2");
+ this.Label2.Name = "Label2";
+ //
+ // Label3
+ //
+ resources.ApplyResources(this.Label3, "Label3");
+ this.Label3.Name = "Label3";
+ //
+ // Label4
+ //
+ resources.ApplyResources(this.Label4, "Label4");
+ this.Label4.Name = "Label4";
+ //
+ // ExUID
+ //
+ this.ExUID.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
+ this.ExUID.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource;
+ resources.ApplyResources(this.ExUID, "ExUID");
+ this.ExUID.Name = "ExUID";
+ //
+ // ExMSG1
+ //
+ resources.ApplyResources(this.ExMSG1, "ExMSG1");
+ this.ExMSG1.Name = "ExMSG1";
+ this.ExMSG1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FilterTextBox_KeyDown);
+ this.ExMSG1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.FilterTextBox_KeyPress);
+ //
+ // ExMSG2
+ //
+ resources.ApplyResources(this.ExMSG2, "ExMSG2");
+ this.ExMSG2.Name = "ExMSG2";
+ this.ExMSG2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FilterTextBox_KeyDown);
+ this.ExMSG2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.FilterTextBox_KeyPress);
+ //
+ // GroupMatch
+ //
+ this.GroupMatch.Controls.Add(this.CheckLambda);
+ this.GroupMatch.Controls.Add(this.TextSource);
+ this.GroupMatch.Controls.Add(this.Label5);
+ this.GroupMatch.Controls.Add(this.CheckRetweet);
+ this.GroupMatch.Controls.Add(this.CheckCaseSensitive);
+ this.GroupMatch.Controls.Add(this.RadioAND);
+ this.GroupMatch.Controls.Add(this.Label8);
+ this.GroupMatch.Controls.Add(this.CheckURL);
+ this.GroupMatch.Controls.Add(this.RadioPLUS);
+ this.GroupMatch.Controls.Add(this.CheckRegex);
+ this.GroupMatch.Controls.Add(this.Label9);
+ this.GroupMatch.Controls.Add(this.Label7);
+ this.GroupMatch.Controls.Add(this.Label6);
+ this.GroupMatch.Controls.Add(this.UID);
+ this.GroupMatch.Controls.Add(this.MSG1);
+ this.GroupMatch.Controls.Add(this.MSG2);
+ resources.ApplyResources(this.GroupMatch, "GroupMatch");
+ this.GroupMatch.Name = "GroupMatch";
+ this.GroupMatch.TabStop = false;
+ //
+ // Label9
+ //
+ resources.ApplyResources(this.Label9, "Label9");
+ this.Label9.Name = "Label9";
+ //
+ // Label7
+ //
+ resources.ApplyResources(this.Label7, "Label7");
+ this.Label7.Name = "Label7";
+ //
+ // Label6
+ //
+ resources.ApplyResources(this.Label6, "Label6");
+ this.Label6.Name = "Label6";
+ //
+ // UID
+ //
+ this.UID.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
+ this.UID.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource;
+ resources.ApplyResources(this.UID, "UID");
+ this.UID.Name = "UID";
+ //
+ // MSG1
+ //
+ resources.ApplyResources(this.MSG1, "MSG1");
+ this.MSG1.Name = "MSG1";
+ this.MSG1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FilterTextBox_KeyDown);
+ this.MSG1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.FilterTextBox_KeyPress);
+ //
+ // MSG2
+ //
+ resources.ApplyResources(this.MSG2, "MSG2");
+ this.MSG2.Name = "MSG2";
+ this.MSG2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FilterTextBox_KeyDown);
+ this.MSG2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.FilterTextBox_KeyPress);
+ //
+ // GroupBox1
+ //
+ this.GroupBox1.Controls.Add(this.CheckMark);
+ this.GroupBox1.Controls.Add(this.OptCopy);
+ this.GroupBox1.Controls.Add(this.OptMove);
+ resources.ApplyResources(this.GroupBox1, "GroupBox1");
+ this.GroupBox1.Name = "GroupBox1";
+ this.GroupBox1.TabStop = false;
+ //
+ // FilterDialog
+ //
+ resources.ApplyResources(this, "$this");
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.ButtonClose;
+ this.ControlBox = false;
+ this.Controls.Add(this.ButtonClose);
+ this.Controls.Add(this.GroupTab);
+ this.Controls.Add(this.GroupBox2);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+ this.KeyPreview = true;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FilterDialog";
+ this.ShowInTaskbar = false;
+ this.TopMost = true;
+ this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FilterDialog_FormClosed);
+ this.Shown += new System.EventHandler(this.FilterDialog_Shown);
+ this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FilterDialog_KeyDown);
+ this.GroupTab.ResumeLayout(false);
+ this.GroupTab.PerformLayout();
+ this.GroupBox2.ResumeLayout(false);
+ this.EditFilterGroup.ResumeLayout(false);
+ this.GroupExclude.ResumeLayout(false);
+ this.GroupExclude.PerformLayout();
+ this.GroupMatch.ResumeLayout(false);
+ this.GroupMatch.PerformLayout();
+ this.GroupBox1.ResumeLayout(false);
+ this.GroupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ internal System.Windows.Forms.Label Label5;
+ internal System.Windows.Forms.Button ButtonClose;
+ internal System.Windows.Forms.Button ButtonRuleMove;
+ internal System.Windows.Forms.CheckBox CheckRetweet;
+ internal System.Windows.Forms.Button ButtonRuleCopy;
+ internal System.Windows.Forms.TextBox TextSource;
+ internal System.Windows.Forms.Button ButtonRuleDown;
+ internal System.Windows.Forms.CheckBox CheckLambda;
+ internal System.Windows.Forms.Button ButtonRuleUp;
+ internal System.Windows.Forms.CheckBox CheckCaseSensitive;
+ internal System.Windows.Forms.CheckBox CheckMark;
+ internal System.Windows.Forms.Button ButtonCancel;
+ internal System.Windows.Forms.RadioButton OptCopy;
+ internal System.Windows.Forms.RadioButton OptMove;
+ internal System.Windows.Forms.RadioButton RadioAND;
+ internal System.Windows.Forms.Label Label8;
+ internal System.Windows.Forms.CheckBox CheckURL;
+ internal System.Windows.Forms.Button ButtonOK;
+ internal System.Windows.Forms.RadioButton RadioPLUS;
+ internal System.Windows.Forms.CheckBox CheckRegex;
+ internal System.Windows.Forms.Label LabelTabType;
+ internal System.Windows.Forms.ListBox ListTabs;
+ internal System.Windows.Forms.Button ButtonDown;
+ internal System.Windows.Forms.Button ButtonAddTab;
+ internal System.Windows.Forms.Button ButtonNew;
+ internal System.Windows.Forms.Button ButtonUp;
+ internal System.Windows.Forms.Button ButtonDeleteTab;
+ internal System.Windows.Forms.Label Label10;
+ internal System.Windows.Forms.Button ButtonRenameTab;
+ internal System.Windows.Forms.GroupBox GroupTab;
+ internal System.Windows.Forms.Label Label13;
+ internal System.Windows.Forms.ComboBox ComboSound;
+ internal System.Windows.Forms.CheckBox CheckManageRead;
+ internal System.Windows.Forms.CheckBox CheckNotifyNew;
+ internal System.Windows.Forms.Button ButtonEdit;
+ internal System.Windows.Forms.Button ButtonDelete;
+ internal System.Windows.Forms.GroupBox GroupBox2;
+ internal System.Windows.Forms.ListBox ListFilters;
+ internal System.Windows.Forms.GroupBox EditFilterGroup;
+ internal System.Windows.Forms.Label Label11;
+ internal System.Windows.Forms.GroupBox GroupExclude;
+ internal System.Windows.Forms.CheckBox CheckExLambDa;
+ internal System.Windows.Forms.TextBox TextExSource;
+ internal System.Windows.Forms.Label Label12;
+ internal System.Windows.Forms.CheckBox CheckExRetweet;
+ internal System.Windows.Forms.CheckBox CheckExCaseSensitive;
+ internal System.Windows.Forms.RadioButton RadioExAnd;
+ internal System.Windows.Forms.Label Label1;
+ internal System.Windows.Forms.CheckBox CheckExURL;
+ internal System.Windows.Forms.RadioButton RadioExPLUS;
+ internal System.Windows.Forms.CheckBox CheckExRegex;
+ internal System.Windows.Forms.Label Label2;
+ internal System.Windows.Forms.Label Label3;
+ internal System.Windows.Forms.Label Label4;
+ internal System.Windows.Forms.TextBox ExUID;
+ internal System.Windows.Forms.TextBox ExMSG1;
+ internal System.Windows.Forms.TextBox ExMSG2;
+ internal System.Windows.Forms.GroupBox GroupMatch;
+ internal System.Windows.Forms.Label Label9;
+ internal System.Windows.Forms.Label Label7;
+ internal System.Windows.Forms.Label Label6;
+ internal System.Windows.Forms.TextBox UID;
+ internal System.Windows.Forms.TextBox MSG1;
+ internal System.Windows.Forms.TextBox MSG2;
+ internal System.Windows.Forms.GroupBox GroupBox1;
+ }
+}
\ No newline at end of file
--- /dev/null
+// Tween - Client of Twitter
+// Copyright (c) 2007-2011 kiri_feather (@kiri_feather) <kiri.feather@gmail.com>
+// (c) 2008-2011 Moz (@syo68k)
+// (c) 2008-2011 takeshik (@takeshik) <http://www.takeshik.org/>
+// (c) 2010-2011 anis774 (@anis774) <http://d.hatena.ne.jp/anis774/>
+// (c) 2010-2011 fantasticswallow (@f_swallow) <http://twitter.com/f_swallow>
+// (c) 2011-2012 kim_upsilon (@kim_upsilon) <https://upsilo.net/~upsilon/>
+// All rights reserved.
+//
+// This file is part of Tween.
+//
+// This program is free software; you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3 of the License, or (at your option)
+// any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program. If not, see <http://www.gnu.org/licenses/>, or write to
+// the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+// Boston, MA 02110-1301, USA.
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.Linq.Expressions;
+using System.Text.RegularExpressions;
+using System.IO;
+using System.Collections.Specialized;
+
+namespace Tween
+{
+ public partial class FilterDialog : Form
+ {
+ private EDITMODE _mode;
+ private bool _directAdd;
+ private TabInformations _sts;
+ private string _cur;
+ private List<string> idlist = new List<string>();
+
+ private TabsDialog tabdialog = new TabsDialog(true);
+
+ private enum EDITMODE
+ {
+ AddNew,
+ Edit,
+ None,
+ }
+
+ public FilterDialog()
+ {
+ InitializeComponent();
+ }
+
+ private void SetFilters(string tabName)
+ {
+ if (ListTabs.Items.Count == 0) return;
+
+ ListFilters.Items.Clear();
+ ListFilters.Items.AddRange(_sts.Tabs[tabName].GetFilters());
+ if (ListFilters.Items.Count > 0) ListFilters.SelectedIndex = 0;
+
+ CheckManageRead.Checked = _sts.Tabs[tabName].UnreadManage;
+ CheckNotifyNew.Checked = _sts.Tabs[tabName].Notify;
+
+ int idx = ComboSound.Items.IndexOf(_sts.Tabs[tabName].SoundFile);
+ if (idx == -1) idx = 0;
+ ComboSound.SelectedIndex = idx;
+
+ if (_directAdd) return;
+
+ ListTabs.Enabled = true;
+ GroupTab.Enabled = true;
+ ListFilters.Enabled = true;
+ if (ListFilters.SelectedIndex != -1)
+ {
+ ShowDetail();
+ }
+ EditFilterGroup.Enabled = false;
+ switch (TabInformations.GetInstance().Tabs[tabName].TabType)
+ {
+ case MyCommon.TabUsageType.Home:
+ case MyCommon.TabUsageType.DirectMessage:
+ case MyCommon.TabUsageType.Favorites:
+ case MyCommon.TabUsageType.PublicSearch:
+ case MyCommon.TabUsageType.Lists:
+ case MyCommon.TabUsageType.Related:
+ case MyCommon.TabUsageType.UserTimeline:
+ ButtonNew.Enabled = false;
+ ButtonEdit.Enabled = false;
+ ButtonDelete.Enabled = false;
+ ButtonRuleUp.Enabled = false;
+ ButtonRuleDown.Enabled = false;
+ ButtonRuleCopy.Enabled = false;
+ ButtonRuleMove.Enabled = false;
+ break;
+ default:
+ ButtonNew.Enabled = true;
+ if (ListFilters.SelectedIndex > -1)
+ {
+ ButtonEdit.Enabled = true;
+ ButtonDelete.Enabled = true;
+ ButtonRuleUp.Enabled = true;
+ ButtonRuleDown.Enabled = true;
+ ButtonRuleCopy.Enabled = true;
+ ButtonRuleMove.Enabled = true;
+ }
+ else
+ {
+ ButtonEdit.Enabled = false;
+ ButtonDelete.Enabled = false;
+ ButtonRuleUp.Enabled = false;
+ ButtonRuleDown.Enabled = false;
+ ButtonRuleCopy.Enabled = false;
+ ButtonRuleMove.Enabled = false;
+ }
+ break;
+ }
+ switch (TabInformations.GetInstance().Tabs[tabName].TabType)
+ {
+ case MyCommon.TabUsageType.Home:
+ LabelTabType.Text = Properties.Resources.TabUsageTypeName_Home;
+ break;
+ case MyCommon.TabUsageType.Mentions:
+ LabelTabType.Text = Properties.Resources.TabUsageTypeName_Mentions;
+ break;
+ case MyCommon.TabUsageType.DirectMessage:
+ LabelTabType.Text = Properties.Resources.TabUsageTypeName_DirectMessage;
+ break;
+ case MyCommon.TabUsageType.Favorites:
+ LabelTabType.Text = Properties.Resources.TabUsageTypeName_Favorites;
+ break;
+ case MyCommon.TabUsageType.UserDefined:
+ LabelTabType.Text = Properties.Resources.TabUsageTypeName_UserDefined;
+ break;
+ case MyCommon.TabUsageType.PublicSearch:
+ LabelTabType.Text = Properties.Resources.TabUsageTypeName_PublicSearch;
+ break;
+ case MyCommon.TabUsageType.Lists:
+ LabelTabType.Text = Properties.Resources.TabUsageTypeName_Lists;
+ break;
+ case MyCommon.TabUsageType.Related:
+ LabelTabType.Text = Properties.Resources.TabUsageTypeName_Related;
+ break;
+ case MyCommon.TabUsageType.UserTimeline:
+ LabelTabType.Text = Properties.Resources.TabUsageTypeName_UserTimeline;
+ break;
+ default:
+ LabelTabType.Text = "UNKNOWN";
+ break;
+ }
+ ButtonRenameTab.Enabled = true;
+ if (TabInformations.GetInstance().IsDefaultTab(tabName))
+ {
+ ButtonDeleteTab.Enabled = false;
+ }
+ else
+ {
+ ButtonDeleteTab.Enabled = true;
+ }
+ ButtonClose.Enabled = true;
+ }
+
+ public void SetCurrent(string TabName)
+ {
+ _cur = TabName;
+ }
+
+ public void AddNewFilter(string id, string msg)
+ {
+ //元フォームから直接呼ばれる
+ ButtonNew.Enabled = false;
+ ButtonEdit.Enabled = false;
+ ButtonRuleUp.Enabled = false;
+ ButtonRuleDown.Enabled = false;
+ ButtonRuleCopy.Enabled = false;
+ ButtonRuleMove.Enabled = false;
+ ButtonDelete.Enabled = false;
+ ButtonClose.Enabled = false;
+ EditFilterGroup.Enabled = true;
+ ListTabs.Enabled = false;
+ GroupTab.Enabled = false;
+ ListFilters.Enabled = false;
+
+ RadioAND.Checked = true;
+ RadioPLUS.Checked = false;
+ UID.Text = id;
+ UID.SelectAll();
+ MSG1.Text = msg;
+ MSG1.SelectAll();
+ MSG2.Text = id + msg;
+ MSG2.SelectAll();
+ TextSource.Text = "";
+ UID.Enabled = true;
+ MSG1.Enabled = true;
+ MSG2.Enabled = false;
+ CheckRegex.Checked = false;
+ CheckURL.Checked = false;
+ CheckCaseSensitive.Checked = false;
+ CheckRetweet.Checked = false;
+ CheckLambda.Checked = false;
+
+ RadioExAnd.Checked = true;
+ RadioExPLUS.Checked = false;
+ ExUID.Text = "";
+ ExUID.SelectAll();
+ ExMSG1.Text = "";
+ ExMSG1.SelectAll();
+ ExMSG2.Text = "";
+ ExMSG2.SelectAll();
+ TextExSource.Text = "";
+ ExUID.Enabled = true;
+ ExMSG1.Enabled = true;
+ ExMSG2.Enabled = false;
+ CheckExRegex.Checked = false;
+ CheckExURL.Checked = false;
+ CheckExCaseSensitive.Checked = false;
+ CheckExRetweet.Checked = false;
+ CheckExLambDa.Checked = false;
+
+ OptCopy.Checked = true;
+ CheckMark.Checked = true;
+ UID.Focus();
+ _mode = EDITMODE.AddNew;
+ _directAdd = true;
+ }
+
+ private void ButtonNew_Click(object sender, EventArgs e)
+ {
+ ButtonNew.Enabled = false;
+ ButtonEdit.Enabled = false;
+ ButtonClose.Enabled = false;
+ ButtonRuleUp.Enabled = false;
+ ButtonRuleDown.Enabled = false;
+ ButtonRuleCopy.Enabled = false;
+ ButtonRuleMove.Enabled = false;
+ ButtonDelete.Enabled = false;
+ ButtonClose.Enabled = false;
+ EditFilterGroup.Enabled = true;
+ ListTabs.Enabled = false;
+ GroupTab.Enabled = false;
+ ListFilters.Enabled = false;
+
+ RadioAND.Checked = true;
+ RadioPLUS.Checked = false;
+ UID.Text = "";
+ MSG1.Text = "";
+ MSG2.Text = "";
+ TextSource.Text = "";
+ UID.Enabled = true;
+ MSG1.Enabled = true;
+ MSG2.Enabled = false;
+ CheckRegex.Checked = false;
+ CheckURL.Checked = false;
+ CheckCaseSensitive.Checked = false;
+ CheckRetweet.Checked = false;
+ CheckLambda.Checked = false;
+
+ RadioExAnd.Checked = true;
+ RadioExPLUS.Checked = false;
+ ExUID.Text = "";
+ ExMSG1.Text = "";
+ ExMSG2.Text = "";
+ TextExSource.Text = "";
+ ExUID.Enabled = true;
+ ExMSG1.Enabled = true;
+ ExMSG2.Enabled = false;
+ CheckExRegex.Checked = false;
+ CheckExURL.Checked = false;
+ CheckExCaseSensitive.Checked = false;
+ CheckExRetweet.Checked = false;
+ CheckExLambDa.Checked = false;
+
+ OptCopy.Checked = true;
+ CheckMark.Checked = true;
+ UID.Focus();
+ _mode = EDITMODE.AddNew;
+ }
+
+ private void ButtonEdit_Click(object sender, EventArgs e)
+ {
+ if (ListFilters.SelectedIndex == -1) return;
+
+ ShowDetail();
+
+ int idx = ListFilters.SelectedIndex;
+ ListFilters.SelectedIndex = -1;
+ ListFilters.SelectedIndex = idx;
+ ListFilters.Enabled = false;
+
+ ButtonNew.Enabled = false;
+ ButtonEdit.Enabled = false;
+ ButtonDelete.Enabled = false;
+ ButtonClose.Enabled = false;
+ ButtonRuleUp.Enabled = false;
+ ButtonRuleDown.Enabled = false;
+ ButtonRuleCopy.Enabled = false;
+ ButtonRuleMove.Enabled = false;
+ EditFilterGroup.Enabled = true;
+ ListTabs.Enabled = false;
+ GroupTab.Enabled = false;
+
+ _mode = EDITMODE.Edit;
+ }
+
+ private void ButtonDelete_Click(object sender, EventArgs e)
+ {
+ if (ListFilters.SelectedIndex == -1) return;
+ string tmp = "";
+ DialogResult rslt;
+
+ if (ListFilters.SelectedIndices.Count == 1)
+ {
+ tmp = string.Format(Properties.Resources.ButtonDelete_ClickText1, "\r\n", ListFilters.SelectedItem.ToString());
+ rslt = MessageBox.Show(tmp, Properties.Resources.ButtonDelete_ClickText2,
+ MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
+ }
+ else
+ {
+ tmp = string.Format(Properties.Resources.ButtonDelete_ClickText3, ListFilters.SelectedIndices.Count.ToString());
+ rslt = MessageBox.Show(tmp, Properties.Resources.ButtonDelete_ClickText2,
+ MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
+ }
+ if (rslt == DialogResult.Cancel) return;
+
+ for (int idx = ListFilters.Items.Count - 1; idx >= 0; idx--)
+ {
+ if (ListFilters.GetSelected(idx))
+ {
+ _sts.Tabs[ListTabs.SelectedItem.ToString()].RemoveFilter((FiltersClass)ListFilters.Items[idx]);
+ ListFilters.Items.RemoveAt(idx);
+ }
+ }
+ }
+
+ private void ButtonCancel_Click(object sender, EventArgs e)
+ {
+ ListTabs.Enabled = true;
+ GroupTab.Enabled = true;
+ ListFilters.Enabled = true;
+ ListFilters.Focus();
+ if (ListFilters.SelectedIndex != -1)
+ {
+ ShowDetail();
+ }
+ EditFilterGroup.Enabled = false;
+ ButtonNew.Enabled = true;
+ if (ListFilters.SelectedIndex > -1)
+ {
+ ButtonEdit.Enabled = true;
+ ButtonDelete.Enabled = true;
+ ButtonRuleUp.Enabled = true;
+ ButtonRuleDown.Enabled = true;
+ ButtonRuleCopy.Enabled = true;
+ ButtonRuleMove.Enabled = true;
+ }
+ else
+ {
+ ButtonEdit.Enabled = false;
+ ButtonDelete.Enabled = false;
+ ButtonRuleUp.Enabled = false;
+ ButtonRuleDown.Enabled = false;
+ ButtonRuleCopy.Enabled = false;
+ ButtonRuleMove.Enabled = false;
+ }
+ ButtonClose.Enabled = true;
+ if (_directAdd)
+ {
+ this.Close();
+ }
+ }
+
+ private void ShowDetail()
+ {
+ if (_directAdd) return;
+
+ if (ListFilters.SelectedIndex > -1)
+ {
+ FiltersClass fc = (FiltersClass)ListFilters.SelectedItem;
+ if (fc.SearchBoth)
+ {
+ RadioAND.Checked = true;
+ RadioPLUS.Checked = false;
+ UID.Enabled = true;
+ MSG1.Enabled = true;
+ MSG2.Enabled = false;
+ UID.Text = fc.NameFilter;
+ UID.SelectAll();
+ MSG1.Text = "";
+ MSG2.Text = "";
+ foreach (string bf in fc.BodyFilter)
+ {
+ MSG1.Text += bf + " ";
+ }
+ MSG1.Text = MSG1.Text.Trim();
+ MSG1.SelectAll();
+ }
+ else
+ {
+ RadioPLUS.Checked = true;
+ RadioAND.Checked = false;
+ UID.Enabled = false;
+ MSG1.Enabled = false;
+ MSG2.Enabled = true;
+ UID.Text = "";
+ MSG1.Text = "";
+ MSG2.Text = "";
+ foreach (string bf in fc.BodyFilter)
+ {
+ MSG2.Text += bf + " ";
+ }
+ MSG2.Text = MSG2.Text.Trim();
+ MSG2.SelectAll();
+ }
+ TextSource.Text = fc.Source;
+ CheckRegex.Checked = fc.UseRegex;
+ CheckURL.Checked = fc.SearchUrl;
+ CheckCaseSensitive.Checked = fc.CaseSensitive;
+ CheckRetweet.Checked = fc.IsRt;
+ CheckLambda.Checked = fc.UseLambda;
+
+ if (fc.ExSearchBoth)
+ {
+ RadioExAnd.Checked = true;
+ RadioExPLUS.Checked = false;
+ ExUID.Enabled = true;
+ ExMSG1.Enabled = true;
+ ExMSG2.Enabled = false;
+ ExUID.Text = fc.ExNameFilter;
+ ExUID.SelectAll();
+ ExMSG1.Text = "";
+ ExMSG2.Text = "";
+ foreach (string bf in fc.ExBodyFilter)
+ {
+ ExMSG1.Text += bf + " ";
+ }
+ ExMSG1.Text = ExMSG1.Text.Trim();
+ ExMSG1.SelectAll();
+ }
+ else
+ {
+ RadioExPLUS.Checked = true;
+ RadioExAnd.Checked = false;
+ ExUID.Enabled = false;
+ ExMSG1.Enabled = false;
+ ExMSG2.Enabled = true;
+ ExUID.Text = "";
+ ExMSG1.Text = "";
+ ExMSG2.Text = "";
+ foreach (string bf in fc.ExBodyFilter)
+ {
+ ExMSG2.Text += bf + " ";
+ }
+ ExMSG2.Text = ExMSG2.Text.Trim();
+ ExMSG2.SelectAll();
+ }
+ TextExSource.Text = fc.ExSource;
+ CheckExRegex.Checked = fc.ExUseRegex;
+ CheckExURL.Checked = fc.ExSearchUrl;
+ CheckExCaseSensitive.Checked = fc.ExCaseSensitive;
+ CheckExRetweet.Checked = fc.IsExRt;
+ CheckExLambDa.Checked = fc.ExUseLambda;
+
+ if (fc.MoveFrom)
+ {
+ OptMove.Checked = true;
+ }
+ else
+ {
+ OptCopy.Checked = true;
+ }
+ CheckMark.Checked = fc.SetMark;
+
+ ButtonEdit.Enabled = true;
+ ButtonDelete.Enabled = true;
+ ButtonRuleUp.Enabled = true;
+ ButtonRuleDown.Enabled = true;
+ ButtonRuleCopy.Enabled = true;
+ ButtonRuleMove.Enabled = true;
+ }
+ else
+ {
+ RadioAND.Checked = true;
+ RadioPLUS.Checked = false;
+ UID.Enabled = true;
+ MSG1.Enabled = true;
+ MSG2.Enabled = false;
+ UID.Text = "";
+ MSG1.Text = "";
+ MSG2.Text = "";
+ TextSource.Text = "";
+ CheckRegex.Checked = false;
+ CheckURL.Checked = false;
+ CheckCaseSensitive.Checked = false;
+ CheckRetweet.Checked = false;
+ CheckLambda.Checked = false;
+
+ RadioExAnd.Checked = true;
+ RadioExPLUS.Checked = false;
+ ExUID.Enabled = true;
+ ExMSG1.Enabled = true;
+ ExMSG2.Enabled = false;
+ ExUID.Text = "";
+ ExMSG1.Text = "";
+ ExMSG2.Text = "";
+ TextExSource.Text = "";
+ CheckExRegex.Checked = false;
+ CheckExURL.Checked = false;
+ CheckExCaseSensitive.Checked = false;
+ CheckExRetweet.Checked = false;
+ CheckExLambDa.Checked = false;
+
+ OptCopy.Checked = true;
+ CheckMark.Checked = true;
+
+ ButtonEdit.Enabled = false;
+ ButtonDelete.Enabled = false;
+ ButtonRuleUp.Enabled = false;
+ ButtonRuleDown.Enabled = false;
+ ButtonRuleCopy.Enabled = false;
+ ButtonRuleMove.Enabled = false;
+ }
+ }
+
+ private void RadioAND_CheckedChanged(object sender, EventArgs e)
+ {
+ bool flg = RadioAND.Checked;
+ UID.Enabled = flg;
+ MSG1.Enabled = flg;
+ MSG2.Enabled = !flg;
+ }
+
+ private void ButtonOK_Click(object sender, EventArgs e)
+ {
+ bool isBlankMatch = false;
+ bool isBlankExclude = false;
+
+ //入力チェック
+ if (!CheckMatchRule(out isBlankMatch) || !CheckExcludeRule(out isBlankExclude))
+ {
+ return;
+ }
+ if (isBlankMatch && isBlankExclude)
+ {
+ MessageBox.Show(Properties.Resources.ButtonOK_ClickText1, Properties.Resources.ButtonOK_ClickText2, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
+ return;
+ }
+
+ int i = ListFilters.SelectedIndex;
+ FiltersClass ft;
+
+ ft = new FiltersClass();
+
+ ft.MoveFrom = OptMove.Checked;
+ ft.SetMark = CheckMark.Checked;
+
+ string bdy = "";
+ if (RadioAND.Checked)
+ {
+ ft.NameFilter = UID.Text;
+ int cnt = TweenMain.AtIdSupl.ItemCount;
+ TweenMain.AtIdSupl.AddItem("@" + ft.NameFilter);
+ if (cnt != TweenMain.AtIdSupl.ItemCount)
+ {
+ TweenMain.ModifySettingAtId = true;
+ }
+ ft.SearchBoth = true;
+ bdy = MSG1.Text;
+ }
+ else
+ {
+ ft.NameFilter = "";
+ ft.SearchBoth = false;
+ bdy = MSG2.Text;
+ }
+ ft.Source = TextSource.Text.Trim();
+
+ if (CheckRegex.Checked || CheckLambda.Checked)
+ {
+ ft.BodyFilter.Add(bdy);
+ }
+ else
+ {
+ string[] bf = bdy.Trim().Split((char)32);
+ foreach (string bfs in bf)
+ {
+ if (bfs != "") ft.BodyFilter.Add(bfs.Trim());
+ }
+ }
+
+ ft.UseRegex = CheckRegex.Checked;
+ ft.SearchUrl = CheckURL.Checked;
+ ft.CaseSensitive = CheckCaseSensitive.Checked;
+ ft.IsRt = CheckRetweet.Checked;
+ ft.UseLambda = CheckLambda.Checked;
+
+ bdy = "";
+ if (RadioExAnd.Checked)
+ {
+ ft.ExNameFilter = ExUID.Text;
+ ft.ExSearchBoth = true;
+ bdy = ExMSG1.Text;
+ }
+ else
+ {
+ ft.ExNameFilter = "";
+ ft.ExSearchBoth = false;
+ bdy = ExMSG2.Text;
+ }
+ ft.ExSource = TextExSource.Text.Trim();
+
+ if (CheckExRegex.Checked || CheckExLambDa.Checked)
+ {
+ ft.ExBodyFilter.Add(bdy);
+ }
+ else
+ {
+ string[] bf = bdy.Trim().Split((char)32);
+ foreach (string bfs in bf)
+ {
+ if (bfs != "") ft.ExBodyFilter.Add(bfs.Trim());
+ }
+ }
+
+ ft.ExUseRegex = CheckExRegex.Checked;
+ ft.ExSearchUrl = CheckExURL.Checked;
+ ft.ExCaseSensitive = CheckExCaseSensitive.Checked;
+ ft.IsExRt = CheckExRetweet.Checked;
+ ft.ExUseLambda = CheckExLambDa.Checked;
+
+ if (_mode == EDITMODE.AddNew)
+ {
+ if (!_sts.Tabs[ListTabs.SelectedItem.ToString()].AddFilter(ft))
+ MessageBox.Show(Properties.Resources.ButtonOK_ClickText4, Properties.Resources.ButtonOK_ClickText2, MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ else
+ {
+ _sts.Tabs[ListTabs.SelectedItem.ToString()].EditFilter((FiltersClass)ListFilters.SelectedItem, ft);
+ }
+
+ SetFilters(ListTabs.SelectedItem.ToString());
+ ListFilters.SelectedIndex = -1;
+ if (_mode == EDITMODE.AddNew)
+ {
+ ListFilters.SelectedIndex = ListFilters.Items.Count - 1;
+ }
+ else
+ {
+ ListFilters.SelectedIndex = i;
+ }
+ _mode = EDITMODE.None;
+
+ if (_directAdd)
+ {
+ this.Close();
+ }
+ }
+
+ private bool IsValidLambdaExp(string text)
+ {
+ if (text == "") return true;
+ try
+ {
+ LambdaExpression expr;
+ expr = ParseLambda<PostClass, bool>(text, new PostClass());
+ }
+ catch (ParseException ex)
+ {
+ MessageBox.Show(Properties.Resources.IsValidLambdaExpText1 + ex.Message,
+ Properties.Resources.IsValidLambdaExpText2, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
+ return false;
+ }
+ return true;
+ }
+
+ private bool IsValidRegexp(string text)
+ {
+ try
+ {
+ Regex rgx = new Regex(text);
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show(Properties.Resources.ButtonOK_ClickText3 + ex.Message, Properties.Resources.ButtonOK_ClickText2, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
+ return false;
+ }
+ return true;
+ }
+
+ private bool CheckMatchRule(out bool isBlank)
+ {
+ isBlank = false;
+ TextSource.Text = TextSource.Text.Trim();
+ if (RadioAND.Checked)
+ {
+ MSG1.Text = MSG1.Text.Trim();
+ UID.Text = UID.Text.Trim();
+ if (!CheckRegex.Checked && !CheckLambda.Checked) MSG1.Text = MSG1.Text.Replace(" ", " ");
+
+ if (UID.Text == "" && MSG1.Text == "" && TextSource.Text == "" && CheckRetweet.Checked == false)
+ {
+ isBlank = true;
+ return true;
+ }
+ if (CheckLambda.Checked)
+ {
+ if (!IsValidLambdaExp(UID.Text))
+ {
+ return false;
+ }
+ if (!IsValidLambdaExp(MSG1.Text))
+ {
+ return false;
+ }
+ }
+ else if (CheckRegex.Checked)
+ {
+ if (!IsValidRegexp(UID.Text))
+ {
+ return false;
+ }
+ if (!IsValidRegexp(MSG1.Text))
+ {
+ return false;
+ }
+ }
+ }
+ else
+ {
+ MSG2.Text = MSG2.Text.Trim();
+ if (!CheckRegex.Checked && !CheckLambda.Checked) MSG2.Text = MSG2.Text.Replace(" ", " ");
+ if (MSG2.Text == "" && TextSource.Text == "" && CheckRetweet.Checked == false)
+ {
+ isBlank = true;
+ return true;
+ }
+ if (CheckLambda.Checked && !IsValidLambdaExp(MSG2.Text))
+ {
+ return false;
+ }
+ else if (CheckRegex.Checked && !IsValidRegexp(MSG2.Text))
+ {
+ return false;
+ }
+ }
+
+ if (CheckRegex.Checked && !IsValidRegexp(TextSource.Text))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ private bool CheckExcludeRule(out bool isBlank)
+ {
+ isBlank = false;
+ TextExSource.Text = TextExSource.Text.Trim();
+ if (RadioExAnd.Checked)
+ {
+ ExMSG1.Text = ExMSG1.Text.Trim();
+ if (!CheckExRegex.Checked && !CheckExLambDa.Checked) ExMSG1.Text = ExMSG1.Text.Replace(" ", " ");
+ ExUID.Text = ExUID.Text.Trim();
+ if (ExUID.Text == "" && ExMSG1.Text == "" && TextExSource.Text == "" && CheckExRetweet.Checked == false)
+ {
+ isBlank = true;
+ return true;
+ }
+ if (CheckExLambDa.Checked)
+ {
+ if (!IsValidLambdaExp(ExUID.Text))
+ {
+ return false;
+ }
+ if (!IsValidLambdaExp(ExMSG1.Text))
+ {
+ return false;
+ }
+ }
+ else if (CheckExRegex.Checked)
+ {
+ if (!IsValidRegexp(ExUID.Text))
+ {
+ return false;
+ }
+ if (!IsValidRegexp(ExMSG1.Text))
+ {
+ return false;
+ }
+ }
+ }
+ else
+ {
+ ExMSG2.Text = ExMSG2.Text.Trim();
+ if (!CheckExRegex.Checked && !CheckExLambDa.Checked) ExMSG2.Text = ExMSG2.Text.Replace(" ", " ");
+ if (ExMSG2.Text == "" && TextExSource.Text == "" && CheckExRetweet.Checked == false)
+ {
+ isBlank = true;
+ return true;
+ }
+ if (CheckExLambDa.Checked && !IsValidLambdaExp(ExMSG2.Text))
+ {
+ return false;
+ }
+ else if (CheckExRegex.Checked && !IsValidRegexp(ExMSG2.Text))
+ {
+ return false;
+ }
+ }
+
+ if (CheckExRegex.Checked && !IsValidRegexp(TextExSource.Text))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ private void ListFilters_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ ShowDetail();
+ }
+
+ private void ButtonClose_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ private void FilterDialog_FormClosed(object sender, FormClosedEventArgs e)
+ {
+ _directAdd = false;
+ }
+
+ private void FilterDialog_KeyDown(object sender, KeyEventArgs e)
+ {
+ if (e.KeyCode == Keys.Escape)
+ {
+ if (EditFilterGroup.Enabled)
+ ButtonCancel_Click(null, null);
+ else
+ ButtonClose_Click(null, null);
+ }
+ }
+
+ private void ListFilters_DoubleClick(object sender, EventArgs e)
+ {
+ if (ListFilters.SelectedItem == null)
+ {
+ return;
+ }
+
+ if (ListFilters.IndexFromPoint(ListFilters.PointToClient(Control.MousePosition)) == ListBox.NoMatches)
+ {
+ return;
+ }
+
+ if (ListFilters.Items[ListFilters.IndexFromPoint(ListFilters.PointToClient(Control.MousePosition))] == null)
+ {
+ return;
+ }
+ ButtonEdit_Click(sender, e);
+ }
+
+ private void FilterDialog_Shown(object sender, EventArgs e)
+ {
+ _sts = TabInformations.GetInstance();
+ ListTabs.Items.Clear();
+ foreach (string key in _sts.Tabs.Keys)
+ {
+ ListTabs.Items.Add(key);
+ }
+ SetTabnamesToDialog();
+
+ ComboSound.Items.Clear();
+ ComboSound.Items.Add("");
+ DirectoryInfo oDir = new DirectoryInfo(Application.StartupPath + Path.DirectorySeparatorChar);
+ if (Directory.Exists(Path.Combine(Application.StartupPath, "Sounds")))
+ {
+ oDir = oDir.GetDirectories("Sounds")[0];
+ }
+ foreach (FileInfo oFile in oDir.GetFiles("*.wav"))
+ {
+ ComboSound.Items.Add(oFile.Name);
+ }
+
+ idlist.Clear();
+ foreach (string tmp in TweenMain.AtIdSupl.GetItemList)
+ {
+ idlist.Add(tmp.Remove(0, 1)); // @文字削除
+ }
+ UID.AutoCompleteCustomSource.Clear();
+ UID.AutoCompleteCustomSource.AddRange(idlist.ToArray());
+
+ ExUID.AutoCompleteCustomSource.Clear();
+ ExUID.AutoCompleteCustomSource.AddRange(idlist.ToArray());
+
+ //選択タブ変更
+ if (ListTabs.Items.Count > 0)
+ {
+ if (_cur.Length > 0)
+ {
+ for (int i = 0; i < ListTabs.Items.Count; i++)
+ {
+ if (_cur == ListTabs.Items[i].ToString())
+ {
+ ListTabs.SelectedIndex = i;
+ //tabdialog.TabList.Items.Remove(_cur);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ private void SetTabnamesToDialog()
+ {
+ tabdialog.ClearTab();
+ foreach (string key in _sts.Tabs.Keys)
+ {
+ if (TabInformations.GetInstance().IsDistributableTab(key)) tabdialog.AddTab(key);
+ }
+ }
+
+ private void ListTabs_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (ListTabs.SelectedIndex > -1)
+ SetFilters(ListTabs.SelectedItem.ToString());
+ else
+ ListFilters.Items.Clear();
+ }
+
+ private void ButtonAddTab_Click(object sender, EventArgs e)
+ {
+ string tabName = null;
+ MyCommon.TabUsageType tabType;
+ using (InputTabName inputName = new InputTabName())
+ {
+ inputName.TabName = _sts.GetUniqueTabName();
+ inputName.IsShowUsage = true;
+ inputName.ShowDialog();
+ if (inputName.DialogResult == DialogResult.Cancel) return;
+ tabName = inputName.TabName;
+ tabType = inputName.Usage;
+ }
+ if (tabName != "")
+ {
+ //List対応
+ ListElement list = null;
+ if (tabType == MyCommon.TabUsageType.Lists)
+ {
+ string rslt = ((TweenMain)this.Owner).TwitterInstance.GetListsApi();
+ if (rslt != "")
+ {
+ MessageBox.Show("Failed to get lists. (" + rslt + ")");
+ }
+ using (ListAvailable listAvail = new ListAvailable())
+ {
+ if (listAvail.ShowDialog(this) == DialogResult.Cancel) return;
+ if (listAvail.SelectedList == null) return;
+ list = listAvail.SelectedList;
+ }
+ }
+ if (!_sts.AddTab(tabName, tabType, list) || !((TweenMain)this.Owner).AddNewTab(tabName, false, tabType, list))
+ {
+ string tmp = string.Format(Properties.Resources.AddTabMenuItem_ClickText1, tabName);
+ MessageBox.Show(tmp, Properties.Resources.AddTabMenuItem_ClickText2, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
+ return;
+ }
+ else
+ {
+ //成功
+ ListTabs.Items.Add(tabName);
+ SetTabnamesToDialog();
+ }
+ }
+ }
+
+ private void ButtonDeleteTab_Click(object sender, EventArgs e)
+ {
+ if (ListTabs.SelectedIndex > -1 && ListTabs.SelectedItem.ToString() != "")
+ {
+ string tb = ListTabs.SelectedItem.ToString();
+ int idx = ListTabs.SelectedIndex;
+ if (((TweenMain)this.Owner).RemoveSpecifiedTab(tb, true))
+ {
+ ListTabs.Items.RemoveAt(idx);
+ idx -= 1;
+ if (idx < 0) idx = 0;
+ ListTabs.SelectedIndex = idx;
+ SetTabnamesToDialog();
+ }
+ }
+ }
+
+ private void ButtonRenameTab_Click(object sender, EventArgs e)
+ {
+ if (ListTabs.SelectedIndex > -1 && ListTabs.SelectedItem.ToString() != "")
+ {
+ string tb = ListTabs.SelectedItem.ToString();
+ int idx = ListTabs.SelectedIndex;
+ if (((TweenMain)this.Owner).TabRename(tb))
+ {
+ ListTabs.Items.RemoveAt(idx);
+ ListTabs.Items.Insert(idx, tb);
+ ListTabs.SelectedIndex = idx;
+ SetTabnamesToDialog();
+ }
+ }
+ }
+
+ private void CheckManageRead_CheckedChanged(object sender, EventArgs e)
+ {
+ if (ListTabs.SelectedIndex > -1 && ListTabs.SelectedItem.ToString() != "")
+ {
+ ((TweenMain)this.Owner).ChangeTabUnreadManage(
+ ListTabs.SelectedItem.ToString(),
+ CheckManageRead.Checked);
+ }
+ }
+
+ private void ButtonUp_Click(object sender, EventArgs e)
+ {
+ if (ListTabs.SelectedIndex > 0 && ListTabs.SelectedItem.ToString() != "")
+ {
+ string selName = ListTabs.SelectedItem.ToString();
+ string tgtName = ListTabs.Items[ListTabs.SelectedIndex - 1].ToString();
+ ((TweenMain)this.Owner).ReOrderTab(
+ selName,
+ tgtName,
+ true);
+ int idx = ListTabs.SelectedIndex;
+ ListTabs.Items.RemoveAt(idx - 1);
+ ListTabs.Items.Insert(idx, tgtName);
+ }
+ }
+
+ private void ButtonDown_Click(object sender, EventArgs e)
+ {
+ if (ListTabs.SelectedIndex > -1 && ListTabs.SelectedIndex < ListTabs.Items.Count - 1 && !string.IsNullOrEmpty(ListTabs.SelectedItem.ToString()))
+ {
+ string selName = ListTabs.SelectedItem.ToString();
+ string tgtName = ListTabs.Items[ListTabs.SelectedIndex + 1].ToString();
+ ((TweenMain)this.Owner).ReOrderTab(
+ selName,
+ tgtName,
+ false);
+ int idx = ListTabs.SelectedIndex;
+ ListTabs.Items.RemoveAt(idx + 1);
+ ListTabs.Items.Insert(idx, tgtName);
+ }
+ }
+
+ private void CheckNotifyNew_CheckedChanged(object sender, EventArgs e)
+ {
+ if (ListTabs.SelectedIndex > -1 && ListTabs.SelectedItem.ToString() != "")
+ {
+ _sts.Tabs[ListTabs.SelectedItem.ToString()].Notify = CheckNotifyNew.Checked;
+ }
+ }
+
+ private void ComboSound_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (ListTabs.SelectedIndex > -1 && ListTabs.SelectedItem.ToString() != "")
+ {
+ string filename = "";
+ if (ComboSound.SelectedIndex > -1) filename = ComboSound.SelectedItem.ToString();
+ _sts.Tabs[ListTabs.SelectedItem.ToString()].SoundFile = filename;
+ }
+ }
+
+ private void RadioExAnd_CheckedChanged(object sender, EventArgs e)
+ {
+ bool flg = RadioExAnd.Checked;
+ ExUID.Enabled = flg;
+ ExMSG1.Enabled = flg;
+ ExMSG2.Enabled = !flg;
+ }
+
+ private void OptMove_CheckedChanged(object sender, EventArgs e)
+ {
+ CheckMark.Enabled = !OptMove.Checked;
+ }
+
+ private void ButtonRuleUp_Click(object sender, EventArgs e)
+ {
+ if (ListTabs.SelectedIndex > -1 && ListFilters.SelectedItem != null && ListFilters.SelectedIndex > 0)
+ {
+ string tabname = ListTabs.SelectedItem.ToString();
+ FiltersClass selected = _sts.Tabs[tabname].Filters[ListFilters.SelectedIndex];
+ FiltersClass target = _sts.Tabs[tabname].Filters[ListFilters.SelectedIndex - 1];
+ int idx = ListFilters.SelectedIndex;
+ ListFilters.Items.RemoveAt(idx - 1);
+ ListFilters.Items.Insert(idx, target);
+ _sts.Tabs[tabname].Filters.RemoveAt(idx - 1);
+ _sts.Tabs[tabname].Filters.Insert(idx, target);
+ }
+ }
+
+ private void ButtonRuleDown_Click(object sender, EventArgs e)
+ {
+ if (ListTabs.SelectedIndex > -1 && ListFilters.SelectedItem != null && ListFilters.SelectedIndex < ListFilters.Items.Count - 1)
+ {
+ string tabname = ListTabs.SelectedItem.ToString();
+ FiltersClass selected = _sts.Tabs[tabname].Filters[ListFilters.SelectedIndex];
+ FiltersClass target = _sts.Tabs[tabname].Filters[ListFilters.SelectedIndex + 1];
+ int idx = ListFilters.SelectedIndex;
+ ListFilters.Items.RemoveAt(idx + 1);
+ ListFilters.Items.Insert(idx, target);
+ _sts.Tabs[tabname].Filters.RemoveAt(idx + 1);
+ _sts.Tabs[tabname].Filters.Insert(idx, target);
+ }
+ }
+
+ private void ButtonRuleCopy_Click(object sender, EventArgs e)
+ {
+ if (ListTabs.SelectedIndex > -1 && ListFilters.SelectedItem != null)
+ {
+ tabdialog.Text = Properties.Resources.ButtonRuleCopy_ClickText1;
+ if (tabdialog.ShowDialog == DialogResult.Cancel)
+ {
+ return;
+ }
+ string tabname = ListTabs.SelectedItem.ToString();
+ StringCollection tabs = tabdialog.SelectedTabNames;
+ List<FiltersClass> filters = new List<FiltersClass>();
+
+ foreach (int idx in ListFilters.SelectedIndices)
+ {
+ filters.Add(_sts.Tabs[tabname].Filters[idx].CopyTo(new FiltersClass()));
+ }
+ foreach (string tb in tabs)
+ {
+ if (tb != tabname)
+ {
+ foreach (FiltersClass flt in filters)
+ {
+ if (!_sts.Tabs[tb].Filters.Contains(flt))
+ _sts.Tabs[tb].AddFilter(flt.CopyTo(new FiltersClass()));
+ }
+ }
+ }
+ SetFilters(tabname);
+ }
+ }
+
+ private void ButtonRuleMove_Click(object sender, EventArgs e)
+ {
+ if (ListTabs.SelectedIndex > -1 && ListFilters.SelectedItem != null)
+ {
+ tabdialog.Text = Properties.Resources.ButtonRuleMove_ClickText1;
+ if (tabdialog.ShowDialog == DialogResult.Cancel)
+ {
+ return;
+ }
+ string tabname = ListTabs.SelectedItem.ToString();
+ StringCollection tabs = tabdialog.SelectedTabNames;
+ List<FiltersClass> filters = new List<FiltersClass>();
+
+ foreach (int idx in ListFilters.SelectedIndices)
+ {
+ filters.Add(_sts.Tabs[tabname].Filters[idx].CopyTo(new FiltersClass()));
+ }
+ if (tabs.Count == 1 && tabs[0] == tabname) return;
+ foreach (string tb in tabs)
+ {
+ if (tb != tabname)
+ {
+ foreach (FiltersClass flt in filters)
+ {
+ if (!_sts.Tabs[tb].Filters.Contains(flt))
+ _sts.Tabs[tb].AddFilter(flt.CopyTo(new FiltersClass()));
+ }
+ }
+ }
+ for (int idx = ListFilters.Items.Count - 1; idx >= 0; idx--)
+ {
+ if (ListFilters.GetSelected(idx))
+ {
+ _sts.Tabs[ListTabs.SelectedItem.ToString()].RemoveFilter((FiltersClass)ListFilters.Items[idx]);
+ ListFilters.Items.RemoveAt(idx);
+ }
+ }
+ SetFilters(tabname);
+ }
+ }
+
+ private void FilterTextBox_KeyDown(object sender, KeyEventArgs e)
+ {
+ if (e.KeyCode == Keys.Space && e.Modifiers == (Keys.Shift | Keys.Control))
+ {
+ TweenMain main = (TweenMain)this.Owner;
+ TextBox tbox = (TextBox)sender;
+ if (tbox.SelectionStart > 0)
+ {
+ int endidx = tbox.SelectionStart - 1;
+ string startstr = "";
+ for (int i = tbox.SelectionStart - 1; i >= 0; i--)
+ {
+ char c = tbox.Text[i];
+ if (Char.IsLetterOrDigit(c) || c == '_')
+ {
+ continue;
+ }
+ if (c == '@')
+ {
+ startstr = tbox.Text.Substring(i + 1, endidx - i);
+ main.ShowSuplDialog(tbox, main.AtIdSupl, startstr.Length + 1, startstr);
+ }
+ else if (c == '#')
+ {
+ startstr = tbox.Text.Substring(i + 1, endidx - i);
+ main.ShowSuplDialog(tbox, main.HashSupl, startstr.Length + 1, startstr);
+ }
+ else
+ {
+ break;
+ }
+ }
+ e.Handled = true;
+ }
+ }
+ }
+
+ private void FilterTextBox_KeyPress(object sender, KeyPressEventArgs e)
+ {
+ TweenMain main = (TweenMain)this.Owner;
+ TextBox tbox = (TextBox)sender;
+ if (e.KeyChar == '@')
+ {
+ //if (!SettingDialog.UseAtIdSupplement) return;
+ //@マーク
+ main.ShowSuplDialog(tbox, main.AtIdSupl);
+ e.Handled = true;
+ }
+ else if (e.KeyChar == '#')
+ {
+ //if (!SettingDialog.UseHashSupplement) return;
+ main.ShowSuplDialog(tbox, main.HashSupl);
+ e.Handled = true;
+ }
+ }
+ }
+}
<Compile Include="Connection\IHttpConnection.cs" />
<Compile Include="Connection\imgly.cs" />
<Compile Include="Connection\IMultimediaShareService.cs" />
+ <Compile Include="FilterDialog.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="FilterDialog.Designer.cs">
+ <DependentUpon>FilterDialog.cs</DependentUpon>
+ </Compile>
<Compile Include="ListManage.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Connection\HttpConnection.cs" />
</ItemGroup>
<ItemGroup>
+ <EmbeddedResource Include="FilterDialog.en.resx">
+ <DependentUpon>FilterDialog.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="FilterDialog.resx">
+ <DependentUpon>FilterDialog.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="FilterDialog.zh-CHS.resx">
+ <DependentUpon>FilterDialog.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="ListManage.resx">
<DependentUpon>ListManage.cs</DependentUpon>
</EmbeddedResource>