forked from BornToBeRoot/NETworkManager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSettingsViewManager.cs
More file actions
127 lines (121 loc) · 5.94 KB
/
Copy pathSettingsViewManager.cs
File metadata and controls
127 lines (121 loc) · 5.94 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
using System;
using MahApps.Metro.IconPacks;
using NETworkManager.Models.Settings;
using System.Collections.Generic;
using NETworkManager.Models.Network;
namespace NETworkManager
{
public static class SettingsViewManager
{
// List of all applications
public static List<SettingsViewInfo> List => new List<SettingsViewInfo>
{
// General
new SettingsViewInfo(Name.General, new PackIconModern{ Kind = PackIconModernKind.Box }, Group.General),
new SettingsViewInfo(Name.Window, new PackIconMaterial {Kind = PackIconMaterialKind.Application }, Group.General),
new SettingsViewInfo(Name.Appearance, new PackIconMaterial { Kind = PackIconMaterialKind.AutoFix }, Group.General),
new SettingsViewInfo(Name.Language, new PackIconMaterial { Kind = PackIconMaterialKind.Flag}, Group.General),
new SettingsViewInfo(Name.HotKeys, new PackIconOcticons { Kind = PackIconOcticonsKind.Keyboard }, Group.General),
new SettingsViewInfo(Name.Autostart, new PackIconMaterial { Kind = PackIconMaterialKind.Power }, Group.General),
new SettingsViewInfo(Name.Update, new PackIconMaterial {Kind = PackIconMaterialKind.Download }, Group.General),
new SettingsViewInfo(Name.ImportExport, new PackIconMaterial { Kind = PackIconMaterialKind.Import}, Group.General),
new SettingsViewInfo(Name.Settings, new PackIconMaterialLight { Kind = PackIconMaterialLightKind.Cog }, Group.General),
// Applications
new SettingsViewInfo(Name.IPScanner, new PackIconMaterial {Kind = PackIconMaterialKind.Sitemap }, Group.Applications),
new SettingsViewInfo(Name.PortScanner, new PackIconModern{Kind = PackIconModernKind.NetworkPort }, Group.Applications),
new SettingsViewInfo(Name.Ping, new PackIconMaterial{ Kind = PackIconMaterialKind.LanConnect }, Group.Applications),
new SettingsViewInfo(Name.Traceroute, new PackIconModern {Kind = PackIconModernKind.TransitConnection}, Group.Applications),
new SettingsViewInfo(Name.DNSLookup, new PackIconMaterial { Kind= PackIconMaterialKind.SearchWeb }, Group.Applications ),
new SettingsViewInfo(Name.RemoteDesktop, new PackIconMaterial{ Kind = PackIconMaterialKind.RemoteDesktop}, Group.Applications),
new SettingsViewInfo(Name.PuTTY, new PackIconOcticons {Kind = PackIconOcticonsKind.Terminal}, Group.Applications),
new SettingsViewInfo(Name.SNMP,new PackIconMaterial {Kind = PackIconMaterialKind.Switch }, Group.Applications),
new SettingsViewInfo(Name.WakeOnLAN, new PackIconMaterial {Kind = PackIconMaterialKind.Power} , Group.Applications),
new SettingsViewInfo(Name.HTTPHeaders, new PackIconMaterial {Kind = PackIconMaterialKind.Web}, Group.Applications)
};
public static string TranslateName(Name name, Group group)
{
switch (name)
{
case Name.General:
return Resources.Localization.Strings.General;
case Name.Window:
return Resources.Localization.Strings.Window;
case Name.Appearance:
return Resources.Localization.Strings.Appearance;
case Name.Language:
return Resources.Localization.Strings.Language;
case Name.HotKeys:
return Resources.Localization.Strings.HotKeys;
case Name.Autostart:
return Resources.Localization.Strings.Autostart;
case Name.Update:
return Resources.Localization.Strings.Update;
case Name.ImportExport:
return Resources.Localization.Strings.ImportExport;
case Name.Settings:
return Resources.Localization.Strings.Settings;
case Name.IPScanner:
return Resources.Localization.Strings.IPScanner;
case Name.PortScanner:
return Resources.Localization.Strings.PortScanner;
case Name.Ping:
return Resources.Localization.Strings.Ping;
case Name.Traceroute:
return Resources.Localization.Strings.Traceroute;
case Name.DNSLookup:
return Resources.Localization.Strings.DNSLookup;
case Name.RemoteDesktop:
return Resources.Localization.Strings.RemoteDesktop;
case Name.PuTTY:
return Resources.Localization.Strings.PuTTY;
case Name.SNMP:
return Resources.Localization.Strings.SNMP;
case Name.WakeOnLAN:
return Resources.Localization.Strings.WakeOnLAN;
case Name.HTTPHeaders:
return Resources.Localization.Strings.HTTPHeaders;
default:
return "Translation of name not found";
}
}
public static string TranslateGroup(Group group)
{
switch (group)
{
case Group.General:
return Resources.Localization.Strings.General;
case Group.Applications:
return Resources.Localization.Strings.Applications;
default:
return "Translation of group not found!";
}
}
public enum Name
{
General,
Window,
Appearance,
Language,
HotKeys,
Autostart,
Update,
ImportExport,
Settings,
IPScanner,
PortScanner,
Ping,
Traceroute,
DNSLookup,
RemoteDesktop,
PuTTY,
SNMP,
WakeOnLAN,
HTTPHeaders
}
public enum Group
{
General,
Applications
}
}
}