2 * Copyright (C) 2013 FooProject
\r
3 * * 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
\r
4 * the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
\r
6 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
7 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
\r
9 You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
\r
12 using System.Collections.Generic;
\r
13 using System.Collections.ObjectModel;
\r
16 using System.Threading.Tasks;
\r
17 using FooEditEngine;
\r
21 public class AppSettings
\r
23 public static AppSettings _thisInstance = new AppSettings();
\r
24 public static AppSettings Current
\r
28 if (_thisInstance._LineBreakMethodList == null)
\r
30 _thisInstance._LineBreakMethodList = new ObservableCollection<LineBreakMethodItem>();
\r
31 _thisInstance._LineBreakMethodList.Add(new LineBreakMethodItem("折りたたまない", LineBreakMethod.None));
\r
32 _thisInstance._LineBreakMethodList.Add(new LineBreakMethodItem("右端で折りたたむ", LineBreakMethod.PageBound));
\r
33 _thisInstance._LineBreakMethodList.Add(new LineBreakMethodItem("50字で折りたたむ", LineBreakMethod.CharUnit));
\r
34 _thisInstance._CurrentLineBreakMethod = _thisInstance._LineBreakMethodList[0];
\r
36 return _thisInstance;
\r
40 bool _IsRTL, _ShowRuler, _ShowLineNumber, _ShowLineMarker, _HilightXML, _IsVisible = true;
\r
41 ObservableCollection<LineBreakMethodItem> _LineBreakMethodList;
\r
42 LineBreakMethodItem _CurrentLineBreakMethod;
\r
44 public ObservableCollection<LineBreakMethodItem> LineBreakMethodList
\r
48 return _LineBreakMethodList;
\r
52 public LineBreakMethodItem CurrentLineBreakMethod
\r
56 return _CurrentLineBreakMethod;
\r
60 this._CurrentLineBreakMethod = value;
\r
61 if (ChangedSetting != null)
\r
62 ChangedSetting(this, null);
\r
66 public bool IsVisible
\r
70 return this._IsVisible;
\r
74 this._IsVisible = value;
\r
75 if (ChangedSetting != null)
\r
76 ChangedSetting(this, null);
\r
89 if (ChangedSetting != null)
\r
90 ChangedSetting(this, null);
\r
94 public bool ShowRuler
\r
102 _ShowRuler = value;
\r
103 if(ChangedSetting != null)
\r
104 ChangedSetting(this, null);
\r
108 public bool ShowLineNumber
\r
112 return _ShowLineNumber;
\r
116 _ShowLineNumber = value;
\r
117 if (ChangedSetting != null)
\r
118 ChangedSetting(this, null);
\r
122 public bool ShowLineMarker
\r
126 return _ShowLineMarker;
\r
130 _ShowLineMarker = value;
\r
131 if (ChangedSetting != null)
\r
132 ChangedSetting(this, null);
\r
136 public bool HilightXML
\r
140 return _HilightXML;
\r
144 _HilightXML = value;
\r
145 if (ChangedSetting != null)
\r
146 ChangedSetting(this, null);
\r
150 public event EventHandler ChangedSetting;
\r
152 public struct LineBreakMethodItem
\r
155 LineBreakMethod _Method;
\r
156 public string Title
\r
160 return this._Title;
\r
163 public LineBreakMethod Method
\r
167 return this._Method;
\r
170 public LineBreakMethodItem(string title, LineBreakMethod method)
\r
172 this._Title = title;
\r
173 this._Method = method;
\r