@@ -16,19 +16,6 @@ namespace _1RM.View
1616 public class ProtocolBaseViewModel : NotifyPropertyChangedBase
1717 {
1818 public string DataSourceName => Server.DataSourceName;
19- public bool IsEditable { get; private set; } = false;
20- public bool IsViewable { get; private set; } = false;
21-
22- public string Id => Server.Id;
23-
24- public string DisplayName => Server.DisplayName;
25- public string SubTitle => Server.SubTitle;
26- public string ProtocolDisplayNameInShort => Server.ProtocolDisplayName;
27-
28- /// <summary>
29- /// like: "#work #asd", display in launcher page.
30- /// </summary>
31- public string TagString { get; private set; }
3219
3320 public int CustomOrder
3421 {
@@ -44,6 +31,38 @@ public int CustomOrder
4431 }
4532
4633
34+ public string GroupedOrder
35+ {
36+ get
37+ {
38+ int i = 65535;
39+ char mark = IoC.Get<DataSourceService>().LocalDataSource?.DataSourceName == DataSourceName ? '!' : '#';
40+ if (IoC.TryGet<LocalityService>() != null)
41+ {
42+ var orders = IoC.Get<LocalityService>().ServerGroupedOrder;
43+ if (orders.ContainsKey(DataSourceName) == true)
44+ i = orders[DataSourceName];
45+ }
46+ return $"{i}_{mark}_{DataSourceName}";
47+ }
48+ }
49+
50+
51+ public bool IsEditable { get; private set; } = false;
52+ public bool IsViewable { get; private set; } = false;
53+
54+ public string Id => Server.Id;
55+
56+ public string DisplayName => Server.DisplayName;
57+ public string SubTitle => Server.SubTitle;
58+ public string ProtocolDisplayNameInShort => Server.ProtocolDisplayName;
59+
60+ /// <summary>
61+ /// like: "#work #asd", display in launcher page.
62+ /// </summary>
63+ public string TagString { get; private set; }
64+
65+
4766 private ProtocolBase _server;
4867 public ProtocolBase Server
4968 {
0 commit comments