Develop and Download Open Source Software

Browse CVS Repository

Diff of /gikonavigoeson/gikonavi/GikoDataModule.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.17 by h677, Sat Dec 10 06:54:32 2005 UTC revision 1.18 by h677, Sat Dec 10 08:07:50 2005 UTC
# Line 11  uses Line 11  uses
11          SHDocVw_TLB,          SHDocVw_TLB,
12          MSHTML_TLB,          MSHTML_TLB,
13  {$IFEND}  {$IFEND}
14    ComCtrls, BrowserRecord, Graphics, Messages;    ComCtrls, BrowserRecord, Graphics, Messages, Setting;
15    
16  const  const
17          CAPTION_NAME: string = 'ギコナビ';          CAPTION_NAME: string = 'ギコナビ';
# Line 397  type Line 397  type
397          procedure RepaintStatusBar;          procedure RepaintStatusBar;
398          procedure ClearResFilter;          procedure ClearResFilter;
399          procedure SetResRange(range: Integer);          procedure SetResRange(range: Integer);
400            procedure SetThreadAreaHorNormal;
401            procedure SetThreadAreaHorizontal(gls : TGikoListState);
402            procedure SetThreadAreaVerNormal;
403            procedure SetThreadAreaVertical(gls : TGikoListState);
404            procedure SetThreadReadProperty(read: Boolean);
405    public    public
406          { Public 宣言 }          { Public 宣言 }
407    published    published
# Line 418  implementation Line 423  implementation
423  uses  uses
424          Windows, Math, Dialogs, Clipbrd,          Windows, Math, Dialogs, Clipbrd,
425          Giko, GikoSystem, GikoUtil, BoardGroup,          Giko, GikoSystem, GikoUtil, BoardGroup,
426          FavoriteArrange, Favorite, Setting, MojuUtils,          FavoriteArrange, Favorite, MojuUtils,
427          Editor, ListSelect, Search, Option, Round,          Editor, ListSelect, Search, Option, Round,
428          KeySetting, Gesture, Kotehan, ToolBarSetting,          KeySetting, Gesture, Kotehan, ToolBarSetting,
429          ToolBarUtil, NewBoard, HTMLCreate, IndividualAbon,          ToolBarUtil, NewBoard, HTMLCreate, IndividualAbon,
# Line 868  begin Line 873  begin
873          SetResRange(Ord( grrNew ));          SetResRange(Ord( grrNew ));
874  end;  end;
875  // *************************************************************************  // *************************************************************************
876    //! スレッド表示エリア通常表示にする 注)ListOrientation = gloHorizontal 
877    // *************************************************************************
878    procedure TGikoDM.SetThreadAreaHorNormal;
879    begin
880            //通常表示にする
881            if GikoForm.ActiveContent <> nil then
882                    SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0);  //描画停止
883            GikoForm.ViewPanel.Width := GikoForm.BrowserSizeWidth;
884            BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
885            BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
886            GikoSys.Setting.ListWidthState := glsNormal;
887            if GikoForm.ActiveContent <> nil then
888                    SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0);  //描画
889    end;
890    // *************************************************************************
891    //! スレッド表示エリア最大/最小表示にする 注)ListOrientation = gloHorizontal 
892    // *************************************************************************
893    procedure TGikoDM.SetThreadAreaHorizontal(gls : TGikoListState);
894    begin
895            if GikoForm.ActiveContent <> nil then
896                    SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0);  //描画停止
897            if GikoSys.Setting.ListWidthState = glsNormal then
898                    GikoForm.BrowserSizeWidth := GikoForm.ViewPanel.Width;
899            //最大表示
900            if (gls = glsMax) then begin
901                    GikoForm.ViewPanel.Width := 1;
902                    BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
903                    BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
904                    GikoSys.Setting.ListWidthState := glsMax;
905            end else if (gls = glsMin) then begin
906                    GikoForm.ViewPanel.Width := GikoForm.ThreadMainPanel.Width - 80;
907                    BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
908                    BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
909                    GikoSys.Setting.ListWidthState := glsMin;
910            end;
911            if GikoForm.ActiveContent <> nil then
912                    SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0);  //描画
913    end;
914    // *************************************************************************
915    //! スレッド表示エリア通常表示にする 注)ListOrientation = gloVertical
916    // *************************************************************************
917    procedure TGikoDM.SetThreadAreaVerNormal;
918    begin
919            //通常表示にする
920            if GikoForm.ActiveContent <> nil then
921                    SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0);  //描画停止
922            GikoForm.ViewPanel.Height := GikoForm.BrowserSizeHeight;
923            BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
924            BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
925            GikoSys.Setting.ListHeightState := glsNormal;
926            if GikoForm.ActiveContent <> nil then
927                    SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0);  //描画
928    end;
929    // *************************************************************************
930    //! スレッド表示エリア最大/最小表示にする 注)ListOrientation = gloVertical
931    // *************************************************************************
932    procedure TGikoDM.SetThreadAreaVertical(gls : TGikoListState);
933    begin
934            if GikoForm.ActiveContent <> nil then
935                    SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0);  //描画停止
936            if GikoSys.Setting.ListHeightState = glsNormal then
937                    GikoForm.BrowserSizeHeight := GikoForm.ViewPanel.Height;
938            if (gls = glsMin) then begin
939                    GikoForm.ViewPanel.Height := GikoForm.ThreadMainPanel.Height - GikoForm.BrowserCoolBar.Height - 7;
940                    BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
941                    BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
942                    GikoSys.Setting.ListHeightState := glsMin;
943            end else if (gls = glsMax) then begin
944                    GikoForm.ViewPanel.Height := 1;
945                    BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
946                    BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
947                    GikoSys.Setting.ListHeightState := glsMax;
948            end;
949            if GikoForm.ActiveContent <> nil then
950                    SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0);  //描画
951    end;
952    // *************************************************************************
953  //! スレッド表示エリアを大きく表示する  //! スレッド表示エリアを大きく表示する
954  // *************************************************************************  // *************************************************************************
955  procedure TGikoDM.BrowserMaxActionExecute(Sender: TObject);  procedure TGikoDM.BrowserMaxActionExecute(Sender: TObject);
# Line 876  begin Line 958  begin
958                  case GikoSys.Setting.ListWidthState of                  case GikoSys.Setting.ListWidthState of
959                          glsMax: begin                          glsMax: begin
960                                  //通常表示にする                                  //通常表示にする
961                                  if GikoForm.ActiveContent <> nil then                                  SetThreadAreaHorNormal;
                                         SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0);  //描画停止  
                                 GikoForm.ViewPanel.Width := GikoForm.BrowserSizeWidth;  
                                 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;  
                                 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;  
                                 GikoSys.Setting.ListWidthState := glsNormal;  
                                 if GikoForm.ActiveContent <> nil then  
                                         SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0);  //描画  
962                          end;                          end;
963                          glsMin, glsNormal: begin                          glsMin, glsNormal: begin
964                                  //最大表示にする                                  //最大表示にする
965                                  if GikoForm.ActiveContent <> nil then                                  SetThreadAreaHorizontal(glsMax);
                                         SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0);  //描画停止  
                                 if GikoSys.Setting.ListWidthState = glsNormal then  
                                         GikoForm.BrowserSizeWidth := GikoForm.ViewPanel.Width;  
                                 if GikoForm.ActiveContent <> nil then  
                                         SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0);  //描画  
                                 GikoForm.ViewPanel.Width := 1;  
                                 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;  
                                 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;  
                                 GikoSys.Setting.ListWidthState := glsMax;  
966                          end;                          end;
967                  end;                  end;
968          end else begin          end else begin
969                  case GikoSys.Setting.ListHeightState of                  case GikoSys.Setting.ListHeightState of
970                          glsMax: begin                          glsMax: begin
971                                  //通常表示にする                                  //通常表示にする
972                                  if GikoForm.ActiveContent <> nil then                                  SetThreadAreaVerNormal;
                                         SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0);  //描画停止  
                                 GikoForm.ViewPanel.Height := GikoForm.BrowserSizeHeight;  
                                 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;  
                                 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;  
                                 GikoSys.Setting.ListHeightState := glsNormal;  
                                 if GikoForm.ActiveContent <> nil then  
                                         SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0);  //描画  
973                          end;                          end;
974                          glsMin, glsNormal: begin                          glsMin, glsNormal: begin
975                                  //最大表示にする                                  //最大表示にする
976                                  if GikoForm.ActiveContent <> nil then                                  SetThreadAreaVertical(glsMax);
                                         SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0);  //描画停止  
                                 if GikoSys.Setting.ListHeightState = glsNormal then  
                                         GikoForm.BrowserSizeHeight := GikoForm.ViewPanel.Height;  
                                 if GikoForm.ActiveContent <> nil then  
                                         SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0);  //描画  
                                 GikoForm.ViewPanel.Height := 1;  
                                 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;  
                                 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;  
                                 GikoSys.Setting.ListHeightState := glsMax;  
977                          end;                          end;
978                  end;                  end;
979          end;          end;
# Line 937  begin Line 987  begin
987                  case GikoSys.Setting.ListWidthState of                  case GikoSys.Setting.ListWidthState of
988                          glsMax, glsNormal: begin                          glsMax, glsNormal: begin
989                                  //最小表示にする                                  //最小表示にする
990                                  if GikoForm.ActiveContent <> nil then                                  SetThreadAreaHorizontal(glsMin);
                                         SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0);  //描画停止  
                                 if GikoSys.Setting.ListWidthState = glsNormal then  
                                         GikoForm.BrowserSizeWidth := GikoForm.ViewPanel.Width;  
                                 if GikoForm.ActiveContent <> nil then  
                                         SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0);  //描画  
                                 GikoForm.ViewPanel.Width := GikoForm.ThreadMainPanel.Width - 80;  
                                 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;  
                                 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;  
                                 GikoSys.Setting.ListWidthState := glsMin;  
991                          end;                          end;
992                          glsMin: begin                          glsMin: begin
993                                  //通常表示にする                                  //通常表示にする
994                                  if GikoForm.ActiveContent <> nil then                                  SetThreadAreaHorNormal;
                                         SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0);  //描画停止  
                                 GikoForm.ViewPanel.Width := GikoForm.BrowserSizeWidth;  
                                 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;  
                                 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;  
                                 GikoSys.Setting.ListWidthState := glsNormal;  
                                 if GikoForm.ActiveContent <> nil then  
                                         SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0);  //描画  
995                          end;                          end;
996                  end;                  end;
997          end else begin          end else begin
998                  case GikoSys.Setting.ListHeightState of                  case GikoSys.Setting.ListHeightState of
999                          glsMax, glsNormal: begin                          glsMax, glsNormal: begin
1000                                  //最小表示にする                                  //最小表示にする
1001                                  if GikoForm.ActiveContent <> nil then                                  SetThreadAreaVertical(glsMin);
                                         SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0);  //描画停止  
                                 if GikoSys.Setting.ListHeightState = glsNormal then  
                                         GikoForm.BrowserSizeHeight := GikoForm.ViewPanel.Height;  
                                 GikoForm.ViewPanel.Height := GikoForm.ThreadMainPanel.Height - GikoForm.BrowserCoolBar.Height - 7;  
                                 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;  
                                 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;  
                                 GikoSys.Setting.ListHeightState := glsMin;  
                                 if GikoForm.ActiveContent <> nil then  
                                         SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0);  //描画  
1002                          end;                          end;
1003                          glsMin: begin                          glsMin: begin
1004                                  //通常表示にする                                  //通常表示にする
1005                                  if GikoForm.ActiveContent <> nil then                                  SetThreadAreaVerNormal;
                                         SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0);  //描画停止  
                                 GikoForm.ViewPanel.Height := GikoForm.BrowserSizeHeight;  
                                 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;  
                                 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;  
                                 GikoSys.Setting.ListHeightState := glsNormal;  
                                 if GikoForm.ActiveContent <> nil then  
                                         SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0);  //描画  
1006                          end;                          end;
1007                  end;                  end;
1008          end;          end;
# Line 3635  var Line 3653  var
3653          List: TList;          List: TList;
3654          i: Integer;          i: Integer;
3655  begin  begin
3656          List := TList.Create;          SetThreadReadProperty(true);
         try  
                 GikoForm.SelectListItem(List);  
                 for i := 0 to List.Count - 1 do begin  
                         if TObject(List[i]) is TThreadItem then begin  
                                 if (TThreadItem(List[i]).UnRead) then begin  
                                         TThreadItem(List[i]).UnRead := false;  
                                         TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1;  
                                 end;  
                         end;  
                 end;  
                 if GikoForm.TreeView.Visible then  
                         GikoForm.TreeView.Refresh;  
                 if GikoForm.ListView.Visible then  
                         GikoForm.ListView.Refresh;  
         finally  
                 List.Free;  
         end;  
3657  end;  end;
3658  // *************************************************************************  // *************************************************************************
3659  //! 選択されているスレッドを未読にする  //! 選択されているスレッドを未読にする
3660  // *************************************************************************  // *************************************************************************
3661  procedure TGikoDM.MidokuActionExecute(Sender: TObject);  procedure TGikoDM.MidokuActionExecute(Sender: TObject);
3662    begin
3663            SetThreadReadProperty(false);
3664    end;
3665    // *************************************************************************
3666    //! 選択されているスレッドの未読・既読を設定する   true : 既読 false : 未読
3667    // *************************************************************************
3668    procedure TGikoDM.SetThreadReadProperty(read: Boolean);
3669  var  var
3670          List: TList;          List: TList;
3671          i: Integer;          i: Integer;
# Line 3667  begin Line 3675  begin
3675                  GikoForm.SelectListItem(List);                  GikoForm.SelectListItem(List);
3676                  for i := 0 to List.Count - 1 do begin                  for i := 0 to List.Count - 1 do begin
3677                          if TObject(List[i]) is TThreadItem then begin                          if TObject(List[i]) is TThreadItem then begin
3678                                  if (TThreadItem(List[i]).IsLogFile) and (not TThreadItem(List[i]).UnRead) then begin                                  if (TThreadItem(List[i]).IsLogFile) then begin
3679                                          TThreadItem(List[i]).UnRead := true;                                          TThreadItem(List[i]).UnRead := not read;
                                         TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1;  
3680                                  end;                                  end;
3681                          end;                          end;
3682                  end;                  end;

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26