Skip to content

Commit

Permalink
Merge branch 'irp49'
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinDrab committed Jan 11, 2020
2 parents 15faf6e + 68fd626 commit e97652f
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 11 deletions.
8 changes: 4 additions & 4 deletions gui/IRPMon.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,15 @@
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<BT_BuildType>Debug</BT_BuildType>
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
<VerInfo_Build>331</VerInfo_Build>
<VerInfo_Keys>CompanyName=Martin Drab;FileDescription=IRPMon Application;FileVersion=1.0.0.331;InternalName=IRPMON.EXE;LegalCopyright=Copyright (c) Martin Drab, 2015-2020;LegalTrademarks=;OriginalFilename=IRPMon.exe;ProductName=IRP Monitor;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<VerInfo_Build>332</VerInfo_Build>
<VerInfo_Keys>CompanyName=Martin Drab;FileDescription=IRPMon Application;FileVersion=1.0.0.332;InternalName=IRPMON.EXE;LegalCopyright=Copyright (c) Martin Drab, 2015-2020;LegalTrademarks=;OriginalFilename=IRPMon.exe;ProductName=IRP Monitor;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
<DCC_ExeOutput>..\bin\x64\$(Config)</DCC_ExeOutput>
<BT_BuildType>Debug</BT_BuildType>
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
<VerInfo_Build>7</VerInfo_Build>
<VerInfo_Keys>CompanyName=Martin Drab;FileDescription=IRPMon Application;FileVersion=1.0.0.7;InternalName=IRPMON.EXE;LegalCopyright=Copyright (c) Martin Drab, 2015-2020;LegalTrademarks=;OriginalFilename=IRPMon.exe;ProductName=IRP Monitor;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<VerInfo_Build>8</VerInfo_Build>
<VerInfo_Keys>CompanyName=Martin Drab;FileDescription=IRPMon Application;FileVersion=1.0.0.8;InternalName=IRPMON.EXE;LegalCopyright=Copyright (c) Martin Drab, 2015-2020;LegalTrademarks=;OriginalFilename=IRPMon.exe;ProductName=IRP Monitor;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
</PropertyGroup>
<ItemGroup>
<DelphiCompile Include="$(MainSource)">
Expand Down
Binary file modified gui/IRPMon.res
Binary file not shown.
12 changes: 12 additions & 0 deletions gui/MainForm.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -1144,6 +1144,18 @@ object MainFrm: TMainFrm
Caption = 'Exclude'
OnClick = PopupFilterClick
end
object RPIncludeAllMenuItem: TMenuItem
Caption = 'Include'
OnClick = PopupFilterClick
end
object RPHighlightAllMenuItem: TMenuItem
Caption = 'Highlight'
OnClick = PopupFilterClick
end
object RPExcludeAllMenuItem: TMenuItem
Caption = 'Exclude'
OnClick = PopupFilterClick
end
end
object HighlightColorDialog: TColorDialog
Left = 300
Expand Down
41 changes: 34 additions & 7 deletions gui/MainForm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
IgnoreLogFileHeadersMenuItem: TMenuItem;
StripRequestDataMenuItem: TMenuItem;
MaxRequestDataSizeMenuItem: TMenuItem;
RPIncludeAllMenuItem: TMenuItem;
RPHighlightAllMenuItem: TMenuItem;
RPExcludeAllMenuItem: TMenuItem;
Procedure ClearMenuItemClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure CaptureEventsMenuItemClick(Sender: TObject);
Expand Down Expand Up @@ -584,6 +587,7 @@
clientP : TPoint;
selectedIndex : Integer;
columnFound : Boolean;
requestTypeString : WideString;
begin
w := 0;
value := '';
Expand All @@ -601,13 +605,23 @@
Inc(w, c.Width);
If clientP.X <= w Then
begin
requestTypeString := TDriverRequest.RequestTypeToString(FModel.Items[selectedIndex].RequestType);
value := FModel.Item(selectedIndex, I);
RPIncludeMenuItem.Caption := Format('Include "%s"', [value]);
RPHighlightMenuItem.Caption := Format('Highlight "%s"', [value]);
RPExcludeMenuItem.Caption := Format('IExclude "%s"', [value]);
RPIncludeMenuItem.Caption := Format('Include "%s" (%s)', [value, requestTypeString]);
RPHighlightMenuItem.Caption := Format('Highlight "%s" (%s)...', [value, requestTypeString]);
RPExcludeMenuItem.Caption := Format('IExclude "%s" (%s)', [value, requestTypeString]);

RPIncludeAllMenuItem.Caption := Format('Include "%s" (all requests)', [value]);
RPHighlightAllMenuItem.Caption := Format('Highlight "%s" (all requests)...', [value]);
RPExcludeAllMenuItem.Caption := Format('IExclude "%s" (all requests)', [value]);

RPHighlightMenuItem.Tag := c.Tag;
RPIncludeMenuItem.Tag := c.Tag;
RPExcludeMenuItem.Tag := c.Tag;
RPHighlightAllMenuItem.Tag := c.Tag;
RPIncludeAllMenuItem.Tag := c.Tag;
RPExcludeAllMenuItem.Tag := c.Tag;

RequestPopupMenu.Tag := I;
columnFound := True;
Break;
Expand All @@ -619,6 +633,9 @@
RPIncludeMenuItem.Enabled := columnFound;
RPHighlightMenuItem.Enabled := columnFound;
RPExcludeMenuItem.Enabled := columnFound;
RPIncludeAllMenuItem.Enabled := columnFound;
RPHighlightAllMenuItem.Enabled := columnFound;
RPExcludeAllMenuItem.Enabled := columnFound;
end;

Procedure TMainFrm.RPDetailsMenuItemClick(Sender: TObject);
Expand Down Expand Up @@ -880,22 +897,32 @@ procedure TMainFrm.PopupFilterClick(Sender: TObject);
l : Cardinal;
ret : Boolean;
columnType : ERequestListModelColumnType;
filterType : ERequestType;
begin
invalidButton := False;
M := Sender As TMenuItem;
If Sender = RPHighlightMenuItem Then
If (Sender = RPHighlightMenuItem) Or
(Sender = RPHighlightAllMenuItem) Then
filterAction := ffaHighlight
Else If Sender = RPIncludeMenuItem Then
Else If (Sender = RPIncludeMenuItem) Or
(Sender = RPIncludeAllMenuItem) Then
filterAction := ffaInclude
Else If Sender = RPExcludeMenuItem Then
Else If (Sender = RPExcludeMenuItem) Or
(Sender = RPExcludeAllMenuItem) Then
filterAction := ffaExclude
Else invalidButton := True;

If Not invalidButton Then
begin
value := FModel.Item(FModel.SelectedIndex, RequestPopupMenu.Tag);
rq := FModel.Selected;
rf := TRequestFilter.NewInstance(rq.RequestType);
filterType := ertUndefined;
If (Sender = RPIncludeMenuItem) Or
(Sender = RPHighlightMenuItem) Or
(Sender = RPExcludeMenuItem) Then
filterType := rq.RequestType;

rf := TRequestFilter.NewInstance(filterType);
rf.Enabled := True;
rf.Ephemeral := True;
columnType := ERequestListModelColumnType(M.Tag);
Expand Down
Binary file modified launcher/IRPLauncher.res
Binary file not shown.

0 comments on commit e97652f

Please sign in to comment.