OSDN Git Service

Merge branch 'bitly-oauth2'
[opentween/open-tween.git] / OpenTween / Setting / SettingTabs.cs
1 // OpenTween - Client of Twitter
2 // Copyright (c) 2007-2011 kiri_feather (@kiri_feather) <kiri.feather@gmail.com>
3 //           (c) 2008-2011 Moz (@syo68k)
4 //           (c) 2008-2011 takeshik (@takeshik) <http://www.takeshik.org/>
5 //           (c) 2010-2011 anis774 (@anis774) <http://d.hatena.ne.jp/anis774/>
6 //           (c) 2010-2011 fantasticswallow (@f_swallow) <http://twitter.com/f_swallow>
7 //           (c) 2011      kim_upsilon (@kim_upsilon) <https://upsilo.net/~upsilon/>
8 // All rights reserved.
9 // 
10 // This file is part of OpenTween.
11 // 
12 // This program is free software; you can redistribute it and/or modify it
13 // under the terms of the GNU General Public License as published by the Free
14 // Software Foundation; either version 3 of the License, or (at your option)
15 // any later version.
16 // 
17 // This program is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 // for more details. 
21 // 
22 // You should have received a copy of the GNU General Public License along
23 // with this program. If not, see <http://www.gnu.org/licenses/>, or write to
24 // the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
25 // Boston, MA 02110-1301, USA.
26
27 using System;
28 using System.Collections.Generic;
29 using System.Linq;
30 using System.Text;
31 using System.Xml.Serialization;
32 using OpenTween.Models;
33
34 namespace OpenTween
35 {
36     public class SettingTabs : SettingBase<SettingTabs>
37     {
38 #region Settingクラス基本
39         public static SettingTabs Load()
40         {
41             SettingTabs setting = LoadSettings("");
42             return setting;
43         }
44
45         public void Save()
46         {
47             SaveSettings(this);
48         }
49
50         public SettingTabs()
51         {
52             Tabs = new List<SettingTabItem>();
53         }
54 #endregion
55
56         public List<SettingTabItem> Tabs;
57
58         [XmlType("TabClass")]
59         public class SettingTabItem
60         {
61             /// <summary>タブの表示名</summary>
62             public string TabName { get; set; }
63
64             /// <summary>タブの種類</summary>
65             public MyCommon.TabUsageType TabType { get; set; }
66
67             /// <summary>未読管理を有効にする</summary>
68             public bool UnreadManage { get; set; }
69
70             /// <summary>タブを保護する</summary>
71             [XmlElement(ElementName = "Locked")] // v1.0.5で「タブを固定(Locked)」から「タブを保護(Protected)」に名称変更
72             public bool Protected { get; set; }
73
74             /// <summary>新着通知表示を有効にする</summary>
75             public bool Notify { get; set; }
76
77             /// <summary>通知音</summary>
78             public string SoundFile { get; set; }
79
80             /// <summary>
81             /// 振り分けルール (<see cref="MyCommon.TabUsageType.UserDefined"/> で使用)
82             /// </summary>
83             public PostFilterRule[] FilterArray { get; set; } = new PostFilterRule[0];
84
85             /// <summary>
86             /// 表示するユーザーのスクリーンネーム (<see cref="MyCommon.TabUsageType.UserTimeline"/> で使用)
87             /// </summary>
88             public string User { get; set; }
89
90             /// <summary>
91             /// 検索文字列 (<see cref="MyCommon.TabUsageType.PublicSearch"/> で使用)
92             /// </summary>
93             public string SearchWords { get; set; } = "";
94
95             /// <summary>
96             /// 検索対象の言語 (<see cref="MyCommon.TabUsageType.PublicSearch"/> で使用)
97             /// </summary>
98             public string SearchLang { get; set; } = "";
99
100             /// <summary>
101             /// 表示するリスト (<see cref="MyCommon.TabUsageType.Lists"/> で使用)
102             /// </summary>
103             public ListElement ListInfo { get; set; }
104         }
105     }
106 }