| 282 |
procedure IndividualAbonID1ActionExecute(Sender: TObject); |
procedure IndividualAbonID1ActionExecute(Sender: TObject); |
| 283 |
procedure IndividualAbonID0ActionExecute(Sender: TObject); |
procedure IndividualAbonID0ActionExecute(Sender: TObject); |
| 284 |
procedure GikoNaviWebPageActionExecute(Sender: TObject); |
procedure GikoNaviWebPageActionExecute(Sender: TObject); |
| 285 |
procedure MonazillaWebPageActionExecute(Sender: TObject); |
procedure MonazillaWebPageActionExecute(Sender: TObject); |
| 286 |
procedure BBS2chWebPageActionExecute(Sender: TObject); |
procedure BBS2chWebPageActionExecute(Sender: TObject); |
| 287 |
procedure GikoFolderOpenActionExecute(Sender: TObject); |
procedure GikoFolderOpenActionExecute(Sender: TObject); |
| 288 |
procedure AboutActionExecute(Sender: TObject); |
procedure AboutActionExecute(Sender: TObject); |
| 289 |
procedure GikoHelpActionExecute(Sender: TObject); |
procedure GikoHelpActionExecute(Sender: TObject); |
| 290 |
procedure WikiFAQWebPageActionExecute(Sender: TObject); |
procedure WikiFAQWebPageActionExecute(Sender: TObject); |
| 291 |
|
procedure ListNumberVisibleActionExecute(Sender: TObject); |
| 292 |
|
procedure UpFolderActionExecute(Sender: TObject); |
| 293 |
|
procedure UpFolderActionUpdate(Sender: TObject); |
| 294 |
|
procedure IconStyleExecute(Sender: TObject); |
| 295 |
|
procedure AllItemActionExecute(Sender: TObject); |
| 296 |
|
procedure LogItemActionExecute(Sender: TObject); |
| 297 |
|
procedure NewItemActionExecute(Sender: TObject); |
| 298 |
|
procedure ThreadRangeActionExecute(Sender: TObject); |
| 299 |
|
procedure SelectItemActionExecute(Sender: TObject); |
| 300 |
|
procedure ThreadEditorActionExecute(Sender: TObject); |
| 301 |
|
procedure BoardIEActionExecute(Sender: TObject); |
| 302 |
|
procedure SelectItemURLCopyActionExecute(Sender: TObject); |
| 303 |
|
procedure SelectItemURLCopyActionUpdate(Sender: TObject); |
| 304 |
|
procedure SelectItemNameCopyActionExecute(Sender: TObject); |
| 305 |
|
procedure SelectItemNameCopyActionUpdate(Sender: TObject); |
| 306 |
|
procedure SelectItemNameURLCopyActionExecute(Sender: TObject); |
| 307 |
|
procedure SelectListReloadActionExecute(Sender: TObject); |
| 308 |
|
procedure SelectListReloadActionUpdate(Sender: TObject); |
| 309 |
|
procedure SelectThreadReloadActionExecute(Sender: TObject); |
| 310 |
|
procedure SelectThreadReloadActionUpdate(Sender: TObject); |
| 311 |
|
procedure SelectReservActionExecute(Sender: TObject); |
| 312 |
|
procedure SelectReservActionUpdate(Sender: TObject); |
| 313 |
|
procedure SelectNewRoundNameExecute(Sender: TObject); |
| 314 |
|
procedure SelectDeleteRoundExecute(Sender: TObject); |
| 315 |
|
procedure BoardFavoriteAddActionExecute(Sender: TObject); |
| 316 |
|
procedure BoardFavoriteAddActionUpdate(Sender: TObject); |
| 317 |
|
procedure LogFolderOpenActionExecute(Sender: TObject); |
| 318 |
|
procedure LogFolderOpenActionUpdate(Sender: TObject); |
| 319 |
|
procedure BrowsBoradHeadActionExecute(Sender: TObject); |
| 320 |
|
procedure SortActiveColumnActionExecute(Sender: TObject); |
| 321 |
|
procedure SortNextColumnActionExecute(Sender: TObject); |
| 322 |
|
procedure SortPrevColumnActionExecute(Sender: TObject); |
| 323 |
private |
private |
| 324 |
{ Private 宣言 } |
{ Private 宣言 } |
| 325 |
public |
public |
| 346 |
Editor, ListSelect, Search, Option, Round, |
Editor, ListSelect, Search, Option, Round, |
| 347 |
KeySetting, Gesture, Kotehan, ToolBarSetting, |
KeySetting, Gesture, Kotehan, ToolBarSetting, |
| 348 |
ToolBarUtil, NewBoard, HTMLCreate, IndividualAbon, |
ToolBarUtil, NewBoard, HTMLCreate, IndividualAbon, |
| 349 |
GikoBayesian, About, ShellAPI; |
GikoBayesian, About, ShellAPI, Graphics, |
| 350 |
|
RoundName, RoundData, Menus, ListViewUtils; |
| 351 |
|
|
| 352 |
|
|
| 353 |
const |
const |
| 354 |
CAPTION_NAME: string = 'ギコナビ'; |
CAPTION_NAME: string = 'ギコナビ'; |
| 355 |
USER_SETLINKBAR = WM_USER + 2003; |
USER_SETLINKBAR = WM_USER + 2003; |
| 356 |
|
|
| 357 |
|
ITEM_ICON_SORT1 = 12; //ソートアイコン |
| 358 |
|
ITEM_ICON_SORT2 = 13; //ソートアイコン |
| 359 |
|
|
| 360 |
//ツールバーアイコン |
//ツールバーアイコン |
| 361 |
TOOL_ICON_HEIGHT_MAX = 16; //高さ最大アイコン |
TOOL_ICON_HEIGHT_MAX = 16; //高さ最大アイコン |
| 362 |
TOOL_ICON_HEIGHT_MIN = 17; //高さ最小アイコン |
TOOL_ICON_HEIGHT_MIN = 17; //高さ最小アイコン |
| 374 |
URL_2ch: string = 'http://www.2ch.net/'; |
URL_2ch: string = 'http://www.2ch.net/'; |
| 375 |
URL_Wiki: string = 'http://gikowiki.dyndns.info/index.php?FAQ'; |
URL_Wiki: string = 'http://gikowiki.dyndns.info/index.php?FAQ'; |
| 376 |
|
|
| 377 |
|
SELECTCOMBOBOX_NAME: string = ''; // 'スレッド絞込検索'; |
| 378 |
|
SELECTCOMBOBOX_COLOR: TColor = clWindow; |
| 379 |
|
|
| 380 |
{$R *.dfm} |
{$R *.dfm} |
| 381 |
// ************************************************************************* |
// ************************************************************************* |
| 382 |
// TActionでGetActiveContentがnil以外で有効になる |
// TActionでGetActiveContentがnil以外で有効になる |
| 2559 |
GikoSys.OpenBrowser(URL_Wiki, gbtAuto); |
GikoSys.OpenBrowser(URL_Wiki, gbtAuto); |
| 2560 |
end; |
end; |
| 2561 |
////////////////////////////////ヘルプまでおしまい///////////////////// |
////////////////////////////////ヘルプまでおしまい///////////////////// |
| 2562 |
|
// ************************************************************************* |
| 2563 |
|
// リスト番号表示を変更する |
| 2564 |
|
// ************************************************************************* |
| 2565 |
|
procedure TGikoDM.ListNumberVisibleActionExecute(Sender: TObject); |
| 2566 |
|
begin |
| 2567 |
|
GikoSys.Setting.ListViewNo := ListNumberVisibleAction.Checked; |
| 2568 |
|
GikoForm.ListView.Refresh; |
| 2569 |
|
end; |
| 2570 |
|
// ************************************************************************* |
| 2571 |
|
// 上位フォルダに移動する |
| 2572 |
|
// ************************************************************************* |
| 2573 |
|
procedure TGikoDM.UpFolderActionExecute(Sender: TObject); |
| 2574 |
|
begin |
| 2575 |
|
if GikoForm.GetActiveList is TBoard then begin |
| 2576 |
|
if TBoard(GikoForm.GetActiveList).ParentCategory <> nil then |
| 2577 |
|
GikoForm.SelectTreeNode(TBoard(GikoForm.GetActiveList).ParentCategory, True); |
| 2578 |
|
end else if GikoForm.GetActiveList is TCategory then begin |
| 2579 |
|
GikoForm.SelectTreeNode(TCategory(GikoForm.GetActiveList).ParenTBBS, True); |
| 2580 |
|
end; |
| 2581 |
|
end; |
| 2582 |
|
// ************************************************************************* |
| 2583 |
|
// 上位フォルダに移動するUpDateイベント |
| 2584 |
|
// ************************************************************************* |
| 2585 |
|
procedure TGikoDM.UpFolderActionUpdate(Sender: TObject); |
| 2586 |
|
begin |
| 2587 |
|
UpFolderAction.Enabled := not (GikoForm.GetActiveList is TBBS); |
| 2588 |
|
end; |
| 2589 |
|
// ************************************************************************* |
| 2590 |
|
// 表示 表示リストのモード変更 |
| 2591 |
|
// ************************************************************************* |
| 2592 |
|
procedure TGikoDM.IconStyleExecute(Sender: TObject); |
| 2593 |
|
begin |
| 2594 |
|
case GikoForm.ListView.ViewStyle of |
| 2595 |
|
vsIcon: SmallIconAction.Execute; |
| 2596 |
|
vsSmallIcon: ListIconAction.Execute; |
| 2597 |
|
vsList: DetailIconAction.Execute; |
| 2598 |
|
vsReport: LargeIconAction.Execute; |
| 2599 |
|
end; |
| 2600 |
|
end; |
| 2601 |
|
// ************************************************************************* |
| 2602 |
|
// スレッドをすべて表示する |
| 2603 |
|
// ************************************************************************* |
| 2604 |
|
procedure TGikoDM.AllItemActionExecute(Sender: TObject); |
| 2605 |
|
begin |
| 2606 |
|
try |
| 2607 |
|
if GikoForm.ViewType <> gvtAll then |
| 2608 |
|
GikoForm.SetListViewType(gvtAll); |
| 2609 |
|
GikoSys.Setting.ThreadRange := gtrAll; |
| 2610 |
|
AllItemAction.Checked := True; |
| 2611 |
|
// SelectComboBox の履歴を更新しておく |
| 2612 |
|
GikoForm.ModifySelectList; |
| 2613 |
|
// SelectComboBox の値をクリア |
| 2614 |
|
if GikoForm.SelectComboBoxPanel.Visible then begin |
| 2615 |
|
GikoForm.SelectComboBox.Text := SELECTCOMBOBOX_NAME; |
| 2616 |
|
GikoForm.SelectComboBox.Color := SELECTCOMBOBOX_COLOR; |
| 2617 |
|
GikoForm.ListView.SetFocus; |
| 2618 |
|
end; |
| 2619 |
|
except |
| 2620 |
|
end; |
| 2621 |
|
end; |
| 2622 |
|
// ************************************************************************* |
| 2623 |
|
// ログ有りスレッドのみを表示する |
| 2624 |
|
// ************************************************************************* |
| 2625 |
|
procedure TGikoDM.LogItemActionExecute(Sender: TObject); |
| 2626 |
|
begin |
| 2627 |
|
try |
| 2628 |
|
if GikoForm.ViewType <> gvtLog then |
| 2629 |
|
GikoForm.SetListViewType(gvtLog); |
| 2630 |
|
GikoSys.Setting.ThreadRange := gtrLog; |
| 2631 |
|
LogItemAction.Checked := True; |
| 2632 |
|
// SelectComboBox の履歴を更新しておく |
| 2633 |
|
GikoForm.ModifySelectList; |
| 2634 |
|
// SelectComboBox の値をクリア |
| 2635 |
|
if GikoForm.SelectComboBoxPanel.Visible then begin |
| 2636 |
|
GikoForm.SelectComboBox.Text := SELECTCOMBOBOX_NAME; |
| 2637 |
|
GikoForm.SelectComboBox.Color := SELECTCOMBOBOX_COLOR; |
| 2638 |
|
GikoForm.ListView.SetFocus; |
| 2639 |
|
end; |
| 2640 |
|
except |
| 2641 |
|
end; |
| 2642 |
|
end; |
| 2643 |
|
// ************************************************************************* |
| 2644 |
|
// 新着スレッドのみ表示する |
| 2645 |
|
// ************************************************************************* |
| 2646 |
|
procedure TGikoDM.NewItemActionExecute(Sender: TObject); |
| 2647 |
|
begin |
| 2648 |
|
try |
| 2649 |
|
|
| 2650 |
|
if GikoForm.ViewType <> gvtNew then |
| 2651 |
|
GikoForm.SetListViewType(gvtNew); |
| 2652 |
|
GikoSys.Setting.ThreadRange := gtrNew; |
| 2653 |
|
NewItemAction.Checked := True; |
| 2654 |
|
// SelectComboBox の履歴を更新しておく |
| 2655 |
|
GikoForm.ModifySelectList; |
| 2656 |
|
// SelectComboBox の値をクリア |
| 2657 |
|
if GikoForm.SelectComboBoxPanel.Visible then begin |
| 2658 |
|
GikoForm.SelectComboBox.Text := SELECTCOMBOBOX_NAME; |
| 2659 |
|
GikoForm.SelectComboBox.Color := SELECTCOMBOBOX_COLOR; |
| 2660 |
|
GikoForm.ListView.SetFocus; |
| 2661 |
|
end; |
| 2662 |
|
except |
| 2663 |
|
end; |
| 2664 |
|
end; |
| 2665 |
|
// ************************************************************************* |
| 2666 |
|
// スレッドの表示範囲を設定 |
| 2667 |
|
// ************************************************************************* |
| 2668 |
|
procedure TGikoDM.ThreadRangeActionExecute(Sender: TObject); |
| 2669 |
|
begin |
| 2670 |
|
case GikoSys.Setting.ThreadRange of |
| 2671 |
|
gtrAll: AllItemAction.Execute; |
| 2672 |
|
gtrLog: LogItemAction.Execute; |
| 2673 |
|
gtrNew: NewItemAction.Execute; |
| 2674 |
|
end; |
| 2675 |
|
end; |
| 2676 |
|
// ************************************************************************* |
| 2677 |
|
// スレッド絞込みダイアログを表示する |
| 2678 |
|
// ************************************************************************* |
| 2679 |
|
procedure TGikoDM.SelectItemActionExecute(Sender: TObject); |
| 2680 |
|
var |
| 2681 |
|
idx: Integer; |
| 2682 |
|
Dlg: TListSelectDialog; |
| 2683 |
|
begin |
| 2684 |
|
try |
| 2685 |
|
if GikoForm.SelectComboBoxPanel.Visible then begin |
| 2686 |
|
if GikoForm.SelectComboBoxPanel.Left + GikoForm.SelectComboBoxPanel.Width < GikoForm.ListToolBar.Width then begin |
| 2687 |
|
// SelectComboBox がある場合はフォーカスを移す |
| 2688 |
|
if GikoSys.Setting.ListOrientation = gloHorizontal then begin |
| 2689 |
|
if GikoSys.Setting.ListWidthState = glsMax then |
| 2690 |
|
BrowserMinAction.Execute; |
| 2691 |
|
end else begin |
| 2692 |
|
if GikoSys.Setting.ListHeightState = glsMax then |
| 2693 |
|
BrowserMinAction.Execute; |
| 2694 |
|
end; |
| 2695 |
|
GikoForm.SelectComboBox.SetFocus; |
| 2696 |
|
exit; |
| 2697 |
|
end; |
| 2698 |
|
end; |
| 2699 |
|
except |
| 2700 |
|
end; |
| 2701 |
|
|
| 2702 |
|
if GikoForm.SelectComboBox.Text = SELECTCOMBOBOX_NAME then begin |
| 2703 |
|
GikoForm.SelectComboBox.Text := ''; |
| 2704 |
|
GikoForm.SelectComboBox.Color := clWindow; |
| 2705 |
|
end; |
| 2706 |
|
|
| 2707 |
|
AllItemAction.Checked := False; |
| 2708 |
|
LogItemAction.Checked := False; |
| 2709 |
|
NewItemAction.Checked := False; |
| 2710 |
|
//SelectItemAction.Checked := True; |
| 2711 |
|
GikoForm.ModifySelectList; |
| 2712 |
|
Dlg := TListSelectDialog.Create(Self); |
| 2713 |
|
try |
| 2714 |
|
Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList); |
| 2715 |
|
Dlg.SelectComboBox.Text := GikoForm.SelectComboBox.Text; |
| 2716 |
|
Dlg.ShowModal; |
| 2717 |
|
if Dlg.ModalResult = mrCancel then begin |
| 2718 |
|
if Length( GikoForm.SelectComboBox.Text ) = 0 then begin |
| 2719 |
|
AllItemAction.Checked := True; |
| 2720 |
|
GikoForm.SelectComboBox.Text := SELECTCOMBOBOX_NAME; |
| 2721 |
|
GikoForm.SelectComboBox.Color := SELECTCOMBOBOX_COLOR; |
| 2722 |
|
end; |
| 2723 |
|
|
| 2724 |
|
if GikoForm.GetActiveList is TBoard then |
| 2725 |
|
GikoForm.SetListViewType(gvtUser, TBoard(GikoForm.GetActiveList).ParentCategory.ParenTBBS.SelectText , Dlg.KubetsuCheckBox.Checked); |
| 2726 |
|
end else begin |
| 2727 |
|
idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text); |
| 2728 |
|
if idx <> -1 then |
| 2729 |
|
GikoSys.Setting.SelectTextList.Delete(idx); |
| 2730 |
|
GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text); |
| 2731 |
|
while Dlg.SelectComboBox.Items.Count > 100 do begin |
| 2732 |
|
Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1); |
| 2733 |
|
end; |
| 2734 |
|
|
| 2735 |
|
if Length( Dlg.SelectComboBox.Text ) = 0 then begin |
| 2736 |
|
GikoForm.SelectComboBox.Text := SELECTCOMBOBOX_NAME; |
| 2737 |
|
GikoForm.SelectComboBox.Color := SELECTCOMBOBOX_COLOR; |
| 2738 |
|
end else begin |
| 2739 |
|
GikoForm.SelectComboBox.Text := Dlg.SelectComboBox.Text; |
| 2740 |
|
GikoForm.SelectComboBox.Color := clWindow; |
| 2741 |
|
end; |
| 2742 |
|
GikoForm.SetListViewType(gvtUser, Dlg.SelectComboBox.Text, Dlg.KubetsuCheckBox.Checked); |
| 2743 |
|
end; |
| 2744 |
|
finally |
| 2745 |
|
Dlg.Release; |
| 2746 |
|
end; |
| 2747 |
|
end; |
| 2748 |
|
// ************************************************************************* |
| 2749 |
|
// 新スレ書き込みウィンドウを表示する |
| 2750 |
|
// ************************************************************************* |
| 2751 |
|
procedure TGikoDM.ThreadEditorActionExecute(Sender: TObject); |
| 2752 |
|
var |
| 2753 |
|
Editor: TEditorForm; |
| 2754 |
|
begin |
| 2755 |
|
if not (GikoForm.GetActiveList is TBoard) then |
| 2756 |
|
Exit; |
| 2757 |
|
Editor := TEditorForm.Create(GikoForm); |
| 2758 |
|
Editor.SetBoard(TBoard(GikoForm.GetActiveList)); |
| 2759 |
|
Editor.Show; |
| 2760 |
|
Editor.BodyEdit.SetFocus; |
| 2761 |
|
end; |
| 2762 |
|
// ************************************************************************* |
| 2763 |
|
// 現在表示している板をブラウザで表示する |
| 2764 |
|
// ************************************************************************* |
| 2765 |
|
procedure TGikoDM.BoardIEActionExecute(Sender: TObject); |
| 2766 |
|
var |
| 2767 |
|
URL: string; |
| 2768 |
|
begin |
| 2769 |
|
if GikoForm.GetActiveList is TBoard then begin |
| 2770 |
|
URL := TBoard(GikoForm.GetActiveList).URL; |
| 2771 |
|
GikoSys.OpenBrowser(URL, gbtAuto); |
| 2772 |
|
end; |
| 2773 |
|
end; |
| 2774 |
|
// ************************************************************************* |
| 2775 |
|
// 選択されているスレッドのURLをコピーする |
| 2776 |
|
// ************************************************************************* |
| 2777 |
|
procedure TGikoDM.SelectItemURLCopyActionExecute(Sender: TObject); |
| 2778 |
|
var |
| 2779 |
|
List: TList; |
| 2780 |
|
i: Integer; |
| 2781 |
|
s: string; |
| 2782 |
|
begin |
| 2783 |
|
s := ''; |
| 2784 |
|
List := TList.Create; |
| 2785 |
|
try |
| 2786 |
|
GikoForm.SelectListItem(List); |
| 2787 |
|
for i := 0 to List.Count - 1 do begin |
| 2788 |
|
if TObject(List[i]) is TBoard then |
| 2789 |
|
s := s + TBoard(List[i]).URL + #13#10 |
| 2790 |
|
else if TObject(List[i]) is TThreadItem then |
| 2791 |
|
s := s + TThreadItem(List[i]).URL + #13#10; |
| 2792 |
|
end; |
| 2793 |
|
if s <> '' then |
| 2794 |
|
Clipboard.AsText := s; |
| 2795 |
|
finally |
| 2796 |
|
List.Free; |
| 2797 |
|
end; |
| 2798 |
|
end; |
| 2799 |
|
// ************************************************************************* |
| 2800 |
|
// 選択されているスレッドのURLをコピーするUpdateイベント |
| 2801 |
|
// ************************************************************************* |
| 2802 |
|
procedure TGikoDM.SelectItemURLCopyActionUpdate(Sender: TObject); |
| 2803 |
|
begin |
| 2804 |
|
if ((GikoForm.GetActiveList is TBoard) or |
| 2805 |
|
(GikoForm.GetActiveList is TCategory))and (GikoForm.ListView.SelCount > 0) then |
| 2806 |
|
TAction(Sender).Enabled := True |
| 2807 |
|
else |
| 2808 |
|
TAction(Sender).Enabled := False; |
| 2809 |
|
end; |
| 2810 |
|
// ************************************************************************* |
| 2811 |
|
// 選択されている板の名前をコピーする |
| 2812 |
|
// ************************************************************************* |
| 2813 |
|
procedure TGikoDM.SelectItemNameCopyActionExecute(Sender: TObject); |
| 2814 |
|
var |
| 2815 |
|
List: TList; |
| 2816 |
|
i: Integer; |
| 2817 |
|
s: string; |
| 2818 |
|
begin |
| 2819 |
|
s := ''; |
| 2820 |
|
List := TList.Create; |
| 2821 |
|
try |
| 2822 |
|
GikoForm.SelectListItem(List); |
| 2823 |
|
for i := 0 to List.Count - 1 do begin |
| 2824 |
|
if TObject(List[i]) is TBoard then |
| 2825 |
|
s := s + TBoard(List[i]).Title + #13#10 |
| 2826 |
|
else if TObject(List[i]) is TThreadItem then |
| 2827 |
|
s := s + TThreadItem(List[i]).Title + #13#10; |
| 2828 |
|
end; |
| 2829 |
|
if s <> '' then |
| 2830 |
|
Clipboard.AsText := s; |
| 2831 |
|
finally |
| 2832 |
|
List.Free; |
| 2833 |
|
end; |
| 2834 |
|
end; |
| 2835 |
|
// ************************************************************************* |
| 2836 |
|
// 選択されている板の名前をコピーするUpdateイベント |
| 2837 |
|
// ************************************************************************* |
| 2838 |
|
procedure TGikoDM.SelectItemNameCopyActionUpdate(Sender: TObject); |
| 2839 |
|
begin |
| 2840 |
|
if ((GikoForm.GetActiveList is TBoard) or |
| 2841 |
|
(GikoForm.GetActiveList is TCategory))and (GikoForm.ListView.SelCount > 0) then |
| 2842 |
|
TAction(Sender).Enabled := True |
| 2843 |
|
else |
| 2844 |
|
TAction(Sender).Enabled := False; |
| 2845 |
|
end; |
| 2846 |
|
// ************************************************************************* |
| 2847 |
|
// 選択されているスレッドの名前とURLをコピーする |
| 2848 |
|
// ************************************************************************* |
| 2849 |
|
procedure TGikoDM.SelectItemNameURLCopyActionExecute(Sender: TObject); |
| 2850 |
|
var |
| 2851 |
|
List: TList; |
| 2852 |
|
i: Integer; |
| 2853 |
|
s: string; |
| 2854 |
|
begin |
| 2855 |
|
s := ''; |
| 2856 |
|
List := TList.Create; |
| 2857 |
|
try |
| 2858 |
|
GikoForm.SelectListItem(List); |
| 2859 |
|
for i := 0 to List.Count - 1 do begin |
| 2860 |
|
if TObject(List[i]) is TBoard then |
| 2861 |
|
s := s + TBoard(List[i]).Title + #13#10 + TBoard(List[i]).URL + #13#10 |
| 2862 |
|
else if TObject(List[i]) is TThreadItem then |
| 2863 |
|
s := s + TThreadItem(List[i]).Title + #13#10 + TThreadItem(List[i]).URL + #13#10; |
| 2864 |
|
end; |
| 2865 |
|
if s <> '' then |
| 2866 |
|
Clipboard.AsText := s; |
| 2867 |
|
finally |
| 2868 |
|
List.Free; |
| 2869 |
|
end; |
| 2870 |
|
end; |
| 2871 |
|
// ************************************************************************* |
| 2872 |
|
// 選択されているスレッド一覧をダウンロードする |
| 2873 |
|
// ************************************************************************* |
| 2874 |
|
procedure TGikoDM.SelectListReloadActionExecute(Sender: TObject); |
| 2875 |
|
var |
| 2876 |
|
i: Integer; |
| 2877 |
|
List: TList; |
| 2878 |
|
msg: string; |
| 2879 |
|
shiftDown: Boolean; |
| 2880 |
|
begin |
| 2881 |
|
shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001); |
| 2882 |
|
if GikoForm.GetActiveList is TCategory then begin |
| 2883 |
|
List := TList.Create; |
| 2884 |
|
try |
| 2885 |
|
GikoForm.SelectListItem(List); |
| 2886 |
|
if List.Count > 5 then begin |
| 2887 |
|
msg := '5個以上は指定できません' + #13#10 |
| 2888 |
|
+ '2ちゃんねる負荷軽減にご協力ください'; |
| 2889 |
|
MsgBox(GikoForm.Handle, msg, '警告', MB_ICONEXCLAMATION); |
| 2890 |
|
Exit; |
| 2891 |
|
end; |
| 2892 |
|
for i := 0 to List.Count - 1 do begin |
| 2893 |
|
if TObject(List[i]) is TBoard then |
| 2894 |
|
GikoForm.DownloadList(TBoard(List[i]), shiftDown); |
| 2895 |
|
end; |
| 2896 |
|
finally |
| 2897 |
|
List.Free; |
| 2898 |
|
end; |
| 2899 |
|
end else if GikoForm.GetActiveList is TBoard then begin |
| 2900 |
|
GikoForm.DownloadList(TBoard(GikoForm.GetActiveList), shiftDown); |
| 2901 |
|
end; |
| 2902 |
|
end; |
| 2903 |
|
// ************************************************************************* |
| 2904 |
|
// 選択されているスレッド一覧をダウンロードするUpdateイベント |
| 2905 |
|
// ************************************************************************* |
| 2906 |
|
procedure TGikoDM.SelectListReloadActionUpdate(Sender: TObject); |
| 2907 |
|
begin |
| 2908 |
|
if (GikoForm.GetActiveList is TCategory) and (GikoForm.ListView.SelCount > 0) then |
| 2909 |
|
TAction(Sender).Enabled := True |
| 2910 |
|
else if GikoForm.GetActiveList is TBoard then |
| 2911 |
|
TAction(Sender).Enabled := True |
| 2912 |
|
else |
| 2913 |
|
TAction(Sender).Enabled := False; |
| 2914 |
|
end; |
| 2915 |
|
// ************************************************************************* |
| 2916 |
|
// 選択されているスレッドをダウンロードする |
| 2917 |
|
// ************************************************************************* |
| 2918 |
|
procedure TGikoDM.SelectThreadReloadActionExecute(Sender: TObject); |
| 2919 |
|
var |
| 2920 |
|
List: TList; |
| 2921 |
|
i: Integer; |
| 2922 |
|
msg: string; |
| 2923 |
|
shiftDown: Boolean; |
| 2924 |
|
begin |
| 2925 |
|
shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001); |
| 2926 |
|
List := TList.Create; |
| 2927 |
|
try |
| 2928 |
|
GikoForm.SelectListItem(List); |
| 2929 |
|
if List.Count > 10 then begin |
| 2930 |
|
msg := '10個以上は指定できません' + #13#10 |
| 2931 |
|
+ '2ちゃんねる負荷軽減にご協力ください'; |
| 2932 |
|
MsgBox(GikoForm.Handle, msg, '警告', MB_ICONEXCLAMATION); |
| 2933 |
|
Exit; |
| 2934 |
|
end; |
| 2935 |
|
for i := 0 to List.Count - 1 do begin |
| 2936 |
|
if TObject(List[i]) is TThreadItem then |
| 2937 |
|
GikoForm.DownloadContent(TThreadItem(List[i]), shiftDown); |
| 2938 |
|
end; |
| 2939 |
|
finally |
| 2940 |
|
List.Free; |
| 2941 |
|
end; |
| 2942 |
|
end; |
| 2943 |
|
// ************************************************************************* |
| 2944 |
|
// 選択されているスレッドをダウンロードするUpdateイベント |
| 2945 |
|
// ************************************************************************* |
| 2946 |
|
procedure TGikoDM.SelectThreadReloadActionUpdate(Sender: TObject); |
| 2947 |
|
begin |
| 2948 |
|
TAction(Sender).Enabled := |
| 2949 |
|
(GikoForm.GetActiveList is TBoard) and (GikoForm.ListView.SelCount > 0); |
| 2950 |
|
end; |
| 2951 |
|
// ************************************************************************* |
| 2952 |
|
// スレッド巡回予約 |
| 2953 |
|
// ************************************************************************* |
| 2954 |
|
procedure TGikoDM.SelectReservActionExecute(Sender: TObject); |
| 2955 |
|
begin |
| 2956 |
|
//INFO 2005/11/19 ダミー? by もじゅ |
| 2957 |
|
// このコメント削除しては駄目 |
| 2958 |
|
end; |
| 2959 |
|
// ************************************************************************* |
| 2960 |
|
// スレッド巡回予約Updateイベント |
| 2961 |
|
// ************************************************************************* |
| 2962 |
|
procedure TGikoDM.SelectReservActionUpdate(Sender: TObject); |
| 2963 |
|
var |
| 2964 |
|
i: Integer; |
| 2965 |
|
List: TList; |
| 2966 |
|
begin |
| 2967 |
|
if (GikoForm.GetActiveList is TBoard) and (GikoForm.ListView.SelCount > 0) then begin |
| 2968 |
|
List := TList.Create; |
| 2969 |
|
try |
| 2970 |
|
GikoForm.SelectListItem(List); |
| 2971 |
|
for i := 0 to List.Count - 1 do begin |
| 2972 |
|
if TObject(List[i]) is TThreadItem then begin |
| 2973 |
|
if TThreadItem(List[i]).IsLogFile then begin |
| 2974 |
|
SelectReservAction.Enabled := True; |
| 2975 |
|
Exit; |
| 2976 |
|
end; |
| 2977 |
|
end; |
| 2978 |
|
end; |
| 2979 |
|
SelectReservAction.Enabled := False; |
| 2980 |
|
finally |
| 2981 |
|
List.Free; |
| 2982 |
|
end; |
| 2983 |
|
end else if (GikoForm.GetActiveList is TCategory) and (GikoForm.ListView.SelCount > 0) then |
| 2984 |
|
SelectReservAction.Enabled := True |
| 2985 |
|
else |
| 2986 |
|
SelectReservAction.Enabled := False; |
| 2987 |
|
end; |
| 2988 |
|
// ************************************************************************* |
| 2989 |
|
// 選択しているスレッドに新しい名前で巡回予約 |
| 2990 |
|
// ************************************************************************* |
| 2991 |
|
procedure TGikoDM.SelectNewRoundNameExecute(Sender: TObject); |
| 2992 |
|
var |
| 2993 |
|
s: string; |
| 2994 |
|
Dlg: TRoundNameDialog; |
| 2995 |
|
cnt: Integer; |
| 2996 |
|
|
| 2997 |
|
begin |
| 2998 |
|
//呼び出し元が、TActionでListViewに選択がいなければ、EXITする |
| 2999 |
|
if (Sender is TAction) and (GikoForm.ListView.Selected = nil) then |
| 3000 |
|
Exit; |
| 3001 |
|
|
| 3002 |
|
//登録上限チェック |
| 3003 |
|
cnt := RoundList.Count[grtBoard]; |
| 3004 |
|
cnt := cnt + RoundList.Count[grtItem]; |
| 3005 |
|
if cnt > 500 then begin |
| 3006 |
|
MsgBox(GikoForm.Handle, '巡回は500以上登録できません', 'エラー', MB_OK or MB_ICONSTOP); |
| 3007 |
|
Exit; |
| 3008 |
|
end; |
| 3009 |
|
|
| 3010 |
|
Dlg := TRoundNameDialog.Create(Self); |
| 3011 |
|
try |
| 3012 |
|
Dlg.ShowModal; |
| 3013 |
|
if Dlg.ModalResult <> mrCancel then begin |
| 3014 |
|
s := Trim(Dlg.RoundNameEdit.Text); |
| 3015 |
|
if (Sender is TMenuItem) then begin |
| 3016 |
|
GikoForm.SetSelectItemRound(True, s, TMenuItem(Sender).Parent.Name); |
| 3017 |
|
end else if (Sender is TAction) then begin |
| 3018 |
|
if (GikoForm.ListView.Selected <> nil) then begin |
| 3019 |
|
if (TObject(GikoForm.ListView.Selected.Data) is TThreadItem) then begin |
| 3020 |
|
GikoForm.SetSelectItemRound(True, s, |
| 3021 |
|
TThreadItem(GikoForm.ListView.Selected.Data).Title); |
| 3022 |
|
end else if (TObject(GikoForm.ListView.Selected.Data) is TBoard) then begin |
| 3023 |
|
GikoForm.SetSelectItemRound(True, s, |
| 3024 |
|
TBoard(GikoForm.ListView.Selected.Data).Title); |
| 3025 |
|
end; |
| 3026 |
|
end; |
| 3027 |
|
end; |
| 3028 |
|
GikoForm.ListView.Refresh; |
| 3029 |
|
end; |
| 3030 |
|
finally |
| 3031 |
|
Dlg.Free; |
| 3032 |
|
end; |
| 3033 |
|
end; |
| 3034 |
|
// ************************************************************************* |
| 3035 |
|
// 選択されていスレッドの巡回を削除する |
| 3036 |
|
// ************************************************************************* |
| 3037 |
|
procedure TGikoDM.SelectDeleteRoundExecute(Sender: TObject); |
| 3038 |
|
var |
| 3039 |
|
s : String; |
| 3040 |
|
begin |
| 3041 |
|
if (Sender is TMenuItem) then begin |
| 3042 |
|
try |
| 3043 |
|
GikoForm.SetSelectItemRound(False, '', TMenuItem(Sender).Parent.Name); |
| 3044 |
|
except |
| 3045 |
|
end; |
| 3046 |
|
end else if (Sender is TAction) then begin |
| 3047 |
|
try |
| 3048 |
|
if GikoForm.ListView.Selected <> nil then begin |
| 3049 |
|
if (TObject(GikoForm.ListView.Selected.Data) is TThreadItem) then begin |
| 3050 |
|
s := TThreadItem(GikoForm.ListView.Selected.Data).Title; |
| 3051 |
|
end else if (TObject(GikoForm.ListView.Selected.Data) is TBoard) then begin |
| 3052 |
|
s := TBoard(GikoForm.ListView.Selected.Data).Title; |
| 3053 |
|
end; |
| 3054 |
|
GikoForm.SetSelectItemRound(False, '', s); |
| 3055 |
|
|
| 3056 |
|
end; |
| 3057 |
|
except |
| 3058 |
|
end; |
| 3059 |
|
end; |
| 3060 |
|
GikoForm.ListView.Refresh; |
| 3061 |
|
end; |
| 3062 |
|
// ************************************************************************* |
| 3063 |
|
// 選択されている板をお気に入りに追加する |
| 3064 |
|
// ************************************************************************* |
| 3065 |
|
procedure TGikoDM.BoardFavoriteAddActionExecute(Sender: TObject); |
| 3066 |
|
begin |
| 3067 |
|
if TObject(GikoForm.ListView.Selected.Data) is TBoard then |
| 3068 |
|
GikoForm.ShowFavoriteAddDialog(TObject(GikoForm.ListView.Selected.Data)); |
| 3069 |
|
end; |
| 3070 |
|
// ************************************************************************* |
| 3071 |
|
// 選択されている板をお気に入りに追加するUpdateイベント |
| 3072 |
|
// ************************************************************************* |
| 3073 |
|
procedure TGikoDM.BoardFavoriteAddActionUpdate(Sender: TObject); |
| 3074 |
|
begin |
| 3075 |
|
BoardFavoriteAddAction.Enabled := |
| 3076 |
|
(GikoForm.GetActiveList is TCategory) and (GikoForm.ListView.SelCount > 0); |
| 3077 |
|
end; |
| 3078 |
|
// ************************************************************************* |
| 3079 |
|
// ExplorerでLogフォルダを開く |
| 3080 |
|
// ************************************************************************* |
| 3081 |
|
procedure TGikoDM.LogFolderOpenActionExecute(Sender: TObject); |
| 3082 |
|
var |
| 3083 |
|
List: TList; |
| 3084 |
|
begin |
| 3085 |
|
if ((GikoSys.Setting.ListOrientation = gloVertical) and |
| 3086 |
|
(GikoSys.Setting.ListHeightState = glsMax)) or |
| 3087 |
|
((GikoSys.Setting.ListOrientation = gloHorizontal) and |
| 3088 |
|
(GikoSys.Setting.ListWidthState = glsMax)) then begin |
| 3089 |
|
if(GikoForm.GetActiveContent <> nil) then begin |
| 3090 |
|
GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(GikoForm.GetActiveContent.FilePath) + '"'); |
| 3091 |
|
end; |
| 3092 |
|
end else if GikoForm.GetActiveList is TCategory then begin |
| 3093 |
|
List := TList.Create; |
| 3094 |
|
try |
| 3095 |
|
GikoForm.SelectListItem(List); |
| 3096 |
|
GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(TBoard(List[0]).FilePath) + '"'); |
| 3097 |
|
finally |
| 3098 |
|
List.Free; |
| 3099 |
|
end; |
| 3100 |
|
end else if GikoForm.GetActiveList is TBoard then begin |
| 3101 |
|
GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(TBoard(GikoForm.GetActiveList).FilePath) + '"'); |
| 3102 |
|
end; |
| 3103 |
|
|
| 3104 |
|
end; |
| 3105 |
|
// ************************************************************************* |
| 3106 |
|
// ActiveListがTBoardかTCategoryでスレ一覧で1つ以上選択していると有効になるActionde共通 |
| 3107 |
|
// ************************************************************************* |
| 3108 |
|
procedure TGikoDM.LogFolderOpenActionUpdate(Sender: TObject); |
| 3109 |
|
begin |
| 3110 |
|
if ((GikoForm.GetActiveList is TBoard) or (GikoForm.GetActiveList is TCategory)) |
| 3111 |
|
and (GikoForm.ListView.SelCount > 0) then |
| 3112 |
|
TAction(Sender).Enabled := True |
| 3113 |
|
else |
| 3114 |
|
TAction(Sender).Enabled := False; |
| 3115 |
|
end; |
| 3116 |
|
// ************************************************************************* |
| 3117 |
|
// Header.txtをブラウザで表示する |
| 3118 |
|
// ************************************************************************* |
| 3119 |
|
procedure TGikoDM.BrowsBoradHeadActionExecute(Sender: TObject); |
| 3120 |
|
var |
| 3121 |
|
RefURL, URL : string; |
| 3122 |
|
List : TList; |
| 3123 |
|
begin |
| 3124 |
|
RefURL := ''; |
| 3125 |
|
if GikoForm.GetActiveList is TCategory then begin |
| 3126 |
|
List := TList.Create; |
| 3127 |
|
try |
| 3128 |
|
GikoForm.SelectListItem(List); |
| 3129 |
|
RefURL := TBoard(List[0]).URL; |
| 3130 |
|
finally |
| 3131 |
|
List.Free; |
| 3132 |
|
end; |
| 3133 |
|
end else if GikoForm.GetActiveList is TBoard then begin |
| 3134 |
|
RefURL := TBoard(GikoForm.GetActiveList).URL |
| 3135 |
|
end; |
| 3136 |
|
if RefURL <> '' then begin |
| 3137 |
|
if RefURL[Length(RefURL)] <> '/' then |
| 3138 |
|
URL := RefURL + '/' + 'head.txt' |
| 3139 |
|
else |
| 3140 |
|
URL := RefURL + 'head.txt'; |
| 3141 |
|
|
| 3142 |
|
GikoForm.MoveToURL(URL); |
| 3143 |
|
end else begin |
| 3144 |
|
ShowMessage('板を特定できませんでした。'); |
| 3145 |
|
end; |
| 3146 |
|
|
| 3147 |
|
end; |
| 3148 |
|
// ************************************************************************* |
| 3149 |
|
// 現在のカラムをソートする |
| 3150 |
|
// ************************************************************************* |
| 3151 |
|
procedure TGikoDM.SortActiveColumnActionExecute(Sender: TObject); |
| 3152 |
|
var |
| 3153 |
|
i : Integer; |
| 3154 |
|
so : boolean; |
| 3155 |
|
si : Integer; |
| 3156 |
|
begin |
| 3157 |
|
for i := 0 to GikoForm.ListView.Columns.Count - 1 do begin |
| 3158 |
|
if (GikoForm.ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT1) or |
| 3159 |
|
(GikoForm.ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT2) then begin |
| 3160 |
|
GikoForm.SortOrder := not GikoForm.SortOrder; |
| 3161 |
|
so := GikoForm.SortOrder; |
| 3162 |
|
si := GikoForm.SortIndex; |
| 3163 |
|
TListViewUtils.ListViewSort(nil, GikoForm.ListView, |
| 3164 |
|
GikoForm.ListView.Column[ i ], ListNumberVisibleAction.Checked, |
| 3165 |
|
so, si ); |
| 3166 |
|
GikoForm.SortIndex := si; |
| 3167 |
|
GikoForm.SortOrder := so; |
| 3168 |
|
break; |
| 3169 |
|
end; |
| 3170 |
|
end; |
| 3171 |
|
end; |
| 3172 |
|
// ************************************************************************* |
| 3173 |
|
// 右隣のカラムをソート |
| 3174 |
|
// ************************************************************************* |
| 3175 |
|
procedure TGikoDM.SortNextColumnActionExecute(Sender: TObject); |
| 3176 |
|
var |
| 3177 |
|
i, id : Integer; |
| 3178 |
|
so : boolean; |
| 3179 |
|
si : Integer; |
| 3180 |
|
begin |
| 3181 |
|
for i := 0 to GikoForm.ListView.Columns.Count - 1 do begin |
| 3182 |
|
if (GikoForm.ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT1) or |
| 3183 |
|
(GikoForm.ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT2) then begin |
| 3184 |
|
id := i + 1; |
| 3185 |
|
if id > GikoForm.ListView.Columns.Count - 1 then |
| 3186 |
|
id := 0; |
| 3187 |
|
GikoForm.SortOrder := id = 0; |
| 3188 |
|
so := GikoForm.SortOrder; |
| 3189 |
|
si := GikoForm.SortIndex; |
| 3190 |
|
TListViewUtils.ListViewSort( nil, GikoForm.ListView, |
| 3191 |
|
GikoForm.ListView.Column[ id ], ListNumberVisibleAction.Checked, |
| 3192 |
|
so, si ); |
| 3193 |
|
GikoForm.SortIndex := si; |
| 3194 |
|
GikoForm.SortOrder := so; |
| 3195 |
|
break; |
| 3196 |
|
end; |
| 3197 |
|
end; |
| 3198 |
|
end; |
| 3199 |
|
// ************************************************************************* |
| 3200 |
|
// 左隣のカラムをソート |
| 3201 |
|
// ************************************************************************* |
| 3202 |
|
procedure TGikoDM.SortPrevColumnActionExecute(Sender: TObject); |
| 3203 |
|
var |
| 3204 |
|
i, id : Integer; |
| 3205 |
|
so : boolean; |
| 3206 |
|
si : Integer; |
| 3207 |
|
begin |
| 3208 |
|
for i := 0 to GikoForm.ListView.Columns.Count - 1 do begin |
| 3209 |
|
if (GikoForm.ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT1) or |
| 3210 |
|
(GikoForm.ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT2) then begin |
| 3211 |
|
id := i - 1; |
| 3212 |
|
if id < 0 then |
| 3213 |
|
id := GikoForm.ListView.Columns.Count - 1; |
| 3214 |
|
GikoForm.SortOrder := id = 0; |
| 3215 |
|
so := GikoForm.SortOrder; |
| 3216 |
|
si := GikoForm.SortIndex; |
| 3217 |
|
TListViewUtils.ListViewSort( nil, GikoForm.ListView, |
| 3218 |
|
GikoForm.ListView.Column[ id ], ListNumberVisibleAction.Checked, |
| 3219 |
|
so, si ); |
| 3220 |
|
GikoForm.SortIndex := si; |
| 3221 |
|
GikoForm.SortOrder := so; |
| 3222 |
|
break; |
| 3223 |
|
end; |
| 3224 |
|
end; |
| 3225 |
|
end; |
| 3226 |
|
////////////////////////////////板までおしまい///////////////////// |
| 3227 |
end. |
end. |
| 3228 |
|
|