curtis
21小時前 62c5adb8641e8626a056abc773b72449152d8ae9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{ ==============================================================================
  方法名稱:StatusBar1DblClick
  引用相依:
  方法描述:處理狀態列連按兩下事件。用於切換測試功能按鈕及除錯訊息視窗(Memo1/Disp
            lay1)的顯示,支援搭配 Control 鍵切換授權匯出/匯入功能。
============================================================================== }
procedure TCB_IMGPSScanX.StatusBar1DblClick(Sender: TObject);
begin
  Button3.Visible := not Button3.Visible;
  Button4.Visible := not Button4.Visible;
  if (GetKeyState(VK_CONTROL) < 0) Then
  begin
    ExportBt.Visible := not ExportBt.Visible;
    ImportBt.Visible := not ImportBt.Visible;
  end
  Else
  begin
    Memo1.Visible := not Memo1.Visible;
    Display1.Visible := not Display1.Visible;
  end;
end;
 
 
{ ==============================================================================
  方法名稱:DataLoading
  引用相依:
  方法描述:控制資料載入時的 UI 狀態。啟用載入時會切換滑鼠游標為等待狀態、顯示提示
            面板(Panel22 或 Panel8),並禁用主要的操作面板(Panel1/Panel2);關閉時則
            恢復正常狀態。支援使用計時器(Timer2)來顯示動態提示。
============================================================================== }
Procedure TCB_IMGPSScanX.DataLoading(Loading:Boolean;UseTimer:Boolean);  //資料載入中要停止點選的動作
begin
  If Loading Then
  begin
    Screen.Cursor := -11;
    if UseTimer then
    begin
      Panel22.Caption := ShowText;
      Panel22.Left := (Panel9.Width div 2) - (Panel22.Width div 2);
      Panel22.Top := (Panel9.Height div 2) - (Panel22.Height div 2);
      Panel22.Visible := True;
      Timer2.Enabled := True;
    end
    Else
    begin
      Panel8.Left := (Panel9.Width div 2) - (Panel8.Width div 2);
      Panel8.Top := (Panel9.Height div 2) - (Panel8.Height div 2);
      Panel8.Visible := True;
    end;
    Application.ProcessMessages;
    Panel1.Enabled := False;
    Panel2.Enabled := False;
  end
  Else
  begin
    Panel22.Visible := False;
    Panel8.Visible := False;
    Timer2.Enabled := False;
    Panel1.Enabled := True;
    Panel2.Enabled := True;
    Screen.Cursor := 0;
  end;
 
end;