OSDN Git Service

設定ファイルの読み込み・保存に関するコードをSettingManagerクラスに移動
[opentween/open-tween.git] / OpenTween / Setting / SettingCommon.cs
index f090a1d..ac7d1cf 100644 (file)
@@ -29,12 +29,13 @@ using System.Xml.Serialization;
 using System.Collections.Generic;
 using System.Windows.Forms;
 using OpenTween.Thumbnail;
+using OpenTween.Setting;
 
 namespace OpenTween
 {
-    [Serializable]
     public class SettingCommon : SettingBase<SettingCommon>
     {
+        public static SettingCommon Instance => SettingManager.Common;
 
         #region "Settingクラス基本"
         public static SettingCommon Load()
@@ -111,7 +112,12 @@ namespace OpenTween
         public int DMPeriod = 600;
         public int PubSearchPeriod = 180;
         public int ListsPeriod = 180;
+
+        /// <summary>
+        /// 起動時読み込み分を既読にするか。trueなら既読として処理
+        /// </summary>
         public bool Read = true;
+
         public bool ListLock = false;
         public MyCommon.IconSizes IconSize = MyCommon.IconSizes.Icon16;
         public bool NewAllPop = true;
@@ -122,9 +128,22 @@ namespace OpenTween
         public bool FavEventUnread = true;
         public string TranslateLanguage = Properties.Resources.TranslateDefaultLanguage;
         public string EventSoundFile = "";
+
+        /// <summary>
+        /// サウンド再生(タブ別設定より優先)
+        /// </summary>
         public bool PlaySound = false;
+
+        /// <summary>
+        /// 未読管理。trueなら未読管理する
+        /// </summary>
         public bool UnreadManage = true;
+
+        /// <summary>
+        /// 片思い表示。trueなら片思い表示する
+        /// </summary>
         public bool OneWayLove = true;
+
         public MyCommon.NameBalloonEnum NameBalloon = MyCommon.NameBalloonEnum.NickName;
         public bool PostCtrlEnter = false;
         public bool PostShiftEnter = false;
@@ -161,11 +180,16 @@ namespace OpenTween
         public bool HashIsHead = false;
         public bool HashIsNotAddToAtReply = true;
         public bool PreviewEnable = true;
+        public bool StatusAreaAtBottom = true;
 
         public MyCommon.UrlConverter AutoShortUrlFirst = MyCommon.UrlConverter.Uxnu;
         public bool UseUnreadStyle = true;
         public string DateTimeFormat = "yyyy/MM/dd H:mm:ss";
         public int DefaultTimeOut = 20;
+
+        /// <summary>画像アップロードのタイムアウト設定 (秒)</summary>
+        public int UploadImageTimeout { get; set; } = 60;
+
         public bool RetweetNoConfirm = false;
         public bool LimitBalloon = false;
         public bool TabIconDisp = true;
@@ -178,7 +202,10 @@ namespace OpenTween
         public bool ShowGrid = false;
         public bool UseAtIdSupplement = true;
         public bool UseHashSupplement = true;
-        public string TwitterUrl = "api.twitter.com";
+
+        [XmlElement(ElementName = "TwitterUrl")]
+        public string TwitterApiHost = "api.twitter.com";
+
         public bool HotkeyEnabled = false;
         public Keys HotkeyModifier = Keys.None;
         public Keys HotkeyKey = Keys.None;
@@ -203,25 +230,27 @@ namespace OpenTween
         public int ListDoubleClickAction = 0;
         public string UserAppointUrl = "";
         public bool HideDuplicatedRetweets = false;
-        public bool IsPreviewFoursquare = false;
+        public bool EnableImgAzyobuziNet = true;
+        public bool ImgAzyobuziNetDisabledInDM = true;
         public int MapThumbnailHeight = 200;
         public int MapThumbnailWidth = 200;
         public int MapThumbnailZoom = 15;
         public MapProvider MapThumbnailProvider = MapProvider.OpenStreetMap;
         public bool IsListsIncludeRts = false;
-        public long GAFirst = 0;
-        public long GALast = 0;
         public bool TabMouseLock = false;
         public bool IsRemoveSameEvent = false;
         public bool IsUseNotifyGrowl = false;
+        public bool ForceIPv4 = false;
+        public bool ErrorReportAnonymous = true;
+
+        /// <summary>pic.twitter.com への画像アップロード時に JPEG への変換を回避する</summary>
+        public bool AlphaPNGWorkaround { get; set; } = false;
     }
 
     public class UserAccount
     {
         public string Username = "";
         public long UserId = 0;
-        public long GAFirst = 0;
-        public long GALast = 0;
         public string Token = "";
         [XmlIgnore]
         public string TokenSecret = "";