OSDN Git Service

Added surfacepreview position property
authornaru <bottle@mikage.to>
Sun, 6 Apr 2003 09:48:18 +0000 (09:48 +0000)
committernaru <bottle@mikage.to>
Sun, 6 Apr 2003 09:48:18 +0000 (09:48 +0000)
bottleclient/BottleDef.pas
bottleclient/MainForm.pas
bottleclient/SettingForm.dfm
bottleclient/SettingForm.pas

index 55a9785..66dfd2a 100755 (executable)
@@ -13,6 +13,7 @@ type
   TReturnKeyFunction = (kfYenN, kfReturn, kfYenNReturn, kfConstText);
   TSoundArrived = (saFalse, saTrue, saParent);
   TLogWindowPreviewStyle = (psConversation, psScript, psScriptWithLineBreak);
+  TSurfacePreviewOnScriptPointPosition = (spspMainWindowLeft, spspMainWindowRight);
 
   //SSTP Bottle\82Ì\90Ý\92è
   TBottlePrefs = class(TObject)
@@ -78,6 +79,7 @@ type
     FVisibleGhostsList: TStringList;
     FSurfacePreviewOnHint: boolean;
     FSurfacePreviewOnScriptPoint: boolean;
+    FSurfacePreviewOnScriptPointPosition: TSurfacePreviewOnScriptPointPosition;
     procedure SetDblClkInsert(const Value: boolean);
     procedure SetDefaultScript(const Value: String);
     procedure SetIgnoreTimeCritical(const Value: boolean);
@@ -131,6 +133,8 @@ type
     procedure SetVisibleGhostsList(const Value: TStringList);
     procedure SetSurfacePreviewOnHint(const Value: boolean);
     procedure SetSurfacePreviewOnScriptPoint(const Value: boolean);
+    procedure SetSurfacePreviewOnScriptPointPosition(
+      const Value: TSurfacePreviewOnScriptPointPosition);
   public
     property NoSendGhostList: boolean read FNoSendGhostList write SetNoSendGhostList;
     property ConfirmOnExit: boolean read FConfirmOnExit write SetConfirmOnExit;
@@ -184,23 +188,31 @@ type
     property LUID: String read FLUID write SetLUID;
 
     //\83E\83B\83\93\83h\83E\88Ê\92u
-    property SenderWindowPosition: TRect read FSenderWindowPosition write SetSenderWindowPosition;
+    property SenderWindowPosition: TRect
+      read FSenderWindowPosition write SetSenderWindowPosition;
     property LogWindowPosition: TRect read FLogWindowPosition write SetLogWindowPosition;
-    property LogWindowDividerPos: integer read FLogWindowDividerPos write SetLogWindowDividerPos;
-    property LogWindowColumnWidth: String read FLogWindowColumnWidth write SetLogWindowColumnWidth;
+    property LogWindowDividerPos: integer
+      read FLogWindowDividerPos write SetLogWindowDividerPos;
+    property LogWindowColumnWidth: String
+      read FLogWindowColumnWidth write SetLogWindowColumnWidth;
     //\83v\83\8d\83L\83V\8aÖ\8cW
     property UseHttpProxy: boolean read FUseHttpProxy write SetUseHttpProxy;
     property ProxyAddress: String read FProxyAddress write SetProxyAddress;
     property ProxyPort: integer read FProxyPort write SetProxyPort;
     //\83\8d\83O\83E\83B\83\93\83h\83E\8aÖ\8cW
-    property LogWindowPreviewStyle: TLogWindowPreviewStyle read FLogWindowPreviewStyle write SetLogWindowPreviewStyle;
+    property LogWindowPreviewStyle: TLogWindowPreviewStyle
+      read FLogWindowPreviewStyle write SetLogWindowPreviewStyle;
     //\8fÚ\8d×\90Ý\92è
     property FMOName: TStrings read FFMOName write SetFMOName;
     property HideGhosts: boolean read FHideGhosts write SetHideGhosts;
     property VisibleGhostsList: TStringList read FVisibleGhostsList write SetVisibleGhostsList;
     //\83T\81[\83t\83B\83X\83v\83\8c\83r\83\85\81[
-    property SurfacePreviewOnHint: boolean read FSurfacePreviewOnHint write SetSurfacePreviewOnHint;
-    property SurfacePreviewOnScriptPoint: boolean read FSurfacePreviewOnScriptPoint write SetSurfacePreviewOnScriptPoint;
+    property SurfacePreviewOnHint: boolean
+      read FSurfacePreviewOnHint write SetSurfacePreviewOnHint;
+    property SurfacePreviewOnScriptPoint: boolean
+      read FSurfacePreviewOnScriptPoint write SetSurfacePreviewOnScriptPoint;
+    property SurfacePreviewOnScriptPointPosition: TSurfacePreviewOnScriptPointPosition
+      read FSurfacePreviewOnScriptPointPosition write SetSurfacePreviewOnScriptPointPosition;
     //\83R\83\93\83X\83g\83\89\83N\83^\81E\83f\83X\83g\83\89\83N\83^\81E\95Û\91
     constructor Create;
     destructor Destroy; override;
@@ -395,6 +407,8 @@ begin
     //\83T\81[\83t\83B\83X\83v\83\8c\83r\83\85\81[
     SurfacePreviewOnHint := FIni.ReadBool('System', 'SurfacePreviewOnHint', false);
     SurfacePreviewOnScriptPoint := FIni.ReadBool('System', 'SurfacePreviewOnScriptPoint', false);
+    SurfacePreviewOnScriptPointPosition :=
+      TSurfacePreviewOnScriptPointPosition(FIni.ReadInteger('System', 'SurfacePreviewOnScriptPointPosition', 0));
   except
     ShowMessage('INI\83t\83@\83C\83\8b\93Ç\82Ý\8d\9e\82Ý\83G\83\89\81[');
     Application.Terminate;
@@ -698,6 +712,7 @@ begin
   //
   FIni.WriteBool('System', 'SurfacePreviewOnHint', SurfacePreviewOnHint);
   FIni.WriteBool('System', 'SurfacePreviewOnScriptPoint', SurfacePreviewOnScriptPoint);
+  FIni.WriteInteger('System', 'SurfacePreviewOnScriptPointPosition', Ord(SurfacePreviewOnScriptPointPosition));
 end;
 
 function TBottlePrefs.GetDefaultScript: String;
@@ -752,6 +767,12 @@ begin
   FSurfacePreviewOnScriptPoint := Value;
 end;
 
+procedure TBottlePrefs.SetSurfacePreviewOnScriptPointPosition(
+  const Value: TSurfacePreviewOnScriptPointPosition);
+begin
+  FSurfacePreviewOnScriptPointPosition := Value;
+end;
+
 { TChannelListItem }
 
 procedure TChannelListItem.SetGhost(const Value: String);
index 68d6fe0..f98da84 100755 (executable)
@@ -16,6 +16,8 @@ uses
   SakuraScriptFountain, SppTypes, SppList, SurfacePreview;
 
 type
+  TSurfacePreviewType = (spHint, spEditor);
+
   TfrmSender = class(TForm)
     MainMenu: TMainMenu;
     mnFile: TMenuItem;
@@ -247,8 +249,8 @@ type
     JoinChannelsBackup: TStringList; //
     //
     FScriptModified: boolean; // \83X\83N\83\8a\83v\83g\82ª\95Ï\8dX\82³\82ê\82Ä\82¢\82é\82©\82Ç\82¤\82©\81B
-                              // \83\8d\81[\83J\83\8b\8am\94F\8b­\90§\97p\83t\83\89\83O\81B
-                              // TRichEdit.Modified\82Í\95Ê\82Ì\97p\93r\82Å\8eg\82Á\82Ä\82¢\82é\82Ì\82Å\8eg\82¦\82È\82¢
+                              // \83\8d\81[\83J\83\8b\8am\94F\8b­\90§\97p\83t\83\89\83O\81BTRichEdit.Modified\82Í
+                              //\95Ê\82Ì\97p\93r\82Å\8eg\82Á\82Ä\82¢\82é\82Ì\82Å\8eg\82¦\82È\82¢
     //
     FDragTabIndex: integer; //\83^\83u\83h\83\89\83b\83O\83h\83\8d\83b\83v\8aÖ\98A
     FDragTabDest: integer;  //\83h\83\8d\83b\83v\82·\82é\88Ê\92u(\82·\82®\89E\82É\82­\82é\83^\83u\82Ì\83C\83\93\83f\83b\83N\83X)
@@ -260,6 +262,12 @@ type
     //
     FVisiblePreviewGhost: String;
     FVisiblePreviewSurface: integer; //\83T\81[\83t\83B\83X\83v\83\8c\83r\83\85\81[\82Å\8c©\82¦\82Ä\82¢\82é\82à\82Ì
+    FVisibleMenuItem: TMenuItem; //\83N\83\8a\83b\83N\82³\82ê\82½\83\81\83j\83\85\81[\83A\83C\83e\83\80\81B
+                                 //\83T\81[\83t\83B\83X\83v\83\8c\83r\83\85\81[\82ª\83\81\83j\83\85\81[\82Ì\89º\82É
+                                 //\89B\82ê\82È\82¢\82æ\82¤\82É\95\\8e¦\82³\82ê\82Ä\82¢\82é\82à\82Ì\82ð\8bL\89¯\82µ\82Ä\82¨\82­
+    //
+    FTargetGhostExpand: boolean; //\83S\81[\83X\83g\91I\91ð\83{\83b\83N\83X\82ª\81A
+                                 //\88ê\8e\9e\93I\82É\91S\95\94\95\\8e¦\82³\82ê\82Ä\82¢\82é\82©\82Ç\82¤\82©\82Ì\83t\83\89\83O
     //
     procedure SetStatusText(const Value: String);
     procedure SetSleeping(const Value: boolean);
@@ -267,6 +275,7 @@ type
     procedure SetConnecting(const Value: boolean);
     procedure SetAdded(const Value: boolean);
     procedure mnConstClick(Sender: TObject);
+    procedure mnConstGroupClick(Sender: TObject);
     property Added: boolean read FAdded write SetAdded;
     property Sleeping: boolean read FSleeping write SetSleeping;
     property StatusText: String read FStatusText write SetStatusText;
@@ -281,14 +290,17 @@ type
     procedure NoLuidError;
     procedure UpdateIfGhostBox;
     function BuildMenuConditionCheck(const IfGhost, Ghost: String): boolean;
-    procedure BuildMenu(Root: TMenuItem; Event: TNotifyEvent; Simple: boolean);
+    procedure BuildMenu(Root: TMenuItem; Simple: boolean);
     procedure PlaySound(const FileName: String);
     //TBottleSstp\8aÖ\8cW\83C\83x\83\93\83g\83n\83\93\83h\83\89
     procedure BottleSstpResendCountChange(Sender: TObject);
     procedure BottleSstpResendTrying(Sender: TObject; MID: String);
     procedure BottleSstpResendEnd(Sender: TObject; MID: String);
     function IsSurfaceTag(const Script: String; var ID: integer): boolean;
-    procedure DoSurfacePreview(Surface: integer);
+    procedure DoSurfacePreview(Surface: integer; const Kind:
+      TSurfacePreviewType);
+    function GetSurfacePreviewPositionHint(w, h: integer): TPoint;
+    function GetSurfacePreviewPositionScriptPoint(w, h: integer): TPoint;
   public
     function DoTrans(var Script: String;
       Options: TScriptTransOptions): String;
@@ -315,7 +327,7 @@ const
   PanelBytes      = 1;  //\81\9b\81\9b\83o\83C\83g
   PanelCount      = 2;  //Local Proxy\81A\8c»\8dÝ\81\9b\8c\8f\91Ò\82¿
   PanelMembers    = 3;
-  PanelStatus     = 4;  //\93o\98^\82³\82ê\82Ä\82¢\82Ü\82·\81c\82È\82Ç
+  PanelStatus     = 4;  //SSTP Bottle\83T\81[\83o\82É\93o\98^\82³\82ê\82Ä\82¢\82Ü\82·\81c\82È\82Ç
 
   IconConnected    = 17;
   IconDisconnected = 18;
@@ -705,7 +717,7 @@ begin
                     '\90l\82É\91\97\90M\82µ\82Ü\82µ\82½');
       //\83S\81[\83X\83g\82ð\83f\83t\83H\83\8b\83g\82É\96ß\82·
       if Pref.ResetIfGhostAfterSend then begin
-        cbxTargetGhost.ItemIndex := 0;
+        actResetGhostExecute(Self);
       end;
       //\83X\83N\83\8a\83v\83g\82ð\83N\83\8a\83A
       if Pref.ClearAfterSend then begin
@@ -973,7 +985,7 @@ begin
     if IsSurfaceTag(Application.Hint, id) and Pref.SurfacePreviewOnHint then
     begin
       // \83T\81[\83t\83B\83X\83v\83\8c\83r\83\85\81[
-      DoSurfacePreview(id);
+      DoSurfacePreview(id, spHint);
     end;
   end else
   begin
@@ -984,9 +996,9 @@ end;
 
 procedure TfrmSender.ConstructMenu(Simple: boolean);
 begin
-  BuildMenu(mnPopConst, mnConstClick, Simple);
-  BuildMenu(mnPopUpConst.Items, mnConstClick, Simple);
-  BuildMenu(ConstBarMenu.Items, mnConstClick, Simple);
+  BuildMenu(mnPopConst, Simple);
+  BuildMenu(mnPopUpConst.Items, Simple);
+  BuildMenu(ConstBarMenu.Items, Simple);
   //ConstMenuBar.Menu := nil;
   ConstMenuBar.AutoSize := false;
   ConstMenuBar.Width := 1000;
@@ -2074,6 +2086,7 @@ end;
 procedure TfrmSender.actResetGhostExecute(Sender: TObject);
 begin
   cbxTargetGhost.ItemIndex := 0; // (CH\90\84\8f§)\82É\96ß\82·
+  FTargetGhostExpand := false;
   if Visible then memScript.SetFocus;
   cbxTargetGhostChange(self);
 end;
@@ -2195,7 +2208,7 @@ begin
   until Cond = '';
 end;
 
-procedure TfrmSender.BuildMenu(Root: TMenuItem; Event: TNotifyEvent; Simple: boolean);
+procedure TfrmSender.BuildMenu(Root: TMenuItem; Simple: boolean);
 var i, j, k, count: integer;
     ConstData: TScriptConst;
     Menu1, Menu2: TMenuItem;
@@ -2237,6 +2250,7 @@ begin
       Menu1.Hint    := ScriptConstList[i][j].Caption;
       Menu1.AutoHotkeys := maManual;
       Menu1.Tag := ScriptConstList[i][j].ID;
+      Menu1.OnClick := mnConstGroupClick;
 
       if not Simple then begin
         Root.Add(Menu1);
@@ -2257,7 +2271,7 @@ begin
         //   + ' (' + ShortCutToText(ConstData.ShortCut) + ')';
         // \83T\81[\83t\83B\83X\83v\83\8c\83r\83\85\81[\8eÀ\8c»\82Ì\82½\82ß\8fã\8dí\8f\9c
         Menu2.ShortCut := ConstData.ShortCut;
-        Menu2.OnClick := Event;
+        Menu2.OnClick := mnConstClick;
         Menu2.AutoHotkeys := maManual;
         Menu2.Tag := ConstData.ID;
         if (k mod 15 = 0) and (k > 0) then Menu2.Break := mbBarBreak;
@@ -2435,14 +2449,15 @@ begin
   token := memScript.TokenStringFromPos(Point(X, Y));
   if IsSurfaceTag(token, id) then
   begin
-    DoSurfacePreview(id);
+    DoSurfacePreview(id, spEditor);
   end else
   begin
     frmSurfacePreview.HideAway;
   end;
 end;
 
-procedure TfrmSender.DoSurfacePreview(Surface: integer);
+procedure TfrmSender.DoSurfacePreview(Surface: integer;
+  const Kind: TSurfacePreviewType);
 var Ghost: String;
     Bmp: TBitmap;
     CPos: TPoint;
@@ -2465,8 +2480,15 @@ begin
     try
       if Spps.TryGetImage(ghost, Surface, Bmp) then
       begin
-        GetCursorPos(CPos);
-        frmSurfacePreview.ShowPreview(Bmp, Self.Left-Bmp.Width, CPos.Y);
+        case Kind of
+          spHint:
+            CPos := GetSurfacePreviewPositionHint(Bmp.Width, Bmp.Height);
+          spEditor:
+            CPos := GetSurfacePreviewPositionScriptPoint(Bmp.Width, Bmp.Height);
+          else
+            CPos := Point(0, 0);
+        end;
+        frmSurfacePreview.ShowPreview(Bmp, CPos.X, CPos.Y);
         FVisiblePreviewGhost := Ghost;
         FVisiblePreviewSurface := Surface;
       end else
@@ -2477,4 +2499,36 @@ begin
   end;
 end;
 
+function TfrmSender.GetSurfacePreviewPositionHint(w, h: integer): TPoint;
+var MousePoint: TPoint;
+    MenuRect: TRect;
+begin
+  // \83T\81[\83t\83B\83X\83v\83\8c\83r\83\85\81[\83E\83B\83\93\83h\83E\82Ì\95\\8e¦\88Ê\92u\82ð\8c\88\92è\82·\82é
+  // \91\97\90M\83E\83B\83\93\83h\83E\82Ì\88Ê\92u\82É\82æ\82Á\82Ä\82Í\96­\82È\82Æ\82±\82ë\82É\83\81\83j\83\85\81[\82ª\95\\8e¦\82³\82ê\82Ä\82¢\82é\82Ì\82Å
+  // \88Ä\8aO\82â\82â\82±\82µ\82¢
+  {GetCursorPos(MousePoint);
+  OutputDebugString(PChar(IntToStr(FVisibleMenuItem.Count)));
+  //if GetMenuItemRect(Self.Handle, FVisibleMenuItem.Items[0].Handle, 1, MenuRect) then ;
+  Result := Point(MenuRect.Left-10, MenuRect.Top-10);}
+  Result := GetSurfacePreviewPositionScriptPoint(w, h);
+end;
+
+function TfrmSender.GetSurfacePreviewPositionScriptPoint(w, h: integer): TPoint;
+var MousePoint: TPoint;
+begin
+  GetCursorPos(MousePoint);
+  case Pref.SurfacePreviewOnScriptPointPosition of
+    spspMainWindowRight:
+      Result := Point(Self.Left + Self.Width, MousePoint.Y);
+  else
+      Result := Point(Self.Left - w, MousePoint.Y);
+  end;
+end;
+
+procedure TfrmSender.mnConstGroupClick(Sender: TObject);
+begin
+  if (Sender is TMenuItem) then
+    FVisibleMenuItem := Sender as TMenuItem;
+end;
+
 end.
index bf8928d..b79ac99 100755 (executable)
@@ -27,7 +27,7 @@ object frmSetting: TfrmSetting
     Top = 8
     Width = 439
     Height = 306
-    ActivePage = tstGeneral
+    ActivePage = tstSurfacePreview
     Anchors = [akLeft, akTop, akRight, akBottom]
     TabOrder = 0
     object tstGeneral: TTabSheet
@@ -483,32 +483,23 @@ object frmSetting: TfrmSetting
       ImageIndex = 7
       object lblSurfacePreview: TLabel
         Left = 16
-        Top = 16
+        Top = 8
         Width = 252
         Height = 12
         Caption = #8251#12469#12540#12501#12451#12473#12503#12524#12499#12517#12540#12395#12399#12503#12521#12464#12452#12531#12364#24517#35201#12391#12377
       end
       object lblPluginList: TLabel
         Left = 16
-        Top = 136
+        Top = 184
         Width = 170
         Height = 12
         Caption = #12452#12531#12473#12488#12540#12523#12373#12428#12390#12356#12427#12503#12521#12464#12452#12531':'
       end
-      object cbxSurfacePreviewOnHint: TCheckBox
-        Left = 16
-        Top = 48
-        Width = 377
-        Height = 17
-        Hint = #23450#22411#21477#25407#20837#12513#12491#12517#12540#12434#12503#12523#12480#12454#12531#12375#12383#12392#12365#12395#12503#12524#12499#12517#12540#12434#34920#31034
-        Caption = #23450#22411#21477#25407#20837#26178#12395#12503#12524#12499#12517#12540#12377#12427'(&C)'
-        TabOrder = 0
-      end
       object lvwPluginList: TListView
         Left = 16
-        Top = 152
+        Top = 200
         Width = 401
-        Height = 113
+        Height = 73
         Hint = #29694#22312#12452#12531#12473#12488#12540#12523#12373#12428#12390#12356#12427#12503#12521#12464#12452#12531#12364#19968#35239#34920#31034#12373#12428#12414#12377#12290#19978#12363#12425#38918#12395#12469#12540#12501#12451#12473#12487#12540#12479#12434#26908#32034#12375#12414#12377
         Columns = <
           item
@@ -520,16 +511,38 @@ object frmSetting: TfrmSetting
             Width = 280
           end>
         ReadOnly = True
-        TabOrder = 1
+        RowSelect = True
+        TabOrder = 0
         ViewStyle = vsReport
       end
-      object cbxSurfacePreviewOnScriptPoint: TCheckBox
+      object ctvSurfacePreview: TCPCConfigTreeView
         Left = 16
-        Top = 72
-        Width = 385
-        Height = 17
-        Caption = #32232#38598#12454#12451#12531#12489#12454#12391'\s'#12479#12464#12434#12509#12452#12531#12488#12375#12383#12392#12365#12395#12503#12524#12499#12517#12540#12377#12427'(&E)'
-        TabOrder = 2
+        Top = 24
+        Width = 401
+        Height = 153
+        Images = ImageList
+        Indent = 19
+        Options = []
+        ReadOnly = True
+        ShowButtons = False
+        ShowLines = False
+        ShowRoot = False
+        TabOrder = 1
+        ItemData = {
+          010D5443504347726F75704E6F6465010C92E88C5E8BE5917D93FC8E9E064F6E
+          48696E740200011054435043436865636B426F784E6F6465011C92E88C5E8BE5
+          917D93FC8E9E82C98376838C83728385815B82B782E909446F50726576696577
+          02000100080200000108000009020000010203000D5443504347726F75704E6F
+          646501108358834E838A8376836795D28F578E9E0D4F6E536372697074506F69
+          6E740200011054435043436865636B426F784E6F6465013895D28F5783458342
+          83938368834582C55C73835E834F82F0837C83438393836782B582BD82C682AB
+          82C98376838C83728385815B82B782E909446F50726576696577020001000802
+          00000108000D5443504347726F75704E6F6465010488CA927508506F73697469
+          6F6E0200010D54435043526164696F4E6F646501128381834383938345834283
+          93836883458DB60E4D61696E57696E646F774C65667402000100080200000109
+          000D54435043526164696F4E6F64650112838183438393834583428393836883
+          4589450F4D61696E57696E646F77526967687402000100080200000108000009
+          0200000102030000090200000102030000}
       end
     end
   end
@@ -553,8 +566,264 @@ object frmSetting: TfrmSetting
     Left = 40
     Top = 320
     Bitmap = {
-      494C010103000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
-      0000000000003600000028000000400000001000000001002000000000000010
+      494C010104000900040010001000FFFFFFFFFF00FFFFFFFFFFFFFFFF424D3600
+      0000000000003600000028000000400000003000000001002000000000000030
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000808080008080800080808000808080008080800080808000808080008080
       8000808000000000000000000000000000000000000000000000000000000000
@@ -577,97 +846,97 @@ object frmSetting: TfrmSetting
       0000000000000000FF000000FF00000000000000000000000000000000000000
       000000000000000000000000000000000000000000000000000000000000FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000008080
+      00000000000000000000000000000000000000000000F0CAA600F0CAA600F0CA
+      A600000000000000000000000000000000000000000000000000000000000000
+      000000000000F0CAA600F0CAA600000000000000000000000000000000008080
       8000FFFF0000FFFFFF00FFFFFF00FFFFFF00FFFF0000FFFF0000FFFF0000FFFF
       000080808000000000000000000000000000000000000000FF000000FF000000
       FF000000FF000000FF000000FF000000FF000000000000000000000000000000
       000000000000000000000000000000000000000000000000000000000000FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000008080
+      00000000000000000000000000000000000000000000F0CAA600F0CAA600F0CA
+      A60000000000C6D6EF00C6D6EF00C6D6EF00C6D6EF0099CCFF0099CCFF00CC99
+      FF0000000000F0CAA600F0CAA600000000000000000000000000000000008080
       8000FFFF0000FFFFFF00FFFFFF00C0C0C000FFFFFF00FFFFFF00FFFF00008080
       0000808080000000000000000000000000000000000000000000000000000000
       0000000000000000FF000000FF00000000000000000000000000000000000000
       000000000000000000000000000000000000000000000000000000000000FFFF
       FF00FFFFFF003300CC003300CC00FFFFFF00FFFFFF0000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000008080
+      00000000000000000000000000000000000000000000FFECCC00F0CAA600FFEC
+      CC0000000000C6D6EF00C6D6EF00C6D6EF00C6D6EF00C6D6EF0099CCFF00CC99
+      FF0000000000F0CAA600FFECCC00000000000000000000000000000000008080
       8000FFFF0000FFFFFF00FFFFFF00FFFFFF00C0C0C000FFFFFF00FFFF0000FFFF
       0000808080000000000000000000000000000000000000000000000000000000
       0000000000000000FF0000000000800000008000000080000000800000008000
       000080000000000000000000000000000000000000000000000000000000FFFF
       FF003300FF003300FF003300CC00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
-      FF00000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000008080
+      FF000000000000000000000000000000000000000000F0CAA600FFECCC00F0CA
+      A60000000000C6D6EF00C6D6EF00C6D6EF00C6D6EF00C6D6EF0099CCFF00CC99
+      FF0000000000FFECCC00F0CAA600000000000000000000000000000000008080
       8000FFFF0000FFFF0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080
       0000808080000000000000000000000000000000000000000000000000000000
       00000000000000000000FF000000FF000000FF00000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000003300
       FF003300FF003300FF003300FF003300CC00FFFFFF00FFFFFF00FFFFFF00FFFF
-      FF00000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000008080
+      FF000000000000000000000000000000000000000000FFECCC00FFECCC00FFEC
+      CC00FFECCC0000000000C6D6EF00C6D6EF00C6D6EF00C6D6EF00CC99FF000000
+      0000FFECCC00FFECCC00FFECCC00000000000000000000000000000000008080
       8000FFFF0000FFFF0000FFFFFF00C0C0C000FFFFFF00FFFFFF00FFFF0000FFFF
       0000808080000000000000000000000000000000000000000000000000000000
       00000000000080000000FF000000FF000000FF00000000800000008000000080
       000000800000FF00000080000000000000000000000000000000000000003300
       FF003300FF00FFFFFF003300FF003300FF00FFFFFF00FFFFFF00FFFFFF00FFFF
-      FF00000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000008080
+      FF000000000000000000000000000000000000000000FFECCC00FFECCC00FFEC
+      CC00FFECCC00FFECCC0000000000C6D6EF00C6D6EF00CC99FF0000000000FFEC
+      CC00FFECCC00FFECCC00FFECCC00000000000000000000000000000000008080
       8000FFFF0000FFFF0000FFFF0000FFFFFF00FFFFFF00FFFF0000FFFF00008080
       0000808080000000000000000000000000000000000000000000000000000000
       000000000000FF000000FF000000FF000000FF00000000800000008000000080
       00000080000080800000FF000000000000000000000000000000000000003300
       FF00FFFFFF00FFFFFF00FFFFFF003300FF003300CC00FFFFFF00FFFFFF00FFFF
-      FF00000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000008080
+      FF000000000000000000000000000000000000000000FFFFCC00FFECCC00FFFF
+      CC00FFECCC0000000000C6D6EF00C6D6EF00C6D6EF00C6D6EF00CC99FF000000
+      000000000000FFFFCC00FFECCC00000000000000000000000000000000008080
       8000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF
       0000808080000000000000000000000000000000000000000000000000000000
       000000000000FF000000FF000000000000000080000000800000008000000080
       000000800000FF000000FF00000000000000000000000000000000000000FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF003300CC00FFFFFF00FFFFFF00FFFF
-      FF00000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000008080
+      FF000000000000000000000000000000000000000000FFECCC00FFFFCC00FFEC
+      CC0000000000C6D6EF00C6D6EF00C6D6EF00C6D6EF00C6D6EF0099CCFF00CC99
+      FF0000000000FFECCC00FFFFCC00000000000000000000000000000000008080
       8000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF00008080
       0000808080000000000000000000000000000000000000000000000000000000
       000000000000FF00000000000000008000000080000000800000008000008000
       000080800000800000000080000000000000000000000000000000000000FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF003300FF003300CC00FFFFFF00FFFF
-      FF00000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000008080
+      FF000000000000000000000000000000000000000000FFFFCC00FFFFCC00FFFF
+      CC0000000000C6D6EF00C6D6EF00C6D6EF00C6D6EF00C6D6EF0099CCFF00CC99
+      FF0000000000FFFFCC00FFFFCC00000000000000000000000000000000008080
       8000FFFF0000800000008000000080000000800000008000000080000000FFFF
       0000808080000000000000000000000000000000000000000000000000000000
       000000000000FF000000C0C0C000000000000000000080000000008000000080
       0000FF000000008000000080000000000000000000000000000000000000FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF003300FF003300CC00FFFF
-      FF00000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
+      FF000000000000000000000000000000000000000000FFFFCC00FFFFFF00FFFF
+      CC0000000000C6D6EF00C6D6EF00C6D6EF00C6D6EF00C6D6EF0099CCFF00CC99
+      FF0000000000FFFFCC00FFFFFF00000000000000000000000000000000000000
       0000808080008080800080808000808080008080800080808000808080008080
       8000000000000000000000000000000000000000000000000000000000000000
       00000000000000000000FF000000FFFFFF00C0C0C000FF000000FF000000FF00
       0000FF000000008000000080000000000000000000000000000000000000FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF003300FF00FFFF
-      FF00000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
+      FF000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF0000000000C6D6EF00C6D6EF00C6D6EF00C6D6EF00CC99FF000000
+      0000FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
       0000808080008080800080808000808080008080800080808000808080008080
       8000000000000000000000000000000000000000000000000000000000000000
       00000000000000000000FFFFFF00C0C0C000FFFFFF0000000000008000000080
       000000800000008000000000000000000000000000000000000000000000FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF003300
-      FF00000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
+      FF000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
       0000000000008000000080000000800000008000000080000000800000000000
       0000000000000000000000000000000000000000000000000000000000000000
       00000000000000000000000000000000000080800000C0C0C000000000000000
@@ -684,12 +953,19 @@ object frmSetting: TfrmSetting
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       000000000000000000000000000000000000424D3E000000000000003E000000
-      2800000040000000100000000100010000000000800000000000000000000000
-      000000000000000000000000FFFFFF00F007F3FFFFFF0000F007F1FFC03F0000
+      2800000040000000300000000100010000000000800100000000000000000000
+      000000000000000000000000FFFFFF0000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000F007F3FFFFFFFFFFF007F1FFC03F0000
       E00700FFC01F0000E007007FC00F0000E0070007C0070000E007F003C0070000
       E007F005C0070000E007F801C0070000E007F800C0070000E007F900C0070000
       E007FA00C0070000E007F980C0070000F00FFC01C0070000F00FFC41C0070000
-      F81FFF33C0070000F81FFFFFC007000000000000000000000000000000000000
-      000000000000}
+      F81FFF33C0070000F81FFFFFC007FFFF}
   end
 end
index 4c1d7a6..11fde33 100755 (executable)
@@ -56,11 +56,10 @@ type
     cbxHideGhosts: TCheckBox;
     btnVisibleGhosts: TButton;
     tstSurfacePreview: TTabSheet;
-    cbxSurfacePreviewOnHint: TCheckBox;
     lblSurfacePreview: TLabel;
     lvwPluginList: TListView;
     lblPluginList: TLabel;
-    cbxSurfacePreviewOnScriptPoint: TCheckBox;
+    ctvSurfacePreview: TCPCConfigTreeView;
     procedure FormClose(Sender: TObject; var Action: TCloseAction);
     procedure edtProxyPortKeyPress(Sender: TObject; var Key: Char);
     procedure ctvBottleNodeChecked(Sender: TObject;
@@ -92,6 +91,7 @@ implementation
 
 procedure TfrmSetting.Execute;
 var i: integer;
+    Node: TCPCGroupNode;
 begin
   PageControl.ActivePage := tstGeneral;
   memDefaultScript.Text := Pref.DefaultScript;
@@ -149,8 +149,13 @@ begin
   cbxHideGhosts.Checked := Pref.HideGhosts;
   memAutoJoinChannels.Lines := Pref.AutoJoinChannels;
   //
-  cbxSurfacePreviewOnHint.Checked := Pref.SurfacePreviewOnHint;
-  cbxSurfacePreviewOnScriptPoint.Checked := Pref.SurfacePreviewOnScriptPoint;
+  with ctvSurfacePreview do
+  begin
+    (GetNodeFromKeyPath('OnHint\DoPreview') as TCPCCheckBoxNode).Checked := Pref.SurfacePreviewOnHint;
+    (GetNodeFromKeyPath('OnScriptPoint\DoPreview') as TCPCCheckBoxNode).Checked := Pref.SurfacePreviewOnScriptPoint;
+    Node := GetNodeFromKeyPath('OnScriptPoint\Position') as TCPCGroupNode;
+    (Node.Item[Ord(Pref.SurfacePreviewOnScriptPointPosition)] as TCPCRadioNode).Check;
+  end;
   for i := 0 to Spps.Count-1 do
   begin
     with lvwPluginList.Items.Add do
@@ -164,6 +169,8 @@ begin
 end;
 
 procedure TfrmSetting.FormClose(Sender: TObject; var Action: TCloseAction);
+var i: integer;
+    Node: TCPCGroupNode;
 begin
   Pref.DefaultScript := memDefaultScript.Text;
   Pref.ShowRuler := cbxShowRuler.Checked;
@@ -219,8 +226,15 @@ begin
   //
   Pref.AutoJoinChannels := memAutoJoinChannels.Lines;
   //
-  Pref.SurfacePreviewOnHint := cbxSurfacePreviewOnHint.Checked;
-  Pref.SurfacePreviewOnScriptPoint := cbxSurfacePreviewOnScriptPoint.Checked;
+  with ctvSurfacePreview do
+  begin
+    Pref.SurfacePreviewOnHint := (GetNodeFromKeyPath('OnHint\DoPreview') as TCPCCheckBoxNode).Checked;
+    Pref.SurfacePreviewOnScriptPoint := (GetNodeFromKeyPath('OnScriptPoint\DoPreview') as TCPCCheckBoxNode).Checked;
+    Node := GetNodeFromKeyPath('OnScriptPoint\Position') as TCPCGroupNode;
+    for i := 0 to Node.Count-1 do
+      if (Node.Item[i] as TCPCRadioNode).Checked then
+        Pref.SurfacePreviewOnScriptPointPosition := TSurfacePreviewOnScriptPointPosition(i);
+  end;
 end;
 
 procedure TfrmSetting.edtProxyPortKeyPress(Sender: TObject; var Key: Char);