OSDN Git Service

投稿画像選択のUIをMediaSelectorクラスとして分離
authorspx <spx268@gmail.com>
Thu, 5 Jun 2014 21:28:29 +0000 (06:28 +0900)
committerspx <spx268@gmail.com>
Thu, 5 Jun 2014 21:28:29 +0000 (06:28 +0900)
OpenTween/MediaSelector.Designer.cs [new file with mode: 0644]
OpenTween/MediaSelector.cs [new file with mode: 0644]
OpenTween/MediaSelector.en.resx [new file with mode: 0644]
OpenTween/MediaSelector.resx [new file with mode: 0644]
OpenTween/MediaSelector.zh-CHS.resx [new file with mode: 0644]
OpenTween/OpenTween.csproj
OpenTween/Tween.Designer.cs
OpenTween/Tween.cs
OpenTween/Tween.en.resx
OpenTween/Tween.resx
OpenTween/Tween.zh-CHS.resx

diff --git a/OpenTween/MediaSelector.Designer.cs b/OpenTween/MediaSelector.Designer.cs
new file mode 100644 (file)
index 0000000..6a15cd8
--- /dev/null
@@ -0,0 +1,141 @@
+namespace OpenTween
+{
+    partial class MediaSelector
+    {
+        /// <summary> 
+        /// 必要なデザイナー変数です。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// 使用中のリソースをすべてクリーンアップします。
+        /// </summary>
+        /// <param name="disposing">マネージ リソースが破棄される場合 true、破棄されない場合は false です。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region コンポーネント デザイナーで生成されたコード
+
+        /// <summary> 
+        /// デザイナー サポートに必要なメソッドです。このメソッドの内容を 
+        /// コード エディターで変更しないでください。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MediaSelector));
+            this.ImageSelectedPicture = new OpenTween.OTPictureBox();
+            this.ImagePathPanel = new System.Windows.Forms.Panel();
+            this.ImagefilePathText = new System.Windows.Forms.TextBox();
+            this.ImagePageCombo = new System.Windows.Forms.ComboBox();
+            this.FilePickButton = new System.Windows.Forms.Button();
+            this.Label2 = new System.Windows.Forms.Label();
+            this.ImageServiceCombo = new System.Windows.Forms.ComboBox();
+            this.ImageCancelButton = new System.Windows.Forms.Button();
+            ((System.ComponentModel.ISupportInitialize)(this.ImageSelectedPicture)).BeginInit();
+            this.ImagePathPanel.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // ImageSelectedPicture
+            // 
+            resources.ApplyResources(this.ImageSelectedPicture, "ImageSelectedPicture");
+            this.ImageSelectedPicture.Name = "ImageSelectedPicture";
+            this.ImageSelectedPicture.TabStop = false;
+            // 
+            // ImagePathPanel
+            // 
+            this.ImagePathPanel.Controls.Add(this.ImagefilePathText);
+            this.ImagePathPanel.Controls.Add(this.ImagePageCombo);
+            this.ImagePathPanel.Controls.Add(this.FilePickButton);
+            this.ImagePathPanel.Controls.Add(this.Label2);
+            this.ImagePathPanel.Controls.Add(this.ImageServiceCombo);
+            this.ImagePathPanel.Controls.Add(this.ImageCancelButton);
+            resources.ApplyResources(this.ImagePathPanel, "ImagePathPanel");
+            this.ImagePathPanel.Name = "ImagePathPanel";
+            // 
+            // ImagefilePathText
+            // 
+            resources.ApplyResources(this.ImagefilePathText, "ImagefilePathText");
+            this.ImagefilePathText.Name = "ImagefilePathText";
+            this.ImagefilePathText.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ImageSelection_KeyDown);
+            this.ImagefilePathText.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ImageSelection_KeyPress);
+            this.ImagefilePathText.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.ImageSelection_PreviewKeyDown);
+            this.ImagefilePathText.Validating += new System.ComponentModel.CancelEventHandler(this.ImagefilePathText_Validating);
+            // 
+            // ImagePageCombo
+            // 
+            resources.ApplyResources(this.ImagePageCombo, "ImagePageCombo");
+            this.ImagePageCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.ImagePageCombo.FormattingEnabled = true;
+            this.ImagePageCombo.Name = "ImagePageCombo";
+            this.ImagePageCombo.SelectedIndexChanged += new System.EventHandler(this.ImagePageCombo_SelectedIndexChanged);
+            this.ImagePageCombo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ImageSelection_KeyDown);
+            this.ImagePageCombo.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ImageSelection_KeyPress);
+            this.ImagePageCombo.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.ImageSelection_PreviewKeyDown);
+            // 
+            // FilePickButton
+            // 
+            resources.ApplyResources(this.FilePickButton, "FilePickButton");
+            this.FilePickButton.Name = "FilePickButton";
+            this.FilePickButton.UseVisualStyleBackColor = true;
+            this.FilePickButton.Click += new System.EventHandler(this.FilePickButton_Click);
+            this.FilePickButton.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ImageSelection_KeyDown);
+            this.FilePickButton.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ImageSelection_KeyPress);
+            this.FilePickButton.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.ImageSelection_PreviewKeyDown);
+            // 
+            // Label2
+            // 
+            resources.ApplyResources(this.Label2, "Label2");
+            this.Label2.Name = "Label2";
+            // 
+            // ImageServiceCombo
+            // 
+            resources.ApplyResources(this.ImageServiceCombo, "ImageServiceCombo");
+            this.ImageServiceCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.ImageServiceCombo.FormattingEnabled = true;
+            this.ImageServiceCombo.Items.AddRange(new object[] {
+            resources.GetString("ImageServiceCombo.Items")});
+            this.ImageServiceCombo.Name = "ImageServiceCombo";
+            this.ImageServiceCombo.SelectedIndexChanged += new System.EventHandler(this.ImageServiceCombo_SelectedIndexChanged);
+            this.ImageServiceCombo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ImageSelection_KeyDown);
+            this.ImageServiceCombo.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ImageSelection_KeyPress);
+            this.ImageServiceCombo.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.ImageSelection_PreviewKeyDown);
+            // 
+            // ImageCancelButton
+            // 
+            resources.ApplyResources(this.ImageCancelButton, "ImageCancelButton");
+            this.ImageCancelButton.Name = "ImageCancelButton";
+            this.ImageCancelButton.UseVisualStyleBackColor = true;
+            this.ImageCancelButton.Click += new System.EventHandler(this.ImageCancelButton_Click);
+            // 
+            // MediaSelector
+            // 
+            resources.ApplyResources(this, "$this");
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
+            this.Controls.Add(this.ImageSelectedPicture);
+            this.Controls.Add(this.ImagePathPanel);
+            this.Name = "MediaSelector";
+            ((System.ComponentModel.ISupportInitialize)(this.ImageSelectedPicture)).EndInit();
+            this.ImagePathPanel.ResumeLayout(false);
+            this.ImagePathPanel.PerformLayout();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        internal OTPictureBox ImageSelectedPicture;
+        internal System.Windows.Forms.Panel ImagePathPanel;
+        internal System.Windows.Forms.TextBox ImagefilePathText;
+        internal System.Windows.Forms.ComboBox ImagePageCombo;
+        internal System.Windows.Forms.Button FilePickButton;
+        internal System.Windows.Forms.Label Label2;
+        internal System.Windows.Forms.ComboBox ImageServiceCombo;
+        internal System.Windows.Forms.Button ImageCancelButton;
+    }
+}
diff --git a/OpenTween/MediaSelector.cs b/OpenTween/MediaSelector.cs
new file mode 100644 (file)
index 0000000..ca59144
--- /dev/null
@@ -0,0 +1,604 @@
+// OpenTween - Client of Twitter
+// Copyright (c) 2014 spx (@5px)
+// All rights reserved.
+// 
+// This file is part of OpenTween.
+// 
+// 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.Drawing;
+using System.Data;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using OpenTween.Connection;
+
+namespace OpenTween
+{
+    public partial class MediaSelector : UserControl
+    {
+        public event EventHandler BeginSelecting;
+        public event EventHandler EndSelecting;
+
+        public event EventHandler FilePickDialogOpening;
+        public event EventHandler FilePickDialogClosed;
+
+        public event EventHandler SelectedServiceChanged;
+
+        [Browsable(false)]
+        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+        public OpenFileDialog FilePickDialog { get; set; }
+
+        /// <summary>
+        /// 選択されている投稿先名を取得する。
+        /// </summary>
+        [Browsable(false)]
+        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+        public string ServiceName
+        {
+            get { return ImageServiceCombo.Text; }
+        }
+
+        /// <summary>
+        /// 選択されている投稿先を示すインデックスを取得する。
+        /// </summary>
+        [Browsable(false)]
+        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+        public int ServiceIndex
+        {
+            get { return ImageServiceCombo.SelectedIndex; }
+        }
+
+        /// <summary>
+        /// 指定された投稿先名から、作成済みの IMultimediaShareService インスタンスを取得する。
+        /// </summary>
+        public IMultimediaShareService GetService(string serviceName)
+        {
+            IMultimediaShareService service;
+            this.pictureService.TryGetValue(serviceName, out service);
+            return service;
+        }
+
+        private class SelectedMedia
+        {
+            public string Path { get; set; }
+            public MyCommon.UploadFileType Type { get; set; }
+            public string Text { get; set; }
+
+            public SelectedMedia(string path, MyCommon.UploadFileType type, string text)
+            {
+                this.Path = path;
+                this.Type = type;
+                this.Text = text;
+            }
+
+            public SelectedMedia(string text)
+                : this("", MyCommon.UploadFileType.Invalid, text)
+            {
+            }
+
+            public bool IsValid
+            {
+                get { return this.Type != MyCommon.UploadFileType.Invalid; }
+            }
+
+            public override string ToString()
+            {
+                return this.Text;
+            }
+        }
+
+        private Dictionary<string, IMultimediaShareService> pictureService;
+
+        private void CreateServices(Twitter tw)
+        {
+            if (this.pictureService != null) this.pictureService.Clear();
+            this.pictureService = null;
+
+            this.pictureService = new Dictionary<string, IMultimediaShareService> {
+                {"TwitPic", new TwitPic(tw)},
+                {"img.ly", new imgly(tw)},
+                {"yfrog", new yfrog(tw)},
+                {"Twitter", new TwitterPhoto(tw)},
+                {"ついっぷるフォト", new TwipplePhoto(tw)},
+                {"Imgur", new Imgur(tw)},
+            };
+        }
+
+        public MediaSelector()
+        {
+            InitializeComponent();
+
+            this.ImageSelectedPicture.InitialImage = Properties.Resources.InitialImage;
+        }
+
+        /// <summary>
+        /// 投稿先サービスなどを初期化する。
+        /// </summary>
+        public void Initialize(Twitter tw, string svc, int? index = null)
+        {
+            CreateServices(tw);
+
+            SetImageServiceCombo();
+            SetImagePageCombo();
+
+            SelectImageServiceComboItem(svc, index);
+        }
+
+        /// <summary>
+        /// 投稿先サービスを再作成する。
+        /// </summary>
+        public void Reset(Twitter tw)
+        {
+            CreateServices(tw);
+
+            SetImageServiceCombo();
+        }
+
+        /// <summary>
+        /// 指定されたファイルの投稿に対応した投稿先があるかどうかを示す値を取得する。
+        /// </summary>
+        public bool HasUploadableService(string fileName)
+        {
+            FileInfo fl = new FileInfo(fileName);
+            string ext = fl.Extension;
+
+            var serviceName = this.ServiceName;
+            if (!string.IsNullOrEmpty(serviceName) &&
+                this.pictureService[serviceName].CheckValidFilesize(ext, fl.Length))
+            {
+                return true;
+            }
+
+            foreach (string svc in ImageServiceCombo.Items)
+            {
+                if (!string.IsNullOrEmpty(svc) &&
+                    this.pictureService[svc].CheckValidFilesize(ext, fl.Length))
+                {
+                    return true;
+                }
+            }
+
+            return false;
+        }
+
+        /// <summary>
+        /// 投稿するファイルとその投稿先を選択するためのコントロールを表示する。
+        /// D&Dをサポートする場合は引数にドロップされたファイル名を指定して呼ぶこと。
+        /// </summary>
+        public void BeginSelection(string fileName = null)
+        {
+            if (!string.IsNullOrEmpty(fileName))
+            {
+                if (!this.Visible)
+                {
+                    // 非表示時のファイル指定は新規選択として扱う
+                    SetImagePageCombo();
+
+                    if (this.BeginSelecting != null)
+                        this.BeginSelecting(this, EventArgs.Empty);
+
+                    this.Visible = true;
+                }
+                this.Enabled = true;
+                ImagefilePathText.Text = fileName;
+                ImageFromSelectedFile(false);
+            }
+            else
+            {
+                if (!this.Visible)
+                {
+                    if (this.BeginSelecting != null)
+                        this.BeginSelecting(this, EventArgs.Empty);
+
+                    this.Visible = true;
+                    this.Enabled = true;
+                    ImageFromSelectedFile(true);
+                    ImagefilePathText.Focus();
+                }
+            }
+        }
+
+        /// <summary>
+        /// 選択処理を終了してコントロールを隠す。
+        /// </summary>
+        public void EndSelection()
+        {
+            if (this.Visible)
+            {
+                ImagefilePathText.CausesValidation = false;
+
+                if (this.EndSelecting != null)
+                    this.EndSelecting(this, EventArgs.Empty);
+
+                this.Visible = false;
+                this.Enabled = false;
+                ClearImageSelectedPicture();
+
+                ImagefilePathText.CausesValidation = true;
+            }
+        }
+
+        /// <summary>
+        /// 選択された投稿先名と投稿ファイル名を取得する。
+        /// </summary>
+        public bool TryGetSelectedMedia(out string imageService, out string[] imagePaths)
+        {
+            var validPaths = ImagePageCombo.Items.Cast<SelectedMedia>()
+                             .Where(x => x.IsValid).Select(x => x.Path).ToArray();
+
+            if (validPaths.Length > 0 &&
+                ImageServiceCombo.SelectedIndex > -1)
+            {
+                var serviceName = this.ServiceName;
+                if (MessageBox.Show(string.Format(Properties.Resources.PostPictureConfirm1, serviceName, validPaths.Length),
+                                   Properties.Resources.PostPictureConfirm2,
+                                   MessageBoxButtons.OKCancel,
+                                   MessageBoxIcon.Question,
+                                   MessageBoxDefaultButton.Button1)
+                               == DialogResult.OK)
+                {
+                    imageService = serviceName;
+                    imagePaths = validPaths;
+                    EndSelection();
+                    SetImagePageCombo();
+                    return true;
+                }
+            }
+            else
+            {
+                MessageBox.Show(Properties.Resources.PostPictureWarn1, Properties.Resources.PostPictureWarn2);
+            }
+
+            EndSelection();
+            imageService = null;
+            imagePaths = null;
+            return false;
+        }
+
+        private void FilePickButton_Click(object sender, EventArgs e)
+        {
+            if (FilePickDialog == null || string.IsNullOrEmpty(this.ServiceName)) return;
+            FilePickDialog.Filter = this.pictureService[this.ServiceName].GetFileOpenDialogFilter();
+            FilePickDialog.Title = Properties.Resources.PickPictureDialog1;
+            FilePickDialog.FileName = "";
+
+            if (this.FilePickDialogOpening != null)
+                this.FilePickDialogOpening(this, EventArgs.Empty);
+
+            try
+            {
+                if (FilePickDialog.ShowDialog() == DialogResult.Cancel) return;
+            }
+            finally
+            {
+                if (this.FilePickDialogClosed != null)
+                    this.FilePickDialogClosed(this, EventArgs.Empty);
+            }
+
+            ImagefilePathText.Text = FilePickDialog.FileName;
+            ImageFromSelectedFile(false);
+        }
+
+        private void ImagefilePathText_Validating(object sender, CancelEventArgs e)
+        {
+            if (ImageCancelButton.Focused)
+            {
+                ImagefilePathText.CausesValidation = false;
+                return;
+            }
+
+            ImageFromSelectedFile(false);
+        }
+
+        private void ImageFromSelectedFile(bool suppressMsgBox)
+        {
+            this.ClearImageSelectedPicture();
+
+            try
+            {
+                ImagefilePathText.Text = ImagefilePathText.Text.Trim();
+                var fileName = ImagefilePathText.Text;
+                var serviceName = this.ServiceName;
+                if (string.IsNullOrEmpty(fileName) || string.IsNullOrEmpty(serviceName))
+                {
+                    ClearSelectedImagePage();
+                    return;
+                }
+
+                FileInfo fl = new FileInfo(fileName);
+                string ext = fl.Extension;
+                var imageService = this.pictureService[serviceName];
+
+                if (!imageService.CheckValidExtension(ext))
+                {
+                    //画像以外の形式
+                    ClearSelectedImagePage();
+                    if (!suppressMsgBox)
+                    {
+                        MessageBox.Show(
+                            string.Format(Properties.Resources.PostPictureWarn3, serviceName, MakeAvailableServiceText(ext, fl.Length), ext),
+                            Properties.Resources.PostPictureWarn4,
+                            MessageBoxButtons.OK,
+                            MessageBoxIcon.Warning);
+                    }
+                    return;
+                }
+
+                if (!imageService.CheckValidFilesize(ext, fl.Length))
+                {
+                    // ファイルサイズが大きすぎる
+                    ClearSelectedImagePage();
+                    if (!suppressMsgBox)
+                    {
+                        MessageBox.Show(
+                            string.Format(Properties.Resources.PostPictureWarn5, serviceName, MakeAvailableServiceText(ext, fl.Length)),
+                            Properties.Resources.PostPictureWarn4,
+                            MessageBoxButtons.OK,
+                            MessageBoxIcon.Warning);
+                    }
+                    return;
+                }
+
+                switch (imageService.GetFileType(ext))
+                {
+                    case MyCommon.UploadFileType.Picture:
+                        using (var fs = File.OpenRead(fileName))
+                        {
+                            ImageSelectedPicture.Image = MemoryImage.CopyFromStream(fs);
+                        }
+                        SetSelectedImagePage(fileName, MyCommon.UploadFileType.Picture);
+                        break;
+                    case MyCommon.UploadFileType.MultiMedia:
+                        SetSelectedImagePage(fileName, MyCommon.UploadFileType.MultiMedia);
+                        break;
+                    default:
+                        ClearSelectedImagePage();
+                        break;
+                }
+            }
+            catch (FileNotFoundException)
+            {
+                ClearSelectedImagePage();
+                if (!suppressMsgBox) MessageBox.Show("File not found.");
+            }
+            catch (Exception)
+            {
+                ClearSelectedImagePage();
+                if (!suppressMsgBox) MessageBox.Show("The type of this file is not image.");
+            }
+        }
+
+        private string MakeAvailableServiceText(string ext, long fileSize)
+        {
+            var text = string.Join(", ",
+                ImageServiceCombo.Items.Cast<string>()
+                    .Where(x => !string.IsNullOrEmpty(x) && this.pictureService[x].CheckValidFilesize(ext, fileSize)));
+
+            if (string.IsNullOrEmpty(text))
+                return Properties.Resources.PostPictureWarn6;
+
+            return text;
+        }
+
+        private void ClearImageSelectedPicture()
+        {
+            var oldImage = this.ImageSelectedPicture.Image;
+            if (oldImage != null)
+            {
+                this.ImageSelectedPicture.Image = null;
+                oldImage.Dispose();
+            }
+
+            this.ImageSelectedPicture.ShowInitialImage();
+        }
+
+        private void ImageCancelButton_Click(object sender, EventArgs e)
+        {
+            EndSelection();
+        }
+
+        private void ImageSelection_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Escape)
+            {
+                EndSelection();
+            }
+        }
+
+        private void ImageSelection_KeyPress(object sender, KeyPressEventArgs e)
+        {
+            if (Convert.ToInt32(e.KeyChar) == 0x1B)
+            {
+                ImagefilePathText.CausesValidation = false;
+                e.Handled = true;
+            }
+        }
+
+        private void ImageSelection_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
+        {
+            if (e.KeyCode == Keys.Escape)
+            {
+                ImagefilePathText.CausesValidation = false;
+            }
+        }
+
+        private void SetImageServiceCombo()
+        {
+            using (ControlTransaction.Update(ImageServiceCombo))
+            {
+                string svc = "";
+                if (ImageServiceCombo.SelectedIndex > -1) svc = ImageServiceCombo.Text;
+                ImageServiceCombo.Items.Clear();
+
+                // Add service names to combobox
+                foreach (var key in pictureService.Keys)
+                {
+                    ImageServiceCombo.Items.Add(key);
+                }
+
+                SelectImageServiceComboItem(svc);
+            }
+        }
+
+        private void SelectImageServiceComboItem(string svc, int? index = null)
+        {
+            int idx;
+            if (string.IsNullOrEmpty(svc))
+            {
+                idx = index ?? 0;
+            }
+            else
+            {
+                idx = ImageServiceCombo.Items.IndexOf(svc);
+                if (idx == -1) idx = index ?? 0;
+            }
+
+            try
+            {
+                ImageServiceCombo.SelectedIndex = idx;
+            }
+            catch (ArgumentOutOfRangeException)
+            {
+                ImageServiceCombo.SelectedIndex = 0;
+            }
+        }
+
+        private void ImageServiceCombo_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            if (this.Visible)
+            {
+                var serviceName = this.ServiceName;
+                if (!string.IsNullOrEmpty(serviceName))
+                {
+                    if (ImagePageCombo.Items.Count > 0)
+                    {
+                        // 画像が選択された投稿先に対応しているかをチェックする
+                        // TODO: 複数の選択済み画像があるなら、できれば全てを再チェックしたほうがいい
+                        if (serviceName.Equals("Twitter"))
+                        {
+                            ValidateSelectedImagePage();
+                        }
+                        else
+                        {
+                            if (ImagePageCombo.Items.Count > 1)
+                            {
+                                // 複数の選択済み画像のうち、1枚目のみを残す
+                                SetImagePageCombo((SelectedMedia)ImagePageCombo.Items[0]);
+                            }
+                            else
+                            {
+                                ImagePageCombo.Enabled = false;
+
+                                try
+                                {
+                                    FileInfo fi = new FileInfo(ImagefilePathText.Text.Trim());
+                                    string ext = fi.Extension;
+                                    var imageService = this.pictureService[serviceName];
+                                    if (!imageService.CheckValidFilesize(ext, fi.Length))
+                                    {
+                                        ClearImageSelectedPicture();
+                                        ClearSelectedImagePage();
+                                    }
+                                }
+                                catch (Exception)
+                                {
+                                    ClearImageSelectedPicture();
+                                    ClearSelectedImagePage();
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            if (this.SelectedServiceChanged != null)
+                this.SelectedServiceChanged(this, EventArgs.Empty);
+        }
+
+        private void SetImagePageCombo(SelectedMedia media = null)
+        {
+            using (ControlTransaction.Update(ImagePageCombo))
+            {
+                ImagePageCombo.Enabled = false;
+                ImagePageCombo.Items.Clear();
+                if (media != null)
+                {
+                    ImagePageCombo.Items.Add(media);
+                    ImagefilePathText.Text = media.Path;
+                }
+                else
+                {
+                    ImagePageCombo.Items.Add(new SelectedMedia("1"));
+                    ImagefilePathText.Text = "";
+                }
+                ImagePageCombo.SelectedIndex = 0;
+            }
+        }
+
+        private void AddNewImagePage(int selectedIndex)
+        {
+            if (this.ServiceName.Equals("Twitter") && selectedIndex < 3)
+            {
+                // 投稿先が Twitter であれば、最大 4 枚まで選択できるようにする
+                var count = ImagePageCombo.Items.Count;
+                if (selectedIndex == count - 1)
+                {
+                    count++;
+                    ImagePageCombo.Items.Add(new SelectedMedia(count.ToString()));
+                    ImagePageCombo.Enabled = true;
+                }
+            }
+        }
+
+        private void SetSelectedImagePage(string path, MyCommon.UploadFileType type)
+        {
+            var idx = ImagePageCombo.SelectedIndex;
+            var item = (SelectedMedia)ImagePageCombo.Items[idx];
+            item.Path = path;
+            item.Type = type;
+
+            AddNewImagePage(idx);
+        }
+
+        private void ClearSelectedImagePage()
+        {
+            var item = (SelectedMedia)ImagePageCombo.SelectedItem;
+            item.Path = "";
+            item.Type = MyCommon.UploadFileType.Invalid;
+            ImagefilePathText.Text = "";
+        }
+
+        private void ValidateSelectedImagePage()
+        {
+            var idx = ImagePageCombo.SelectedIndex;
+            var item = (SelectedMedia)ImagePageCombo.Items[idx];
+            ImageServiceCombo.Enabled = (idx == 0);  // idx == 0 以外では投稿先サービスを選べないようにする
+            ImagefilePathText.Text = item.Path;
+            ImageFromSelectedFile(true);
+        }
+
+        private void ImagePageCombo_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            ValidateSelectedImagePage();
+        }
+    }
+}
diff --git a/OpenTween/MediaSelector.en.resx b/OpenTween/MediaSelector.en.resx
new file mode 100644 (file)
index 0000000..5ee02f6
--- /dev/null
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="Label2.Text" xml:space="preserve">
+    <value>Service</value>
+  </data>
+</root>
\ No newline at end of file
diff --git a/OpenTween/MediaSelector.resx b/OpenTween/MediaSelector.resx
new file mode 100644 (file)
index 0000000..89eafbc
--- /dev/null
@@ -0,0 +1,363 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="ImageSelectedPicture.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Fill</value>
+  </data>
+  <data name="ImageSelectedPicture.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="ImageSelectedPicture.Location" type="System.Drawing.Point, System.Drawing">
+    <value>0, 0</value>
+  </data>
+  <data name="ImageSelectedPicture.Size" type="System.Drawing.Size, System.Drawing">
+    <value>608, 252</value>
+  </data>
+  <data name="ImageSelectedPicture.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
+    <value>Zoom</value>
+  </data>
+  <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="ImageSelectedPicture.TabIndex" type="System.Int32, mscorlib">
+    <value>0</value>
+  </data>
+  <data name="&gt;&gt;ImageSelectedPicture.Name" xml:space="preserve">
+    <value>ImageSelectedPicture</value>
+  </data>
+  <data name="&gt;&gt;ImageSelectedPicture.Type" xml:space="preserve">
+    <value>OpenTween.OTPictureBox, OpenTween, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null</value>
+  </data>
+  <data name="&gt;&gt;ImageSelectedPicture.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;ImageSelectedPicture.ZOrder" xml:space="preserve">
+    <value>0</value>
+  </data>
+  <data name="ImagefilePathText.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Fill</value>
+  </data>
+  <data name="ImagefilePathText.Location" type="System.Drawing.Point, System.Drawing">
+    <value>61, 3</value>
+  </data>
+  <data name="ImagefilePathText.Size" type="System.Drawing.Size, System.Drawing">
+    <value>297, 19</value>
+  </data>
+  <data name="ImagefilePathText.TabIndex" type="System.Int32, mscorlib">
+    <value>1</value>
+  </data>
+  <data name="&gt;&gt;ImagefilePathText.Name" xml:space="preserve">
+    <value>ImagefilePathText</value>
+  </data>
+  <data name="&gt;&gt;ImagefilePathText.Type" xml:space="preserve">
+    <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;ImagefilePathText.Parent" xml:space="preserve">
+    <value>ImagePathPanel</value>
+  </data>
+  <data name="&gt;&gt;ImagefilePathText.ZOrder" xml:space="preserve">
+    <value>0</value>
+  </data>
+  <data name="ImagePageCombo.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Left</value>
+  </data>
+  <data name="ImagePageCombo.Location" type="System.Drawing.Point, System.Drawing">
+    <value>3, 3</value>
+  </data>
+  <data name="ImagePageCombo.Size" type="System.Drawing.Size, System.Drawing">
+    <value>58, 20</value>
+  </data>
+  <data name="ImagePageCombo.TabIndex" type="System.Int32, mscorlib">
+    <value>0</value>
+  </data>
+  <data name="&gt;&gt;ImagePageCombo.Name" xml:space="preserve">
+    <value>ImagePageCombo</value>
+  </data>
+  <data name="&gt;&gt;ImagePageCombo.Type" xml:space="preserve">
+    <value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;ImagePageCombo.Parent" xml:space="preserve">
+    <value>ImagePathPanel</value>
+  </data>
+  <data name="&gt;&gt;ImagePageCombo.ZOrder" xml:space="preserve">
+    <value>1</value>
+  </data>
+  <data name="FilePickButton.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Right</value>
+  </data>
+  <data name="FilePickButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="FilePickButton.Location" type="System.Drawing.Point, System.Drawing">
+    <value>358, 3</value>
+  </data>
+  <data name="FilePickButton.Size" type="System.Drawing.Size, System.Drawing">
+    <value>23, 22</value>
+  </data>
+  <data name="FilePickButton.TabIndex" type="System.Int32, mscorlib">
+    <value>2</value>
+  </data>
+  <data name="FilePickButton.Text" xml:space="preserve">
+    <value>...</value>
+  </data>
+  <data name="&gt;&gt;FilePickButton.Name" xml:space="preserve">
+    <value>FilePickButton</value>
+  </data>
+  <data name="&gt;&gt;FilePickButton.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;FilePickButton.Parent" xml:space="preserve">
+    <value>ImagePathPanel</value>
+  </data>
+  <data name="&gt;&gt;FilePickButton.ZOrder" xml:space="preserve">
+    <value>2</value>
+  </data>
+  <data name="Label2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Right</value>
+  </data>
+  <data name="Label2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="Label2.Location" type="System.Drawing.Point, System.Drawing">
+    <value>381, 3</value>
+  </data>
+  <data name="Label2.Size" type="System.Drawing.Size, System.Drawing">
+    <value>61, 22</value>
+  </data>
+  <data name="Label2.TabIndex" type="System.Int32, mscorlib">
+    <value>3</value>
+  </data>
+  <data name="Label2.Text" xml:space="preserve">
+    <value>投稿先</value>
+  </data>
+  <data name="Label2.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
+    <value>MiddleRight</value>
+  </data>
+  <data name="&gt;&gt;Label2.Name" xml:space="preserve">
+    <value>Label2</value>
+  </data>
+  <data name="&gt;&gt;Label2.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;Label2.Parent" xml:space="preserve">
+    <value>ImagePathPanel</value>
+  </data>
+  <data name="&gt;&gt;Label2.ZOrder" xml:space="preserve">
+    <value>3</value>
+  </data>
+  <data name="ImageServiceCombo.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Right</value>
+  </data>
+  <data name="ImageServiceCombo.Items" xml:space="preserve">
+    <value>TwitPic</value>
+  </data>
+  <data name="ImageServiceCombo.Location" type="System.Drawing.Point, System.Drawing">
+    <value>442, 3</value>
+  </data>
+  <data name="ImageServiceCombo.Size" type="System.Drawing.Size, System.Drawing">
+    <value>103, 20</value>
+  </data>
+  <data name="ImageServiceCombo.TabIndex" type="System.Int32, mscorlib">
+    <value>4</value>
+  </data>
+  <data name="&gt;&gt;ImageServiceCombo.Name" xml:space="preserve">
+    <value>ImageServiceCombo</value>
+  </data>
+  <data name="&gt;&gt;ImageServiceCombo.Type" xml:space="preserve">
+    <value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;ImageServiceCombo.Parent" xml:space="preserve">
+    <value>ImagePathPanel</value>
+  </data>
+  <data name="&gt;&gt;ImageServiceCombo.ZOrder" xml:space="preserve">
+    <value>4</value>
+  </data>
+  <data name="ImageCancelButton.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Right</value>
+  </data>
+  <data name="ImageCancelButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="ImageCancelButton.Location" type="System.Drawing.Point, System.Drawing">
+    <value>545, 3</value>
+  </data>
+  <data name="ImageCancelButton.Size" type="System.Drawing.Size, System.Drawing">
+    <value>60, 22</value>
+  </data>
+  <data name="ImageCancelButton.TabIndex" type="System.Int32, mscorlib">
+    <value>5</value>
+  </data>
+  <data name="ImageCancelButton.Text" xml:space="preserve">
+    <value>Cancel</value>
+  </data>
+  <data name="&gt;&gt;ImageCancelButton.Name" xml:space="preserve">
+    <value>ImageCancelButton</value>
+  </data>
+  <data name="&gt;&gt;ImageCancelButton.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;ImageCancelButton.Parent" xml:space="preserve">
+    <value>ImagePathPanel</value>
+  </data>
+  <data name="&gt;&gt;ImageCancelButton.ZOrder" xml:space="preserve">
+    <value>5</value>
+  </data>
+  <data name="ImagePathPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Bottom</value>
+  </data>
+  <data name="ImagePathPanel.Location" type="System.Drawing.Point, System.Drawing">
+    <value>0, 252</value>
+  </data>
+  <data name="ImagePathPanel.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
+    <value>3, 3, 3, 3</value>
+  </data>
+  <data name="ImagePathPanel.Size" type="System.Drawing.Size, System.Drawing">
+    <value>608, 28</value>
+  </data>
+  <data name="ImagePathPanel.TabIndex" type="System.Int32, mscorlib">
+    <value>0</value>
+  </data>
+  <data name="&gt;&gt;ImagePathPanel.Name" xml:space="preserve">
+    <value>ImagePathPanel</value>
+  </data>
+  <data name="&gt;&gt;ImagePathPanel.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;ImagePathPanel.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;ImagePathPanel.ZOrder" xml:space="preserve">
+    <value>1</value>
+  </data>
+  <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
+    <value>96, 96</value>
+  </data>
+  <data name="$this.Size" type="System.Drawing.Size, System.Drawing">
+    <value>608, 280</value>
+  </data>
+  <data name="&gt;&gt;$this.Name" xml:space="preserve">
+    <value>MediaSelector</value>
+  </data>
+  <data name="&gt;&gt;$this.Type" xml:space="preserve">
+    <value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+</root>
\ No newline at end of file
diff --git a/OpenTween/MediaSelector.zh-CHS.resx b/OpenTween/MediaSelector.zh-CHS.resx
new file mode 100644 (file)
index 0000000..ce82234
--- /dev/null
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="Label2.Text" xml:space="preserve">
+    <value>上传到</value>
+  </data>
+  <data name="ImageCancelButton.Text" xml:space="preserve">
+    <value>取消</value>
+  </data>
+</root>
\ No newline at end of file
index fa8ff0c..2a06caf 100644 (file)
     <Compile Include="InputDialog.Designer.cs">
       <DependentUpon>InputDialog.cs</DependentUpon>
     </Compile>
+    <Compile Include="MediaSelector.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="MediaSelector.Designer.cs">
+      <DependentUpon>MediaSelector.cs</DependentUpon>
+    </Compile>
     <Compile Include="OTBaseForm.cs">
       <SubType>Form</SubType>
     </Compile>
     <EmbeddedResource Include="ListManage.zh-CHS.resx">
       <DependentUpon>ListManage.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="MediaSelector.en.resx">
+      <DependentUpon>MediaSelector.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="MediaSelector.resx">
+      <DependentUpon>MediaSelector.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="MediaSelector.zh-CHS.resx">
+      <DependentUpon>MediaSelector.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Setting\Panel\ActionPanel.en.resx">
       <DependentUpon>ActionPanel.cs</DependentUpon>
     </EmbeddedResource>
index 297f1c8..e312511 100644 (file)
             this.ToolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
             this.DeleteTabMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.TabImage = new System.Windows.Forms.ImageList(this.components);
-            this.ImageSelectionPanel = new System.Windows.Forms.Panel();
-            this.ImageSelectedPicture = new OpenTween.OTPictureBox();
-            this.ImagePathPanel = new System.Windows.Forms.Panel();
-            this.ImagefilePathText = new System.Windows.Forms.TextBox();
-            this.ImagePageCombo = new System.Windows.Forms.ComboBox();
-            this.FilePickButton = new System.Windows.Forms.Button();
-            this.Label2 = new System.Windows.Forms.Label();
-            this.ImageServiceCombo = new System.Windows.Forms.ComboBox();
-            this.ImageCancelButton = new System.Windows.Forms.Button();
+            this.ImageSelector = new MediaSelector();
             this.ProfilePanel = new System.Windows.Forms.Panel();
             this.SplitContainer3 = new System.Windows.Forms.SplitContainer();
             this.SplitContainer2 = new System.Windows.Forms.SplitContainer();
             this.SplitContainer1.SuspendLayout();
             this.TimelinePanel.SuspendLayout();
             this.ContextMenuTabProperty.SuspendLayout();
-            this.ImageSelectionPanel.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.ImageSelectedPicture)).BeginInit();
-            this.ImagePathPanel.SuspendLayout();
+            this.ImageSelector.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.SplitContainer3)).BeginInit();
             this.SplitContainer3.Panel1.SuspendLayout();
             this.SplitContainer3.Panel2.SuspendLayout();
             // 
             resources.ApplyResources(this.SplitContainer1.Panel1, "SplitContainer1.Panel1");
             this.SplitContainer1.Panel1.Controls.Add(this.TimelinePanel);
-            this.SplitContainer1.Panel1.Controls.Add(this.ImageSelectionPanel);
+            this.SplitContainer1.Panel1.Controls.Add(this.ImageSelector);
             this.SplitContainer1.Panel1.Controls.Add(this.ProfilePanel);
             this.ToolTip1.SetToolTip(this.SplitContainer1.Panel1, resources.GetString("SplitContainer1.Panel1.ToolTip"));
             // 
             resources.ApplyResources(this.TabImage, "TabImage");
             this.TabImage.TransparentColor = System.Drawing.Color.Transparent;
             // 
-            // ImageSelectionPanel
-            // 
-            resources.ApplyResources(this.ImageSelectionPanel, "ImageSelectionPanel");
-            this.ImageSelectionPanel.Controls.Add(this.ImageSelectedPicture);
-            this.ImageSelectionPanel.Controls.Add(this.ImagePathPanel);
-            this.ImageSelectionPanel.Name = "ImageSelectionPanel";
-            this.ToolTip1.SetToolTip(this.ImageSelectionPanel, resources.GetString("ImageSelectionPanel.ToolTip"));
-            this.ImageSelectionPanel.VisibleChanged += new System.EventHandler(this.ImageSelectionPanel_VisibleChanged);
-            // 
-            // ImageSelectedPicture
-            // 
-            resources.ApplyResources(this.ImageSelectedPicture, "ImageSelectedPicture");
-            this.ImageSelectedPicture.Name = "ImageSelectedPicture";
-            this.ImageSelectedPicture.TabStop = false;
-            this.ToolTip1.SetToolTip(this.ImageSelectedPicture, resources.GetString("ImageSelectedPicture.ToolTip"));
-            // 
-            // ImagePathPanel
-            // 
-            resources.ApplyResources(this.ImagePathPanel, "ImagePathPanel");
-            this.ImagePathPanel.Controls.Add(this.ImagefilePathText);
-            this.ImagePathPanel.Controls.Add(this.ImagePageCombo);
-            this.ImagePathPanel.Controls.Add(this.FilePickButton);
-            this.ImagePathPanel.Controls.Add(this.Label2);
-            this.ImagePathPanel.Controls.Add(this.ImageServiceCombo);
-            this.ImagePathPanel.Controls.Add(this.ImageCancelButton);
-            this.ImagePathPanel.Name = "ImagePathPanel";
-            this.ToolTip1.SetToolTip(this.ImagePathPanel, resources.GetString("ImagePathPanel.ToolTip"));
-            // 
-            // ImagefilePathText
-            // 
-            resources.ApplyResources(this.ImagefilePathText, "ImagefilePathText");
-            this.ImagefilePathText.Name = "ImagefilePathText";
-            this.ToolTip1.SetToolTip(this.ImagefilePathText, resources.GetString("ImagefilePathText.ToolTip"));
-            this.ImagefilePathText.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ImageSelection_KeyDown);
-            this.ImagefilePathText.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ImageSelection_KeyPress);
-            this.ImagefilePathText.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.ImageSelection_PreviewKeyDown);
-            this.ImagefilePathText.Validating += new System.ComponentModel.CancelEventHandler(this.ImagefilePathText_Validating);
-            // 
-            // ImagePageCombo
-            // 
-            resources.ApplyResources(this.ImagePageCombo, "ImagePageCombo");
-            this.ImagePageCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.ImagePageCombo.FormattingEnabled = true;
-            this.ImagePageCombo.Name = "ImagePageCombo";
-            this.ImagePageCombo.SelectedIndexChanged += new System.EventHandler(this.ImagePageCombo_SelectedIndexChanged);
-            this.ImagePageCombo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ImageSelection_KeyDown);
-            this.ImagePageCombo.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ImageSelection_KeyPress);
-            this.ImagePageCombo.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.ImageSelection_PreviewKeyDown);
-            // 
-            // FilePickButton
-            // 
-            resources.ApplyResources(this.FilePickButton, "FilePickButton");
-            this.FilePickButton.Name = "FilePickButton";
-            this.ToolTip1.SetToolTip(this.FilePickButton, resources.GetString("FilePickButton.ToolTip"));
-            this.FilePickButton.UseVisualStyleBackColor = true;
-            this.FilePickButton.Click += new System.EventHandler(this.FilePickButton_Click);
-            this.FilePickButton.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ImageSelection_KeyDown);
-            this.FilePickButton.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ImageSelection_KeyPress);
-            this.FilePickButton.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.ImageSelection_PreviewKeyDown);
-            // 
-            // Label2
-            // 
-            resources.ApplyResources(this.Label2, "Label2");
-            this.Label2.Name = "Label2";
-            this.ToolTip1.SetToolTip(this.Label2, resources.GetString("Label2.ToolTip"));
-            // 
-            // ImageServiceCombo
-            // 
-            resources.ApplyResources(this.ImageServiceCombo, "ImageServiceCombo");
-            this.ImageServiceCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.ImageServiceCombo.FormattingEnabled = true;
-            this.ImageServiceCombo.Items.AddRange(new object[] {
-            resources.GetString("ImageServiceCombo.Items")});
-            this.ImageServiceCombo.Name = "ImageServiceCombo";
-            this.ToolTip1.SetToolTip(this.ImageServiceCombo, resources.GetString("ImageServiceCombo.ToolTip"));
-            this.ImageServiceCombo.SelectedIndexChanged += new System.EventHandler(this.ImageServiceCombo_SelectedIndexChanged);
-            this.ImageServiceCombo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ImageSelection_KeyDown);
-            this.ImageServiceCombo.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ImageSelection_KeyPress);
-            this.ImageServiceCombo.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.ImageSelection_PreviewKeyDown);
-            // 
-            // ImageCancelButton
-            // 
-            resources.ApplyResources(this.ImageCancelButton, "ImageCancelButton");
-            this.ImageCancelButton.Name = "ImageCancelButton";
-            this.ToolTip1.SetToolTip(this.ImageCancelButton, resources.GetString("ImageCancelButton.ToolTip"));
-            this.ImageCancelButton.UseVisualStyleBackColor = true;
-            this.ImageCancelButton.Click += new System.EventHandler(this.ImageCancelButton_Click);
+            // ImageSelector
+            // 
+            resources.ApplyResources(this.ImageSelector, "ImageSelector");
+            this.ImageSelector.Name = "ImageSelector";
+            this.ImageSelector.BeginSelecting += new System.EventHandler(this.ImageSelector_BeginSelecting);
+            this.ImageSelector.EndSelecting += new System.EventHandler(this.ImageSelector_EndSelecting);
+            this.ImageSelector.FilePickDialogClosed += new System.EventHandler(ImageSelector_FilePickDialogClosed);
+            this.ImageSelector.FilePickDialogOpening += new System.EventHandler(ImageSelector_FilePickDialogOpening);
+            this.ImageSelector.SelectedServiceChanged += new System.EventHandler(this.ImageSelector_SelectedServiceChanged);
+            this.ImageSelector.VisibleChanged += new System.EventHandler(this.ImageSelector_VisibleChanged);
             // 
             // ProfilePanel
             // 
             this.SplitContainer1.ResumeLayout(false);
             this.TimelinePanel.ResumeLayout(false);
             this.ContextMenuTabProperty.ResumeLayout(false);
-            this.ImageSelectionPanel.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)(this.ImageSelectedPicture)).EndInit();
-            this.ImagePathPanel.ResumeLayout(false);
-            this.ImagePathPanel.PerformLayout();
+            this.ImageSelector.ResumeLayout(false);
             this.SplitContainer3.Panel1.ResumeLayout(false);
             this.SplitContainer3.Panel2.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.SplitContainer3)).EndInit();
         internal System.Windows.Forms.ToolStripSeparator ToolStripSeparator11;
         internal System.Windows.Forms.ToolStripMenuItem DeleteTabMenuItem;
         internal System.Windows.Forms.ImageList TabImage;
-        internal System.Windows.Forms.Panel ImageSelectionPanel;
-        internal OTPictureBox ImageSelectedPicture;
-        internal System.Windows.Forms.Panel ImagePathPanel;
-        internal System.Windows.Forms.TextBox ImagefilePathText;
-        internal System.Windows.Forms.ComboBox ImagePageCombo;
-        internal System.Windows.Forms.Button FilePickButton;
-        internal System.Windows.Forms.Label Label2;
-        internal System.Windows.Forms.ComboBox ImageServiceCombo;
-        internal System.Windows.Forms.Button ImageCancelButton;
+        internal MediaSelector ImageSelector;
         internal System.Windows.Forms.Panel ProfilePanel;
         internal System.Windows.Forms.SplitContainer SplitContainer3;
         internal System.Windows.Forms.SplitContainer SplitContainer2;
index 44f936d..9d0fcec 100644 (file)
@@ -211,7 +211,6 @@ namespace OpenTween
 
         private bool _DoFavRetweetFlags = false;
         private bool osResumed = false;
-        private Dictionary<string, IMultimediaShareService> pictureService;
 
         //////////////////////////////////////////////////////////////////////////////////////////////////////////
         private string _postBrowserStatusText = "";
@@ -1016,11 +1015,7 @@ namespace OpenTween
             AllrepliesToolStripMenuItem.Checked = tw.AllAtReply;
 
             //画像投稿サービス
-            this.CreatePictureServices();
-            SetImageServiceCombo();
-            SetImagePageCombo();
-
-            SelectImageServiceComboItem(_cfgCommon.UseImageServiceName, _cfgCommon.UseImageService);
+            ImageSelector.Initialize(tw, _cfgCommon.UseImageServiceName, _cfgCommon.UseImageService);
 
             //ウィンドウ設定
             this.ClientSize = _cfgLocal.FormSize;
@@ -2113,7 +2108,7 @@ namespace OpenTween
         {
             if (StatusText.Text.Trim().Length == 0)
             {
-                if (!ImageSelectionPanel.Enabled)
+                if (!ImageSelector.Enabled)
                 {
                     DoRefresh();
                     return;
@@ -2293,10 +2288,10 @@ namespace OpenTween
 
             args.status.inReplyToId = _reply_to_id;
             args.status.inReplyToName = _reply_to_name;
-            if (ImageSelectionPanel.Visible)
+            if (ImageSelector.Visible)
             {
                 //画像投稿
-                if (!TryGetSelectedMedia(out args.status.imageService, out args.status.imagePath))
+                if (!ImageSelector.TryGetSelectedMedia(out args.status.imageService, out args.status.imagePath))
                     return;
             }
 
@@ -2522,7 +2517,7 @@ namespace OpenTween
                     }
                     else
                     {
-                        var service = this.pictureService[args.status.imageService];
+                        var service = ImageSelector.GetService(args.status.imageService);
                         if (args.status.imagePath.Length > 1 &&
                             args.status.imageService.Equals("Twitter"))
                         {
@@ -3073,7 +3068,9 @@ namespace OpenTween
                     //_waitFollower = false
                     if (SettingDialog.TwitterConfiguration.PhotoSizeLimit != 0)
                     {
-                        pictureService["Twitter"].Configuration("MaxUploadFilesize", SettingDialog.TwitterConfiguration.PhotoSizeLimit);
+                        var service = ImageSelector.GetService("Twitter");
+                        if (service != null)
+                            service.Configuration("MaxUploadFilesize", SettingDialog.TwitterConfiguration.PhotoSizeLimit);
                     }
                     this.PurgeListViewItemCache();
                     if (_curList != null) _curList.Refresh();
@@ -3930,7 +3927,8 @@ namespace OpenTween
                                                         SettingDialog.ProxyPort,
                                                         SettingDialog.ProxyUser,
                                                         SettingDialog.ProxyPassword);
-                    this.CreatePictureServices();
+
+                    ImageSelector.Reset(tw);
 
                     try
                     {
@@ -4133,7 +4131,6 @@ namespace OpenTween
 
                     if (uid != tw.Username) this.doGetFollowersMenu();
 
-                    SetImageServiceCombo();
                     if (SettingDialog.IsNotifyUseGrowl) gh.RegisterGrowl();
                     try
                     {
@@ -5052,7 +5049,7 @@ namespace OpenTween
                 //    pLen += m.Result("${url}").Length - SettingDialog.TwitterConfiguration.ShortUrlLength;
                 //}
             }
-            if (ImageSelectionPanel.Visible && !string.IsNullOrEmpty(this.ImageService))
+            if (ImageSelector.Visible && !string.IsNullOrEmpty(ImageSelector.ServiceName))
             {
                 pLen -= SettingDialog.TwitterConfiguration.CharactersReservedPerMedia;
             }
@@ -5797,7 +5794,7 @@ namespace OpenTween
             int idx = -1;
             DetailsListView lst = null;
 
-            if (ImageSelectionPanel.Enabled)
+            if (ImageSelector.Enabled)
                 return;
 
             //現在タブから最終タブまで探索
@@ -7893,8 +7890,8 @@ namespace OpenTween
                 _cfgCommon.AllAtReply = tw.AllAtReply;
                 _cfgCommon.OpenUserTimeline = SettingDialog.OpenUserTimeline;
                 _cfgCommon.ListCountApi = SettingDialog.ListCountApi;
-                _cfgCommon.UseImageService = ImageServiceCombo.SelectedIndex;
-                _cfgCommon.UseImageServiceName = this.ImageService;
+                _cfgCommon.UseImageService = ImageSelector.ServiceIndex;
+                _cfgCommon.UseImageServiceName = ImageSelector.ServiceName;
                 _cfgCommon.ListDoubleClickAction = SettingDialog.ListDoubleClickAction;
                 _cfgCommon.UserAppointUrl = SettingDialog.UserAppointUrl;
                 _cfgCommon.HideDuplicatedRetweets = SettingDialog.HideDuplicatedRetweets;
@@ -12327,9 +12324,9 @@ namespace OpenTween
             this._apiGauge.BorderSides = ToolStripStatusLabelBorderSides.Right;
             this.StatusStrip1.Items.Insert(2, this._apiGauge);
 
-            ImageSelectionPanel.Visible = false;
-            ImageSelectionPanel.Enabled = false;
-            this.ImageSelectedPicture.InitialImage = Properties.Resources.InitialImage;
+            this.ImageSelector.Visible = false;
+            this.ImageSelector.Enabled = false;
+            this.ImageSelector.FilePickDialog = OpenFileDialog1;
 
             this.ReplaceAppName();
         }
@@ -12385,105 +12382,21 @@ namespace OpenTween
         }
 
 #region "画像投稿"
-        private void CreatePictureServices()
-        {
-            if (this.pictureService != null) this.pictureService.Clear();
-            this.pictureService = null;
-            this.pictureService = new Dictionary<string, IMultimediaShareService> {
-                {"TwitPic", new TwitPic(tw)},
-                {"img.ly", new imgly(tw)},
-                {"yfrog", new yfrog(tw)},
-                {"Twitter", new TwitterPhoto(tw)},
-                {"ついっぷるフォト", new TwipplePhoto(tw)},
-                {"Imgur", new Imgur(tw)},
-            };
-        }
-
-        private class SelectedMedia
-        {
-            public string Path { get; set; }
-            public MyCommon.UploadFileType Type { get; set; }
-            public string Text { get; set; }
-
-            public SelectedMedia(string path, MyCommon.UploadFileType type, string text)
-            {
-                this.Path = path;
-                this.Type = type;
-                this.Text = text;
-            }
-
-            public SelectedMedia(string text)
-                : this("", MyCommon.UploadFileType.Invalid, text)
-            {
-            }
-
-            public bool IsValid
-            {
-                get { return this.Type != MyCommon.UploadFileType.Invalid; }
-            }
-
-            public override string ToString()
-            {
-                return this.Text;
-            }
-        }
-
         private void ImageSelectMenuItem_Click(object sender, EventArgs e)
         {
-            if (ImageSelectionPanel.Visible)
-            {
-                CloseImageSelectionPanel();
-            }
+            if (ImageSelector.Visible)
+                ImageSelector.EndSelection();
             else
-            {
-                OpenImageSelectionPanel();
-                ImageFromSelectedFile(true);
-                ImagefilePathText.Focus();
-            }
-        }
-
-        private void OpenImageSelectionPanel()
-        {
-            ImageSelectionPanel.Visible = true;
-            ImageSelectionPanel.Enabled = true;
-            TimelinePanel.Visible = false;
-            TimelinePanel.Enabled = false;
-        }
-
-        private void CloseImageSelectionPanel()
-        {
-            ImagefilePathText.CausesValidation = false;
-            TimelinePanel.Visible = true;
-            TimelinePanel.Enabled = true;
-            ImageSelectionPanel.Visible = false;
-            ImageSelectionPanel.Enabled = false;
-            ((DetailsListView)ListTab.SelectedTab.Tag).Focus();
-            ClearImageSelectedPicture();
-            ImagefilePathText.CausesValidation = true;
+                ImageSelector.BeginSelection();
         }
 
         private void SelectMedia_DragEnter(DragEventArgs e)
         {
-            string filename = ((string[])e.Data.GetData(DataFormats.FileDrop, false))[0];
-            FileInfo fl = new FileInfo(filename);
-            string ext = fl.Extension;
-
-            if (!string.IsNullOrEmpty(this.ImageService) &&
-                this.pictureService[this.ImageService].CheckValidFilesize(ext, fl.Length))
+            if (ImageSelector.HasUploadableService(((string[])e.Data.GetData(DataFormats.FileDrop, false))[0]))
             {
                 e.Effect = DragDropEffects.Copy;
                 return;
             }
-            foreach (string svc in ImageServiceCombo.Items)
-            {
-                if (!string.IsNullOrEmpty(svc) &&
-                    this.pictureService[svc].CheckValidFilesize(ext, fl.Length))
-                {
-                    //ImageServiceCombo.SelectedItem = svc;
-                    e.Effect = DragDropEffects.Copy;
-                    return;
-                }
-            }
             e.Effect = DragDropEffects.None;
         }
 
@@ -12494,388 +12407,48 @@ namespace OpenTween
 
         private void SelectMedia_DragDrop(DragEventArgs e)
         {
-            if (!ImageSelectionPanel.Visible)
-            {
-                // 画像選択パネル非表示時のドロップは新規選択として扱う
-                SetImagePageCombo();
-            }
             this.Activate();
             this.BringToFront();
-            OpenImageSelectionPanel();
-            ImagefilePathText.Text = ((string[])e.Data.GetData(DataFormats.FileDrop, false))[0];
-            ImageFromSelectedFile(false);
+            ImageSelector.BeginSelection(((string[])e.Data.GetData(DataFormats.FileDrop, false))[0]);
             StatusText.Focus();
         }
 
-        private void FilePickButton_Click(object sender, EventArgs e)
-        {
-            if (string.IsNullOrEmpty(this.ImageService)) return;
-            OpenFileDialog1.Filter = this.pictureService[this.ImageService].GetFileOpenDialogFilter();
-            OpenFileDialog1.Title = Properties.Resources.PickPictureDialog1;
-            OpenFileDialog1.FileName = "";
-
-            try
-            {
-                this.AllowDrop = false;
-                if (OpenFileDialog1.ShowDialog() == DialogResult.Cancel) return;
-            }
-            finally
-            {
-                this.AllowDrop = true;
-            }
-
-            ImagefilePathText.Text = OpenFileDialog1.FileName;
-            ImageFromSelectedFile(false);
-        }
-
-        private void ImagefilePathText_Validating(object sender, CancelEventArgs e)
+        private void ImageSelector_BeginSelecting(object sender, EventArgs e)
         {
-            if (ImageCancelButton.Focused)
-            {
-                ImagefilePathText.CausesValidation = false;
-                return;
-            }
-
-            ImageFromSelectedFile(false);
-        }
-
-        private void ImageFromSelectedFile(bool suppressMsgBox)
-        {
-            this.ClearImageSelectedPicture();
-
-            try
-            {
-                ImagefilePathText.Text = ImagefilePathText.Text.Trim();
-                var fileName = ImagefilePathText.Text;
-                var serviceName = this.ImageService;
-                if (string.IsNullOrEmpty(fileName) || string.IsNullOrEmpty(serviceName))
-                {
-                    ClearSelectedImagePage();
-                    return;
-                }
-
-                FileInfo fl = new FileInfo(fileName);
-                string ext = fl.Extension;
-                var imageService = this.pictureService[serviceName];
-
-                if (!imageService.CheckValidExtension(ext))
-                {
-                    //画像以外の形式
-                    ClearSelectedImagePage();
-                    if (!suppressMsgBox)
-                    {
-                        MessageBox.Show(
-                            string.Format(Properties.Resources.PostPictureWarn3, serviceName, MakeAvailableServiceText(ext, fl.Length), ext),
-                            Properties.Resources.PostPictureWarn4,
-                            MessageBoxButtons.OK,
-                            MessageBoxIcon.Warning);
-                    }
-                    return;
-                }
-
-                if (!imageService.CheckValidFilesize(ext, fl.Length))
-                {
-                    // ファイルサイズが大きすぎる
-                    ClearSelectedImagePage();
-                    if (!suppressMsgBox)
-                    {
-                        MessageBox.Show(
-                            string.Format(Properties.Resources.PostPictureWarn5, serviceName, MakeAvailableServiceText(ext, fl.Length)),
-                            Properties.Resources.PostPictureWarn4,
-                            MessageBoxButtons.OK,
-                            MessageBoxIcon.Warning);
-                    }
-                    return;
-                }
-
-                switch (imageService.GetFileType(ext))
-                {
-                    case MyCommon.UploadFileType.Picture:
-                        using (var fs = File.OpenRead(fileName))
-                        {
-                            ImageSelectedPicture.Image = MemoryImage.CopyFromStream(fs);
-                        }
-                        SetSelectedImagePage(fileName, MyCommon.UploadFileType.Picture);
-                        break;
-                    case MyCommon.UploadFileType.MultiMedia:
-                        SetSelectedImagePage(fileName, MyCommon.UploadFileType.MultiMedia);
-                        break;
-                    default:
-                        ClearSelectedImagePage();
-                        break;
-                }
-            }
-            catch (FileNotFoundException)
-            {
-                ClearSelectedImagePage();
-                if (!suppressMsgBox) MessageBox.Show("File not found.");
-            }
-            catch (Exception)
-            {
-                ClearSelectedImagePage();
-                if (!suppressMsgBox) MessageBox.Show("The type of this file is not image.");
-            }
-        }
-
-        private string MakeAvailableServiceText(string ext, long fileSize)
-        {
-            var text = string.Join(", ",
-                ImageServiceCombo.Items.Cast<string>()
-                    .Where(x => !string.IsNullOrEmpty(x) && this.pictureService[x].CheckValidFilesize(ext, fileSize)));
-
-            if (string.IsNullOrEmpty(text))
-                return Properties.Resources.PostPictureWarn6;
-
-            return text;
-        }
-
-        private void ClearImageSelectedPicture()
-        {
-            var oldImage = this.ImageSelectedPicture.Image;
-            if (oldImage != null)
-            {
-                this.ImageSelectedPicture.Image = null;
-                oldImage.Dispose();
-            }
-
-            this.ImageSelectedPicture.ShowInitialImage();
-        }
-
-        private void ImageCancelButton_Click(object sender, EventArgs e)
-        {
-            CloseImageSelectionPanel();
-        }
-
-        private void ImageSelection_KeyDown(object sender, KeyEventArgs e)
-        {
-            if (e.KeyCode == Keys.Escape)
-            {
-                CloseImageSelectionPanel();
-            }
-        }
-
-        private void ImageSelection_KeyPress(object sender, KeyPressEventArgs e)
-        {
-            if (Convert.ToInt32(e.KeyChar) == 0x1B)
-            {
-                ImagefilePathText.CausesValidation = false;
-                e.Handled = true;
-            }
-        }
-
-        private void ImageSelection_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
-        {
-            if (e.KeyCode == Keys.Escape)
-            {
-                ImagefilePathText.CausesValidation = false;
-            }
-        }
-
-        private bool TryGetSelectedMedia(out string imageService, out string[] imagePath)
-        {
-            var validPaths = ImagePageCombo.Items.Cast<SelectedMedia>()
-                             .Where(x => x.IsValid).Select(x => x.Path).ToArray();
-
-            if (validPaths.Length > 0 &&
-                ImageServiceCombo.SelectedIndex > -1)
-            {
-                var serviceName = this.ImageService;
-                if (MessageBox.Show(string.Format(Properties.Resources.PostPictureConfirm1, serviceName, validPaths.Length),
-                                   Properties.Resources.PostPictureConfirm2,
-                                   MessageBoxButtons.OKCancel,
-                                   MessageBoxIcon.Question,
-                                   MessageBoxDefaultButton.Button1)
-                               == DialogResult.OK)
-                {
-                    imageService = serviceName;
-                    imagePath = validPaths;
-                    CloseImageSelectionPanel();
-                    SetImagePageCombo();
-                    return true;
-                }
-            }
-            else
-            {
-                MessageBox.Show(Properties.Resources.PostPictureWarn1, Properties.Resources.PostPictureWarn2);
-            }
-
-            CloseImageSelectionPanel();
-            imageService = null;
-            imagePath = null;
-            return false;
-        }
-
-        private void SetImageServiceCombo()
-        {
-            using (ControlTransaction.Update(ImageServiceCombo))
-            {
-                string svc = "";
-                if (ImageServiceCombo.SelectedIndex > -1) svc = ImageServiceCombo.SelectedItem.ToString();
-                ImageServiceCombo.Items.Clear();
-
-                // Add service names to combobox
-                foreach (var key in pictureService.Keys)
-                {
-                    ImageServiceCombo.Items.Add(key);
-                }
-
-                SelectImageServiceComboItem(svc);
-            }
+            TimelinePanel.Visible = false;
+            TimelinePanel.Enabled = false;
         }
 
-        private void SelectImageServiceComboItem(string svc, int? index = null)
+        private void ImageSelector_EndSelecting(object sender, EventArgs e)
         {
-            int idx;
-            if (string.IsNullOrEmpty(svc))
-            {
-                idx = index ?? 0;
-            }
-            else
-            {
-                idx = ImageServiceCombo.Items.IndexOf(svc);
-                if (idx == -1) idx = index ?? 0;
-            }
-
-            try
-            {
-                ImageServiceCombo.SelectedIndex = idx;
-            }
-            catch (ArgumentOutOfRangeException)
-            {
-                ImageServiceCombo.SelectedIndex = 0;
-            }
+            TimelinePanel.Visible = true;
+            TimelinePanel.Enabled = true;
+            ((DetailsListView)ListTab.SelectedTab.Tag).Focus();
         }
 
-        private string ImageService
+        private void ImageSelector_FilePickDialogOpening(object sender, EventArgs e)
         {
-            get { return ImageServiceCombo.SelectedItem.ToString(); }
+            this.AllowDrop = false;
         }
 
-        private void ImageServiceCombo_SelectedIndexChanged(object sender, EventArgs e)
+        private void ImageSelector_FilePickDialogClosed(object sender, EventArgs e)
         {
-            if (ImageSelectionPanel.Visible)
-            {
-                var serviceName = this.ImageService;
-                if (!string.IsNullOrEmpty(serviceName))
-                {
-                    var isTwitter = serviceName.Equals("Twitter");
-
-                    if (ImagePageCombo.Items.Count > 0)
-                    {
-                        // 画像が選択された投稿先に対応しているかをチェックする
-                        // TODO: 複数の選択済み画像があるなら、できれば全てを再チェックしたほうがいい
-                        if (isTwitter)
-                        {
-                            ValidateSelectedImagePage();
-                        }
-                        else
-                        {
-                            if (ImagePageCombo.Items.Count > 1)
-                            {
-                                // 複数の選択済み画像のうち、1枚目のみを残す
-                                SetImagePageCombo((SelectedMedia)ImagePageCombo.Items[0]);
-                            }
-                            else
-                            {
-                                ImagePageCombo.Enabled = false;
-
-                                try
-                                {
-                                    FileInfo fi = new FileInfo(ImagefilePathText.Text.Trim());
-                                    string ext = fi.Extension;
-                                    var imageService = this.pictureService[serviceName];
-                                    if (!imageService.CheckValidFilesize(ext, fi.Length))
-                                    {
-                                        ClearImageSelectedPicture();
-                                        ClearSelectedImagePage();
-                                    }
-                                }
-                                catch (Exception)
-                                {
-                                    ClearImageSelectedPicture();
-                                    ClearSelectedImagePage();
-                                }
-                            }
-                        }
-                    }
-
-                    _modifySettingCommon = true;
-                    SaveConfigsAll(true);
-
-                    if (isTwitter)
-                        this.StatusText_TextChanged(null, null);
-                }
-            }
+            this.AllowDrop = true;
         }
 
-        private void SetImagePageCombo(SelectedMedia media = null)
+        private void ImageSelector_SelectedServiceChanged(object sender, EventArgs e)
         {
-            using (ControlTransaction.Update(ImagePageCombo))
+            if (ImageSelector.Visible)
             {
-                ImagePageCombo.Enabled = false;
-                ImagePageCombo.Items.Clear();
-                if (media != null)
-                {
-                    ImagePageCombo.Items.Add(media);
-                    ImagefilePathText.Text = media.Path;
-                }
-                else
-                {
-                    ImagePageCombo.Items.Add(new SelectedMedia("1"));
-                    ImagefilePathText.Text = "";
-                }
-                ImagePageCombo.SelectedIndex = 0;
-            }
-        }
+                _modifySettingCommon = true;
+                SaveConfigsAll(true);
 
-        private void AddNewImagePage(int selectedIndex)
-        {
-            if (this.ImageService.Equals("Twitter") && selectedIndex < 3)
-            {
-                // 投稿先が Twitter であれば、最大 4 枚まで選択できるようにする
-                var count = ImagePageCombo.Items.Count;
-                if (selectedIndex == count - 1)
-                {
-                    count++;
-                    ImagePageCombo.Items.Add(new SelectedMedia(count.ToString()));
-                    ImagePageCombo.Enabled = true;
-                }
+                if (ImageSelector.ServiceName.Equals("Twitter"))
+                    this.StatusText_TextChanged(null, null);
             }
         }
 
-        private void SetSelectedImagePage(string path, MyCommon.UploadFileType type)
-        {
-            var idx = ImagePageCombo.SelectedIndex;
-            var item = (SelectedMedia)ImagePageCombo.Items[idx];
-            item.Path = path;
-            item.Type = type;
-
-            AddNewImagePage(idx);
-        }
-
-        private void ClearSelectedImagePage()
-        {
-            var item = (SelectedMedia)ImagePageCombo.SelectedItem;
-            item.Path = "";
-            item.Type = MyCommon.UploadFileType.Invalid;
-            ImagefilePathText.Text = "";
-        }
-
-        private void ValidateSelectedImagePage()
-        {
-            var idx = ImagePageCombo.SelectedIndex;
-            var item = (SelectedMedia)ImagePageCombo.Items[idx];
-            ImageServiceCombo.Enabled = (idx == 0);  // idx == 0 以外では投稿先サービスを選べないようにする
-            ImagefilePathText.Text = item.Path;
-            ImageFromSelectedFile(true);
-        }
-
-        private void ImagePageCombo_SelectedIndexChanged(object sender, EventArgs e)
-        {
-            ValidateSelectedImagePage();
-        }
-
-        private void ImageSelectionPanel_VisibleChanged(object sender, EventArgs e)
+        private void ImageSelector_VisibleChanged(object sender, EventArgs e)
         {
             this.StatusText_TextChanged(null, null);
         }
index 97735ef..4116851 100644 (file)
   <data name="TimelinePanel.ToolTip" xml:space="preserve">
     <value />
   </data>
-  <data name="ImageSelectedPicture.Size" type="System.Drawing.Size, System.Drawing">
-    <value>570, 114</value>
-  </data>
-  <data name="ImageSelectedPicture.ToolTip" xml:space="preserve">
-    <value />
-  </data>
-  <data name="ImagefilePathText.Size" type="System.Drawing.Size, System.Drawing">
-    <value>182, 22</value>
-  </data>
-  <data name="ImagefilePathText.ToolTip" xml:space="preserve">
-    <value />
-  </data>
-  <data name="FilePickButton.Location" type="System.Drawing.Point, System.Drawing">
-    <value>258, 4</value>
-  </data>
-  <data name="FilePickButton.ToolTip" xml:space="preserve">
-    <value />
-  </data>
-  <data name="Label2.Location" type="System.Drawing.Point, System.Drawing">
-    <value>287, 4</value>
-  </data>
-  <data name="Label2.Text" xml:space="preserve">
-    <value>Service</value>
-  </data>
-  <data name="Label2.ToolTip" xml:space="preserve">
-    <value />
-  </data>
-  <data name="ImageServiceCombo.Location" type="System.Drawing.Point, System.Drawing">
-    <value>363, 4</value>
-  </data>
-  <data name="ImageServiceCombo.ToolTip" xml:space="preserve">
-    <value />
-  </data>
-  <data name="ImageCancelButton.Location" type="System.Drawing.Point, System.Drawing">
-    <value>491, 4</value>
-  </data>
-  <data name="ImageCancelButton.ToolTip" xml:space="preserve">
-    <value />
-  </data>
-  <data name="ImagePathPanel.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 114</value>
-  </data>
-  <data name="ImagePathPanel.Size" type="System.Drawing.Size, System.Drawing">
-    <value>570, 35</value>
-  </data>
-  <data name="ImagePathPanel.ToolTip" xml:space="preserve">
-    <value />
-  </data>
-  <data name="ImageSelectionPanel.Size" type="System.Drawing.Size, System.Drawing">
-    <value>570, 149</value>
-  </data>
-  <data name="ImageSelectionPanel.ToolTip" xml:space="preserve">
-    <value />
-  </data>
   <data name="ProfilePanel.Size" type="System.Drawing.Size, System.Drawing">
     <value>570, 149</value>
   </data>
index 8a81d32..b8bb04a 100644 (file)
     <value>MenuItemSearchNext</value>
   </data>
   <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-  <data name="FilePickButton.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Right</value>
-  </data>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="NotifyDispMenuItem.Size" type="System.Drawing.Size, System.Drawing">
     <value>233, 24</value>
   <data name="&gt;&gt;ReadOpMenuItem.Name" xml:space="preserve">
     <value>ReadOpMenuItem</value>
   </data>
-  <data name="ImageCancelButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
-    <value>Off</value>
-  </data>
   <data name="&gt;&gt;ToolStripContainer1.RightToolStripPanel.Name" xml:space="preserve">
     <value>ToolStripContainer1.RightToolStripPanel</value>
   </data>
   <data name="&gt;&gt;ListManageUserContextToolStripMenuItem2.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="ImagefilePathText.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Fill</value>
-  </data>
   <data name="&gt;&gt;HashToggleMenuItem.Name" xml:space="preserve">
     <value>HashToggleMenuItem</value>
   </data>
   <data name="&gt;&gt;ClearTbMenuItem.Name" xml:space="preserve">
     <value>ClearTbMenuItem</value>
   </data>
-  <data name="FilePickButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
-    <value>Off</value>
-  </data>
   <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   <data name="TableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
     <value>4</value>
   <data name="&gt;&gt;RtUnOpMenuItem.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="ImagePathPanel.Size" type="System.Drawing.Size, System.Drawing">
-    <value>761, 35</value>
-  </data>
   <data name="DebugModeToolStripMenuItem.Text" xml:space="preserve">
     <value>デバッグモード</value>
   </data>
   <data name="AboutMenuItem.Size" type="System.Drawing.Size, System.Drawing">
     <value>301, 24</value>
   </data>
-  <data name="FilePickButton.Size" type="System.Drawing.Size, System.Drawing">
-    <value>29, 27</value>
-  </data>
   <data name="ContextMenuOperate.ToolTip" xml:space="preserve">
     <value />
   </data>
   <data name="TabRenameMenuItem.Size" type="System.Drawing.Size, System.Drawing">
     <value>233, 24</value>
   </data>
-  <data name="ImagePathPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Bottom</value>
-  </data>
   <data name="NotifyDispMenuItem.Text" xml:space="preserve">
     <value>新着通知表示(&amp;Q)</value>
   </data>
   <data name="PostButton.Text" xml:space="preserve">
     <value>Post</value>
   </data>
-  <data name="Label2.Location" type="System.Drawing.Point, System.Drawing">
-    <value>478, 4</value>
-  </data>
   <data name="ToolStripMenuItemUrlMultibyteSplit.Text" xml:space="preserve">
     <value>URLからの全角文字列の切り離し</value>
   </data>
   <data name="&gt;&gt;FollowToolStripMenuItem.Name" xml:space="preserve">
     <value>FollowToolStripMenuItem</value>
   </data>
-  <data name="&gt;&gt;ImageSelectedPicture.Name" xml:space="preserve">
-    <value>ImageSelectedPicture</value>
-  </data>
   <data name="ToolStripContainer1.Location" type="System.Drawing.Point, System.Drawing">
     <value>0, 0</value>
   </data>
   <data name="&gt;&gt;SplitContainer1.Panel1.ZOrder" xml:space="preserve">
     <value>0</value>
   </data>
-  <data name="&gt;&gt;ImagePageCombo.ZOrder" xml:space="preserve">
-    <value>1</value>
-  </data>
   <data name="&gt;&gt;HashStripSplitButton.Name" xml:space="preserve">
     <value>HashStripSplitButton</value>
   </data>
-  <data name="&gt;&gt;ImagePageCombo.Type" xml:space="preserve">
-    <value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
   <data name="&gt;&gt;TabMenuItem.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="HashToggleToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
     <value>306, 24</value>
   </data>
-  <data name="&gt;&gt;ImageCancelButton.ZOrder" xml:space="preserve">
-    <value>5</value>
-  </data>
   <data name="RefreshMoreStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
     <value>288, 24</value>
   </data>
   <data name="&gt;&gt;FriendshipAllMenuItem.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="ImagefilePathText.TabIndex" type="System.Int32, mscorlib">
-    <value>1</value>
-  </data>
   <data name="&gt;&gt;ToolStripSeparator25.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;CreateTbMenuItem.Name" xml:space="preserve">
     <value>CreateTbMenuItem</value>
   </data>
-  <data name="ImagePathPanel.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
-    <value>4, 4, 4, 4</value>
-  </data>
   <data name="DeleteTabMenuItem.Size" type="System.Drawing.Size, System.Drawing">
     <value>233, 24</value>
   </data>
   <data name="RepliedStatusOpenMenuItem.Text" xml:space="preserve">
     <value>返信元ステータスを開く(&amp;I)</value>
   </data>
-  <data name="ImagePathPanel.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 356</value>
-  </data>
   <data name="&gt;&gt;FavoriteRetweetUnofficialMenuItem.Name" xml:space="preserve">
     <value>FavoriteRetweetUnofficialMenuItem</value>
   </data>
-  <data name="ImageSelectionPanel.TabIndex" type="System.Int32, mscorlib">
+  <data name="ImageSelector.TabIndex" type="System.Int32, mscorlib">
     <value>1</value>
   </data>
   <data name="ToolStripSeparator4.Size" type="System.Drawing.Size, System.Drawing">
   <data name="ListTab.TabIndex" type="System.Int32, mscorlib">
     <value>0</value>
   </data>
-  <data name="ImageSelectedPicture.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
-    <value>4, 4, 4, 4</value>
-  </data>
   <data name="SplitContainer2.SplitterDistance" type="System.Int32, mscorlib">
     <value>87</value>
   </data>
   <data name="&gt;&gt;ListManageToolStripMenuItem.Name" xml:space="preserve">
     <value>ListManageToolStripMenuItem</value>
   </data>
-  <data name="&gt;&gt;ImageCancelButton.Type" xml:space="preserve">
-    <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
   <data name="ShowUserTimelineToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
     <value>377, 24</value>
   </data>
   <data name="&gt;&gt;OpenHomeOpMenuItem.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="ImageSelectionPanel.ToolTip" xml:space="preserve">
-    <value />
-  </data>
   <data name="ListManageMenuItem.Text" xml:space="preserve">
     <value>リスト管理(&amp;L)</value>
   </data>
   <data name="ToolStripFocusLockMenuItem.Text" xml:space="preserve">
     <value>フォーカスを発言欄へロックする</value>
   </data>
-  <data name="&gt;&gt;ImagePathPanel.Parent" xml:space="preserve">
-    <value>ImageSelectionPanel</value>
-  </data>
   <data name="SplitContainer1.ToolTip" xml:space="preserve">
     <value />
   </data>
   <data name="&gt;&gt;MatomeMenuItem.Name" xml:space="preserve">
     <value>MatomeMenuItem</value>
   </data>
-  <data name="ImageCancelButton.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Right</value>
-  </data>
   <data name="DeleteStripMenuItem.Text" xml:space="preserve">
     <value>削除(&amp;D)</value>
   </data>
   <data name="lblLen.ToolTip" xml:space="preserve">
     <value />
   </data>
-  <data name="ImageSelectionPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+  <data name="ImageSelector.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
     <value>Fill</value>
   </data>
   <data name="&gt;&gt;FriendshipContextMenuItem.Type" xml:space="preserve">
   <data name="&gt;&gt;StatusStrip1.ZOrder" xml:space="preserve">
     <value>0</value>
   </data>
-  <data name="&gt;&gt;ImagefilePathText.Type" xml:space="preserve">
-    <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
   <data name="&gt;&gt;IdeographicSpaceToSpaceToolStripMenuItem.Name" xml:space="preserve">
     <value>IdeographicSpaceToSpaceToolStripMenuItem</value>
   </data>
   <data name="ImageSelectMenuItem.Size" type="System.Drawing.Size, System.Drawing">
     <value>306, 24</value>
   </data>
-  <data name="ImageServiceCombo.Items" xml:space="preserve">
-    <value>TwitPic</value>
-  </data>
   <data name="TableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
     <value>2</value>
   </data>
   <data name="UseHashtagMenuItem.Text" xml:space="preserve">
     <value>ハッシュタグを固定(&amp;H)</value>
   </data>
-  <data name="Label2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
-    <value>4, 0, 4, 0</value>
-  </data>
   <data name="tweetThumbnail1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
     <value>5, 5, 5, 5</value>
   </data>
   <data name="SearchPostsDetailNameToolStripMenuItem.Text" xml:space="preserve">
     <value>ユーザーのタイムラインを表示(&amp;T)</value>
   </data>
-  <data name="&gt;&gt;ImagefilePathText.Name" xml:space="preserve">
-    <value>ImagefilePathText</value>
-  </data>
   <data name="&gt;&gt;lblLen.Name" xml:space="preserve">
     <value>lblLen</value>
   </data>
-  <data name="&gt;&gt;ImageSelectionPanel.ZOrder" xml:space="preserve">
+  <data name="&gt;&gt;ImageSelector.ZOrder" xml:space="preserve">
     <value>1</value>
   </data>
   <data name="FilterEditMenuItem.Size" type="System.Drawing.Size, System.Drawing">
   <data name="&gt;&gt;MenuItemSubSearch.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="ImageSelectedPicture.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Fill</value>
-  </data>
   <data name="UrlCopyContextMenuItem.Enabled" type="System.Boolean, mscorlib">
     <value>False</value>
   </data>
   <data name="EndFileMenuItem.Size" type="System.Drawing.Size, System.Drawing">
     <value>206, 24</value>
   </data>
-  <data name="&gt;&gt;ImageCancelButton.Parent" xml:space="preserve">
-    <value>ImagePathPanel</value>
-  </data>
   <data name="&gt;&gt;ToolStripSeparator41.Name" xml:space="preserve">
     <value>ToolStripSeparator41</value>
   </data>
   <data name="&gt;&gt;TabMenuItem.Name" xml:space="preserve">
     <value>TabMenuItem</value>
   </data>
-  <data name="ImagePageCombo.Location" type="System.Drawing.Point, System.Drawing">
-    <value>4, 4</value>
-  </data>
   <data name="NameLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
     <value>Off</value>
   </data>
   <data name="&gt;&gt;ToolStripSeparator22.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="ImagePageCombo.ToolTip" xml:space="preserve">
-    <value />
-  </data>
   <data name="UserFavorareToolStripMenuItem.Text" xml:space="preserve">
     <value>ユーザーのふぁぼられを開く</value>
   </data>
   <data name="&gt;&gt;SaveFileMenuItem.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="&gt;&gt;ImageSelectedPicture.Parent" xml:space="preserve">
-    <value>ImageSelectionPanel</value>
-  </data>
   <data name="&gt;&gt;ToolStripSeparator32.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="StatusText.Size" type="System.Drawing.Size, System.Drawing">
     <value>643, 22</value>
   </data>
-  <data name="ImageCancelButton.ToolTip" xml:space="preserve">
-    <value />
-  </data>
   <data name="&gt;&gt;ApiUsageInfoMenuItem.Name" xml:space="preserve">
     <value>ApiUsageInfoMenuItem</value>
   </data>
   <data name="ToolStripSeparator5.Size" type="System.Drawing.Size, System.Drawing">
     <value>279, 6</value>
   </data>
-  <data name="ImageSelectedPicture.TabIndex" type="System.Int32, mscorlib">
-    <value>5</value>
-  </data>
   <data name="&gt;&gt;DMStripMenuItem.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="UserStatusToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
     <value>306, 24</value>
   </data>
-  <data name="ImageServiceCombo.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
-    <value>4, 4, 4, 4</value>
-  </data>
   <data name="ShowProfileMenuItem.Text" xml:space="preserve">
     <value>プロフィール表示</value>
   </data>
   <data name="&gt;&gt;RefreshPrevOpMenuItem.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="ImageCancelButton.TabIndex" type="System.Int32, mscorlib">
-    <value>5</value>
-  </data>
   <data name="OpenRepSourceOpMenuItem.ShortcutKeys" type="System.Windows.Forms.Keys, System.Windows.Forms">
     <value>Ctrl+I</value>
   </data>
   <data name="SaveFileMenuItem.Text" xml:space="preserve">
     <value>ファイル保存(&amp;S)</value>
   </data>
-  <data name="Label2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
-    <value>Off</value>
-  </data>
   <data name="&gt;&gt;SettingStripMenuItem.Name" xml:space="preserve">
     <value>SettingStripMenuItem</value>
   </data>
   <data name="&gt;&gt;ToolStripSeparator12.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="ImagePathPanel.ToolTip" xml:space="preserve">
-    <value />
-  </data>
   <data name="&gt;&gt;ProfilePanel.Type" xml:space="preserve">
     <value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;ToolStripSeparator32.Name" xml:space="preserve">
     <value>ToolStripSeparator32</value>
   </data>
-  <data name="ImageSelectedPicture.Size" type="System.Drawing.Size, System.Drawing">
-    <value>761, 356</value>
-  </data>
-  <data name="&gt;&gt;FilePickButton.Parent" xml:space="preserve">
-    <value>ImagePathPanel</value>
-  </data>
   <data name="&gt;&gt;SelectionAllContextMenuItem.Name" xml:space="preserve">
     <value>SelectionAllContextMenuItem</value>
   </data>
   <data name="ToolStripSeparator43.Size" type="System.Drawing.Size, System.Drawing">
     <value>203, 6</value>
   </data>
-  <data name="ImagePageCombo.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Left</value>
-  </data>
   <data name="&gt;&gt;ToolStripSeparator8.Name" xml:space="preserve">
     <value>ToolStripSeparator8</value>
   </data>
   <data name="&gt;&gt;StatusLabelUrl.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="Label2.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
-    <value>MiddleRight</value>
-  </data>
   <data name="&gt;&gt;DebugModeToolStripMenuItem.Name" xml:space="preserve">
     <value>DebugModeToolStripMenuItem</value>
   </data>
   <data name="&gt;&gt;TwurlnlToolStripMenuItem.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="&gt;&gt;Label2.Type" xml:space="preserve">
-    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
   <data name="&gt;&gt;OpenRterHomeMenuItem.Name" xml:space="preserve">
     <value>OpenRterHomeMenuItem</value>
   </data>
   <data name="ShowUserTimelineContextMenuItem.Size" type="System.Drawing.Size, System.Drawing">
     <value>288, 24</value>
   </data>
-  <data name="ImagePageCombo.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
-    <value>Off</value>
-  </data>
-  <data name="&gt;&gt;ImageSelectionPanel.Name" xml:space="preserve">
-    <value>ImageSelectionPanel</value>
-  </data>
-  <data name="ImagePathPanel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
-    <value>4, 4, 4, 4</value>
+  <data name="&gt;&gt;ImageSelector.Name" xml:space="preserve">
+    <value>ImageSelector</value>
   </data>
   <data name="&gt;&gt;FriendshipMenuItem.Name" xml:space="preserve">
     <value>FriendshipMenuItem</value>
   </data>
-  <data name="&gt;&gt;ImagePageCombo.Parent" xml:space="preserve">
-    <value>ImagePathPanel</value>
-  </data>
   <data name="&gt;&gt;JumpReadOpMenuItem.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;NameLabel.Name" xml:space="preserve">
     <value>NameLabel</value>
   </data>
-  <data name="ImagePathPanel.TabIndex" type="System.Int32, mscorlib">
-    <value>0</value>
-  </data>
   <data name="ToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
     <value>279, 6</value>
   </data>
   <data name="UrlUndoToolStripMenuItem.Text" xml:space="preserve">
     <value>元に戻す</value>
   </data>
-  <data name="ImageSelectionPanel.Location" type="System.Drawing.Point, System.Drawing">
+  <data name="ImageSelector.Location" type="System.Drawing.Point, System.Drawing">
     <value>0, 0</value>
   </data>
   <data name="&gt;&gt;HashManageMenuItem.Type" xml:space="preserve">
   <data name="&gt;&gt;SplitContainer2.Panel2.Parent" xml:space="preserve">
     <value>SplitContainer2</value>
   </data>
-  <data name="ImagefilePathText.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
-    <value>4, 4, 4, 4</value>
-  </data>
   <data name="StatusStrip1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
     <value>None</value>
   </data>
   <data name="SearchWikipediaContextMenuItem.Size" type="System.Drawing.Size, System.Drawing">
     <value>210, 24</value>
   </data>
-  <data name="&gt;&gt;FilePickButton.ZOrder" xml:space="preserve">
-    <value>2</value>
-  </data>
   <data name="SelectAllMenuItem.Text" xml:space="preserve">
     <value>全て選択(&amp;A)</value>
   </data>
   <data name="&gt;&gt;OpenUserSpecifiedUrlMenuItem.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="FilePickButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
-    <value>4, 4, 4, 4</value>
-  </data>
-  <data name="ImageSelectionPanel.AutoScroll" type="System.Boolean, mscorlib">
+  <data name="ImageSelector.AutoScroll" type="System.Boolean, mscorlib">
     <value>True</value>
   </data>
   <data name="ListTab.Location" type="System.Drawing.Point, System.Drawing">
   <data name="UxnuMenuItem.Size" type="System.Drawing.Size, System.Drawing">
     <value>269, 24</value>
   </data>
-  <data name="&gt;&gt;ImagePageCombo.Name" xml:space="preserve">
-    <value>ImagePageCombo</value>
-  </data>
   <data name="SourceLinkLabel.TabIndex" type="System.Int32, mscorlib">
     <value>7</value>
   </data>
   <data name="&gt;&gt;SelAllOpMenuItem.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="FilePickButton.Location" type="System.Drawing.Point, System.Drawing">
-    <value>449, 4</value>
-  </data>
   <data name="ToolStripSeparator17.Size" type="System.Drawing.Size, System.Drawing">
     <value>203, 6</value>
   </data>
   <data name="ToolStripMenuItemUrlMultibyteSplit.Size" type="System.Drawing.Size, System.Drawing">
     <value>306, 24</value>
   </data>
-  <data name="&gt;&gt;ImageServiceCombo.Type" xml:space="preserve">
-    <value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
   <data name="FriendshipContextMenuItem.Text" xml:space="preserve">
     <value>相互フォロー状態表示(&amp;R)</value>
   </data>
   <data name="DMStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
     <value>288, 24</value>
   </data>
-  <data name="&gt;&gt;ImageSelectionPanel.Type" xml:space="preserve">
-    <value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  <data name="&gt;&gt;ImageSelector.Type" xml:space="preserve">
+    <value>OpenTween.MediaSelector, OpenTween, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null</value>
   </data>
   <data name="ToolStripSeparator37.Size" type="System.Drawing.Size, System.Drawing">
     <value>279, 6</value>
   <data name="&gt;&gt;ReplyAllStripMenuItem.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="&gt;&gt;ImageSelectedPicture.ZOrder" xml:space="preserve">
-    <value>0</value>
-  </data>
   <data name="NameLabel.Font" type="System.Drawing.Font, System.Drawing">
     <value>MS UI Gothic, 9pt, style=Bold</value>
   </data>
   <data name="&gt;&gt;UserFavorareToolStripMenuItem.Name" xml:space="preserve">
     <value>UserFavorareToolStripMenuItem</value>
   </data>
-  <data name="ImageSelectedPicture.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
-    <value>Off</value>
-  </data>
   <data name="&gt;&gt;MoveToRTHomeMenuItem.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="CacheInfoMenuItem.Text" xml:space="preserve">
     <value>アイコンキャッシュ使用状況</value>
   </data>
-  <data name="ImageCancelButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
-    <value>4, 4, 4, 4</value>
-  </data>
   <data name="SaveLogMenuItem.Size" type="System.Drawing.Size, System.Drawing">
     <value>206, 24</value>
   </data>
   <data name="StatusStrip1.TabIndex" type="System.Int32, mscorlib">
     <value>0</value>
   </data>
-  <data name="Label2.Size" type="System.Drawing.Size, System.Drawing">
-    <value>76, 27</value>
-  </data>
   <data name="&gt;&gt;OpenURLMenuItem.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;SourceCopyMenuItem.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="ImageSelectedPicture.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 0</value>
-  </data>
   <data name="&gt;&gt;OpenStatusOpMenuItem.Name" xml:space="preserve">
     <value>OpenStatusOpMenuItem</value>
   </data>
   <data name="&gt;&gt;ToolStripSeparator6.Name" xml:space="preserve">
     <value>ToolStripSeparator6</value>
   </data>
-  <data name="ImagePageCombo.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
-    <value>4, 0, 4, 0</value>
-  </data>
   <data name="DmOpMenuItem.Text" xml:space="preserve">
     <value>DM送信(&amp;M)</value>
   </data>
   <data name="&gt;&gt;SearchWikipediaContextMenuItem.Name" xml:space="preserve">
     <value>SearchWikipediaContextMenuItem</value>
   </data>
-  <data name="ImagePageCombo.Size" type="System.Drawing.Size, System.Drawing">
-    <value>72, 27</value>
-  </data>
   <data name="IdFilterAddMenuItem.Size" type="System.Drawing.Size, System.Drawing">
     <value>282, 24</value>
   </data>
   <data name="&gt;&gt;LockListFileMenuItem.Name" xml:space="preserve">
     <value>LockListFileMenuItem</value>
   </data>
-  <data name="&gt;&gt;Label2.ZOrder" xml:space="preserve">
-    <value>3</value>
-  </data>
   <data name="&gt;&gt;ToolStripSeparator11.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;ToolStripContainer1.RightToolStripPanel.ZOrder" xml:space="preserve">
     <value>2</value>
   </data>
-  <data name="Label2.ToolTip" xml:space="preserve">
-    <value />
-  </data>
   <data name="&gt;&gt;ToolStripSeparator37.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="ToolStripSeparator13.Size" type="System.Drawing.Size, System.Drawing">
     <value>279, 6</value>
   </data>
-  <data name="ImagefilePathText.ToolTip" xml:space="preserve">
-    <value />
-  </data>
   <data name="&gt;&gt;StatusOpenMenuItem.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;IdFilterAddMenuItem.Name" xml:space="preserve">
     <value>IdFilterAddMenuItem</value>
   </data>
-  <data name="ImageSelectionPanel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
+  <data name="ImageSelector.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
     <value>4, 4, 4, 4</value>
   </data>
   <data name="ToolStripSeparator30.Size" type="System.Drawing.Size, System.Drawing">
   <data name="&gt;&gt;StatusStrip1.Type" xml:space="preserve">
     <value>System.Windows.Forms.StatusStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="FilePickButton.ToolTip" xml:space="preserve">
-    <value />
-  </data>
   <data name="&gt;&gt;ToolStripSeparator5.Name" xml:space="preserve">
     <value>ToolStripSeparator5</value>
   </data>
   <data name="ListTab.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
     <value>Fill</value>
   </data>
-  <data name="ImageServiceCombo.ToolTip" xml:space="preserve">
-    <value />
-  </data>
   <data name="MatomeMenuItem.Text" xml:space="preserve">
     <value>%AppName% ウェブサイト(&amp;H)</value>
   </data>
   <data name="MenuItemUserStream.Enabled" type="System.Boolean, mscorlib">
     <value>False</value>
   </data>
-  <data name="&gt;&gt;ImagePathPanel.ZOrder" xml:space="preserve">
-    <value>1</value>
-  </data>
   <data name="UnreadOpMenuItem.ShortcutKeys" type="System.Windows.Forms.Keys, System.Windows.Forms">
     <value>Ctrl+Shift+B</value>
   </data>
   <data name="ProfilePanel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
     <value>4, 4, 4, 4</value>
   </data>
-  <data name="&gt;&gt;ImageSelectionPanel.Parent" xml:space="preserve">
+  <data name="&gt;&gt;ImageSelector.Parent" xml:space="preserve">
     <value>SplitContainer1.Panel1</value>
   </data>
   <data name="SplitContainer2.SplitterWidth" type="System.Int32, mscorlib">
     <value>2</value>
   </data>
-  <data name="ImageCancelButton.Text" xml:space="preserve">
-    <value>Cancel</value>
-  </data>
   <data name="SearchPostsDetailToolStripMenuItem.Text" xml:space="preserve">
     <value>このユーザーのTLを取得(&amp;F)</value>
   </data>
   <data name="ToolStripSeparator2.Size" type="System.Drawing.Size, System.Drawing">
     <value>285, 6</value>
   </data>
-  <data name="FilePickButton.TabIndex" type="System.Int32, mscorlib">
-    <value>2</value>
-  </data>
   <data name="StatusOpenMenuItem.Text" xml:space="preserve">
     <value>ステータスを開く(&amp;O)</value>
   </data>
   <data name="JumpUnreadMenuItem.Size" type="System.Drawing.Size, System.Drawing">
     <value>288, 24</value>
   </data>
-  <data name="ImageSelectedPicture.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
-    <value>Zoom</value>
-  </data>
   <data name="AddTabMenuItem.Size" type="System.Drawing.Size, System.Drawing">
     <value>233, 24</value>
   </data>
   <data name="&gt;&gt;SettingFileMenuItem.Name" xml:space="preserve">
     <value>SettingFileMenuItem</value>
   </data>
-  <data name="ImageCancelButton.Size" type="System.Drawing.Size, System.Drawing">
-    <value>75, 27</value>
-  </data>
   <data name="&gt;&gt;TinyURLToolStripMenuItem.Name" xml:space="preserve">
     <value>TinyURLToolStripMenuItem</value>
   </data>
   <data name="&gt;&gt;PostButton.Parent" xml:space="preserve">
     <value>SplitContainer2.Panel2</value>
   </data>
-  <data name="&gt;&gt;FilePickButton.Name" xml:space="preserve">
-    <value>FilePickButton</value>
-  </data>
   <data name="EditRuleTbMenuItem.Text" xml:space="preserve">
     <value>振り分けルール編集(&amp;F)...</value>
   </data>
   <data name="&gt;&gt;JumpUnreadMenuItem.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="&gt;&gt;ImagefilePathText.ZOrder" xml:space="preserve">
-    <value>0</value>
-  </data>
   <data name="ToolStripSeparator9.Size" type="System.Drawing.Size, System.Drawing">
     <value>203, 6</value>
   </data>
   <data name="PublicSearchQueryMenuItem.Text" xml:space="preserve">
     <value>抽出条件入力(&amp;Q)</value>
   </data>
-  <data name="ImageCancelButton.Location" type="System.Drawing.Point, System.Drawing">
-    <value>682, 4</value>
-  </data>
   <data name="ToolStripSeparator21.Size" type="System.Drawing.Size, System.Drawing">
     <value>203, 6</value>
   </data>
   <data name="NewPostPopMenuItem.Size" type="System.Drawing.Size, System.Drawing">
     <value>206, 24</value>
   </data>
-  <data name="Label2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Right</value>
-  </data>
   <data name="MenuStrip1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
     <value>None</value>
   </data>
   <data name="FollowToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
     <value>282, 24</value>
   </data>
-  <data name="ImagefilePathText.Location" type="System.Drawing.Point, System.Drawing">
-    <value>76, 4</value>
-  </data>
   <data name="&gt;&gt;ToolStripSeparator33.Name" xml:space="preserve">
     <value>ToolStripSeparator33</value>
   </data>
   <data name="&gt;&gt;TabRenameMenuItem.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="ImageServiceCombo.TabIndex" type="System.Int32, mscorlib">
-    <value>4</value>
-  </data>
   <data name="StatusLabel.Size" type="System.Drawing.Size, System.Drawing">
     <value>87, 23</value>
   </data>
   <data name="SplitContainer1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
     <value>4, 4, 4, 4</value>
   </data>
-  <data name="ImageServiceCombo.Location" type="System.Drawing.Point, System.Drawing">
-    <value>554, 4</value>
-  </data>
-  <data name="ImageServiceCombo.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Right</value>
-  </data>
   <data name="&gt;&gt;ToolStripSeparator27.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;MenuItemFile.Name" xml:space="preserve">
     <value>MenuItemFile</value>
   </data>
-  <data name="&gt;&gt;ImagefilePathText.Parent" xml:space="preserve">
-    <value>ImagePathPanel</value>
-  </data>
   <data name="ProtectTbMenuItem.Size" type="System.Drawing.Size, System.Drawing">
     <value>233, 24</value>
   </data>
   <data name="LockListFileMenuItem.Text" xml:space="preserve">
     <value>新着時リスト固定(&amp;L)</value>
   </data>
-  <data name="&gt;&gt;ImageServiceCombo.Name" xml:space="preserve">
-    <value>ImageServiceCombo</value>
-  </data>
   <data name="PostButton.ToolTip" xml:space="preserve">
     <value />
   </data>
   <data name="IdFilterAddMenuItem.Text" xml:space="preserve">
     <value>ID振分ルール作成(&amp;I)</value>
   </data>
-  <data name="&gt;&gt;ImageServiceCombo.Parent" xml:space="preserve">
-    <value>ImagePathPanel</value>
-  </data>
   <data name="ShowFriendShipToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
     <value>282, 24</value>
   </data>
   <data name="RenameTbMenuItem.Text" xml:space="preserve">
     <value>タブ名変更(&amp;R)</value>
   </data>
-  <data name="&gt;&gt;ImagePathPanel.Type" xml:space="preserve">
-    <value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
   <data name="&gt;&gt;TimelinePanel.ZOrder" xml:space="preserve">
     <value>0</value>
   </data>
   <data name="&gt;&gt;SearchAtPostsDetailToolStripMenuItem.Name" xml:space="preserve">
     <value>SearchAtPostsDetailToolStripMenuItem</value>
   </data>
-  <data name="&gt;&gt;ImageCancelButton.Name" xml:space="preserve">
-    <value>ImageCancelButton</value>
-  </data>
-  <data name="ImageSelectionPanel.Visible" type="System.Boolean, mscorlib">
+  <data name="ImageSelector.Visible" type="System.Boolean, mscorlib">
     <value>False</value>
   </data>
   <data name="&gt;&gt;OpenRepSourceOpMenuItem.Type" xml:space="preserve">
   <data name="ToolStripContainer1.Text" xml:space="preserve">
     <value>ToolStripContainer1</value>
   </data>
-  <data name="&gt;&gt;ImageServiceCombo.ZOrder" xml:space="preserve">
-    <value>4</value>
-  </data>
-  <data name="ImagePageCombo.TabIndex" type="System.Int32, mscorlib">
-    <value>0</value>
-  </data>
-  <data name="&gt;&gt;ImagePathPanel.Name" xml:space="preserve">
-    <value>ImagePathPanel</value>
-  </data>
   <data name="&gt;&gt;ToolStripSeparator17.Name" xml:space="preserve">
     <value>ToolStripSeparator17</value>
   </data>
   <data name="&gt;&gt;EndFileMenuItem.Name" xml:space="preserve">
     <value>EndFileMenuItem</value>
   </data>
-  <data name="&gt;&gt;Label2.Parent" xml:space="preserve">
-    <value>ImagePathPanel</value>
-  </data>
   <data name="&gt;&gt;ToolStripContainer1.ContentPanel.Parent" xml:space="preserve">
     <value>ToolStripContainer1</value>
   </data>
   <data name="&gt;&gt;ShowFriendShipToolStripMenuItem.Name" xml:space="preserve">
     <value>ShowFriendShipToolStripMenuItem</value>
   </data>
-  <data name="Label2.TabIndex" type="System.Int32, mscorlib">
-    <value>3</value>
-  </data>
   <data name="&gt;&gt;SplitContainer1.Name" xml:space="preserve">
     <value>SplitContainer1</value>
   </data>
   <data name="SplitContainer2.Orientation" type="System.Windows.Forms.Orientation, System.Windows.Forms">
     <value>Horizontal</value>
   </data>
-  <data name="&gt;&gt;FilePickButton.Type" xml:space="preserve">
-    <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
   <data name="&gt;&gt;UnreadMngTbMenuItem.Name" xml:space="preserve">
     <value>UnreadMngTbMenuItem</value>
   </data>
   <data name="&gt;&gt;TableLayoutPanel1.Parent" xml:space="preserve">
     <value>SplitContainer2.Panel1</value>
   </data>
-  <data name="&gt;&gt;Label2.Name" xml:space="preserve">
-    <value>Label2</value>
-  </data>
   <data name="&gt;&gt;ToolStripSeparator28.Name" xml:space="preserve">
     <value>ToolStripSeparator28</value>
   </data>
   <data name="&gt;&gt;UreadManageMenuItem.Name" xml:space="preserve">
     <value>UreadManageMenuItem</value>
   </data>
-  <data name="Label2.Text" xml:space="preserve">
-    <value>投稿先</value>
-  </data>
   <data name="&gt;&gt;IDRuleMenuItem.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="ImageSelectionPanel.Size" type="System.Drawing.Size, System.Drawing">
+  <data name="ImageSelector.Size" type="System.Drawing.Size, System.Drawing">
     <value>761, 391</value>
   </data>
   <data name="&gt;&gt;SplitContainer2.Name" xml:space="preserve">
   <data name="RtOpMenuItem.ShortcutKeys" type="System.Windows.Forms.Keys, System.Windows.Forms">
     <value>Alt+R</value>
   </data>
-  <data name="ImageSelectedPicture.ToolTip" xml:space="preserve">
-    <value />
-  </data>
   <data name="&gt;&gt;TwitterApiStatusToolStripMenuItem.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="TraceOutToolStripMenuItem.Text" xml:space="preserve">
     <value>TraceOut出力</value>
   </data>
-  <data name="ImageServiceCombo.Size" type="System.Drawing.Size, System.Drawing">
-    <value>128, 23</value>
-  </data>
   <data name="ProfilePanel.Location" type="System.Drawing.Point, System.Drawing">
     <value>0, 0</value>
   </data>
   <data name="ContextMenuUserPicture.ToolTip" xml:space="preserve">
     <value />
   </data>
-  <data name="&gt;&gt;ImageSelectedPicture.Type" xml:space="preserve">
-    <value>OpenTween.OTPictureBox, OpenTween, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null</value>
-  </data>
   <data name="ShowUserTimelineToolStripMenuItem.Text" xml:space="preserve">
     <value>ユーザーのタイムラインを表示</value>
   </data>
   <data name="&gt;&gt;IsgdToolStripMenuItem.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="ImagefilePathText.Size" type="System.Drawing.Size, System.Drawing">
-    <value>373, 22</value>
-  </data>
   <data name="&gt;&gt;DeleteStripMenuItem.Name" xml:space="preserve">
     <value>DeleteStripMenuItem</value>
   </data>
   <data name="&gt;&gt;UxnuMenuItem.Name" xml:space="preserve">
     <value>UxnuMenuItem</value>
   </data>
-  <data name="FilePickButton.Text" xml:space="preserve">
-    <value>...</value>
-  </data>
   <data name="ToolStripContainer1.Size" type="System.Drawing.Size, System.Drawing">
     <value>765, 570</value>
   </data>
index a13748b..f2a8062 100644 (file)
   <data name="ContextMenuTabProperty.Size" type="System.Drawing.Size, System.Drawing">
     <value>186, 207</value>
   </data>
-  <data name="Label2.Text" xml:space="preserve">
-    <value>上传到</value>
-  </data>
-  <data name="ImageCancelButton.Text" xml:space="preserve">
-    <value>取消</value>
-  </data>
   <data name="FollowToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
     <value>170, 22</value>
   </data>