From daa33f1cdc86e552a5263598ab04c0d16c61776c Mon Sep 17 00:00:00 2001 From: syo68k Date: Mon, 26 Jul 2010 06:26:58 +0000 Subject: [PATCH] =?utf8?q?=E6=8A=95=E7=A8=BF=E5=85=88=E3=81=AE=E3=82=B3?= =?utf8?q?=E3=83=B3=E3=83=9C=E3=83=9C=E3=83=83=E3=82=AF=E3=82=B9=E3=82=92?= =?utf8?q?=E5=88=87=E3=82=8A=E6=9B=BF=E3=81=88=E3=81=9F=E9=9A=9B=E3=81=AB?= =?utf8?q?=E5=AF=BE=E5=BF=9C=E5=BD=A2=E5=BC=8F=E3=81=AE=E3=83=95=E3=82=A1?= =?utf8?q?=E3=82=A4=E3=83=AB=E3=81=8B=E3=81=A9=E3=81=86=E3=81=8B=E3=81=AE?= =?utf8?q?=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF=E3=82=92=E8=A1=8C=E3=81=A3?= =?utf8?q?=E3=81=A6=E3=81=84=E3=81=AA=E3=81=8B=E3=81=A3=E3=81=9F=E3=81=AE?= =?utf8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.sourceforge.jp/svnroot/tween/trunk@617 e39ad16e-3079-482e-bb30-4b4d378143b6 --- Tween/Connection/TwitPic.vb | 4 + Tween/Connection/TwitVideo.vb | 4 + Tween/Connection/imgly.vb | 4 + Tween/PictureService.vb | 13 ++ Tween/Tween.Designer.vb | 32 ++--- Tween/Tween.resx | 284 +++++++++++++++++++++--------------------- Tween/Tween.vb | 25 +++- 7 files changed, 207 insertions(+), 159 deletions(-) diff --git a/Tween/Connection/TwitPic.vb b/Tween/Connection/TwitPic.vb index 265383fa..90d9e442 100644 --- a/Tween/Connection/TwitPic.vb +++ b/Tween/Connection/TwitPic.vb @@ -69,6 +69,10 @@ Public Class TwitPic Return UploadFileType.Invalid End Function + Public Function IsSupportedFileType(ByVal type As UploadFileType) As Boolean + Return type.Equals(UploadFileType.Picture) + End Function + Public Sub New(ByVal accessToken As String, ByVal accessTokenSecret As String) MyBase.New(New Uri("http://api.twitter.com/"), _ New Uri("https://api.twitter.com/1/account/verify_credentials.json")) diff --git a/Tween/Connection/TwitVideo.vb b/Tween/Connection/TwitVideo.vb index 3a784c6c..a6c94522 100644 --- a/Tween/Connection/TwitVideo.vb +++ b/Tween/Connection/TwitVideo.vb @@ -84,6 +84,10 @@ Public Class TwitVideo Return UploadFileType.Invalid End Function + Public Function IsSupportedFileType(ByVal type As UploadFileType) As Boolean + Return type.Equals(UploadFileType.Picture) OrElse type.Equals(UploadFileType.MultiMedia) + End Function + Public Function GetFileOpenDialogFilter() As String Return "Image Files(*.gif;*.jpg;*.jpeg;*.png)|*.gif;*.jpg;*.jpeg;*.png|" + _ "Movie Files(*.avi;*.wmv;*.flv;*.m4v;*.mov;*.mp4;*.rm;*.mpeg;*.mpg;*.3gp;*.3g2)|*.avi;*.wmv;*.flv;*.m4v;*.mov;*.mp4;*.rm;*.mpeg;*.mpg;*.3gp;*.3g2" diff --git a/Tween/Connection/imgly.vb b/Tween/Connection/imgly.vb index 4bcadf5c..a8ccb715 100644 --- a/Tween/Connection/imgly.vb +++ b/Tween/Connection/imgly.vb @@ -67,6 +67,10 @@ Public Class imgly Return UploadFileType.Invalid End Function + Public Function IsSupportedFileType(ByVal type As UploadFileType) As Boolean + Return type.Equals(UploadFileType.Picture) + End Function + Public Sub New(ByVal accessToken As String, ByVal accessTokenSecret As String) MyBase.New(New Uri("http://api.twitter.com/"), _ New Uri("https://api.twitter.com/1/account/verify_credentials.json")) diff --git a/Tween/PictureService.vb b/Tween/PictureService.vb index c1ed0375..e3be0183 100644 --- a/Tween/PictureService.vb +++ b/Tween/PictureService.vb @@ -62,6 +62,19 @@ Public Class PictureService Return ret End Function + Public Function IsSupportedFileType(ByVal type As UploadFileType, ByVal service As String) As Boolean + Dim ret As Boolean = False + Select Case service + Case "TwitPic" + ret = (New TwitPic(tw.AccessToken, tw.AccessTokenSecret)).IsSupportedFileType(type) + Case "img.ly" + ret = (New imgly(tw.AccessToken, tw.AccessTokenSecret)).IsSupportedFileType(type) + Case "TwitVideo" + ret = (New TwitVideo).IsSupportedFileType(type) + End Select + Return ret + End Function + Private Function UpToTwitPic(ByVal file As FileInfo, ByRef message As String, ByVal resultUpload As Boolean) As String Dim content As String = "" Dim ret As HttpStatusCode diff --git a/Tween/Tween.Designer.vb b/Tween/Tween.Designer.vb index b412b3ca..32f21a81 100644 --- a/Tween/Tween.Designer.vb +++ b/Tween/Tween.Designer.vb @@ -27,7 +27,9 @@ Partial Class TweenMain Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(TweenMain)) Me.ToolStripContainer1 = New System.Windows.Forms.ToolStripContainer() Me.StatusStrip1 = New System.Windows.Forms.StatusStrip() + Me.StatusLabelApi = New System.Windows.Forms.ToolStripStatusLabel() Me.StatusLabelUrl = New System.Windows.Forms.ToolStripStatusLabel() + Me.StatusLabel = New Tween.TweenCustomControl.ToolStripLabelHistory() Me.HashStripSplitButton = New System.Windows.Forms.ToolStripSplitButton() Me.ContextMenuStripPostMode = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.ToolStripMenuItemUrlMultibyteSplit = New System.Windows.Forms.ToolStripMenuItem() @@ -260,8 +262,6 @@ Partial Class TweenMain Me.TimerRefreshIcon = New System.Windows.Forms.Timer(Me.components) Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog() Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components) - Me.StatusLabelApi = New System.Windows.Forms.ToolStripStatusLabel() - Me.StatusLabel = New Tween.TweenCustomControl.ToolStripLabelHistory() Me.ToolStripContainer1.BottomToolStripPanel.SuspendLayout() Me.ToolStripContainer1.ContentPanel.SuspendLayout() Me.ToolStripContainer1.TopToolStripPanel.SuspendLayout() @@ -320,6 +320,12 @@ Partial Class TweenMain Me.StatusStrip1.Name = "StatusStrip1" Me.StatusStrip1.ShowItemToolTips = True ' + 'StatusLabelApi + ' + Me.StatusLabelApi.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text + Me.StatusLabelApi.Name = "StatusLabelApi" + resources.ApplyResources(Me.StatusLabelApi, "StatusLabelApi") + ' 'StatusLabelUrl ' resources.ApplyResources(Me.StatusLabelUrl, "StatusLabelUrl") @@ -329,6 +335,14 @@ Partial Class TweenMain Me.StatusLabelUrl.Name = "StatusLabelUrl" Me.StatusLabelUrl.Spring = True ' + 'StatusLabel + ' + Me.StatusLabel.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right + Me.StatusLabel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text + Me.StatusLabel.DoubleClickEnabled = True + Me.StatusLabel.Name = "StatusLabel" + resources.ApplyResources(Me.StatusLabel, "StatusLabel") + ' 'HashStripSplitButton ' Me.HashStripSplitButton.AutoToolTip = False @@ -1622,20 +1636,6 @@ Partial Class TweenMain ' Me.OpenFileDialog1.FileName = "OpenFileDialog1" ' - 'StatusLabelApi - ' - Me.StatusLabelApi.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text - Me.StatusLabelApi.Name = "StatusLabelApi" - resources.ApplyResources(Me.StatusLabelApi, "StatusLabelApi") - ' - 'StatusLabel - ' - Me.StatusLabel.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right - Me.StatusLabel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text - Me.StatusLabel.DoubleClickEnabled = True - Me.StatusLabel.Name = "StatusLabel" - resources.ApplyResources(Me.StatusLabel, "StatusLabel") - ' 'TweenMain ' Me.AllowDrop = True diff --git a/Tween/Tween.resx b/Tween/Tween.resx index 57a1273c..7b01ada8 100644 --- a/Tween/Tween.resx +++ b/Tween/Tween.resx @@ -126,7 +126,7 @@ - 88, 22 + 73, 22 [API: ???/???] @@ -136,7 +136,7 @@ False - 201, 22 + 271, 22 ToolStripStatusLabel1 @@ -145,7 +145,7 @@ MiddleLeft - 71, 22 + 55, 22 Starting... @@ -232,7 +232,7 @@ System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 51, 25 + 43, 25 #[-] @@ -295,7 +295,7 @@ 0, 0 - 453, 136 + 453, 138 Zoom @@ -499,7 +499,7 @@ Bottom - 0, 136 + 0, 138 3, 3, 3, 3 @@ -529,7 +529,7 @@ 0, 0 - 453, 164 + 453, 166 0 @@ -583,7 +583,7 @@ 新着通知表示(&Q) - 121, 26 + 121, 20 再生するwavファイルを指定してください @@ -643,7 +643,7 @@ 0, 0, 0, 0 - 453, 164 + 453, 166 0 @@ -667,7 +667,7 @@ 0, 0 - 453, 164 + 453, 166 1 @@ -691,7 +691,7 @@ 0, 0 - 453, 164 + 453, 166 2 @@ -919,31 +919,31 @@ 480, 17 - 180, 22 + 160, 22 Google(&G) - 180, 22 + 160, 22 Wikipedia(&W) - 180, 22 + 160, 22 Twitter検索(&Y) - 180, 22 + 160, 22 Twitter Search(&S) - 180, 22 + 160, 22 現在のタブ(&L) @@ -1360,10 +1360,10 @@ 23 - 457, 300 + 457, 302 - 168 + 170 2 @@ -1384,7 +1384,7 @@ 0 - 457, 300 + 457, 302 ToolStripContainer1.ContentPanel @@ -1444,85 +1444,85 @@ None - 189, 22 + 168, 22 設定(&O) - 186, 6 + 165, 6 - 189, 22 + 168, 22 ファイル保存(&S) - 186, 6 + 165, 6 - 189, 22 + 168, 22 新着通知(&Q) - 189, 22 + 168, 22 サウンド再生(&P) - 189, 22 + 168, 22 新着時リスト固定(&L) - 186, 6 + 165, 6 - 189, 22 + 168, 22 終了(&X) - 85, 22 + 66, 20 ファイル(&F) - 259, 22 + 225, 22 タブ削除の取消 - 256, 6 + 222, 6 - 259, 22 + 225, 22 コピー(STOT形式テキスト)(&C) - 259, 22 + 225, 22 コピー(ステータスURL)(&S) - 256, 6 + 222, 6 Ctrl+F - 259, 22 + 225, 22 検索(&F)... @@ -1531,7 +1531,7 @@ F3 - 259, 22 + 225, 22 次を検索(&X) @@ -1540,25 +1540,25 @@ Shift+F3 - 259, 22 + 225, 22 前を検索(&P) - 256, 6 + 222, 6 Ctrl+Shift+F - 259, 22 + 225, 22 抽出条件入力(&Q) - 61, 22 + 56, 20 編集(&E) @@ -1567,7 +1567,7 @@ Ctrl+R - 267, 22 + 233, 22 @返信(&R) @@ -1576,7 +1576,7 @@ Ctrl+Shift+R - 267, 22 + 233, 22 @返信ALL(&E) @@ -1585,7 +1585,7 @@ Ctrl+M - 267, 22 + 233, 22 DM送信(&M) @@ -1594,7 +1594,7 @@ Alt+R - 267, 22 + 233, 22 Re&tweet @@ -1603,7 +1603,7 @@ Alt+Shift+R - 267, 22 + 233, 22 Retweet(U&nofficial) @@ -1612,19 +1612,19 @@ Ctrl+Q - 267, 22 + 233, 22 &Quote - 264, 6 + 230, 6 Ctrl+S - 267, 22 + 233, 22 Fav追加(&F) @@ -1633,7 +1633,7 @@ Ctrl+Shift+S - 267, 22 + 233, 22 Fav削除(&V) @@ -1645,7 +1645,7 @@ Alt+P - 267, 22 + 233, 22 プロフィール表示 @@ -1654,7 +1654,7 @@ Ctrl+H - 315, 22 + 266, 22 ホームを開く(&H) @@ -1663,7 +1663,7 @@ Ctrl+G - 315, 22 + 266, 22 Favを開く(&G) @@ -1672,7 +1672,7 @@ Ctrl+O - 315, 22 + 266, 22 ステータスを開く(&O) @@ -1681,7 +1681,7 @@ Ctrl+I - 315, 22 + 266, 22 返信元ステータスを開く(&I) @@ -1690,7 +1690,7 @@ Ctrl+Shift+O - 315, 22 + 266, 22 ふぁぼられを開く(&P) @@ -1699,7 +1699,7 @@ Ctrl+E - 315, 22 + 266, 22 発言内URLを開く(&U) @@ -1708,43 +1708,43 @@ Ctrl+Shift+H - 315, 22 + 266, 22 RTした人のホームを開く(&R) - 267, 22 + 233, 22 開く(&O) - 227, 22 + 199, 22 タブ振り分けルール作成(&N) - 227, 22 + 199, 22 ID振り分けルール作成(&I) - 267, 22 + 233, 22 振り分けルール作成(&C) - 264, 6 + 230, 6 Ctrl+B - 239, 22 + 206, 22 既読にする(&B) @@ -1753,31 +1753,31 @@ Ctrl+Shift+B - 239, 22 + 206, 22 未読にする(&U) - 267, 22 + 233, 22 未読状態変更(&H) - 267, 22 + 233, 22 未読へジャンプ(&J) - 264, 6 + 230, 6 Ctrl+A - 267, 22 + 233, 22 全て選択(&A) @@ -1786,7 +1786,7 @@ Ctrl+D - 267, 22 + 233, 22 削除(&D) @@ -1795,7 +1795,7 @@ F5 - 267, 22 + 233, 22 更新(&U) @@ -1804,79 +1804,79 @@ Shift+F5 - 267, 22 + 233, 22 前データを取得(&I) - 63, 22 + 57, 20 操作(&O) - 226, 22 + 188, 22 タブ作成(&N)... - 226, 22 + 188, 22 タブ名変更(&R) - 223, 6 + 185, 6 - 226, 22 + 188, 22 未読管理(&U) - 226, 22 + 188, 22 新着通知表示(&Q) - 121, 26 + 121, 20 - 223, 6 + 185, 6 - 226, 22 + 188, 22 振り分けルール編集(&F)... - 223, 6 + 185, 6 - 226, 22 + 188, 22 このタブの発言をクリア(&C) - 223, 6 + 185, 6 Ctrl+W - 226, 22 + 188, 22 タブ削除(&D) - 62, 22 + 49, 20 タブ(&T) @@ -1885,7 +1885,7 @@ Ctrl+L - 242, 22 + 215, 22 短縮サービス自動選択 @@ -1894,103 +1894,103 @@ False - 242, 22 + 215, 22 元に戻す - 242, 22 + 215, 22 TinyURL - 242, 22 + 215, 22 is.gd - 242, 22 + 215, 22 twurl.nl - 242, 22 + 215, 22 u.nu - 242, 22 + 215, 22 bit.ly - 242, 22 + 215, 22 j.mp - 280, 22 + 237, 22 入力欄のURLを短縮変換 - 280, 22 + 237, 22 片思いユーザーリスト取得 - 277, 6 + 234, 6 - 280, 22 + 237, 22 フォローする(&F) - 280, 22 + 237, 22 フォロー解除(&N) - 280, 22 + 237, 22 相互フォロー状態表示(&H) - 277, 6 + 234, 6 - 280, 22 + 237, 22 自プロフィール簡易表示 - 280, 22 + 237, 22 プロフィール表示 - 277, 6 + 234, 6 Ctrl+Shift+T - 280, 22 + 237, 22 ハッシュタグ自動付加 @@ -1999,19 +1999,19 @@ Ctrl+T - 280, 22 + 237, 22 ハッシュタグ設定 - 280, 22 + 237, 22 この発言のRetweet回数を確認 - 98, 22 + 88, 20 その他機能(&C) @@ -2020,52 +2020,52 @@ F1 - 227, 22 + 191, 22 Tweenまとめサイト(&H) - 224, 6 + 188, 6 - 227, 22 + 191, 22 最新版の取得(&G) - 224, 6 + 188, 6 - 227, 22 + 191, 22 API情報 - 224, 6 + 188, 6 - 227, 22 + 191, 22 Tweenについて(&A)... - 179, 22 + 159, 22 PostClassのダンプ - 179, 22 + 159, 22 TraceOut出力 - 227, 22 + 191, 22 デバッグモード @@ -2074,7 +2074,7 @@ False - 75, 22 + 62, 20 ヘルプ(&H) @@ -2083,7 +2083,7 @@ 0, 0 - 457, 26 + 457, 24 0 @@ -2188,43 +2188,43 @@ プロフィール表示 - 230, 22 + 198, 22 ホームを開く(&H) - 230, 22 + 198, 22 Favを開く(&G) - 230, 22 + 198, 22 ステータスを開く(&O) - 230, 22 + 198, 22 返信元ステータスを開く(&I) - 230, 22 + 198, 22 ふぁぼられを開く(&P) - 230, 22 + 198, 22 発言内URLを開く(&U) - 230, 22 + 198, 22 RTした人のホームを開く(&R) @@ -2236,13 +2236,13 @@ 開く(&O) - 239, 22 + 205, 22 タブ振り分けルール作成(&N)... - 239, 22 + 205, 22 ID振り分けルール作成... @@ -2257,13 +2257,13 @@ 199, 6 - 154, 22 + 138, 22 既読にする(&B) - 154, 22 + 138, 22 未読にする @@ -2418,12 +2418,24 @@ Tween + + StatusLabelApi + + + System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + StatusLabelUrl System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + StatusLabel + + + Tween.TweenCustomControl.ToolStripLabelHistory, Tween, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null + HashStripSplitButton @@ -3618,18 +3630,6 @@ System.Windows.Forms.ToolTip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - StatusLabelApi - - - System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - StatusLabel - - - Tween.TweenCustomControl.ToolStripLabelHistory, Tween, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null - TweenMain diff --git a/Tween/Tween.vb b/Tween/Tween.vb index 291b10b4..a678abf8 100644 --- a/Tween/Tween.vb +++ b/Tween/Tween.vb @@ -9330,6 +9330,7 @@ RETRY: OpenUriAsync("http://twitter.com/" + NameLabel.Tag.ToString) End If End Sub + #Region "画像投稿" Private Sub ImageSelectMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ImageSelectMenuItem.Click If ImageSelectionPanel.Visible = True Then @@ -9350,7 +9351,6 @@ RETRY: End Sub Private Sub FilePickButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FilePickButton.Click - ''' ToDo: サービスによっては動画ファイルのアップロードも可能 OpenFileDialog1.Filter = (New PictureService(tw)).GetFileOpenDialogFilter(ImageService) OpenFileDialog1.Title = My.Resources.PickPictureDialog1 OpenFileDialog1.FileName = "" @@ -9374,6 +9374,7 @@ RETRY: ImagefilePathText.Text = Trim(ImagefilePathText.Text) If ImagefilePathText.Text = "" Then ImageSelectedPicture.Image = ImageSelectedPicture.InitialImage + ImageSelectedPicture.Tag = UploadFileType.Invalid Else ImageFromSelectedFile() End If @@ -9384,6 +9385,7 @@ RETRY: Dim svc As New PictureService(tw) If String.IsNullOrEmpty(Trim(ImagefilePathText.Text)) Then ImageSelectedPicture.Image = ImageSelectedPicture.InitialImage + ImageSelectedPicture.Tag = UploadFileType.Invalid Exit Sub End If @@ -9391,12 +9393,14 @@ RETRY: If Not svc.IsValidExtension(fl.Extension.ToLower, ImageService) Then '画像以外の形式 ImageSelectedPicture.Image = ImageSelectedPicture.InitialImage + ImageSelectedPicture.Tag = UploadFileType.Invalid Exit Sub End If Select Case svc.GetFileType(fl.Extension.ToLower, ImageService) Case UploadFileType.Invalid ImageSelectedPicture.Image = ImageSelectedPicture.InitialImage + ImageSelectedPicture.Tag = UploadFileType.Invalid Case UploadFileType.Picture Dim fs As New FileStream(ImagefilePathText.Text, FileMode.Open, FileAccess.Read) ImageSelectedPicture.Image = (New HttpVarious).CheckValidImage( _ @@ -9404,18 +9408,23 @@ RETRY: ImageSelectedPicture.Width, _ ImageSelectedPicture.Height) fs.Close() + ImageSelectedPicture.Tag = UploadFileType.Picture Case UploadFileType.MultiMedia ''' TODO:動画アップロード用画像へ変更 ImageSelectedPicture.Image = My.Resources.MultiMediaImage + ImageSelectedPicture.Tag = UploadFileType.MultiMedia Case Else ImageSelectedPicture.Image = ImageSelectedPicture.InitialImage + ImageSelectedPicture.Tag = UploadFileType.Invalid End Select Catch ex As FileNotFoundException ImageSelectedPicture.Image = ImageSelectedPicture.InitialImage + ImageSelectedPicture.Tag = UploadFileType.Invalid MessageBox.Show("File not found.") Catch ex As Exception ImageSelectedPicture.Image = ImageSelectedPicture.InitialImage + ImageSelectedPicture.Tag = UploadFileType.Invalid MessageBox.Show("The type of this file is not image.") End Try End Sub @@ -9426,6 +9435,7 @@ RETRY: ImageServiceCombo.KeyDown If e.KeyCode = Keys.Escape Then ImageSelectedPicture.Image = ImageSelectedPicture.InitialImage + ImageSelectedPicture.Tag = UploadFileType.Invalid TimelinePanel.Visible = True TimelinePanel.Enabled = True ImageSelectionPanel.Visible = False @@ -9484,6 +9494,7 @@ RETRY: Private Sub ImageCancelButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ImageCancelButton.Click ImagefilePathText.CausesValidation = False ImageSelectedPicture.Image = ImageSelectedPicture.InitialImage + ImageSelectedPicture.Tag = UploadFileType.Invalid TimelinePanel.Visible = True TimelinePanel.Enabled = True ImageSelectionPanel.Visible = False @@ -9491,6 +9502,18 @@ RETRY: DirectCast(ListTab.SelectedTab.Tag, DetailsListView).Focus() ImagefilePathText.CausesValidation = True End Sub + + Private Sub ImageServiceCombo_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ImageServiceCombo.SelectedIndexChanged + If ImageSelectedPicture.Tag IsNot Nothing Then + If Not (New PictureService(tw)).IsSupportedFileType( _ + DirectCast(ImageSelectedPicture.Tag, UploadFileType), _ + ImageService) Then + ImagefilePathText.Text = "" + ImageSelectedPicture.Image = ImageSelectedPicture.InitialImage + ImageSelectedPicture.Tag = UploadFileType.Invalid + End If + End If + End Sub #End Region End Class -- 2.11.0