-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfigFile.vb
More file actions
44 lines (35 loc) · 1.21 KB
/
ConfigFile.vb
File metadata and controls
44 lines (35 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Imports System.Xml.Serialization
Imports Microsoft.VisualBasic.ComponentModel
Imports Microsoft.VisualBasic.Linq
Imports Microsoft.VisualBasic.Text.Xml.Models
Imports WeifenLuo.WinFormsUI.Docking
Namespace Config
Public Class ConfigFile : Inherits XmlDataModel
Public Property theme As VisualStudioToolStripExtender.VsVersion
Public Property type As ThemeType
<XmlElement>
Public Property server As LinuxServer()
Public Property recentFiles As NamedValue()
Public Shared ReadOnly Property FileLocation As String
Get
Return App.ProductProgramData & "/config.ini.xml"
End Get
End Property
''' <summary>
'''
''' </summary>
''' <param name="file">file full path</param>
Public Sub AddRecent(file As String)
recentFiles = recentFiles _
.JoinIterates(New NamedValue With {.name = file.GetFullPath, .text = Now.ToString}) _
.GroupBy(Function(f) f.name) _
.Select(Function(g) g.First) _
.ToArray
End Sub
End Class
Public Enum ThemeType
Blue
Dark
Light
End Enum
End Namespace