procedure FormDestroy(Sender: TObject);
procedure CabinetPanelHide(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
- procedure TreeViewChange(Sender: TObject; Node: TTreeNode);
procedure ListViewData(Sender: TObject; Item: TListItem);
procedure ListViewDataFind(Sender: TObject; Find: TItemFind;
const FindString: String; const FindPosition: TPoint;
procedure ShowThreadActionUpdate(Sender: TObject);
procedure ShowBoardActionUpdate(Sender: TObject);
procedure SelectThreadReloadActionUpdate(Sender: TObject);
- procedure ListViewSelectItem(Sender: TObject; Item: TListItem;
- Selected: Boolean);
procedure SelectTimerTimer(Sender: TObject);
procedure ItemReloadActionUpdate(Sender: TObject);
procedure ListViewDblClick(Sender: TObject);
procedure BrowserNameToolBarResize(Sender: TObject);
procedure BrowserToolBarResize(Sender: TObject);
procedure BrowserTabResize(Sender: TObject);
+ procedure ListViewClick(Sender: TObject);
+ procedure TreeViewClick(Sender: TObject);
+ procedure TreeViewKeyDown(Sender: TObject; var Key: Word;
+ Shift: TShiftState);
private
{ Private \90é\8c¾ }
//RoundList : TRoundList;
function Hook(var Message: TMessage): Boolean;
procedure AddRoundNameMenu(MenuItem: TMenuItem);
procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string); overload;
- procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string); overload;
+ procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string); overload;
procedure SetSelectRoundName(Sender: TObject);
function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
// procedure SetStdToolBar;
// function GetAction(ActionName: string): TContainedAction;
procedure SetLinkBar;
- procedure ClearLinkBar;
+ procedure ClearLinkBar;
function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
procedure MenuBarChevronMenu;
procedure LinkBarChevronMenu;
procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
- //
+ //
procedure BrowserTabClick(Sender: TObject);
procedure SetListViewBackGroundColor(value: TColor);
procedure BBSMenuItemOnClick( Sender : TObject );
- //
- procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean);
+ //
+ procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean);
// CoolBar \82Ì\90Ý\92è\82ð\95Ï\90\94\82É\95Û\91¶
procedure SaveCoolBarSettings;
// CoolBar \82Ì\90Ý\92è\82ð\95Ï\90\94\82©\82ç\95\9c\8c³
procedure OnMinimize;
// CoolBar \82ª\83T\83C\83Y\95Ï\8dX\82³\82ê\82½
procedure CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
+ // TreeView \82ª\83N\83\8a\83b\83N\82³\82ê\82½
+ procedure TreeClick( Node : TTreeNode );
+ // TreeView \82ª\83_\83u\83\8b\83N\83\8a\83b\83N\82³\82ê\82½
+ procedure TreeDoubleClick( Node : TTreeNode );
+ // \83M\83R\83i\83r\82Ì\83\81\83b\83Z\81[\83W\83\8b\81[\83v\82ð\89¡\8eæ\82è\82µ\82Ü\82·
+ procedure HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
+ // \83u\83\89\83E\83U\82Ì\83L\81[\83_\83E\83\93\83C\83x\83\93\83g
+ // \83C\83x\83\93\83g\82ð\8eæ\82è\88µ\82Á\82½\8fê\8d\87\82Í True \82ð\95Ô\82·
+ function BrowserKeydown(Sender: TObject; Key: Word; State:TShiftState) : Boolean;
protected
procedure CreateParams(var Params: TCreateParams); override;
Application.OnDeactivate := AppFormDeactivate;
Self.OnDeactivate := AppFormDeactivate;
Application.HookMainWindow(Hook);
+ Application.OnMessage := HandleAppMessage;
FTreeType := gttNone;
RoundList.LoadRoundThreadFile;
- if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
- GikoSys.ListBoardFile;
+ if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
+ GikoSys.ListBoardFile;
// \83\81\83j\83\85\81[\82É\92Ç\89Á
for i := Length( BBSs ) - 1 downto 0 do begin
ListView.Font.Size := GikoSys.Setting.ListFontSize;
ListView.Font.Color := GikoSys.Setting.ListFontColor;
//ListView.Color := GikoSys.Setting.ListBackColor;
- ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
- FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
- FOddColor := GikoSys.Setting.OddColor;
+ ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
+ FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
+ FOddColor := GikoSys.Setting.OddColor;
finally
TreeView.Items.EndUpdate;
ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
- KeepDefaultToolButton(StdToolBar, TmpToolBar);
- KeepDefaultToolButton(ListToolBar, TmpToolBar);
- KeepDefaultToolButton(BrowserToolBar, TmpToolBar);
+ KeepDefaultToolButton(StdToolBar, TmpToolBar);
+ KeepDefaultToolButton(ListToolBar, TmpToolBar);
+ KeepDefaultToolButton(BrowserToolBar, TmpToolBar);
- MakeDefaultINIFile();
+ MakeDefaultINIFile();
//\83c\81[\83\8b\83{\83^\83\93\93Ç\82Ý\8d\9e\82Ý
ReadToolBarSetting(ActionList, StdToolBar);
ReadToolBarSetting(ActionList, ListToolBar);
StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
StatusBarResize(Sender);
- dummy1.Caption := ItemReservPMenu.Caption;
- dummy1.Hint := ItemReservPMenu.Hint;
+ dummy1.Caption := ItemReservPMenu.Caption;
+ dummy1.Hint := ItemReservPMenu.Hint;
- //Samba24\82Ì\83t\83@\83C\83\8b\83`\83F\83b\83N
- GikoSys.SambaFileExists();
+ //Samba24\82Ì\83t\83@\83C\83\8b\83`\83F\83b\83N
+ GikoSys.SambaFileExists();
end;
// CoolBar \82Ì\90Ý\92è\82ð\95Ï\90\94\82É\95Û\91¶
// CoolSet: TCoolSet;
wp: TWindowPlacement;
begin
- if ( GikoSys.Setting.ShowDialogForEnd ) and
- (MessageDlg('\83M\83R\83i\83r\82ð\8fI\97¹\82µ\82Ä\82æ\82ë\82µ\82¢\82Å\82·\82©\81H', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin
- CanClose := false;
- Exit;
- end else begin
- CanClose := True;
- end;
+ if ( GikoSys.Setting.ShowDialogForEnd ) and
+ (MessageDlg('\83M\83R\83i\83r\82ð\8fI\97¹\82µ\82Ä\82æ\82ë\82µ\82¢\82Å\82·\82©\81H', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin
+ CanClose := false;
+ Exit;
+ end else begin
+ CanClose := True;
+ end;
// Application.OnDeactivate := nil;
// Self.OnDeactivate := nil;
- try
+ try
//column\95\9d
if GetActiveList is TBBS then begin
for i := 0 to ListView.Columns.Count - 1 do
for i := 0 to ListView.Columns.Count - 1 do
GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
end;
- except
- end;
- try
+ except
+ end;
+ try
//\8dÅ\91å\89»\81E\83E\83B\83\93\83h\83E\88Ê\92u\95Û\91¶
wp.length := sizeof(wp);
GetWindowPlacement(Handle, @wp);
else
GikoSys.Setting.ListOrientation := gloHorizontal;
GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
- except
+ except
end;
// \83\8a\83A\83\8b\83^\83C\83\80\82É\95Û\91¶\82³\82ê\82é\82Ì\82Å\81A\82Ü\82½\81A\83E\83B\83\93\83h\83E\83T\83C\83Y\82ª CoolBar \82æ\82è
{
// CoolBar \95Û\91¶
SaveCoolBarSettings;
- }
- try
+ }
+ try
GikoSys.Setting.WriteWindowSettingFile;
GikoSys.Setting.WriteNameMailSettingFile;
- except
- end;
+ except
+ end;
//\82¨\8bC\82É\93ü\82è\95Û\91¶
try
- //FavoriteDM\82Í\8e©\93®\90¶\90¬\83t\83H\81[\83\80\82È\82Ì\82Å\81A\89ð\95ú\82Í\8e©\93®\93I\82É\82³\82ê\82é
+ //FavoriteDM\82Í\8e©\93®\90¶\90¬\83t\83H\81[\83\80\82È\82Ì\82Å\81A\89ð\95ú\82Í\8e©\93®\93I\82É\82³\82ê\82é
FavoriteDM.WriteFavorite;
- FavoriteDM.Clear;
+ FavoriteDM.Clear;
except
end;
end;
try
- TreeView.Items.BeginUpdate;
- for i := TreeView.Items.Count - 1 downto 0 do begin
- TreeView.Items[i].Free;
- end;
- TreeView.Items.Clear;
- TreeView.Items.EndUpdate;
+ TreeView.Items.BeginUpdate;
+ for i := TreeView.Items.Count - 1 downto 0 do begin
+ TreeView.Items[i].Free;
+ end;
+ TreeView.Items.Clear;
+ TreeView.Items.EndUpdate;
except
end;
//\83A\83h\83\8c\83X\97\9a\97ð\95Û\91¶
try
- //AddressHistoryDM\82Í\8e©\93®\90¶\90¬\83t\83H\81[\83\80\82È\82Ì\82Å\81A\89ð\95ú\82Í\8e©\93®\93I\82É\82³\82ê\82é\81B
+ //AddressHistoryDM\82Í\8e©\93®\90¶\90¬\83t\83H\81[\83\80\82È\82Ì\82Å\81A\89ð\95ú\82Í\8e©\93®\93I\82É\82³\82ê\82é\81B
AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
except
end;
SaveHistory;
except
end;
- try
- try
- ClearHistory;
- except
- end;
- finally
- FHistoryList.Free;
- end;
+ try
+ try
+ ClearHistory;
+ except
+ end;
+ finally
+ FHistoryList.Free;
+ end;
//\8f\84\89ñ\83\8a\83X\83g\95Û\91¶&\94j\8aü
try
RoundList.SaveRoundFile;
except
end;
- try
+ try
try
- RoundList.Clear;
+ RoundList.Clear;
except
end;
- finally
- RoundList.Free;
- end;
+ finally
+ RoundList.Free;
+ end;
- try
+ try
try
FControlThread.Terminate;
- FControlThread.WaitFor;
+ FControlThread.WaitFor;
except
end;
- finally
- FControlThread.Free;
- end;
+ finally
+ FControlThread.Free;
+ end;
// TBBS \82Í\95Û\8e\9d\82µ\82Ä\82¢\82é TCategory, TBoard, TThreadItem \82·\82×\82Ä\82ð\8aJ\95ú\82·\82é
// TBoard, TThreadItem \82Ì\83f\83X\83g\83\89\83N\83^\82Í\83v\83\89\83O\83C\83\93\82É\94j\8aü\82ð\93`\82¦\82é\82Ì\82Å
end;
try
- if FEvent <> nil then
- FEvent.Free;
+ if FEvent <> nil then
+ FEvent.Free;
//Hint\94j\8aü
if FHint <> nil then begin
end;
except
end;
- //Application.HookMainWindow(Hook);
- Application.UnhookMainWindow(Hook);
- Application.Terminate;
+ //Application.HookMainWindow(Hook);
+ Application.UnhookMainWindow(Hook);
+ Application.Terminate;
end;
procedure TGikoForm.FormDestroy(Sender: TObject);
end;
end;
-procedure TGikoForm.TreeViewChange(Sender: TObject; Node: TTreeNode);
-var
- i: Integer;
-begin
- if FTreeType = gttHistory then begin
- if Node <> nil then
- if TObject( Node.Data ) is TFavoriteThreadItem then
- if GetActiveContent <> TFavoriteThreadItem( Node.Data ).Item then
- FavoriteClick( Node );
- Exit;
- end;
-
- ListView.Selected := nil;
- ListView.Items.Count := 0;
- ListView.Items.Clear;
-// ListView.Columns.Clear;
-
- Caption := CAPTION_NAME;
- //Application.Title := CAPTION_NAME;
-
-
- if GetActiveList is TBBS then begin
- for i := 0 to ListView.Columns.Count - 1 do
- GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
- end else if GetActiveList is TCategory then begin
- for i := 0 to ListView.Columns.Count - 1 do
- GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
- end else if GetActiveList is TBoard then begin
- for i := 0 to ListView.Columns.Count - 1 do
- GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
- end;
-
- if TObject(Node.Data) is TBBS then begin
- SetActiveList(Node.data);
- end else if TObject(Node.Data) is TCategory then begin
- SetActiveList(Node.data);
- end else if TObject(Node.Data) is TBoard then begin
- if not TBoard(Node.Data).IsThreadDatRead then begin
- Screen.Cursor := crHourGlass;
- try
- if not TBoard(Node.Data).IsThreadDatRead then
- GikoSys.ReadSubjectFile(Node.Data);
- finally
- Screen.Cursor := crDefault;
- end;
- end;
- SetActiveList(Node.data);
- end;
-end;
-
procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
var
// FileName: string;
Board: TBoard;
ThreadItem: TThreadItem;
RepStr: string;
- ActivListObj : TObject;
+ ActivListObj : TObject;
begin
- ActivListObj := ActiveList;
+ ActivListObj := ActiveList;
if ActivListObj is TBBS then begin
BBS := TBBS(ActivListObj);
procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
- if Key = VK_BACK then begin
+ if GetActiveList is TBoard then begin
+ if Key = VK_BACK then begin
// UpFolderButtonClick(Sender);
- end else if Key = VK_SPACE then begin
-// ListClick;
- end else if Key = VK_RETURN then begin
- ListDoubleClick;
+ end else if Key = VK_SPACE then begin
+ ListDoubleClick;
+ end else if Key = VK_RETURN then begin
+ ListClick;
+ end;
+ end else begin // TBBS, TCategory
+ if Key = VK_BACK then begin
+// UpFolderButtonClick(Sender);
+ end else if Key = VK_SPACE then begin
+ ListClick;
+ end else if Key = VK_RETURN then begin
+ ListDoubleClick;
+ end;
end;
end;
procedure TGikoForm.TreeViewDblClick(Sender: TObject);
var
- Board: TBoard;
- ThreadItem: TThreadItem;
APoint: TPoint;
HitTest: THitTests;
begin
APoint := TreeView.ScreenToClient(APoint);
HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y);
if not (htOnLabel in HitTest) then Exit;
- if TreeView.Selected = nil then Exit;
- if FTreeType = gtt2ch then begin
- if not (TObject(TreeView.Selected.Data) is TBoard) then Exit;
- Board := TBoard(TreeView.Selected.Data);
- DownloadList(Board);
- end else if FTreeType = gttHistory then begin
- if not (TObject(TreeView.Selected.Data) is TFavoriteThreadItem) then Exit;
- ThreadItem := TFavoriteThreadItem(TreeView.Selected.Data).Item;
- DownloadContent(ThreadItem);
- end;
+ TreeDoubleClick( TreeView.Selected );
end;
procedure TGikoForm.FavoriteTreeViewClick(Sender: TObject);
ListView.Column[i].Width := GikoSys.Setting.CategoryColumnWidth[i];
SetBoardListItem(TCategory(Obj));
end else if Obj is TBoard then begin
- // SetThreadListItem \8cÄ\82Ô\82È\82ç\82¢\82ç\82È\82¢\82ñ\82¶\82á\82Ë\82¥\81H
- {
- for i := 0 to ListView.Columns.Count - 1 do
- ListView.Column[i].Width := GikoSys.Setting.BoardColumnWidth[i];
- }
SetThreadListItem(TBoard(Obj));
end;
+
+ if GikoSys.Setting.ListOrientation = gloHorizontal then begin
+ if GikoSys.Setting.ListWidthState = glsMax then begin
+ BrowserMinAction.Execute;
+ ListView.SetFocus;
+ end;
+ end else begin
+ if GikoSys.Setting.ListHeightState = glsMax then begin
+ BrowserMinAction.Execute;
+ ListView.SetFocus;
+ end;
+ end;
end;
TreeView.TopItem.Expanded := True; //\83c\83\8a\81[\83g\83b\83v\8d\80\96Ú\82¾\82¯\82ð\8aJ\82
//\83c\83\8a\81[\82Ì\83g\83b\83v\8d\80\96Ú\82ð\91I\91ð\82·\82é
if GetActiveList = nil then
- TreeView.Selected := TreeView.Items[0]
+ TreeClick( TreeView.Items[0] )
else begin
for i := 0 to TreeView.Items.Count - 1 do begin
if TreeView.Items[i].Data = GetActiveList then begin
- TreeView.Selected := TreeView.Items[i];
+ TreeClick( TreeView.Items[i] );
Exit;
end;
end;
- TreeView.Selected := TreeView.Items[0]
+ TreeClick( TreeView.Items[0] );
end;
end;
except
if TreeView.Items[i].Data = Item then begin
TreeView.Items[i].Selected := True;
if CallEvent then
- TreeViewChange(TreeView, TreeView.Items[i]);
+ TreeClick(TreeView.Items[i]);
Break;
end;
end;
end;
if (Item is TBBS) or (Item is TCategory) then begin
- ListView.Columns.Clear;
+ ListView.Columns.Clear;
SetActiveList( Item );
end else if Item is TBoard then begin
if not TBoard( Item ).IsThreadDatRead then begin
Screen.Cursor := crHourGlass;
try
- if not TBoard( Item ).IsThreadDatRead then
+ if not TBoard( Item ).IsThreadDatRead then
GikoSys.ReadSubjectFile(TBoard( Item ));
finally
Screen.Cursor := crDefault;
// SetContent(ThreadItem);
InsertBrowserTab(ListItem.Data);
end;
+
+ if ListView.Selected = nil then
+ Exit;
+ if ListView.Selected.Data = nil then
+ Exit;
+ if TThreadItem( ListView.Selected.Data ).IsLogFile then begin
+ if GikoSys.Setting.ListOrientation = gloHorizontal then begin
+ if GikoSys.Setting.ListWidthState = glsMin then begin
+ BrowserMaxAction.Execute;
+ Browser.SetFocus;
+ end;
+ end else begin
+ if GikoSys.Setting.ListHeightState = glsMin then begin
+ BrowserMaxAction.Execute;
+ Browser.SetFocus;
+ end;
+ end;
+ end;
end;
procedure TGikoForm.ListDoubleClick;
Application.ProcessMessages;
end;
}
+ // Access Violation \82ª\8bN\82«\82é\8e\96\82ª\82 \82é\82Ì\82Å\8d¡\8cã\97v\83`\83F\83b\83N
try
- top := 0;
- nm := AName;
- item := OleVariant( Browser.Document as IHTMLDocument2).anchors.item(nm);
- repeat
- top := top + item.offsetTop;
- item := item.offsetParent;
- until AnsiCompareText(item.tagName, 'body' ) = 0;
-
- OleVariant(Browser.Document as IHTMLDocument2).body.scrollTop := top;
-
- except
- end;
+ top := 0;
+ nm := AName;
+ item := OleVariant( Browser.Document as IHTMLDocument2).anchors.item(nm);
+ repeat
+ top := top + item.offsetTop;
+ item := item.offsetParent;
+ until AnsiCompareText(item.tagName, 'body' ) = 0;
+
+ OleVariant(Browser.Document as IHTMLDocument2).body.scrollTop := top;
+ except
+ end;
end;
procedure TGikoForm.TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
ActiveLogDeleteAction.Enabled := GetActiveContent <> nil;
end;
-procedure TGikoForm.ListViewSelectItem(Sender: TObject; Item: TListItem;
- Selected: Boolean);
-begin
- //SelectTimer.Enabled := False;
- //if Selected then
- // SelectTimer.Enabled := True;
- SelectTimer.Enabled := Selected;
-
- {
- if ListView.Selected = nil then
- Exit;
- if ListView.Selected.Data = nil then
- Exit;
- if TThreadItem( ListView.Selected.Data ).IsLogFile then begin
- if GikoSys.Setting.ListOrientation = gloHorizontal then begin
- if GikoSys.Setting.ListWidthState = glsMin then
- BrowserMaxAction.Execute;
- end else begin
- if GikoSys.Setting.ListHeightState = glsMin then
- BrowserMaxAction.Execute;
- end;
- end;
- }
-end;
-
procedure TGikoForm.SelectTimerTimer(Sender: TObject);
begin
SelectTimer.Enabled := False;
function TGikoForm.Hook(var Message: TMessage): Boolean;
begin
Result := False;
- if Message.Msg = CM_APPKEYDOWN then Result := True;
+ case Message.Msg of
+ CM_APPKEYDOWN:
+ Result := True;
+ end;
end;
procedure TGikoForm.KokoResActionExecute(Sender: TObject);
begin
SelectTreeNode( GetActiveContent.ParentBoard, True );
- {
- if GikoSys.Setting.ListOrientation = gloHorizontal then begin
- if GikoSys.Setting.ListWidthState = glsMax then
- BrowserMinAction.Execute;
- end else begin
- if GikoSys.Setting.ListHeightState = glsMax then
- BrowserMinAction.Execute;
- end;
- }
end;
end;
+procedure TGikoForm.ListViewClick(Sender: TObject);
+begin
+ ListClick;
+end;
+
+// TreeView \82ª\83N\83\8a\83b\83N\82³\82ê\82½
+procedure TGikoForm.TreeClick( Node : TTreeNode );
+var
+ i: Integer;
+begin
+
+ if FTreeType = gttHistory then begin
+ if Node <> nil then
+ if TObject( Node.Data ) is TFavoriteThreadItem then
+ if GetActiveContent <> TFavoriteThreadItem( Node.Data ).Item then
+ FavoriteClick( Node );
+ Exit;
+ end;
+
+ ListView.Selected := nil;
+ ListView.Items.Count := 0;
+ ListView.Items.Clear;
+// ListView.Columns.Clear;
+
+ Caption := CAPTION_NAME;
+ //Application.Title := CAPTION_NAME;
+
+
+ if GetActiveList is TBBS then begin
+ for i := 0 to ListView.Columns.Count - 1 do
+ GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
+ end else if GetActiveList is TCategory then begin
+ for i := 0 to ListView.Columns.Count - 1 do
+ GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
+ end else if GetActiveList is TBoard then begin
+ for i := 0 to ListView.Columns.Count - 1 do
+ GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
+ end;
+
+ if TObject(Node.Data) is TBBS then begin
+ SetActiveList(Node.data);
+ end else if TObject(Node.Data) is TCategory then begin
+ SetActiveList(Node.data);
+ end else if TObject(Node.Data) is TBoard then begin
+ if not TBoard(Node.Data).IsThreadDatRead then begin
+ Screen.Cursor := crHourGlass;
+ try
+ if not TBoard(Node.Data).IsThreadDatRead then
+ GikoSys.ReadSubjectFile(Node.Data);
+ finally
+ Screen.Cursor := crDefault;
+ end;
+ end;
+ SetActiveList(Node.data);
+ end;
+
+end;
+
+// TreeView \82ª\83_\83u\83\8b\83N\83\8a\83b\83N\82³\82ê\82½
+procedure TGikoForm.TreeDoubleClick( Node : TTreeNode );
+var
+ Board : TBoard;
+ ThreadItem : TThreadItem;
+begin
+
+ if Node = nil then Exit;
+
+ if FTreeType = gtt2ch then begin
+ if not (TObject(Node.Data) is TBoard) then Exit;
+ Board := TBoard(Node.Data);
+ DownloadList(Board);
+ end else if FTreeType = gttHistory then begin
+ if not (TObject(Node.Data) is TFavoriteThreadItem) then Exit;
+ ThreadItem := TFavoriteThreadItem(Node.Data).Item;
+ DownloadContent(ThreadItem);
+ end;
+
+end;
+
+procedure TGikoForm.TreeViewClick(Sender: TObject);
+begin
+ TreeClick( TreeView.Selected );
+end;
+
+procedure TGikoForm.TreeViewKeyDown(Sender: TObject; var Key: Word;
+ Shift: TShiftState);
+begin
+ if Key = VK_BACK then begin
+// UpFolderButtonClick(Sender);
+ end else if Key = VK_SPACE then begin
+ TreeDoubleClick( TreeView.Selected );
+ end else if Key = VK_RETURN then begin
+ TreeClick( TreeView.Selected );
+ end;
+end;
+
+// \83u\83\89\83E\83U\82Ì\83L\81[\83_\83E\83\93\83C\83x\83\93\83g
+ // \83C\83x\83\93\83g\82ð\8eæ\82è\88µ\82Á\82½\8fê\8d\87\82Í True \82ð\95Ô\82·
+function TGikoForm.BrowserKeydown(Sender: TObject; Key: Word; State:TShiftState) : Boolean;
+begin
+
+ if Key = VK_BACK then begin
+ UpBoardAction.Execute;
+ Result := True;
+ end;
+
+end;
+
+// \83M\83R\83i\83r\82Ì\83\81\83b\83Z\81[\83W\83\8b\81[\83v\82ð\89¡\8eæ\82è\82µ\82Ü\82·
+procedure TGikoForm.HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
+var
+ key : Word;
+ h : Boolean;
+begin
+
+ case Msg.message of
+ WM_KEYFIRST..WM_KEYLAST:
+ if IsDialogMessage(Browser.Handle, Msg) then begin
+ key := Msg.wParam;
+ Handled := BrowserKeyDown( nil, key, KeyDataToShiftState( Msg.lParam ) );
+ Msg.wParam := key;
+ end;
+ end;
+
+end;
+
initialization
OleInitialize(nil);
finalization