Advertisement
MadCortez

Untitled

Mar 23rd, 2021
472
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 1.26 KB | None | 0 0
  1. unit ChangeMenu;
  2.  
  3. interface
  4.  
  5. uses
  6.   Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  7.   Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
  8.  
  9. type
  10.   TChangeMenuForm = class(TForm)
  11.     Add: TButton;
  12.     Delete: TButton;
  13.     Change: TButton;
  14.     procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
  15.     procedure AddClick(Sender: TObject);
  16.     procedure DeleteClick(Sender: TObject);
  17.     procedure ChangeClick(Sender: TObject);
  18.   private
  19.     { Private declarations }
  20.   public
  21.     { Public declarations }
  22.   end;
  23.  
  24. var
  25.   ChangeMenuForm: TChangeMenuForm;
  26.  
  27. implementation
  28.  
  29. Uses
  30.    Base, Menu, Add, DeleteRef, Change;
  31.  
  32. {$R *.dfm}
  33.  
  34. procedure TChangeMenuForm.AddClick(Sender: TObject);
  35. begin
  36.    ChangeMenuForm.Hide;
  37.    AddForm.Show;
  38. end;
  39.  
  40. procedure TChangeMenuForm.ChangeClick(Sender: TObject);
  41. begin
  42.    ChangeMenuForm.Hide;
  43.    ChangeForm.Show;
  44. end;
  45.  
  46. procedure TChangeMenuForm.DeleteClick(Sender: TObject);
  47. begin
  48.    ChangeMenuForm.Hide;
  49.    DeleteForm.Show;
  50. end;
  51.  
  52. procedure TChangeMenuForm.FormCloseQuery(Sender: TObject;
  53.   var CanClose: Boolean);
  54. begin
  55.    BaseForm.Show;
  56.    MenuForm.Hide;
  57.    ChangeMenuForm.Hide;
  58.    AddForm.Hide;
  59.    DeleteForm.Hide;
  60.    ChangeForm.Hide;
  61. end;
  62.  
  63. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement