OSDN Git Service

コメントアウトされた不要なコードを削除
authorKimura Youichi <kim.upsilon@bucyou.net>
Sun, 22 Sep 2019 21:42:14 +0000 (06:42 +0900)
committerKimura Youichi <kim.upsilon@bucyou.net>
Sun, 22 Sep 2019 21:42:14 +0000 (06:42 +0900)
14 files changed:
OpenTween/AtIdSupplement.cs
OpenTween/DetailsListView.cs
OpenTween/EventViewerDialog.cs
OpenTween/FilterDialog.cs
OpenTween/Growl.cs
OpenTween/Models/TabInformations.cs
OpenTween/MyCommon.cs
OpenTween/NativeMethods.cs
OpenTween/Setting/Panel/BasedPanel.cs
OpenTween/Setting/Panel/ShortUrlPanel.cs
OpenTween/Setting/SettingBase.cs
OpenTween/Tween.cs
OpenTween/TweetDetailsView.cs
OpenTween/Twitter.cs

index e2b17ff..49116d6 100644 (file)
@@ -74,19 +74,19 @@ namespace OpenTween
         public int ItemCount
             => this.TextId.AutoCompleteCustomSource.Count;
 
-        private void ButtonOK_Click(object sender, EventArgs e) /*Handles ButtonOK.Click*/
+        private void ButtonOK_Click(object sender, EventArgs e)
         {
             inputText = this.TextId.Text;
             isBack = false;
         }
 
-        private void ButtonCancel_Click(object sender, EventArgs e) /*Handles ButtonCancel.Click*/
+        private void ButtonCancel_Click(object sender, EventArgs e)
         {
             inputText = "";
             isBack = false;
         }
 
-        private void TextId_KeyDown(object sender, KeyEventArgs e) /*Handles TextId.KeyDown*/
+        private void TextId_KeyDown(object sender, KeyEventArgs e)
         {
             if (e.KeyCode == Keys.Back && string.IsNullOrEmpty(this.TextId.Text))
             {
@@ -114,7 +114,7 @@ namespace OpenTween
             }
         }
 
-        private void AtIdSupplement_Load(object sender, EventArgs e) /*Handles this.Load*/
+        private void AtIdSupplement_Load(object sender, EventArgs e)
         {
             if (startChar == "#")
             {
@@ -123,7 +123,7 @@ namespace OpenTween
             }
         }
 
-        private void AtIdSupplement_Shown(object sender, EventArgs e) /*Handles this.Shown*/
+        private void AtIdSupplement_Shown(object sender, EventArgs e)
         {
             TextId.Text = startChar;
             if (!string.IsNullOrEmpty(this.StartsWith))
@@ -148,7 +148,7 @@ namespace OpenTween
             startChar = startCharacter;
         }
 
-        private void TextId_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) /*Handles TextId.PreviewKeyDown*/
+        private void TextId_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
         {
             if (e.KeyCode == Keys.Tab)
             {
@@ -158,7 +158,7 @@ namespace OpenTween
             }
         }
 
-        private void AtIdSupplement_FormClosed(object sender, FormClosedEventArgs e) /*Handles MyBase.FormClosed*/
+        private void AtIdSupplement_FormClosed(object sender, FormClosedEventArgs e)
         {
             this.StartsWith = "";
             if (isBack)
index 655e8bd..9aae3df 100644 (file)
@@ -55,50 +55,6 @@ namespace OpenTween.OpenTweenCustomControl
             DoubleBuffered = true;
         }
 
-        //[System.ComponentModel.DefaultValue(0),
-        // System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)]
-        //public new int VirtualListSize
-        //{
-        //    get { return base.VirtualListSize; }
-        //    set
-        //    {
-        //        if (value == base.VirtualListSize) return;
-        //        if (base.VirtualListSize > 0 && value > 0)
-        //        {
-        //            int topIndex = 0;
-        //            if (!this.IsDisposed)
-        //            {
-        //                if (base.VirtualListSize < value)
-        //                {
-        //                    if (this.TopItem == null)
-        //                    {
-        //                        topIndex = 0;
-        //                    }
-        //                    else
-        //                    {
-        //                        topIndex = this.TopItem.Index;
-        //                    }
-        //                    topIndex = Math.Min(topIndex, Math.Abs(value - 1));
-        //                    this.TopItem = this.Items[topIndex];
-        //                }
-        //                else
-        //                {
-        //                    if (this.TopItem == null)
-        //                    {
-        //                        topIndex = 0;
-        //                    }
-        //                    else
-        //                    {
-        //
-        //                    }
-        //                    this.TopItem = this.Items[0];
-        //                }
-        //            }
-        //        }
-        //        base.VirtualListSize = value;
-        //    }
-        //}
-
         /// <summary>
         /// 複数選択時の起点になるアイテム (selection mark) の位置を取得・設定する
         /// </summary>
index 0e135d8..2cab195 100644 (file)
@@ -274,7 +274,6 @@ namespace OpenTween
                         SaveEventLog(EventSource, sw);
                         break;
                     default:
-                        //
                         break;
                 }
             }
@@ -301,7 +300,6 @@ namespace OpenTween
                        .Where(e => e != "None" && e != "All")
                        .Select(e => new TabPage(e)
                        {
-                           // Name = "TabPage" + e,
                            Tag = e,
                            UseVisualStyleBackColor = true,
                            AccessibleRole = AccessibleRole.PageTab,
index f1d0970..82c6bcd 100644 (file)
@@ -1370,14 +1370,12 @@ namespace OpenTween
             var tbox = (TextBox)sender;
             if (e.KeyChar == '@')
             {
-                //if (!SettingDialog.UseAtIdSupplement) return;
                 //@マーク
                 main.ShowSuplDialog(tbox, main.AtIdSupl);
                 e.Handled = true;
             }
             else if (e.KeyChar == '#')
             {
-                //if (!SettingDialog.UseHashSupplement) return;
                 main.ShowSuplDialog(tbox, main.HashSupl);
                 e.Handled = true;
             }
index b4abd3f..21dcf8a 100644 (file)
@@ -323,7 +323,6 @@ namespace OpenTween
                                       text},
                         CultureInfo.InvariantCulture);
             }
-            //_targetConnector.GetType.InvokeMember("Notify", BindingFlags.InvokeMethod, null, _targetConnector, new object[] {n});
             var cc = _connector.GetType("Growl.Connector.CallbackContext").InvokeMember(
                 null, BindingFlags.CreateInstance, null, _connector,
                 new object[] { "some fake information", notificationName },
index d33b340..c6badd0 100644 (file)
@@ -139,11 +139,6 @@ namespace OpenTween.Models
             }
         }
 
-        //public void AddTab(string TabName, TabClass Tab)
-        //{
-        //    _tabs.Add(TabName, Tab);
-        //}
-
         public void RemoveTab(string TabName)
         {
             lock (LockObj)
@@ -281,30 +276,13 @@ namespace OpenTween.Models
             return this.SortOrder;
         }
 
-        //    public PostClass RetweetSource(long Id)
-        //    {
-        //        get
-        //        {
-        //            if (_retweets.ContainsKey(Id))
-        //            {
-        //                return _retweets[Id];
-        //            }
-        //            else
-        //            {
-        //                return null;
-        //            }
-        //        }
-        //    }
         public PostClass? RetweetSource(long Id)
             => this.Posts.TryGetValue(Id, out var status) ? status : null;
 
         public void ScrubGeoReserve(long id, long upToStatusId)
         {
             lock (LockObj)
-            {
-                //this._scrubGeo.Add(new ScrubGeoInfo With {.UserId = id, .UpToStatusId = upToStatusId});
                 this.ScrubGeo(id, upToStatusId);
-            }
         }
 
         private void ScrubGeo(long userId, long upToStatusId)
index 982d67c..22a624c 100644 (file)
@@ -164,17 +164,6 @@ namespace OpenTween
             public const string DM = "Direct";
             public const string FAV = "Favorites";
             public static readonly string MUTE = Properties.Resources.MuteTabName;
-
-            //private string dummy;
-
-            //private object ReferenceEquals()
-            //{
-            //    return new object();
-            //}
-            //private object Equals()
-            //{
-            //    return new object();
-            //}
         }
 
         public static readonly object? Block = null;
@@ -693,9 +682,6 @@ namespace OpenTween
             UserTimeline = 1024,
             Mute = 2048,
             SearchResults = 4096,
-            //RTMyTweet
-            //RTByOthers
-            //RTByMe
         }
 
         public static TwitterApiStatus TwitterApiInfo = new TwitterApiStatus();
index 0ad6321..c318452 100644 (file)
@@ -321,7 +321,6 @@ namespace OpenTween
 
         private enum InternetOpenType
         {
-            //PRECONFIG = 0, // IE setting
             DIRECT = 1, // Direct
             PROXY = 3, // Custom
         }
index 78fa0ac..6f45191 100644 (file)
@@ -56,9 +56,6 @@ namespace OpenTween.Setting.Panel
 
         private void AuthClearButton_Click(object sender, EventArgs e)
         {
-            //tw.ClearAuthInfo();
-            //this.AuthStateLabel.Text = Properties.Resources.AuthorizeButton_Click4;
-            //this.AuthUserLabel.Text = "";
             if (this.AuthUserCombo.SelectedIndex > -1)
             {
                 this.AuthUserCombo.Items.RemoveAt(this.AuthUserCombo.SelectedIndex);
@@ -71,7 +68,6 @@ namespace OpenTween.Setting.Panel
                     this.AuthUserCombo.SelectedIndex = -1;
                 }
             }
-            //this.Save.Enabled = false;
         }
     }
 }
index ccd0379..d97c58e 100644 (file)
@@ -50,8 +50,6 @@ namespace OpenTween.Setting.Panel
 
             // 使われていない設定項目 (Tween v1.0.5.0)
             this.CheckAutoConvertUrl.Checked = false;
-            //this.CheckAutoConvertUrl.Checked = settingCommon.UrlConvertAuto;
-            //this.ShortenTcoCheck.Checked = settingCommon.ShortenTco;
             this.ShortenTcoCheck.Enabled = this.CheckAutoConvertUrl.Checked;
 
             this.ComboBoxAutoShortUrlFirst.SelectedIndex = (int)settingCommon.AutoShortUrlFirst;
@@ -63,7 +61,6 @@ namespace OpenTween.Setting.Panel
         {
             settingCommon.TinyUrlResolve = this.CheckTinyURL.Checked;
             settingCommon.UrlConvertAuto = this.CheckAutoConvertUrl.Checked;
-            //settingCommon.ShortenTco = this.ShortenTcoCheck.Checked;
             settingCommon.AutoShortUrlFirst = (MyCommon.UrlConverter)this.ComboBoxAutoShortUrlFirst.SelectedIndex;
             settingCommon.BitlyAccessToken = this.TextBitlyAccessToken.Text;
         }
index d197410..c6a7f24 100644 (file)
@@ -102,11 +102,6 @@ namespace OpenTween
                 }
                 MessageBox.Show("File: " + GetSettingFilePath(FileId) + Environment.NewLine + "Use default setting, because application can't read this setting file.");
                 return new T();
-                //ex.Data.Add("FilePath", GetSettingFilePath(FileId));
-                //FileInfo fi = new IO.FileInfo(GetSettingFilePath(FileId));
-                //ex.Data.Add("FileSize", fi.Length.ToString());
-                //ex.Data.Add("FileData", File.ReadAllText(GetSettingFilePath(FileId)));
-                //throw;
             }
         }
 
index b708824..0109c29 100644 (file)
@@ -797,8 +797,6 @@ namespace OpenTween
 
             InitializeTraceFrag();
 
-            //Win32Api.SetProxy(HttpConnection.ProxyType.Specified, "127.0.0.1", 8080, "user", "pass")
-
             Microsoft.Win32.SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged;
 
             Regex.CacheSize = 100;
@@ -990,19 +988,14 @@ namespace OpenTween
             _brsBackColorAtYou = new SolidBrush(_clAtTarget);
             _brsBackColorAtFromTarget = new SolidBrush(_clAtFromTarget);
             _brsBackColorAtTo = new SolidBrush(_clAtTo);
-            //_brsBackColorNone = new SolidBrush(Color.FromKnownColor(KnownColor.Window));
             _brsBackColorNone = new SolidBrush(_clListBackcolor);
 
             // StringFormatオブジェクトへの事前設定
-            //sf.Alignment = StringAlignment.Near;             // Textを近くへ配置(左から右の場合は左寄せ)
-            //sf.LineAlignment = StringAlignment.Near;         // Textを近くへ配置(上寄せ)
-            //sf.FormatFlags = StringFormatFlags.LineLimit;    // 
             sfTab.Alignment = StringAlignment.Center;
             sfTab.LineAlignment = StringAlignment.Center;
 
             InitDetailHtmlFormat();
 
-            //Regex statregex = new Regex("^0*");
             this.recommendedStatusFooter = " [TWNv" + Regex.Replace(MyCommon.FileVersion.Replace(".", ""), "^0*", "") + "]";
 
             _history.Add(new StatusTextHistory());
@@ -1062,7 +1055,6 @@ namespace OpenTween
             {
                 _mySpDis3 = ScaleBy(configScaleFactor.Width, SettingManager.Local.PreviewDistance);
             }
-            //this.Tween_ClientSizeChanged(this, null);
             this.PlaySoundMenuItem.Checked = SettingManager.Common.PlaySound;
             this.PlaySoundFileMenuItem.Checked = SettingManager.Common.PlaySound;
             //入力欄
@@ -1382,7 +1374,7 @@ namespace OpenTween
             }
         }
 
-        private void TimerInterval_Changed(object sender, IntervalChangedEventArgs e) //Handles SettingDialog.IntervalChanged
+        private void TimerInterval_Changed(object sender, IntervalChangedEventArgs e)
         {
             if (e.UserStream)
             {
@@ -1822,14 +1814,9 @@ namespace OpenTween
                                 title.Append(tw.Username);
                                 title.Append(" - ");
                             }
-                            else
-                            {
-                                //title.Clear();
-                            }
+
                             if (dm)
                             {
-                                //NotifyIcon1.BalloonTipIcon = ToolTipIcon.Warning;
-                                //NotifyIcon1.BalloonTipTitle += Application.ProductName + " [DM] " + Properties.Resources.RefreshDirectMessageText1 + " " + addCount.ToString() + Properties.Resources.RefreshDirectMessageText2;
                                 title.Append(ApplicationSettings.ApplicationName);
                                 title.Append(" [DM] ");
                                 title.AppendFormat(Properties.Resources.RefreshTimeline_NotifyText, addCount);
@@ -1837,8 +1824,6 @@ namespace OpenTween
                             }
                             else if (reply)
                             {
-                                //NotifyIcon1.BalloonTipIcon = ToolTipIcon.Warning;
-                                //NotifyIcon1.BalloonTipTitle += Application.ProductName + " [Reply!] " + Properties.Resources.RefreshTimelineText1 + " " + addCount.ToString() + Properties.Resources.RefreshTimelineText2;
                                 title.Append(ApplicationSettings.ApplicationName);
                                 title.Append(" [Reply!] ");
                                 title.AppendFormat(Properties.Resources.RefreshTimeline_NotifyText, addCount);
@@ -1846,8 +1831,6 @@ namespace OpenTween
                             }
                             else
                             {
-                                //NotifyIcon1.BalloonTipIcon = ToolTipIcon.Info;
-                                //NotifyIcon1.BalloonTipTitle += Application.ProductName + " " + Properties.Resources.RefreshTimelineText1 + " " + addCount.ToString() + Properties.Resources.RefreshTimelineText2;
                                 title.Append(ApplicationSettings.ApplicationName);
                                 title.Append(" ");
                                 title.AppendFormat(Properties.Resources.RefreshTimeline_NotifyText, addCount);
@@ -1882,7 +1865,7 @@ namespace OpenTween
                             sb.Append(post.TextFromApi);
 
                         }
-                        //if (SettingDialog.DispUsername) { NotifyIcon1.BalloonTipTitle = tw.Username + " - "; } else { NotifyIcon1.BalloonTipTitle = ""; }
+
                         var title = new StringBuilder();
                         ToolTipIcon ntIcon;
                         if (SettingManager.Common.DispUsername)
@@ -1890,14 +1873,9 @@ namespace OpenTween
                             title.Append(tw.Username);
                             title.Append(" - ");
                         }
-                        else
-                        {
-                            //title.Clear();
-                        }
+
                         if (dm)
                         {
-                            //NotifyIcon1.BalloonTipIcon = ToolTipIcon.Warning;
-                            //NotifyIcon1.BalloonTipTitle += Application.ProductName + " [DM] " + Properties.Resources.RefreshDirectMessageText1 + " " + addCount.ToString() + Properties.Resources.RefreshDirectMessageText2;
                             ntIcon = ToolTipIcon.Warning;
                             title.Append(ApplicationSettings.ApplicationName);
                             title.Append(" [DM] ");
@@ -1905,8 +1883,6 @@ namespace OpenTween
                         }
                         else if (reply)
                         {
-                            //NotifyIcon1.BalloonTipIcon = ToolTipIcon.Warning;
-                            //NotifyIcon1.BalloonTipTitle += Application.ProductName + " [Reply!] " + Properties.Resources.RefreshTimelineText1 + " " + addCount.ToString() + Properties.Resources.RefreshTimelineText2;
                             ntIcon = ToolTipIcon.Warning;
                             title.Append(ApplicationSettings.ApplicationName);
                             title.Append(" [Reply!] ");
@@ -1914,8 +1890,6 @@ namespace OpenTween
                         }
                         else
                         {
-                            //NotifyIcon1.BalloonTipIcon = ToolTipIcon.Info;
-                            //NotifyIcon1.BalloonTipTitle += Application.ProductName + " " + Properties.Resources.RefreshTimelineText1 + " " + addCount.ToString() + Properties.Resources.RefreshTimelineText2;
                             ntIcon = ToolTipIcon.Info;
                             title.Append(ApplicationSettings.ApplicationName);
                             title.Append(" ");
@@ -1923,8 +1897,7 @@ namespace OpenTween
                         }
                         var bText = sb.ToString();
                         if (string.IsNullOrEmpty(bText)) return;
-                        //NotifyIcon1.BalloonTipText = sb.ToString();
-                        //NotifyIcon1.ShowBalloonTip(500);
+
                         NotifyIcon1.BalloonTipTitle = title.ToString();
                         NotifyIcon1.BalloonTipText = bText;
                         NotifyIcon1.BalloonTipIcon = ntIcon;
@@ -2047,7 +2020,6 @@ namespace OpenTween
                     DList.ChangeItemFontAndColor(Item, cl, fnt);
                 else
                     DList.ChangeItemForeColor(Item, cl);
-                //if (_itemCache != null) DList.RedrawItems(_itemCacheIndex, _itemCacheIndex + _itemCache.Length - 1, false);
             }
         }
 
@@ -2200,16 +2172,7 @@ namespace OpenTween
                 StatusText.SelectionStart = StatusText.Text.Length;
                 await UrlConvertAsync(MyCommon.UrlConverter.Nicoms);
             }
-            //if (SettingDialog.UrlConvertAuto)
-            //{
-            //    StatusText.SelectionStart = StatusText.Text.Length;
-            //    UrlConvertAutoToolStripMenuItem_Click(null, null);
-            //}
-            //else if (SettingDialog.Nicoms)
-            //{
-            //    StatusText.SelectionStart = StatusText.Text.Length;
-            //    UrlConvert(UrlConverter.Nicoms);
-            //}
+
             StatusText.SelectionStart = StatusText.Text.Length;
             CheckReplyTo(StatusText.Text);
 
@@ -3318,14 +3281,7 @@ namespace OpenTween
                     FavoriteRetweetUnofficialContextMenu.Enabled = true;
                 }
             }
-            //if (_statuses.Tabs[ListTab.SelectedTab.Text].TabType != MyCommon.TabUsageType.Favorites)
-            //{
-            //    RefreshMoreStripMenuItem.Enabled = true;
-            //}
-            //else
-            //{
-            //    RefreshMoreStripMenuItem.Enabled = false;
-            //}
+
             if (!this.ExistCurrentPost || post == null || post.InReplyToStatusId == null)
             {
                 RepliedStatusOpenMenuItem.Enabled = false;
@@ -4355,7 +4311,6 @@ namespace OpenTween
 
         private void ListTab_SelectedIndexChanged(object sender, EventArgs e)
         {
-            //_curList.Refresh();
             SetMainWindowTitle();
             SetStatusLabelUrl();
             SetApiStatusLabel();
@@ -4831,10 +4786,7 @@ namespace OpenTween
         private ListViewItem CreateItem(TabModel tab, PostClass Post)
         {
             var mk = new StringBuilder();
-            //if (Post.IsDeleted) mk.Append("×");
-            //if (Post.IsMark) mk.Append("♪");
-            //if (Post.IsProtect) mk.Append("Ю");
-            //if (Post.InReplyToStatusId != null) mk.Append("⇒");
+
             if (Post.FavoritedCount > 0) mk.Append("+" + Post.FavoritedCount);
             ImageListViewItem itm;
             if (Post.RetweetedId == null)
@@ -4975,35 +4927,20 @@ namespace OpenTween
 
                 var drawLineCount = Math.Max(1, Math.DivRem((int)rct.Height, fontHeight, out var heightDiff));
 
-                //if (heightDiff > fontHeight * 0.7)
-                //{
-                //    rct.Height += fontHeight;
-                //    drawLineCount += 1;
-                //}
-
                 //フォントの高さの半分を足してるのは保険。無くてもいいかも。
-                if (!_iconCol && drawLineCount <= 1)
+                if (this._iconCol || drawLineCount > 1)
                 {
-                    //rct.Inflate(0, heightDiff / -2);
-                    //rct.Height += fontHeight / 2;
-                }
-                else if (heightDiff < fontHeight * 0.7)
-                {
-                    //最終行が70%以上欠けていたら、最終行は表示しない
-                    //rct.Height = (float)((fontHeight * drawLineCount) + (fontHeight / 2));
-                    rct.Height = (fontHeight * drawLineCount) - 1;
-                }
-                else
-                {
-                    drawLineCount += 1;
+                    if (heightDiff < fontHeight * 0.7)
+                    {
+                        // 最終行が70%以上欠けていたら、最終行は表示しない
+                        rct.Height = (fontHeight * drawLineCount) - 1;
+                    }
+                    else
+                    {
+                        drawLineCount += 1;
+                    }
                 }
 
-                //if (!_iconCol && drawLineCount > 1)
-                //{
-                //    rct.Y += fontHeight * 0.2;
-                //    if (heightDiff >= fontHeight * 0.8) rct.Height -= fontHeight * 0.2;
-                //}
-
                 if (rct.Width > 0)
                 {
                     var color = (!e.Item.Selected) ? e.Item.ForeColor :   //選択されていない行
@@ -5071,7 +5008,6 @@ namespace OpenTween
                                                     TextFormatFlags.NoPrefix);
                         }
                     }
-                    //if (e.ColumnIndex == 6) this.DrawListViewItemStateIcon(e, rct);
                 }
             }
         }
@@ -5124,7 +5060,6 @@ namespace OpenTween
             else
             {
                 iconRect = Rectangle.Intersect(new Rectangle(e.Item.GetBounds(ItemBoundsPortion.Icon).Location, new Size(1, 1)), itemRect);
-                //iconRect.Offset(0, Math.Max(0, (itemRect.Height - realIconSize.Height) / 2));
 
                 item.GetImageAsync();
             }
@@ -5133,11 +5068,7 @@ namespace OpenTween
             {
                 var stateRect = Rectangle.Intersect(new Rectangle(new Point(iconRect.X + realIconSize.Width + 2, iconRect.Y), realStateSize), itemRect);
                 if (stateRect.Width > 0)
-                {
-                    //e.Graphics.FillRectangle(Brushes.White, stateRect);
-                    //e.Graphics.InterpolationMode = Drawing2D.InterpolationMode.High;
                     e.Graphics.DrawImage(this.PostStateImageList.Images[item.StateIndex], stateRect);
-                }
             }
         }
 
@@ -5156,36 +5087,6 @@ namespace OpenTween
             }
         }
 
-        //private void DrawListViewItemStateIcon(DrawListViewSubItemEventArgs e, RectangleF rct)
-        //{
-        //    ImageListViewItem item = (ImageListViewItem)e.Item;
-        //    if (item.StateImageIndex > -1)
-        //    {
-        //        ////e.Bounds.Leftが常に0を指すから自前で計算
-        //        //Rectangle itemRect = item.Bounds;
-        //        //itemRect.Width = e.Item.ListView.Columns[4].Width;
-
-        //        //foreach (ColumnHeader clm in e.Item.ListView.Columns)
-        //        //{
-        //        //    if (clm.DisplayIndex < e.Item.ListView.Columns[4].DisplayIndex)
-        //        //    {
-        //        //        itemRect.X += clm.Width;
-        //        //    }
-        //        //}
-
-        //        //Rectangle iconRect = Rectangle.Intersect(new Rectangle(e.Item.GetBounds(ItemBoundsPortion.Icon).Location, new Size(_iconSz, _iconSz)), itemRect);
-        //        //iconRect.Offset(0, Math.Max(0, (itemRect.Height - _iconSz) / 2));
-
-        //        if (rct.Width > 0)
-        //        {
-        //            RectangleF stateRect = RectangleF.Intersect(rct, new RectangleF(rct.Location, new Size(18, 16)));
-        //            //e.Graphics.FillRectangle(Brushes.White, rct);
-        //            //e.Graphics.InterpolationMode = Drawing2D.InterpolationMode.High;
-        //            e.Graphics.DrawImage(this.PostStateImageList.Images(item.StateImageIndex), stateRect);
-        //        }
-        //    }
-        //}
-
         internal void DoTabSearch(string searchWord, bool caseSensitive, bool useRegex, SEARCHTYPE searchType)
         {
             var tab = this.CurrentTab;
@@ -7586,22 +7487,8 @@ namespace OpenTween
                             }
                             StatusText.Text = StatusText.Text.Insert(sidx, id);
                             sidx += id.Length;
-                            //if (StatusText.Text.StartsWith("@"))
-                            //{
-                            //    //複数リプライ
-                            //    StatusText.Text = ". " + StatusText.Text.Insert(sidx, " @" + _curPost.ScreenName + " ");
-                            //    sidx += 5 + _curPost.ScreenName.Length;
-                            //}
-                            //else
-                            //{
-                            //    // 複数リプライ
-                            //    StatusText.Text = StatusText.Text.Insert(sidx, " @" + _curPost.ScreenName + " ");
-                            //    sidx += 3 + _curPost.ScreenName.Length;
-                            //}
                             StatusText.SelectionStart = sidx;
                             StatusText.Focus();
-                            //_reply_to_id = 0;
-                            //_reply_to_name = null;
                             return;
                         }
                     }
@@ -7626,10 +7513,7 @@ namespace OpenTween
                         foreach (var post in selectedPosts)
                         {
                             if (!sTxt.Contains("@" + post.ScreenName + " "))
-                            {
                                 sTxt = sTxt.Insert(2, "@" + post.ScreenName + " ");
-                                //sTxt = "@" + post.ScreenName + " " + sTxt;
-                            }
                         }
                         StatusText.Text = sTxt;
                     }
@@ -7681,16 +7565,6 @@ namespace OpenTween
                             }
                             StatusText.Text = StatusText.Text.Insert(sidx, ids);
                             sidx += ids.Length;
-                            //if (StatusText.Text.StartsWith("@"))
-                            //{
-                            //    StatusText.Text = ". " + StatusText.Text.Insert(sidx, ids);
-                            //    sidx += 2 + ids.Length;
-                            //}
-                            //else
-                            //{
-                            //    StatusText.Text = StatusText.Text.Insert(sidx, ids);
-                            //    sidx += 1 + ids.Length;
-                            //}
                             StatusText.SelectionStart = sidx;
                             StatusText.Focus();
                             return;
@@ -9000,9 +8874,6 @@ namespace OpenTween
                 }
             }
 
-            //t.coで投稿時自動短縮する場合は、外部サービスでの短縮禁止
-            //if (SettingDialog.UrlConvertAuto && SettingDialog.ShortenTco) return;
-
             //Converter_Type=Nicomsの場合は、nicovideoのみ短縮する
             //参考資料 RFC3986 Uniform Resource Identifier (URI): Generic Syntax
             //Appendix A.  Collected ABNF for URI
@@ -9378,11 +9249,6 @@ namespace OpenTween
                 this.MarkSettingLocalModified();
                 this._isColumnChanged = true;
             }
-            // 非表示の時にColumnChangedが呼ばれた場合はForm初期化処理中なので保存しない
-            //if (changed)
-            //{
-            //    SaveConfigsLocal();
-            //}
         }
 
         private void SplitContainer2_SplitterMoved(object sender, SplitterEventArgs e)
@@ -9611,7 +9477,6 @@ namespace OpenTween
                 }
                 catch (Exception)
                 {
-                    //MessageBox.Show("ブラウザの起動に失敗、またはタイムアウトしました。" + ex.ToString());
                 }
             });
         }
@@ -10586,20 +10451,7 @@ namespace OpenTween
                 HashTogglePullDownMenuItem.Checked = false;
                 HashToggleMenuItem.Checked = false;
             }
-            //if (HashMgr.IsInsert && HashMgr.UseHash != "")
-            //{
-            //    int sidx = StatusText.SelectionStart;
-            //    string hash = HashMgr.UseHash + " ";
-            //    if (sidx > 0)
-            //    {
-            //        if (StatusText.Text.Substring(sidx - 1, 1) != " ")
-            //            hash = " " + hash;
-            //    }
-            //    StatusText.Text = StatusText.Text.Insert(sidx, hash);
-            //    sidx += hash.Length;
-            //    StatusText.SelectionStart = sidx;
-            //    StatusText.Focus();
-            //}
+
             this.MarkSettingCommonModified();
             this.StatusText_TextChanged(this.StatusText, EventArgs.Empty);
         }
@@ -11076,11 +10928,6 @@ namespace OpenTween
                 RtCountMenuItem.Enabled = true;
             else
                 RtCountMenuItem.Enabled = false;
-
-            //if (SettingDialog.UrlConvertAuto && SettingDialog.ShortenTco)
-            //    TinyUrlConvertToolStripMenuItem.Enabled = false;
-            //else
-            //    TinyUrlConvertToolStripMenuItem.Enabled = true;
         }
 
         private void CopyUserIdStripMenuItem_Click(object sender, EventArgs e)
@@ -11191,8 +11038,6 @@ namespace OpenTween
         private void CacheInfoMenuItem_Click(object sender, EventArgs e)
         {
             var buf = new StringBuilder();
-            //buf.AppendFormat("キャッシュメモリ容量         : {0}bytes({1}MB)" + Environment.NewLine, IconCache.CacheMemoryLimit, ((ImageDictionary)IconCache).CacheMemoryLimit / 1048576);
-            //buf.AppendFormat("物理メモリ使用割合           : {0}%" + Environment.NewLine, IconCache.PhysicalMemoryLimit);
             buf.AppendFormat("キャッシュエントリ保持数     : {0}" + Environment.NewLine, IconCache.CacheCount);
             buf.AppendFormat("キャッシュエントリ破棄数     : {0}" + Environment.NewLine, IconCache.CacheRemoveCount);
             MessageBox.Show(buf.ToString(), "アイコンキャッシュ使用状況");
@@ -11326,10 +11171,6 @@ namespace OpenTween
             }
             var ev = e.EventData;
             StatusLabel.Text = "Event: " + ev.Event;
-            //if (ev.Event == "favorite")
-            //{
-            //    NotifyFavorite(ev);
-            //}
             NotifyEvent(ev);
             if (ev.Event == "favorite" || ev.Event == "unfavorite")
             {
@@ -11352,18 +11193,12 @@ namespace OpenTween
             if (BalloonRequired(ev))
             {
                 NotifyIcon1.BalloonTipIcon = ToolTipIcon.Info;
-                //if (SettingDialog.DispUsername) NotifyIcon1.BalloonTipTitle = tw.Username + " - "; else NotifyIcon1.BalloonTipTitle = "";
-                //NotifyIcon1.BalloonTipTitle += Application.ProductName + " [" + ev.Event.ToUpper() + "] by " + ((string)(!string.IsNullOrEmpty(ev.Username) ? ev.Username : ""), string);
                 var title = new StringBuilder();
                 if (SettingManager.Common.DispUsername)
                 {
                     title.Append(tw.Username);
                     title.Append(" - ");
                 }
-                else
-                {
-                    //title.Clear();
-                }
                 title.Append(ApplicationSettings.ApplicationName);
                 title.Append(" [");
                 title.Append(ev.Event.ToUpper(CultureInfo.CurrentCulture));
@@ -11372,22 +11207,13 @@ namespace OpenTween
                 {
                     title.Append(ev.Username);
                 }
-                else
-                {
-                    //title.Append("");
-                }
+
                 string text;
                 if (!string.IsNullOrEmpty(ev.Target))
-                {
-                    //NotifyIcon1.BalloonTipText = ev.Target;
                     text = ev.Target;
-                }
                 else
-                {
-                    //NotifyIcon1.BalloonTipText = " ";
                     text = " ";
-                }
-                //NotifyIcon1.ShowBalloonTip(500);
+
                 if (SettingManager.Common.IsUseNotifyGrowl)
                 {
                     gh.Notify(GrowlHelper.NotifyType.UserStreamEvent,
index 8a384a9..1b56aa3 100644 (file)
@@ -137,7 +137,6 @@ namespace OpenTween
                 sb.AppendFormat("TextFromApi           : {0}<br>", post.TextFromApi);
                 sb.AppendFormat("(PlainText)    : <xmp>{0}</xmp><br>", post.TextFromApi);
                 sb.AppendFormat("StatusId             : {0}<br>", post.StatusId);
-                //sb.AppendFormat("ImageIndex     : {0}<br>", post.ImageIndex);
                 sb.AppendFormat("ImageUrl       : {0}<br>", post.ImageUrl);
                 sb.AppendFormat("InReplyToStatusId    : {0}<br>", post.InReplyToStatusId);
                 sb.AppendFormat("InReplyToUser  : {0}<br>", post.InReplyToUser);
index 1c8c6e5..e184c27 100644 (file)
@@ -74,7 +74,6 @@ namespace OpenTween
         //Hashtag用正規表現
         private const string LATIN_ACCENTS = @"\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u00ff\u0100-\u024f\u0253\u0254\u0256\u0257\u0259\u025b\u0263\u0268\u026f\u0272\u0289\u028b\u02bb\u1e00-\u1eff";
         private const string NON_LATIN_HASHTAG_CHARS = @"\u0400-\u04ff\u0500-\u0527\u1100-\u11ff\u3130-\u3185\uA960-\uA97F\uAC00-\uD7AF\uD7B0-\uD7FF";
-        //private const string CJ_HASHTAG_CHARACTERS = @"\u30A1-\u30FA\uFF66-\uFF9F\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\u3041-\u3096\u3400-\u4DBF\u4E00-\u9FFF\u20000-\u2A6DF\u2A700-\u2B73F\u2B740-\u2B81F\u2F800-\u2FA1F";
         private const string CJ_HASHTAG_CHARACTERS = @"\u30A1-\u30FA\u30FC\u3005\uFF66-\uFF9F\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\u3041-\u309A\u3400-\u4DBF\p{IsCJKUnifiedIdeographs}";
         private const string HASHTAG_BOUNDARY = @"^|$|\s|「|」|。|\.|!";
         private const string HASHTAG_ALPHA = "[a-z_" + LATIN_ACCENTS + NON_LATIN_HASHTAG_CHARS + CJ_HASHTAG_CHARACTERS + "]";
@@ -170,10 +169,6 @@ namespace OpenTween
 
         private long previousStatusId = -1L;
 
-        //private FavoriteQueue favQueue;
-
-        //private List<PostClass> _deletemessages = new List<PostClass>();
-
         public Twitter() : this(new TwitterApi())
         {
         }
@@ -234,7 +229,6 @@ namespace OpenTween
         {
             int posl1;
             var posl2 = 0;
-            //var IDNConveter = new IdnMapping();
             var href = "<a href=\"";
 
             while (true)
@@ -1638,10 +1632,6 @@ namespace OpenTween
                                 if (ent.VideoInfo != null &&
                                     ent.Type == "animated_gif" || ent.Type == "video")
                                 {
-                                    //var videoUrl = ent.VideoInfo.Variants
-                                    //    .Where(v => v.ContentType == "video/mp4")
-                                    //    .OrderByDescending(v => v.Bitrate)
-                                    //    .Select(v => v.Url).FirstOrDefault();
                                     media.Add(new MediaInfo(ent.MediaUrlHttps, ent.AltText, ent.ExpandedUrl));
                                 }
                                 else
@@ -2342,13 +2332,6 @@ namespace OpenTween
             this.disposedValue = true;
         }
 
-        //protected Overrides void Finalize()
-        //{
-        //    // このコードを変更しないでください。クリーンアップ コードを上の Dispose(bool disposing) に記述します。
-        //    Dispose(false)
-        //    MyBase.Finalize()
-        //}
-
         // このコードは、破棄可能なパターンを正しく実装できるように Visual Basic によって追加されました。
         public void Dispose()
         {