Rev 92 | Rev 95 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 92 | Rev 94 | ||
---|---|---|---|
Line 60... | Line 60... | ||
60 | IdentificationsPopupMenu: TPopupMenu; |
60 | IdentificationsPopupMenu: TPopupMenu; |
61 | CopyTaskDefinitionExample1: TMenuItem; |
61 | CopyTaskDefinitionExample1: TMenuItem; |
62 | Button3: TButton; |
62 | Button3: TButton; |
63 | VersionLabel: TLabel; |
63 | VersionLabel: TLabel; |
64 | LoadedPluginsPopupMenu: TPopupMenu; |
64 | LoadedPluginsPopupMenu: TPopupMenu; |
65 | MenuItem1: TMenuItem; |
65 | CopyStatusCodeToClipboard: TMenuItem; |
66 | Panel2: TPanel; |
66 | Panel2: TPanel; |
67 | Image2: TImage; |
67 | Image2: TImage; |
68 | DynamicTestGroupbox: TGroupBox; |
68 | DynamicTestGroupbox: TGroupBox; |
69 | DynamicTestPluginComboBox: TComboBox; |
69 | DynamicTestPluginComboBox: TComboBox; |
70 | DynamicTestPluginLabel: TLabel; |
70 | DynamicTestPluginLabel: TLabel; |
Line 83... | Line 83... | ||
83 | procedure IdentificationsPopupMenuPopup(Sender: TObject); |
83 | procedure IdentificationsPopupMenuPopup(Sender: TObject); |
84 | procedure CopyTaskDefinitionExample1Click(Sender: TObject); |
84 | procedure CopyTaskDefinitionExample1Click(Sender: TObject); |
85 | procedure ListViewCompare(Sender: TObject; Item1, Item2: TListItem; Data: Integer; var Compare: Integer); |
85 | procedure ListViewCompare(Sender: TObject; Item1, Item2: TListItem; Data: Integer; var Compare: Integer); |
86 | procedure Button3Click(Sender: TObject); |
86 | procedure Button3Click(Sender: TObject); |
87 | procedure LoadedPluginsPopupMenuPopup(Sender: TObject); |
87 | procedure LoadedPluginsPopupMenuPopup(Sender: TObject); |
88 | procedure MenuItem1Click(Sender: TObject); |
88 | procedure CopyStatusCodeToClipboardClick(Sender: TObject); |
89 | procedure FormCreate(Sender: TObject); |
89 | procedure FormCreate(Sender: TObject); |
90 | procedure DynamicTestButtonClick(Sender: TObject); |
90 | procedure DynamicTestButtonClick(Sender: TObject); |
91 | protected |
91 | protected |
92 | ud2: TUD2; |
92 | ud2: TUD2; |
93 | procedure LoadTaskList; |
93 | procedure LoadTaskList; |
Line 292... | Line 292... | ||
292 | begin |
292 | begin |
293 | pl := ud2.LoadedPlugins.Items[i] as TUD2Plugin; |
293 | pl := ud2.LoadedPlugins.Items[i] as TUD2Plugin; |
294 | for j := 0 to pl.DetectedIdentifications.Count-1 do |
294 | for j := 0 to pl.DetectedIdentifications.Count-1 do |
295 | begin |
295 | begin |
296 | ude := pl.DetectedIdentifications.Items[j] as TUD2IdentificationEntry; |
296 | ude := pl.DetectedIdentifications.Items[j] as TUD2IdentificationEntry; |
- | 297 | ||
297 | with IdentificationsListView.Items.Add do |
298 | with IdentificationsListView.Items.Add do |
298 | begin |
299 | begin |
- | 300 | Data := ude; |
|
299 | Caption := pl.PluginName; |
301 | Caption := pl.PluginName; |
300 | if ude.DynamicDataUsed then |
302 | if ude.DynamicDataUsed then |
301 | SubItems.Add(ude.DynamicData) |
303 | SubItems.Add(ude.DynamicData) |
302 | else |
304 | else |
303 | SubItems.Add(''); |
305 | SubItems.Add(''); |
Line 365... | Line 367... | ||
365 | for i := 0 to ud2.LoadedPlugins.Count-1 do |
367 | for i := 0 to ud2.LoadedPlugins.Count-1 do |
366 | begin |
368 | begin |
367 | pl := ud2.LoadedPlugins.Items[i] as TUD2Plugin; |
369 | pl := ud2.LoadedPlugins.Items[i] as TUD2Plugin; |
368 | with LoadedPluginsListView.Items.Add do |
370 | with LoadedPluginsListView.Items.Add do |
369 | begin |
371 | begin |
- | 372 | Data := pl; |
|
370 | Caption := pl.PluginDLL; |
373 | Caption := pl.PluginDLL; |
371 | SubItems.Add(pl.PluginVendor); |
374 | SubItems.Add(pl.PluginVendor); |
372 | SubItems.Add(pl.PluginName); |
375 | SubItems.Add(pl.PluginName); |
373 | SubItems.Add(pl.PluginVersion); |
376 | SubItems.Add(pl.PluginVersion); |
374 | SubItems.Add(pl.IdentificationMethodName); |
377 | SubItems.Add(pl.IdentificationMethodName); |
Line 473... | Line 476... | ||
473 | end; |
476 | end; |
474 | 477 | ||
475 | procedure TUD2MainForm.CopyTaskDefinitionExample1Click(Sender: TObject); |
478 | procedure TUD2MainForm.CopyTaskDefinitionExample1Click(Sender: TObject); |
476 | var |
479 | var |
477 | s: string; |
480 | s: string; |
- | 481 | ude: TUD2IdentificationEntry; |
|
478 | begin |
482 | begin |
479 | s := '; '+IdentificationsListView.Selected.Caption+#13#10+ |
483 | if IdentificationsListView.ItemIndex = -1 then exit; |
- | 484 | ||
480 | IdentificationsListView.Selected.SubItems[0] + ':' + IdentificationsListView.Selected.SubItems[1] + '=calc.exe'+#13#10+ |
485 | ude := TUD2IdentificationEntry(IdentificationsListView.Selected.Data); |
- | 486 | s := '; ' + ude.Plugin.PluginName + #13#10 + |
|
- | 487 | UD2_CondToStr(ude.GetConditionString(false))+'=calc.exe'+#13#10+ |
|
481 | #13#10+ |
488 | #13#10+ |
482 | '; Alternatively:'+#13#10+ |
489 | '; Alternatively:'+#13#10+ |
483 | IdentificationsListView.Selected.SubItems[2] + ':' + IdentificationsListView.Selected.SubItems[1] + '=calc.exe'+#13#10; |
490 | UD2_CondToStr(ude.GetConditionString(true))+'=calc.exe'+#13#10; |
- | 491 | ||
484 | Clipboard.AsText := s; |
492 | Clipboard.AsText := s; |
485 | end; |
493 | end; |
486 | 494 | ||
487 | procedure TUD2MainForm.ListViewCompare(Sender: TObject; Item1, |
495 | procedure TUD2MainForm.ListViewCompare(Sender: TObject; Item1, |
488 | Item2: TListItem; Data: Integer; var Compare: Integer); |
496 | Item2: TListItem; Data: Integer; var Compare: Integer); |
Line 507... | Line 515... | ||
507 | VTS_CheckUpdates('userdetect2', VersionLabel.Caption); |
515 | VTS_CheckUpdates('userdetect2', VersionLabel.Caption); |
508 | end; |
516 | end; |
509 | 517 | ||
510 | procedure TUD2MainForm.LoadedPluginsPopupMenuPopup(Sender: TObject); |
518 | procedure TUD2MainForm.LoadedPluginsPopupMenuPopup(Sender: TObject); |
511 | begin |
519 | begin |
512 | MenuItem1.Enabled := LoadedPluginsListView.ItemIndex <> -1; |
520 | CopyStatusCodeToClipboard.Enabled := LoadedPluginsListView.ItemIndex <> -1; |
513 | end; |
521 | end; |
514 | 522 | ||
515 | procedure TUD2MainForm.MenuItem1Click(Sender: TObject); |
523 | procedure TUD2MainForm.CopyStatusCodeToClipboardClick(Sender: TObject); |
516 | var |
524 | var |
517 | s: string; |
525 | s: string; |
- | 526 | pl: TUD2Plugin; |
|
518 | begin |
527 | begin |
- | 528 | if LoadedPluginsListView.ItemIndex = -1 then exit; |
|
519 | s := '; ' + LoadedPluginsListView.Selected.SubItems.Strings[6]; |
529 | pl := TUD2Plugin(LoadedPluginsListView.Selected.Data); |
- | 530 | s := (*'; ' +*) pl.IdentificationProcedureStatusCodeDescribed; |
|
520 | Clipboard.AsText := s; |
531 | Clipboard.AsText := s; |
521 | end; |
532 | end; |
522 | 533 | ||
523 | procedure TUD2MainForm.Run; |
534 | procedure TUD2MainForm.Run; |
524 | resourcestring |
535 | resourcestring |