__fastcall TUsageStatisticsDialog::TUsageStatisticsDialog() :
  TCustomDialog(HELP_USAGE)
{
  Caption = LoadStr(USAGE_CAPTION);
  Width = ScaleByTextHeight(this, 400);

  TLabel * Label = new TLabel(this);
  // UnformatMessage is called, because previously, ** markup was used and translations may still contain that
  Label->Caption = UnformatMessage(LoadStr(USAGE_DATA2));
  AddText(Label);

  FilterEdit = new TEdit(this);
  FilterEdit->Width = ScaleByTextHeight(this, 250);
  TLabel * FilterLabel = new TLabel(this);
  FilterLabel->Caption = LoadStr(USAGE_FILTER);
  AddEdit(FilterEdit, FilterLabel, true);

  UsageMemo = new TMemo(this);
  UsageMemo->Height = ScaleByTextHeight(this, 300);
  UsageMemo->ScrollBars = ssVertical;
  AddEdit(UsageMemo, NULL);
  ReadOnlyControl(UsageMemo);

  ClipboardButton = new TButton(this);
  ClipboardButton->Caption = LoadStr(USAGE_COPY);
  ClipboardButton->Width = ScaleByTextHeight(this, 121);
  ClipboardButton->OnClick = ClipboardButtonClick;
  AddDialogButton(ClipboardButton);

  RemoveCancelButton();
}

__fastcall TUsageStatisticsDialog::TUsageStatisticsDialog() :
  TCustomDialog(HELP_USAGE)
{
  Caption = LoadStr(USAGE_CAPTION);
  Width = ScaleByTextHeight(this, 400);

  TLabel * Label = new TLabel(this);
   
  Label->Caption = UnformatMessage(LoadStr(USAGE_DATA2));
  AddText(Label);

  FilterEdit = new TEdit(this);
  FilterEdit->Width = ScaleByTextHeight(this, 250);
  TLabel * FilterLabel = new TLabel(this);
  FilterLabel->Caption = LoadStr(USAGE_FILTER);
  AddEdit(FilterEdit, FilterLabel, true);

  UsageMemo = new TMemo(this);
  UsageMemo->Height = ScaleByTextHeight(this, 300);
  UsageMemo->ScrollBars = ssVertical;
  AddEdit(UsageMemo, NULL);
  ReadOnlyControl(UsageMemo);

  ClipboardButton = new TButton(this);
  ClipboardButton->Caption = LoadStr(USAGE_COPY);
  ClipboardButton->Width = ScaleByTextHeight(this, 121);
  ClipboardButton->OnClick = ClipboardButtonClick;
  AddDialogButton(ClipboardButton);

  RemoveCancelButton();
}
