Skip to content

Commit 5d7f497

Browse files
committed
Some modifications about "Index"
1 parent 69bcf0f commit 5d7f497

File tree

9 files changed

+23
-38
lines changed

9 files changed

+23
-38
lines changed

StarlightGUI/KernelModulePage.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
CornerRadius="0"
149149
Tag="Size" />
150150
<Button
151-
x:Name="LoadOrderHeaderButton"
151+
x:Name="IndexHeaderButton"
152152
Grid.Column="4"
153153
Height="32"
154154
HorizontalAlignment="Stretch"
@@ -157,7 +157,7 @@
157157
Click="ColumnHeader_Click"
158158
Content="加载顺序"
159159
CornerRadius="0"
160-
Tag="LoadOrder" />
160+
Tag="Index" />
161161
<ct:GridSplitter
162162
Grid.Column="0"
163163
Width="9"
@@ -294,7 +294,7 @@
294294
VerticalAlignment="Center"
295295
FontSize="12"
296296
Foreground="{ThemeResource SystemControlForegroundBaseMediumBrush}"
297-
Text="{Binding LoadOrder}" />
297+
Text="{Binding Index}" />
298298
</Grid>
299299
</DataTemplate>
300300
</ListView.ItemTemplate>

StarlightGUI/KernelModulePage.xaml.cpp

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ namespace winrt::StarlightGUI::implementation
238238
{ L"ImageBase", "ImageBase", &KernelModulePage::m_isImageBaseAscending },
239239
{ L"DriverObject", "DriverObject", &KernelModulePage::m_isDriverObjectAscending },
240240
{ L"Size", "Size", &KernelModulePage::m_isSizeAscending },
241-
{ L"LoadOrder", "LoadOrder", &KernelModulePage::m_isLoadOrderAscending },
241+
{ L"Index", "Index", &KernelModulePage::m_isIndexAscending },
242242
} };
243243

244244
for (auto const& binding : bindings) {
@@ -271,15 +271,15 @@ namespace winrt::StarlightGUI::implementation
271271
ImageBase,
272272
DriverObject,
273273
Size,
274-
LoadOrder
274+
Index
275275
};
276276

277277
auto resolveSortColumn = [&](const std::string& key) -> SortColumn {
278278
if (key == "Name") return SortColumn::Name;
279279
if (key == "ImageBase") return SortColumn::ImageBase;
280280
if (key == "DriverObject") return SortColumn::DriverObject;
281281
if (key == "Size") return SortColumn::Size;
282-
if (key == "LoadOrder") return SortColumn::LoadOrder;
282+
if (key == "Index") return SortColumn::Index;
283283
return SortColumn::Unknown;
284284
};
285285

@@ -291,13 +291,13 @@ namespace winrt::StarlightGUI::implementation
291291
ImageBaseHeaderButton().Content(tbox(L"Common.Base"));
292292
DriverObjectHeaderButton().Content(tbox(L"KernelModule.Header.DriverObj"));
293293
SizeHeaderButton().Content(tbox(L"Common.Size"));
294-
LoadOrderHeaderButton().Content(tbox(L"KernelModule.Header.LoadOrder"));
294+
IndexHeaderButton().Content(tbox(L"Common.Index"));
295295

296296
if (activeColumn == SortColumn::Name) NameHeaderButton().Content(box_value(t(L"Common.Module") + (isAscending ? L"" : L"")));
297297
if (activeColumn == SortColumn::ImageBase) ImageBaseHeaderButton().Content(box_value(t(L"Common.Base") + (isAscending ? L"" : L"")));
298298
if (activeColumn == SortColumn::DriverObject) DriverObjectHeaderButton().Content(box_value(t(L"KernelModule.Header.DriverObj") + (isAscending ? L"" : L"")));
299299
if (activeColumn == SortColumn::Size) SizeHeaderButton().Content(box_value(t(L"Common.Size") + (isAscending ? L"" : L"")));
300-
if (activeColumn == SortColumn::LoadOrder) LoadOrderHeaderButton().Content(box_value(t(L"KernelModule.Header.LoadOrder") + (isAscending ? L"" : L"")));
300+
if (activeColumn == SortColumn::Index) IndexHeaderButton().Content(box_value(t(L"Common.Index") + (isAscending ? L"" : L"")));
301301
}
302302

303303
std::vector<winrt::StarlightGUI::KernelModuleInfo> sortedKernelModules;
@@ -316,8 +316,8 @@ namespace winrt::StarlightGUI::implementation
316316
return a.DriverObjectULong() < b.DriverObjectULong();
317317
case SortColumn::Size:
318318
return a.SizeULong() < b.SizeULong();
319-
case SortColumn::LoadOrder:
320-
return a.LoadOrderULong() < b.LoadOrderULong();
319+
case SortColumn::Index:
320+
return a.Index() < b.Index();
321321
default:
322322
return false;
323323
}
@@ -485,13 +485,6 @@ namespace winrt::StarlightGUI::implementation
485485
ImageBaseHeaderButton().Content(tbox(L"Common.Base"));
486486
DriverObjectHeaderButton().Content(tbox(L"KernelModule.Header.DriverObj"));
487487
SizeHeaderButton().Content(tbox(L"Common.Size"));
488-
LoadOrderHeaderButton().Content(tbox(L"KernelModule.Header.LoadOrder"));
488+
IndexHeaderButton().Content(tbox(L"Common.Index"));
489489
}
490-
}
491-
492-
493-
494-
495-
496-
497-
490+
}

StarlightGUI/KernelModulePage.xaml.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ namespace winrt::StarlightGUI::implementation
4444
inline static bool m_isImageBaseAscending = true;
4545
inline static bool m_isDriverObjectAscending = true;
4646
inline static bool m_isSizeAscending = true;
47-
inline static bool m_isLoadOrderAscending = true;
47+
inline static bool m_isIndexAscending = true;
4848
inline static bool currentSortingOption;
4949
inline static std::string currentSortingType;
5050
};

StarlightGUI/MonitorPage.xaml.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,15 +1453,15 @@ namespace winrt::StarlightGUI::implementation
14531453
SSDTHookHeaderButton().Content(tbox(L"Monitor.Header.Hook"));
14541454
SSDTAddressHeaderButton().Content(tbox(L"Common.Address"));
14551455
SSDTSourceAddressHeaderButton().Content(tbox(L"Monitor.Header.SourceAddress"));
1456-
SSDTIndexHeaderButton().Content(tbox(L"Monitor.Header.Index"));
1456+
SSDTIndexHeaderButton().Content(tbox(L"Common.Index"));
14571457
SSSDTNameModuleHeaderButton().Content(tbox(L"Monitor.Header.NameModule"));
14581458
SSSDTHookHeaderButton().Content(tbox(L"Monitor.Header.Hook"));
14591459
SSSDTAddressHeaderButton().Content(tbox(L"Common.Address"));
14601460
SSSDTSourceAddressHeaderButton().Content(tbox(L"Monitor.Header.SourceAddress"));
1461-
SSSDTIndexHeaderButton().Content(tbox(L"Monitor.Header.Index"));
1461+
SSSDTIndexHeaderButton().Content(tbox(L"Common.Index"));
14621462
IoTimerModuleHeaderButton().Content(tbox(L"Common.Module"));
14631463
IoTimerAddressHeaderButton().Content(tbox(L"Common.Address"));
1464-
IoTimerIndexHeaderButton().Content(tbox(L"Monitor.Header.Index"));
1464+
IoTimerIndexHeaderButton().Content(tbox(L"Common.Index"));
14651465
ExCallbackNameModuleHeaderButton().Content(tbox(L"Monitor.Header.NameModule"));
14661466
ExCallbackEntryHeaderButton().Content(tbox(L"Monitor.Header.Entry"));
14671467
ExCallbackObjectHeaderButton().Content(tbox(L"Monitor.Header.Object"));

StarlightGUI/Strings/en-US/Resources.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"Common.Size": "Size",
2121
"Common.Path": "Path",
2222
"Common.Type": "Type",
23+
"Common.Index": "Index",
2324
"Common.Value": "Value",
2425
"Common.Unknown": "(Unknown)",
2526
"Common.None": "(None)",
@@ -167,7 +168,6 @@
167168
"KernelModule.Placeholder": "Search modules...",
168169
"KernelModule.Detail": "%d kernel modules (%d ms)",
169170
"KernelModule.Header.DriverObj": "Driver object",
170-
"KernelModule.Header.LoadOrder": "Loading order",
171171
"KernelModule.Button.LoadDriver": "Load",
172172
"KernelModule.Button.UnloadModule": "Unload",
173173
"KernelModule.Menu.Hide": "Hide",
@@ -267,7 +267,6 @@
267267
"Monitor.Header.NameModule": "Name/Module",
268268
"Monitor.Header.Hook": "Hook",
269269
"Monitor.Header.SourceAddress": "Source address",
270-
"Monitor.Header.Index": "Index",
271270
"Monitor.Header.Object": "Object",
272271
"Monitor.Header.Timestamp": "Timestamp",
273272
"Monitor.Header.Limit": "Limit",

StarlightGUI/Strings/zh-CN/Resources.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"Common.Path": "路径",
2222
"Common.Type": "类型",
2323
"Common.Value": "",
24+
"Common.Index": "序号",
2425
"Common.Unknown": "(未知)",
2526
"Common.None": "(无)",
2627
"Common.Version": "版本",
@@ -182,7 +183,6 @@
182183
"KernelModule.Detail": "共 %d 个内核模块 (%d ms)",
183184

184185
"KernelModule.Header.DriverObj": "驱动对象",
185-
"KernelModule.Header.LoadOrder": "加载顺序",
186186

187187
"KernelModule.Button.LoadDriver": "加载驱动",
188188
"KernelModule.Button.UnloadModule": "卸载模块",
@@ -294,7 +294,6 @@
294294
"Monitor.Header.NameModule": "名称/模块",
295295
"Monitor.Header.Hook": "钩子",
296296
"Monitor.Header.SourceAddress": "源地址",
297-
"Monitor.Header.Index": "序号",
298297
"Monitor.Header.Object": "对象",
299298
"Monitor.Header.Timestamp": "时间戳",
300299
"Monitor.Header.Limit": "段界限",

StarlightGUI/Utils/KernelInstance.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,8 +502,7 @@ namespace winrt::StarlightGUI::implementation {
502502
di.ImageBaseULong(data.nBase);
503503
di.Size(ULongToHexString(data.nSize, 0, false, true));
504504
di.SizeULong(data.nSize);
505-
di.LoadOrder(ULongToHexString(data.nLoadOrder, 0, false, true));
506-
di.LoadOrderULong(data.nLoadOrder);
505+
di.Index(data.nLoadOrder);
507506
di.DriverObject(ULongToHexString(data.nDriverObject));
508507
di.DriverObjectULong(data.nDriverObject);
509508
kernelModules.push_back(di);

StarlightGUI/Utils/KernelModuleInfo.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,8 @@ namespace winrt::StarlightGUI::implementation
3232
ULONG64 DriverObjectULong() { return m_driverObjectULong; }
3333
void DriverObjectULong(ULONG64 value) { m_driverObjectULong = value; }
3434

35-
hstring LoadOrder() { return m_loadOrder; }
36-
void LoadOrder(hstring const& value) { m_loadOrder = value; }
37-
38-
ULONG64 LoadOrderULong() { return m_loadOrderULong; }
39-
void LoadOrderULong(ULONG64 value) { m_loadOrderULong = value; }
35+
ULONG64 Index() { return m_index; }
36+
void Index(ULONG64 value) { m_index = value; }
4037

4138
private:
4239
hstring m_name{ L"" };
@@ -47,8 +44,7 @@ namespace winrt::StarlightGUI::implementation
4744
ULONG64 m_sizeULong{ 0 };
4845
hstring m_driverObject{ L"" };
4946
ULONG64 m_driverObjectULong{ 0 };
50-
hstring m_loadOrder{ L"" };
51-
ULONG64 m_loadOrderULong{ 0 };
47+
ULONG64 m_index{ 0 };
5248
};
5349
}
5450

StarlightGUI/Utils/KernelModuleInfo.idl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
UInt64 SizeULong{ get; set; };
1515
String DriverObject{ get; set; };
1616
UInt64 DriverObjectULong{ get; set; };
17-
String LoadOrder{ get; set; };
18-
UInt64 LoadOrderULong{ get; set; };
17+
UInt64 Index{ get; set; };
1918
}
2019
}

0 commit comments

Comments
 (0)