OSDN Git Service

レスエディタ/スレ立てエディタにUnicode対応表示を追加
authorzako <zako@users.sourceforge.jp>
Sun, 10 Aug 2014 11:39:30 +0000 (20:39 +0900)
committerzako <zako@users.sourceforge.jp>
Sun, 10 Aug 2014 11:39:30 +0000 (20:39 +0900)
Editor.dfm
Editor.pas

index 49c39be..027686c 100644 (file)
@@ -1,7 +1,7 @@
 object EditorForm: TEditorForm
   Left = 306
   Top = 172
-  Width = 640
+  Width = 749
   Height = 449
   HorzScrollBar.Visible = False
   VertScrollBar.Visible = False
@@ -38,7 +38,7 @@ object EditorForm: TEditorForm
   object StatusBar: TStatusBar
     Left = 0
     Top = 371
-    Width = 624
+    Width = 733
     Height = 19
     Panels = <
       item
@@ -55,7 +55,7 @@ object EditorForm: TEditorForm
   object EditorPage: TPageControl
     Left = 0
     Top = 30
-    Width = 624
+    Width = 733
     Height = 341
     ActivePage = EditorTab
     Align = alClient
@@ -67,7 +67,7 @@ object EditorForm: TEditorForm
       object NameBasePanel: TPanel
         Left = 0
         Top = 29
-        Width = 616
+        Width = 725
         Height = 31
         Align = alTop
         BevelOuter = bvNone
@@ -124,11 +124,19 @@ object EditorForm: TEditorForm
           Caption = #12495#12531#12489#12523#20445#23384'(&H)'
           TabOrder = 3
         end
+        object UCInfoPanel: TPanel
+          Left = 616
+          Top = 4
+          Width = 105
+          Height = 20
+          BevelOuter = bvLowered
+          TabOrder = 4
+        end
       end
       object TitlePanel: TPanel
         Left = 0
         Top = 0
-        Width = 616
+        Width = 725
         Height = 29
         Align = alTop
         BevelOuter = bvNone
@@ -232,7 +240,7 @@ object EditorForm: TEditorForm
   object ToolBar: TToolBar
     Left = 0
     Top = 0
-    Width = 624
+    Width = 733
     Height = 30
     AutoSize = True
     BorderWidth = 1
index 3180d18..df5c2dc 100644 (file)
@@ -141,6 +141,7 @@ type
     N8: TMenuItem;
     N9: TMenuItem;
     N10: TMenuItem;
+    UCInfoPanel: TPanel;
 
                procedure EditorPageChange(Sender: TObject);
                procedure FormCreate(Sender: TObject);
@@ -1605,7 +1606,9 @@ end;
 procedure TEditorForm.ShowBoardInformation(ABoard: TBoard; AMemo: TMemo);
 var
        body: TStringList;
+    UCType: Integer;    // 0:\95s\96¾\81A1:\91Î\89\9e\81A-1:\94ñ\91Î\89\9e
 begin
+    UCType := 0;
        AMemo.Clear;
        AMemo.Lines.Add('[SETTING.TXT]');
        if ABoard.IsSETTINGTXT then begin
@@ -1618,6 +1621,10 @@ begin
                        finally
                                body.Free;
                        end;
+            if (Pos('BBS_UNICODE=pass', AMemo.Text) > 0) then
+                UCType := 1
+            else if (Pos('BBS_UNICODE=', AMemo.Text) > 0) then
+                UCType := -1;
                end else begin
                        ABoard.IsSETTINGTXT := false;
                        ABoard.SETTINGTXTTime := ZERO_DATE;
@@ -1628,6 +1635,24 @@ begin
                AMemo.Lines.Add('SETTING.TXT\82ð\8eæ\93¾\82µ\82Ä\82¢\82Ü\82¹\82ñ\81B');
                AMemo.Lines.Add('\83\81\83j\83\85\81[\82æ\82è\8eæ\93¾\82µ\82Ä\82­\82¾\82³\82¢\81B');
        end;
+
+    case UCType of
+        -1: begin
+            UCInfoPanel.Caption := 'Unicode\94ñ\91Î\89\9e';
+            UCInfoPanel.Color := clRed;
+            UCInfoPanel.Hint := '\82±\82Ì\94Â\82ÍUnicode\82Å\82Ì\83\8c\83X\82É\91Î\89\9e\82µ\82Ä\82¢\82Ü\82¹\82ñ\81B';
+        end;
+        0: begin
+            UCInfoPanel.Caption := 'Unicode\91Î\89\9e\95s\96¾';
+            UCInfoPanel.Color := clBtnFace;
+            UCInfoPanel.Hint := '\94Â\8fî\95ñ\82ð\8eæ\93¾\82µ\82Ä\82­\82¾\82³\82¢\81B';
+        end;
+        1: begin
+            UCInfoPanel.Caption := 'Unicode\91Î\89\9e';
+            UCInfoPanel.Color := clLime;
+            UCInfoPanel.Hint := '\82±\82Ì\94Â\82ÍUnicode\82Å\82Ì\83\8c\83X\82É\91Î\89\9e\82µ\82Ä\82¢\82Ü\82·\81B';
+        end;
+    end;
 end;
 function TEditorForm.GetTitlePictureURL(body: TStringList; ABoard: TBoard): string;
 //BBS_TITLE_PICTURE=