FreeLaunch

Форк
0
/
RenameTabFormModule.pas 
82 строки · 2.8 Кб
1
{
2
  ##########################################################################
3
  #  FreeLaunch is a free links manager for Microsoft Windows              #
4
  #                                                                        #
5
  #  Copyright (C) 2023 Alexey Tatuyko <feedback@ta2i4.ru>                 #
6
  #  Copyright (C) 2019 Mykola Petrivskiy                                  #
7
  #  Copyright (C) 2010 Joker-jar <joker-jar@yandex.ru>                    #
8
  #                                                                        #
9
  #  This file is part of FreeLaunch.                                      #
10
  #                                                                        #
11
  #  FreeLaunch is free software: you can redistribute it and/or modify    #
12
  #  it under the terms of the GNU General Public License as published by  #
13
  #  the Free Software Foundation, either version 3 of the License, or     #
14
  #  (at your option) any later version.                                   #
15
  #                                                                        #
16
  #  FreeLaunch is distributed in the hope that it will be useful,         #
17
  #  but WITHOUT ANY WARRANTY; without even the implied warranty of        #
18
  #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         #
19
  #  GNU General Public License for more details.                          #
20
  #                                                                        #
21
  #  You should have received a copy of the GNU General Public License     #
22
  #  along with FreeLaunch. If not, see <http://www.gnu.org/licenses/>.    #
23
  ##########################################################################
24
}
25

26
unit RenameTabFormModule;
27

28
interface
29

30
uses
31
  Winapi.Windows, Winapi.Messages,
32
  System.SysUtils, System.Variants, System.Classes,
33
  Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls,
34
  FLLanguage;
35

36
type
37
  TRenameTabForm = class(TForm)
38
    GroupBox1: TGroupBox;
39
    TabNameEdit: TEdit;
40
    Label1: TLabel;
41
    OKButton: TButton;
42
    CancelButton: TButton;
43
    procedure FormShow(Sender: TObject);
44
  private
45

46
  public
47
    class function Execute(ACaption: string): string;
48
  end;
49

50
implementation
51

52
uses
53
  FLaunchMainFormModule;
54

55
{$R *.dfm}
56

57
class function TRenameTabForm.Execute(ACaption: string): string;
58
begin
59
  with TRenameTabForm.Create(Application.MainForm) do
60
  try
61
    Result := ACaption;
62
    TabNameEdit.Text := ACaption;
63
    if ShowModal = mrOk then
64
      Result := TabNameEdit.Text;
65
  finally
66
    Free;
67
  end;
68
end;
69

70
procedure TRenameTabForm.FormShow(Sender: TObject);
71
begin
72
  if AlwaysOnTop then FormStyle := fsStayOnTop;
73
  //--Loading language
74
  OKButton.Caption := Language.BtnOk;
75
  CancelButton.Caption := Language.BtnCancel;
76
  Caption := Language.TabRename;
77
  Label1.Caption := Caption + ':';
78
  TabNameEdit.SelectAll;
79
  TabNameEdit.SetFocus;
80
end;
81

82
end.
83

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.