├── .gitignore
├── README
└── cubepdf-viewer
├── CanvasPolicy.cs
├── CustomToolStripRenderer.cs
├── Jacksonsoft.CustomTabControl.dll
├── MainForm.Designer.cs
├── MainForm.cs
├── MainForm.resx
├── MenuDialog.Designer.cs
├── MenuDialog.cs
├── MenuDialog.resx
├── PDFLibNet.dll
├── PasswordDialog.Designer.cs
├── PasswordDialog.cs
├── PasswordDialog.resx
├── Program.cs
├── Properties
├── AssemblyInfo.cs
├── Resources.Designer.cs
├── Resources.resx
├── Settings.Designer.cs
└── Settings.settings
├── RawPrinterHelper.cs
├── Resources
├── arrow_first.png
├── arrow_first_over.png
├── arrow_first_press.png
├── arrow_last.png
├── arrow_last_over.png
├── arrow_last_press.png
├── arrow_next.png
├── arrow_next_over.png
├── arrow_next_press.png
├── arrow_prev.png
├── arrow_prev_over.png
├── arrow_prev_press.png
├── background.png
├── background_tab.png
├── cubepdf-file.ico
├── cubepdf-viewer.ico
├── fit2height.png
├── fit2height_over.png
├── fit2height_press.png
├── fit2width.png
├── fit2width_over.png
├── fit2width_press.png
├── hand_move.cur
├── hidemenu.png
├── hidemenu_over.png
├── hidemenu_press.png
├── icon.png
├── logo.png
├── logo_over.png
├── logo_press.png
├── open.png
├── open_over.png
├── open_press.png
├── print.png
├── print_over.png
├── print_press.png
├── search.png
├── search_over.png
├── search_press.png
├── thumbnail.png
├── thumbnail_over.png
├── thumbnail_press.png
├── title.png
├── zoomin.png
├── zoomin_over.png
├── zoomin_press.png
├── zoomout.png
├── zoomout_over.png
└── zoomout_press.png
├── SearchArgs.cs
├── Thumbnail.cs
├── UserSetting.cs
├── Utility.cs
├── VersionDialog.Designer.cs
├── VersionDialog.cs
├── VersionDialog.resx
├── app.config
├── cubepdf-viewer.csproj
├── cubepdf-viewer.csproj.user
├── cubepdf-viewer.ico
├── cubepdf-viewer.sln
├── cubepdf-viewer2008.csproj
└── cubepdf-viewer2008.sln
/.gitignore:
--------------------------------------------------------------------------------
1 | # cubepdf-viewer
2 | cubepdf-viewer/obj
3 | cubepdf-viewer/bin
4 |
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | ------------------------------------------------------------
2 | CubePDF Viewer
3 | Copyright (c) 2010 CubeSoft Inc. All rights reserved.
4 |
5 | 開発・配布:株式会社キューブ・ソフト
6 | Mailto: support@cube-soft.jp
7 | URL: http://www.cube-soft.jp/cubepdfviewer/
8 |
9 | Last-updated: Mon 29 Nov 2010 11:54:00 JST
10 | ------------------------------------------------------------
11 |
12 | ■What's this
13 | CubePDF Viewer は、閲覧機能に特化したタブ型の PDF ビューア(閲覧)ソフトです。
14 | 詳細な利用方法については、同梱した CubePDF Viewer ユーザーズマニュアル.pdf を参照して下さい。
15 |
16 | CubePDF Viewer を使用するためには、Microsoft .NetFramework 2.0 がインストールされている必要があります。
17 | Microsoft .NetFramework 2.0 は、以下の URL からダウンロードして下さい。
18 | http://www.microsoft.com/downloads/details.aspx?FamilyId=0856eacb-4362-4b0d-8edd-aab15c5e04f5&displaylang=ja
19 |
20 | CubePDF Viewer は、以下のライブラリを利用しています。
21 | それぞれのライブラリについては、記載した URL から取得することができます。
22 | - PDFLibNet
23 | Copyright (c) Antonio Sandoval.
24 | URL: http://www.codeproject.com/KB/files/xpdf_csharp.aspx
25 | GNU General Public License ( http://www.gnu.org/licenses/gpl.html )
26 | - Painting Your Own Tabs - Second Edition
27 | Copyright (c) 2010, Mark Jackson.
28 | URL: http://www.codeproject.com/KB/tabs/NewCustomTabControl.aspx
29 | The Code Project Open License (CPOL) 1.02 ( http://www.codeproject.com/info/cpol10.aspx )
30 |
31 | ■バージョン履歴
32 | 2010/12/01 version 0.4.2β
33 | - CubePDF Viewer のロゴ画像をクリックするとバージョン情報が表示されるように修正
34 | - 「ウィンドウの高さに合わせる」ボタンの挙動を表示されている PDF の幅が高さ
35 | よりも大きい場合には幅に合わせるように表示する「常にページ全体を表示」する
36 | 機能に変更.
37 | - CubePDF Viewer のタイトルバーに現在のタブのファイル名を表示するように修正
38 | - 「手のひらツール」状態のときのアイコンを変更
39 | - 検索の失敗(終了)時に検索ボックスの色を赤くするように修正
40 | - 印刷時にプリンターの用紙サイズの設定が考慮されない問題を修正
41 | - 64bit 版で「印刷」ボタンが機能しない問題を修正
42 | - マウスホイールでスクロールした際に水平方向のスクロールバーの状態がリセットされる問題を修正
43 | - サムネイル画面にフォーカスされている時,メイン画面側にフォーカスが移らない場合がある問題を修正
44 | - ウィンドウを最大化した状態で新しい PDF ファイルをダブルクリックで開くと最大化が解除される問題を修正
45 |
46 | 2010/11/08 version 0.4.1β
47 | - アップデートチェック・プログラムの起動に関する問題を修正
48 | - 関連付けされた PDF ファイルをダブルクリックして開く際に,複数のウィンドウで開かれる問題を修正
49 | - 64bit 版で「Adobe Reader で開く」のアイコンが表示されない問題を修正
50 |
51 | 2010/11/01 version 0.4.0β
52 | - 最初の公開バージョン
53 |
--------------------------------------------------------------------------------
/cubepdf-viewer/CustomToolStripRenderer.cs:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------------- */
2 | /*
3 | * CustomToolStripRenderer.cs
4 | *
5 | * Copyright (c) 2010 CubeSoft Inc. All rights reserved.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see < http://www.gnu.org/licenses/ >.
19 | *
20 | * Last-modified: Mon 04 Oct 2010 12:02:00 JST
21 | */
22 | /* ------------------------------------------------------------------------- */
23 | using System;
24 | using System.Windows.Forms;
25 | using System.Drawing;
26 |
27 | namespace Cube {
28 | /* --------------------------------------------------------------------- */
29 | /// CustomToolStripRenderer
30 | /* --------------------------------------------------------------------- */
31 | class CustomToolStripRenderer : ToolStripProfessionalRenderer {
32 |
33 | /* --------------------------------------------------------------------- */
34 | /// OnRenderToolStripBorder
35 | /* --------------------------------------------------------------------- */
36 | protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e) {
37 | // base.OnRenderToolStripBorder(e);
38 | }
39 |
40 | /* --------------------------------------------------------------------- */
41 | /// OnRenderButtonBackground
42 | /* --------------------------------------------------------------------- */
43 | protected override void OnRenderButtonBackground(ToolStripItemRenderEventArgs e) {
44 | //base.OnRenderButtonBackground(e);
45 |
46 | var button = e.Item as ToolStripButton;
47 | if (button != null) {
48 | if (button.BackgroundImage != null) {
49 | e.Graphics.DrawImage(button.BackgroundImage, new Point(0, 0));
50 | }
51 | }
52 | }
53 |
54 | /* --------------------------------------------------------------------- */
55 | /// OnRenderDropDownButtonBackground
56 | /* --------------------------------------------------------------------- */
57 | protected override void OnRenderDropDownButtonBackground(ToolStripItemRenderEventArgs e) {
58 | base.OnRenderDropDownButtonBackground(e);
59 | }
60 |
61 | /* --------------------------------------------------------------------- */
62 | /// OnRenderSeparator
63 | /* --------------------------------------------------------------------- */
64 | protected override void OnRenderSeparator(ToolStripSeparatorRenderEventArgs e) {
65 | //base.OnRenderSeparator(e);
66 |
67 | var separator = e.Item as ToolStripSeparator;
68 | if (separator != null) {
69 | var pen = new Pen(Color.Black);
70 | e.Graphics.DrawRectangle(pen, new Rectangle(0, 0, 1, separator.Height));
71 | }
72 | }
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/cubepdf-viewer/Jacksonsoft.CustomTabControl.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Jacksonsoft.CustomTabControl.dll
--------------------------------------------------------------------------------
/cubepdf-viewer/MenuDialog.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace Cube {
2 | partial class MenuDialog {
3 | ///
4 | /// 必要なデザイナー変数です。
5 | ///
6 | private System.ComponentModel.IContainer components = null;
7 |
8 | ///
9 | /// 使用中のリソースをすべてクリーンアップします。
10 | ///
11 | /// マネージ リソースが破棄される場合 true、破棄されない場合は false です。
12 | protected override void Dispose(bool disposing) {
13 | if (disposing && (components != null)) {
14 | components.Dispose();
15 | }
16 | base.Dispose(disposing);
17 | }
18 |
19 | #region Windows フォーム デザイナーで生成されたコード
20 |
21 | ///
22 | /// デザイナー サポートに必要なメソッドです。このメソッドの内容を
23 | /// コード エディターで変更しないでください。
24 | ///
25 | private void InitializeComponent() {
26 | this.IconPictureBox = new System.Windows.Forms.PictureBox();
27 | this.MessageLabel = new System.Windows.Forms.Label();
28 | this.NoShowNextCheckBox = new System.Windows.Forms.CheckBox();
29 | this.OKButton = new System.Windows.Forms.Button();
30 | ((System.ComponentModel.ISupportInitialize)(this.IconPictureBox)).BeginInit();
31 | this.SuspendLayout();
32 | //
33 | // IconPictureBox
34 | //
35 | this.IconPictureBox.Location = new System.Drawing.Point(12, 12);
36 | this.IconPictureBox.Name = "IconPictureBox";
37 | this.IconPictureBox.Size = new System.Drawing.Size(32, 32);
38 | this.IconPictureBox.TabIndex = 0;
39 | this.IconPictureBox.TabStop = false;
40 | //
41 | // MessageLabel
42 | //
43 | this.MessageLabel.AutoSize = true;
44 | this.MessageLabel.Location = new System.Drawing.Point(50, 12);
45 | this.MessageLabel.Name = "MessageLabel";
46 | this.MessageLabel.Size = new System.Drawing.Size(330, 12);
47 | this.MessageLabel.TabIndex = 1;
48 | this.MessageLabel.Text = "メニューを非表示にしました。再表示するには F8 キーを押して下さい。";
49 | //
50 | // NoShowNextCheckBox
51 | //
52 | this.NoShowNextCheckBox.AutoSize = true;
53 | this.NoShowNextCheckBox.Location = new System.Drawing.Point(52, 39);
54 | this.NoShowNextCheckBox.Name = "NoShowNextCheckBox";
55 | this.NoShowNextCheckBox.Size = new System.Drawing.Size(181, 16);
56 | this.NoShowNextCheckBox.TabIndex = 2;
57 | this.NoShowNextCheckBox.Text = "今後、このダイアログを表示しない";
58 | this.NoShowNextCheckBox.UseVisualStyleBackColor = true;
59 | //
60 | // OKButton
61 | //
62 | this.OKButton.Location = new System.Drawing.Point(305, 60);
63 | this.OKButton.Name = "OKButton";
64 | this.OKButton.Size = new System.Drawing.Size(75, 23);
65 | this.OKButton.TabIndex = 3;
66 | this.OKButton.Text = "OK";
67 | this.OKButton.UseVisualStyleBackColor = true;
68 | this.OKButton.Click += new System.EventHandler(this.OKButton_Click);
69 | //
70 | // MenuDialog
71 | //
72 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
73 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
74 | this.ClientSize = new System.Drawing.Size(394, 95);
75 | this.Controls.Add(this.OKButton);
76 | this.Controls.Add(this.NoShowNextCheckBox);
77 | this.Controls.Add(this.MessageLabel);
78 | this.Controls.Add(this.IconPictureBox);
79 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
80 | this.MaximizeBox = false;
81 | this.MinimizeBox = false;
82 | this.Name = "MenuDialog";
83 | this.ShowIcon = false;
84 | this.ShowInTaskbar = false;
85 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
86 | this.Text = "メニューの非表示";
87 | ((System.ComponentModel.ISupportInitialize)(this.IconPictureBox)).EndInit();
88 | this.ResumeLayout(false);
89 | this.PerformLayout();
90 |
91 | }
92 |
93 | #endregion
94 |
95 | private System.Windows.Forms.PictureBox IconPictureBox;
96 | private System.Windows.Forms.Label MessageLabel;
97 | private System.Windows.Forms.CheckBox NoShowNextCheckBox;
98 | private System.Windows.Forms.Button OKButton;
99 | }
100 | }
--------------------------------------------------------------------------------
/cubepdf-viewer/MenuDialog.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.Windows.Forms;
4 |
5 | namespace Cube {
6 | public partial class MenuDialog : Form {
7 | public MenuDialog() {
8 | InitializeComponent();
9 | var image = new Bitmap(32, 32);
10 | var g = Graphics.FromImage(image);
11 | g.DrawIcon(SystemIcons.Information, 0, 0);
12 | g.Dispose();
13 | this.IconPictureBox.Image = image;
14 | }
15 |
16 | public bool NoShowNext {
17 | get { return this.NoShowNextCheckBox.Checked; }
18 | }
19 |
20 | private void OKButton_Click(object sender, EventArgs e) {
21 | this.Close();
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/cubepdf-viewer/MenuDialog.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/cubepdf-viewer/PDFLibNet.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/PDFLibNet.dll
--------------------------------------------------------------------------------
/cubepdf-viewer/PasswordDialog.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace Cube
2 | {
3 | partial class PasswordDialog
4 | {
5 | ///
6 | /// 必要なデザイナー変数です。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 使用中のリソースをすべてクリーンアップします。
12 | ///
13 | /// マネージ リソースが破棄される場合 true、破棄されない場合は false です。
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows フォーム デザイナーで生成されたコード
24 |
25 | ///
26 | /// デザイナー サポートに必要なメソッドです。このメソッドの内容を
27 | /// コード エディターで変更しないでください。
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.label1 = new System.Windows.Forms.Label();
32 | this.PasswordBox = new System.Windows.Forms.TextBox();
33 | this.OKButton = new System.Windows.Forms.Button();
34 | this.CloseButton = new System.Windows.Forms.Button();
35 | this.IconPictureBox = new System.Windows.Forms.PictureBox();
36 | this.MessageLabel = new System.Windows.Forms.Label();
37 | ((System.ComponentModel.ISupportInitialize)(this.IconPictureBox)).BeginInit();
38 | this.SuspendLayout();
39 | //
40 | // label1
41 | //
42 | this.label1.AutoSize = true;
43 | this.label1.Location = new System.Drawing.Point(99, 68);
44 | this.label1.Name = "label1";
45 | this.label1.Size = new System.Drawing.Size(91, 12);
46 | this.label1.TabIndex = 0;
47 | this.label1.Text = "パスワードを入力:";
48 | //
49 | // PasswordBox
50 | //
51 | this.PasswordBox.ImeMode = System.Windows.Forms.ImeMode.Off;
52 | this.PasswordBox.Location = new System.Drawing.Point(196, 65);
53 | this.PasswordBox.Name = "PasswordBox";
54 | this.PasswordBox.PasswordChar = '*';
55 | this.PasswordBox.Size = new System.Drawing.Size(186, 19);
56 | this.PasswordBox.TabIndex = 1;
57 | this.PasswordBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.PasswordBox_KeyDown);
58 | //
59 | // OKButton
60 | //
61 | this.OKButton.Location = new System.Drawing.Point(226, 90);
62 | this.OKButton.Name = "OKButton";
63 | this.OKButton.Size = new System.Drawing.Size(75, 23);
64 | this.OKButton.TabIndex = 2;
65 | this.OKButton.Text = "OK";
66 | this.OKButton.UseVisualStyleBackColor = true;
67 | this.OKButton.Click += new System.EventHandler(this.OKButton_Click);
68 | //
69 | // CloseButton
70 | //
71 | this.CloseButton.Location = new System.Drawing.Point(307, 90);
72 | this.CloseButton.Name = "CloseButton";
73 | this.CloseButton.Size = new System.Drawing.Size(75, 23);
74 | this.CloseButton.TabIndex = 3;
75 | this.CloseButton.Text = "キャンセル";
76 | this.CloseButton.UseVisualStyleBackColor = true;
77 | this.CloseButton.Click += new System.EventHandler(this.CloseButton_Click);
78 | //
79 | // IconPictureBox
80 | //
81 | this.IconPictureBox.Location = new System.Drawing.Point(12, 12);
82 | this.IconPictureBox.Name = "IconPictureBox";
83 | this.IconPictureBox.Size = new System.Drawing.Size(32, 32);
84 | this.IconPictureBox.TabIndex = 4;
85 | this.IconPictureBox.TabStop = false;
86 | //
87 | // MessageLabel
88 | //
89 | this.MessageLabel.AutoEllipsis = true;
90 | this.MessageLabel.Location = new System.Drawing.Point(50, 22);
91 | this.MessageLabel.Name = "MessageLabel";
92 | this.MessageLabel.Size = new System.Drawing.Size(332, 31);
93 | this.MessageLabel.TabIndex = 5;
94 | this.MessageLabel.Text = "文書を開くパスワードを入力して下さい。";
95 | //
96 | // PasswordDialog
97 | //
98 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
99 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
100 | this.ClientSize = new System.Drawing.Size(394, 125);
101 | this.Controls.Add(this.MessageLabel);
102 | this.Controls.Add(this.IconPictureBox);
103 | this.Controls.Add(this.CloseButton);
104 | this.Controls.Add(this.OKButton);
105 | this.Controls.Add(this.PasswordBox);
106 | this.Controls.Add(this.label1);
107 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
108 | this.MaximizeBox = false;
109 | this.MinimizeBox = false;
110 | this.Name = "PasswordDialog";
111 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
112 | this.Text = "パスワード";
113 | ((System.ComponentModel.ISupportInitialize)(this.IconPictureBox)).EndInit();
114 | this.ResumeLayout(false);
115 | this.PerformLayout();
116 |
117 | }
118 |
119 | #endregion
120 |
121 | private System.Windows.Forms.Label label1;
122 | private System.Windows.Forms.TextBox PasswordBox;
123 | private System.Windows.Forms.Button OKButton;
124 | private System.Windows.Forms.Button CloseButton;
125 | private System.Windows.Forms.PictureBox IconPictureBox;
126 | private System.Windows.Forms.Label MessageLabel;
127 | }
128 | }
--------------------------------------------------------------------------------
/cubepdf-viewer/PasswordDialog.cs:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------------- */
2 | /*
3 | * PasswordDialog.cs
4 | *
5 | * Copyright (c) 2010 CubeSoft Inc. All rights reserved.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see < http://www.gnu.org/licenses/ >.
19 | *
20 | * Last-modified: Wed 01 Sep 2010 00:10:00 JST
21 | */
22 | /* ------------------------------------------------------------------------- */
23 | using System;
24 | using System.Drawing;
25 | using System.Windows.Forms;
26 |
27 | namespace Cube {
28 | /* --------------------------------------------------------------------- */
29 | /// PasswordDialog
30 | /* --------------------------------------------------------------------- */
31 | public partial class PasswordDialog : Form {
32 | /* ----------------------------------------------------------------- */
33 | ///
34 | /// Constructor
35 | ///
36 | ///
37 | /// 対象となるファイル名を指定する.
38 | ///
39 | ///
40 | /* ----------------------------------------------------------------- */
41 | public PasswordDialog(string path) {
42 | InitializeComponent();
43 | this.MessageLabel.Text = String.Format("「{0}」は保護されています。文書を開くパスワードを入力してください。", System.IO.Path.GetFileName(path));
44 | var image = new Bitmap(32, 32);
45 | var g = Graphics.FromImage(image);
46 | g.DrawIcon(SystemIcons.Warning, 0, 0);
47 | g.Dispose();
48 | this.IconPictureBox.Image = image;
49 | this.OKButton.DialogResult = DialogResult.OK;
50 | this.CloseButton.DialogResult = DialogResult.Cancel;
51 | }
52 |
53 | /* ----------------------------------------------------------------- */
54 | /// Password
55 | /* ----------------------------------------------------------------- */
56 | public String Password {
57 | get {
58 | return this.PasswordBox.Text;
59 | }
60 | }
61 |
62 | /* ----------------------------------------------------------------- */
63 | /// OKButton_Click
64 | /* ----------------------------------------------------------------- */
65 | private void OKButton_Click(object sender, EventArgs e) {
66 | this.Close();
67 | }
68 |
69 | /* ----------------------------------------------------------------- */
70 | /// CloseButton_Click
71 | /* ----------------------------------------------------------------- */
72 | private void CloseButton_Click(object sender, EventArgs e) {
73 | this.Close();
74 | }
75 |
76 | /* ----------------------------------------------------------------- */
77 | /// PasswordBox_KeyDown
78 | /* ----------------------------------------------------------------- */
79 | private void PasswordBox_KeyDown(object sender, KeyEventArgs e) {
80 | if (e.KeyCode == Keys.Enter) this.OKButton_Click(this.OKButton, e);
81 | }
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/cubepdf-viewer/PasswordDialog.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/cubepdf-viewer/Program.cs:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------------- */
2 | /*
3 | * Program.cs
4 | *
5 | * Copyright (c) 2010 CubeSoft Inc. All rights reserved.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see < http://www.gnu.org/licenses/ >.
19 | *
20 | * Last-modified: Thu 07 Oct 2010 23:26:00 JST
21 | */
22 | /* ------------------------------------------------------------------------- */
23 | using System;
24 | using System.Collections.Generic;
25 | using System.Windows.Forms;
26 | using System.Diagnostics;
27 | using System.Runtime.InteropServices;
28 |
29 | namespace Cube {
30 | static class Program {
31 | /* ----------------------------------------------------------------- */
32 | ///
33 | /// Main
34 | ///
35 | ///
36 | /// アプリケーションのメイン エントリ ポイントです。
37 | ///
38 | ///
39 | /* ----------------------------------------------------------------- */
40 | [STAThread]
41 | static void Main(string[] args) {
42 | Process proc = Process.GetCurrentProcess();
43 |
44 | // 多重起動時の処理
45 | // NOTE: デバッガ上で起動した場合、通常起動とはプロセス名が違う。
46 | // そのため、デバッガ上でテストする方法が今の所不明
47 | if (Process.GetProcessesByName(proc.ProcessName).Length > 1) {
48 | if (args.Length > 0) {
49 | var prevHwnd = FindPrevProcess(proc);
50 | var msg = args[0];
51 | var cds = new COPYDATASTRUCT();
52 | cds.dwData = IntPtr.Zero;
53 | cds.lpData = msg;
54 | cds.cbData = System.Text.Encoding.Default.GetBytes(msg).Length + 1;
55 | SendMessage(prevHwnd, WM_COPYDATA, IntPtr.Zero, ref cds);
56 | }
57 | }
58 | else {
59 | Application.EnableVisualStyles();
60 | Application.SetCompatibleTextRenderingDefault(false);
61 | if (args.Length > 0) Application.Run(new MainForm(args[0]));
62 | else Application.Run(new MainForm());
63 | }
64 | }
65 |
66 | /* ----------------------------------------------------------------- */
67 | /// FindPrevProcess
68 | /* ----------------------------------------------------------------- */
69 | private static IntPtr FindPrevProcess(Process proc) {
70 | Process[] processes = Process.GetProcessesByName(proc.ProcessName);
71 | int iThisProcessId = proc.Id;
72 |
73 | foreach (Process item in processes) {
74 | if (item.Id != iThisProcessId) {
75 | if (IsIconic(item.MainWindowHandle)) ShowWindow(item.MainWindowHandle, SW_RESTORE);
76 | SetForegroundWindow(item.MainWindowHandle);
77 | return item.MainWindowHandle;
78 | }
79 | }
80 | return IntPtr.Zero;
81 | }
82 |
83 | [DllImport("User32.dll")]
84 | private static extern int ShowWindow(IntPtr hWnd, int nCmdShow);
85 |
86 | [DllImport("User32.dll")]
87 | public static extern Int32 SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, ref COPYDATASTRUCT lParam);
88 |
89 | [DllImport("User32.dll")]
90 | public static extern Int32 SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
91 |
92 | [DllImport("user32.dll")]
93 | private static extern bool SetForegroundWindow(IntPtr hWnd);
94 |
95 | [DllImport("user32.dll")]
96 | private static extern bool IsIconic(IntPtr hWnd);
97 |
98 | [DllImport("User32.dll", EntryPoint = "FindWindow")]
99 | public static extern IntPtr FindWindow(String lpClassName, String lpWindowName);
100 |
101 | public const int WM_COPYDATA = 0x0000004A;
102 | public const int WM_USER = 0x400;
103 |
104 | //COPYDATASTRUCT構造体
105 | public struct COPYDATASTRUCT {
106 | public IntPtr dwData; // 送信する32ビット値
107 | public int cbData; // lpDataのバイト数
108 | public string lpData; // 送信するデータへのポインタ(0も可能)
109 | }
110 |
111 | private const int SW_RESTORE = 9;
112 | }
113 | }
114 |
--------------------------------------------------------------------------------
/cubepdf-viewer/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // アセンブリに関する一般情報は以下の属性セットをとおして制御されます。
6 | // アセンブリに関連付けられている情報を変更するには、
7 | // これらの属性値を変更してください。
8 | [assembly: AssemblyTitle("CubePDF Viewer")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("CubeSoft")]
12 | [assembly: AssemblyProduct("CubePDF Viewer")]
13 | [assembly: AssemblyCopyright("Copyright © CubeSoft 2010")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから
18 | // 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、
19 | // その型の ComVisible 属性を true に設定してください。
20 | [assembly: ComVisible(true)]
21 |
22 | // 次の GUID は、このプロジェクトが COM に公開される場合の、typelib の ID です
23 | [assembly: Guid("b04a3583-b81d-49e4-8a3f-91114072b471")]
24 |
25 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
33 | // 既定値にすることができます:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("0.4.2.0")]
36 | [assembly: AssemblyFileVersion("0.4.2.0")]
37 |
--------------------------------------------------------------------------------
/cubepdf-viewer/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // このコードはツールによって生成されました。
4 | // ランタイム バージョン:2.0.50727.4952
5 | //
6 | // このファイルへの変更は、以下の状況下で不正な動作の原因になったり、
7 | // コードが再生成されるときに損失したりします。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Cube.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// ローカライズされた文字列などを検索するための、厳密に型指定されたリソース クラスです。
17 | ///
18 | // このクラスは StronglyTypedResourceBuilder クラスが ResGen
19 | // または Visual Studio のようなツールを使用して自動生成されました。
20 | // メンバを追加または削除するには、.ResX ファイルを編集して、/str オプションと共に
21 | // ResGen を実行し直すか、または VS プロジェクトをビルドし直します。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// このクラスで使用されているキャッシュされた ResourceManager インスタンスを返します。
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Cube.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// 厳密に型指定されたこのリソース クラスを使用して、すべての検索リソースに対し、
51 | /// 現在のスレッドの CurrentUICulture プロパティをオーバーライドします。
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | internal static System.Drawing.Bitmap arrow_first {
64 | get {
65 | object obj = ResourceManager.GetObject("arrow_first", resourceCulture);
66 | return ((System.Drawing.Bitmap)(obj));
67 | }
68 | }
69 |
70 | internal static System.Drawing.Bitmap arrow_first_over {
71 | get {
72 | object obj = ResourceManager.GetObject("arrow_first_over", resourceCulture);
73 | return ((System.Drawing.Bitmap)(obj));
74 | }
75 | }
76 |
77 | internal static System.Drawing.Bitmap arrow_first_press {
78 | get {
79 | object obj = ResourceManager.GetObject("arrow_first_press", resourceCulture);
80 | return ((System.Drawing.Bitmap)(obj));
81 | }
82 | }
83 |
84 | internal static System.Drawing.Bitmap arrow_last {
85 | get {
86 | object obj = ResourceManager.GetObject("arrow_last", resourceCulture);
87 | return ((System.Drawing.Bitmap)(obj));
88 | }
89 | }
90 |
91 | internal static System.Drawing.Bitmap arrow_last_over {
92 | get {
93 | object obj = ResourceManager.GetObject("arrow_last_over", resourceCulture);
94 | return ((System.Drawing.Bitmap)(obj));
95 | }
96 | }
97 |
98 | internal static System.Drawing.Bitmap arrow_last_press {
99 | get {
100 | object obj = ResourceManager.GetObject("arrow_last_press", resourceCulture);
101 | return ((System.Drawing.Bitmap)(obj));
102 | }
103 | }
104 |
105 | internal static System.Drawing.Bitmap arrow_next {
106 | get {
107 | object obj = ResourceManager.GetObject("arrow_next", resourceCulture);
108 | return ((System.Drawing.Bitmap)(obj));
109 | }
110 | }
111 |
112 | internal static System.Drawing.Bitmap arrow_next_over {
113 | get {
114 | object obj = ResourceManager.GetObject("arrow_next_over", resourceCulture);
115 | return ((System.Drawing.Bitmap)(obj));
116 | }
117 | }
118 |
119 | internal static System.Drawing.Bitmap arrow_next_press {
120 | get {
121 | object obj = ResourceManager.GetObject("arrow_next_press", resourceCulture);
122 | return ((System.Drawing.Bitmap)(obj));
123 | }
124 | }
125 |
126 | internal static System.Drawing.Bitmap arrow_prev {
127 | get {
128 | object obj = ResourceManager.GetObject("arrow_prev", resourceCulture);
129 | return ((System.Drawing.Bitmap)(obj));
130 | }
131 | }
132 |
133 | internal static System.Drawing.Bitmap arrow_prev_over {
134 | get {
135 | object obj = ResourceManager.GetObject("arrow_prev_over", resourceCulture);
136 | return ((System.Drawing.Bitmap)(obj));
137 | }
138 | }
139 |
140 | internal static System.Drawing.Bitmap arrow_prev_press {
141 | get {
142 | object obj = ResourceManager.GetObject("arrow_prev_press", resourceCulture);
143 | return ((System.Drawing.Bitmap)(obj));
144 | }
145 | }
146 |
147 | internal static System.Drawing.Bitmap background {
148 | get {
149 | object obj = ResourceManager.GetObject("background", resourceCulture);
150 | return ((System.Drawing.Bitmap)(obj));
151 | }
152 | }
153 |
154 | internal static System.Drawing.Bitmap background_tab {
155 | get {
156 | object obj = ResourceManager.GetObject("background_tab", resourceCulture);
157 | return ((System.Drawing.Bitmap)(obj));
158 | }
159 | }
160 |
161 | internal static System.Drawing.Icon cubepdf_file {
162 | get {
163 | object obj = ResourceManager.GetObject("cubepdf_file", resourceCulture);
164 | return ((System.Drawing.Icon)(obj));
165 | }
166 | }
167 |
168 | internal static System.Drawing.Icon cubepdf_viewer {
169 | get {
170 | object obj = ResourceManager.GetObject("cubepdf_viewer", resourceCulture);
171 | return ((System.Drawing.Icon)(obj));
172 | }
173 | }
174 |
175 | internal static System.Drawing.Bitmap fit2height {
176 | get {
177 | object obj = ResourceManager.GetObject("fit2height", resourceCulture);
178 | return ((System.Drawing.Bitmap)(obj));
179 | }
180 | }
181 |
182 | internal static System.Drawing.Bitmap fit2height_over {
183 | get {
184 | object obj = ResourceManager.GetObject("fit2height_over", resourceCulture);
185 | return ((System.Drawing.Bitmap)(obj));
186 | }
187 | }
188 |
189 | internal static System.Drawing.Bitmap fit2height_press {
190 | get {
191 | object obj = ResourceManager.GetObject("fit2height_press", resourceCulture);
192 | return ((System.Drawing.Bitmap)(obj));
193 | }
194 | }
195 |
196 | internal static System.Drawing.Bitmap fit2width {
197 | get {
198 | object obj = ResourceManager.GetObject("fit2width", resourceCulture);
199 | return ((System.Drawing.Bitmap)(obj));
200 | }
201 | }
202 |
203 | internal static System.Drawing.Bitmap fit2width_over {
204 | get {
205 | object obj = ResourceManager.GetObject("fit2width_over", resourceCulture);
206 | return ((System.Drawing.Bitmap)(obj));
207 | }
208 | }
209 |
210 | internal static System.Drawing.Bitmap fit2width_press {
211 | get {
212 | object obj = ResourceManager.GetObject("fit2width_press", resourceCulture);
213 | return ((System.Drawing.Bitmap)(obj));
214 | }
215 | }
216 |
217 | internal static byte[] hand_move {
218 | get {
219 | object obj = ResourceManager.GetObject("hand_move", resourceCulture);
220 | return ((byte[])(obj));
221 | }
222 | }
223 |
224 | internal static System.Drawing.Bitmap hidemenu {
225 | get {
226 | object obj = ResourceManager.GetObject("hidemenu", resourceCulture);
227 | return ((System.Drawing.Bitmap)(obj));
228 | }
229 | }
230 |
231 | internal static System.Drawing.Bitmap hidemenu_over {
232 | get {
233 | object obj = ResourceManager.GetObject("hidemenu_over", resourceCulture);
234 | return ((System.Drawing.Bitmap)(obj));
235 | }
236 | }
237 |
238 | internal static System.Drawing.Bitmap hidemenu_press {
239 | get {
240 | object obj = ResourceManager.GetObject("hidemenu_press", resourceCulture);
241 | return ((System.Drawing.Bitmap)(obj));
242 | }
243 | }
244 |
245 | internal static System.Drawing.Bitmap icon {
246 | get {
247 | object obj = ResourceManager.GetObject("icon", resourceCulture);
248 | return ((System.Drawing.Bitmap)(obj));
249 | }
250 | }
251 |
252 | internal static System.Drawing.Bitmap logo {
253 | get {
254 | object obj = ResourceManager.GetObject("logo", resourceCulture);
255 | return ((System.Drawing.Bitmap)(obj));
256 | }
257 | }
258 |
259 | internal static System.Drawing.Bitmap logo_over {
260 | get {
261 | object obj = ResourceManager.GetObject("logo_over", resourceCulture);
262 | return ((System.Drawing.Bitmap)(obj));
263 | }
264 | }
265 |
266 | internal static System.Drawing.Bitmap logo_press {
267 | get {
268 | object obj = ResourceManager.GetObject("logo_press", resourceCulture);
269 | return ((System.Drawing.Bitmap)(obj));
270 | }
271 | }
272 |
273 | internal static System.Drawing.Bitmap open {
274 | get {
275 | object obj = ResourceManager.GetObject("open", resourceCulture);
276 | return ((System.Drawing.Bitmap)(obj));
277 | }
278 | }
279 |
280 | internal static System.Drawing.Bitmap open_over {
281 | get {
282 | object obj = ResourceManager.GetObject("open_over", resourceCulture);
283 | return ((System.Drawing.Bitmap)(obj));
284 | }
285 | }
286 |
287 | internal static System.Drawing.Bitmap open_press {
288 | get {
289 | object obj = ResourceManager.GetObject("open_press", resourceCulture);
290 | return ((System.Drawing.Bitmap)(obj));
291 | }
292 | }
293 |
294 | internal static System.Drawing.Bitmap print {
295 | get {
296 | object obj = ResourceManager.GetObject("print", resourceCulture);
297 | return ((System.Drawing.Bitmap)(obj));
298 | }
299 | }
300 |
301 | internal static System.Drawing.Bitmap print_over {
302 | get {
303 | object obj = ResourceManager.GetObject("print_over", resourceCulture);
304 | return ((System.Drawing.Bitmap)(obj));
305 | }
306 | }
307 |
308 | internal static System.Drawing.Bitmap print_press {
309 | get {
310 | object obj = ResourceManager.GetObject("print_press", resourceCulture);
311 | return ((System.Drawing.Bitmap)(obj));
312 | }
313 | }
314 |
315 | internal static System.Drawing.Bitmap search {
316 | get {
317 | object obj = ResourceManager.GetObject("search", resourceCulture);
318 | return ((System.Drawing.Bitmap)(obj));
319 | }
320 | }
321 |
322 | internal static System.Drawing.Bitmap search_over {
323 | get {
324 | object obj = ResourceManager.GetObject("search_over", resourceCulture);
325 | return ((System.Drawing.Bitmap)(obj));
326 | }
327 | }
328 |
329 | internal static System.Drawing.Bitmap search_press {
330 | get {
331 | object obj = ResourceManager.GetObject("search_press", resourceCulture);
332 | return ((System.Drawing.Bitmap)(obj));
333 | }
334 | }
335 |
336 | internal static System.Drawing.Bitmap thumbnail {
337 | get {
338 | object obj = ResourceManager.GetObject("thumbnail", resourceCulture);
339 | return ((System.Drawing.Bitmap)(obj));
340 | }
341 | }
342 |
343 | internal static System.Drawing.Bitmap thumbnail_over {
344 | get {
345 | object obj = ResourceManager.GetObject("thumbnail_over", resourceCulture);
346 | return ((System.Drawing.Bitmap)(obj));
347 | }
348 | }
349 |
350 | internal static System.Drawing.Bitmap thumbnail_press {
351 | get {
352 | object obj = ResourceManager.GetObject("thumbnail_press", resourceCulture);
353 | return ((System.Drawing.Bitmap)(obj));
354 | }
355 | }
356 |
357 | internal static System.Drawing.Bitmap title {
358 | get {
359 | object obj = ResourceManager.GetObject("title", resourceCulture);
360 | return ((System.Drawing.Bitmap)(obj));
361 | }
362 | }
363 |
364 | internal static System.Drawing.Bitmap zoomin {
365 | get {
366 | object obj = ResourceManager.GetObject("zoomin", resourceCulture);
367 | return ((System.Drawing.Bitmap)(obj));
368 | }
369 | }
370 |
371 | internal static System.Drawing.Bitmap zoomin_over {
372 | get {
373 | object obj = ResourceManager.GetObject("zoomin_over", resourceCulture);
374 | return ((System.Drawing.Bitmap)(obj));
375 | }
376 | }
377 |
378 | internal static System.Drawing.Bitmap zoomin_press {
379 | get {
380 | object obj = ResourceManager.GetObject("zoomin_press", resourceCulture);
381 | return ((System.Drawing.Bitmap)(obj));
382 | }
383 | }
384 |
385 | internal static System.Drawing.Bitmap zoomout {
386 | get {
387 | object obj = ResourceManager.GetObject("zoomout", resourceCulture);
388 | return ((System.Drawing.Bitmap)(obj));
389 | }
390 | }
391 |
392 | internal static System.Drawing.Bitmap zoomout_over {
393 | get {
394 | object obj = ResourceManager.GetObject("zoomout_over", resourceCulture);
395 | return ((System.Drawing.Bitmap)(obj));
396 | }
397 | }
398 |
399 | internal static System.Drawing.Bitmap zoomout_press {
400 | get {
401 | object obj = ResourceManager.GetObject("zoomout_press", resourceCulture);
402 | return ((System.Drawing.Bitmap)(obj));
403 | }
404 | }
405 | }
406 | }
407 |
--------------------------------------------------------------------------------
/cubepdf-viewer/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 | ..\Resources\arrow_first.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
123 |
124 |
125 | ..\Resources\arrow_first_over.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
126 |
127 |
128 | ..\Resources\arrow_first_press.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
129 |
130 |
131 | ..\Resources\arrow_last.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
132 |
133 |
134 | ..\Resources\arrow_last_over.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
135 |
136 |
137 | ..\Resources\arrow_last_press.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
138 |
139 |
140 | ..\Resources\arrow_next.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
141 |
142 |
143 | ..\Resources\arrow_next_over.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
144 |
145 |
146 | ..\Resources\arrow_next_press.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
147 |
148 |
149 | ..\Resources\arrow_prev.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
150 |
151 |
152 | ..\Resources\arrow_prev_over.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
153 |
154 |
155 | ..\Resources\arrow_prev_press.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
156 |
157 |
158 | ..\Resources\background.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
159 |
160 |
161 | ..\Resources\background_tab.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
162 |
163 |
164 | ..\Resources\cubepdf-file.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
165 |
166 |
167 | ..\Resources\cubepdf-viewer.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
168 |
169 |
170 | ..\Resources\fit2height.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
171 |
172 |
173 | ..\Resources\fit2height_over.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
174 |
175 |
176 | ..\Resources\fit2height_press.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
177 |
178 |
179 | ..\Resources\fit2width.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
180 |
181 |
182 | ..\Resources\fit2width_over.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
183 |
184 |
185 | ..\Resources\fit2width_press.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
186 |
187 |
188 | ..\Resources\hand_move.cur;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
189 |
190 |
191 | ..\Resources\hidemenu.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
192 |
193 |
194 | ..\Resources\hidemenu_over.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
195 |
196 |
197 | ..\Resources\hidemenu_press.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
198 |
199 |
200 | ..\Resources\icon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
201 |
202 |
203 | ..\Resources\logo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
204 |
205 |
206 | ..\Resources\logo_over.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
207 |
208 |
209 | ..\Resources\logo_press.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
210 |
211 |
212 | ..\Resources\open.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
213 |
214 |
215 | ..\Resources\open_over.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
216 |
217 |
218 | ..\Resources\open_press.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
219 |
220 |
221 | ..\Resources\print.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
222 |
223 |
224 | ..\Resources\print_over.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
225 |
226 |
227 | ..\Resources\print_press.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
228 |
229 |
230 | ..\Resources\search.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
231 |
232 |
233 | ..\Resources\search_over.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
234 |
235 |
236 | ..\Resources\search_press.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
237 |
238 |
239 | ..\Resources\thumbnail.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
240 |
241 |
242 | ..\Resources\thumbnail_over.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
243 |
244 |
245 | ..\Resources\thumbnail_press.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
246 |
247 |
248 | ..\Resources\title.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
249 |
250 |
251 | ..\Resources\zoomin.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
252 |
253 |
254 | ..\Resources\zoomin_over.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
255 |
256 |
257 | ..\Resources\zoomin_press.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
258 |
259 |
260 | ..\Resources\zoomout.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
261 |
262 |
263 | ..\Resources\zoomout_over.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
264 |
265 |
266 | ..\Resources\zoomout_press.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
267 |
268 |
--------------------------------------------------------------------------------
/cubepdf-viewer/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // このコードはツールによって生成されました。
4 | // ランタイム バージョン:4.0.30319.1
5 | //
6 | // このファイルへの変更は、以下の状況下で不正な動作の原因になったり、
7 | // コードが再生成されるときに損失したりします。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Cube.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 |
26 | [global::System.Configuration.ApplicationScopedSettingAttribute()]
27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28 | [global::System.Configuration.DefaultSettingValueAttribute("エラー")]
29 | public string ERROR_TITLE {
30 | get {
31 | return ((string)(this["ERROR_TITLE"]));
32 | }
33 | }
34 |
35 | [global::System.Configuration.ApplicationScopedSettingAttribute()]
36 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
37 | [global::System.Configuration.DefaultSettingValueAttribute("このファイルはパスワードで保護されています。")]
38 | public string ERROR_PASSWORD {
39 | get {
40 | return ((string)(this["ERROR_PASSWORD"]));
41 | }
42 | }
43 |
44 | [global::System.Configuration.ApplicationScopedSettingAttribute()]
45 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
46 | [global::System.Configuration.DefaultSettingValueAttribute("CubePDF Viewer")]
47 | public string DEFAULT_WINDOW_TITLE {
48 | get {
49 | return ((string)(this["DEFAULT_WINDOW_TITLE"]));
50 | }
51 | }
52 |
53 | [global::System.Configuration.ApplicationScopedSettingAttribute()]
54 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
55 | [global::System.Configuration.DefaultSettingValueAttribute("(無題)")]
56 | public string DEFAULT_TAB_TEXT {
57 | get {
58 | return ((string)(this["DEFAULT_TAB_TEXT"]));
59 | }
60 | }
61 |
62 | [global::System.Configuration.ApplicationScopedSettingAttribute()]
63 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
64 | [global::System.Configuration.DefaultSettingValueAttribute("Cube.Resources.hand_move.cur")]
65 | public string HAND_CURSOR_LOCATION {
66 | get {
67 | return ((string)(this["HAND_CURSOR_LOCATION"]));
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/cubepdf-viewer/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | エラー
7 |
8 |
9 | このファイルはパスワードで保護されています。
10 |
11 |
12 | CubePDF Viewer
13 |
14 |
15 | (無題)
16 |
17 |
18 | Cube.Resources.hand_move.cur
19 |
20 |
21 |
--------------------------------------------------------------------------------
/cubepdf-viewer/RawPrinterHelper.cs:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------------- */
2 | /*
3 | * Thumbnail.cs
4 | *
5 | * Copyright (c) 2010 CubeSoft Inc.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see < http://www.gnu.org/licenses/ >.
19 | *
20 | * Last-modified: Mon 18 Oct 2010 13:40:00 JST
21 | */
22 | /* ------------------------------------------------------------------------- */
23 | using System;
24 | using System.IO;
25 | using System.Drawing;
26 | using System.Drawing.Printing;
27 | using System.Windows.Forms;
28 | using System.Runtime.InteropServices;
29 |
30 | namespace Cube {
31 | /* --------------------------------------------------------------------- */
32 | ///
33 | /// RawPrinterHelper
34 | ///
35 | ///
36 | /// The class is derived from the following URL:
37 | /// http://support.microsoft.com/kb/322091
38 | ///
39 | ///
40 | /* --------------------------------------------------------------------- */
41 | public class RawPrinterHelper {
42 | /* ----------------------------------------------------------------- */
43 | // Structure and API declarions:
44 | /* ----------------------------------------------------------------- */
45 | #region Win32 APIs
46 |
47 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
48 | public class DOCINFOA {
49 | [MarshalAs(UnmanagedType.LPStr)]
50 | public string pDocName;
51 | [MarshalAs(UnmanagedType.LPStr)]
52 | public string pOutputFile;
53 | [MarshalAs(UnmanagedType.LPStr)]
54 | public string pDataType;
55 | }
56 |
57 | [DllImport("winspool.Drv", EntryPoint = "OpenPrinterA", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
58 | public static extern bool OpenPrinter([MarshalAs(UnmanagedType.LPStr)] string szPrinter, out IntPtr hPrinter, IntPtr pd);
59 |
60 | [DllImport("winspool.Drv", EntryPoint = "ClosePrinter", SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
61 | public static extern bool ClosePrinter(IntPtr hPrinter);
62 |
63 | [DllImport("winspool.Drv", EntryPoint = "StartDocPrinterA", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
64 | public static extern bool StartDocPrinter(IntPtr hPrinter, Int32 level, [In, MarshalAs(UnmanagedType.LPStruct)] DOCINFOA di);
65 |
66 | [DllImport("winspool.Drv", EntryPoint = "EndDocPrinter", SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
67 | public static extern bool EndDocPrinter(IntPtr hPrinter);
68 |
69 | [DllImport("winspool.Drv", EntryPoint = "StartPagePrinter", SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
70 | public static extern bool StartPagePrinter(IntPtr hPrinter);
71 |
72 | [DllImport("winspool.Drv", EntryPoint = "EndPagePrinter", SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
73 | public static extern bool EndPagePrinter(IntPtr hPrinter);
74 |
75 | [DllImport("winspool.Drv", EntryPoint = "WritePrinter", SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
76 | public static extern bool WritePrinter(IntPtr hPrinter, IntPtr pBytes, Int32 dwCount, out Int32 dwWritten);
77 |
78 | #endregion
79 |
80 | /* ----------------------------------------------------------------- */
81 | ///
82 | /// SendBytesToPrinter
83 | ///
84 | ///
85 | /// When the function is given a printer name and an unmanaged array
86 | /// of bytes, the function sends those bytes to the print queue.
87 | /// Returns true on success, false on failure.
88 | ///
89 | ///
90 | /* ----------------------------------------------------------------- */
91 | public static bool SendBytesToPrinter(string szPrinterName, IntPtr pBytes, Int32 dwCount, string szDocName) {
92 | Int32 dwError = 0, dwWritten = 0;
93 | IntPtr hPrinter = new IntPtr(0);
94 | DOCINFOA di = new DOCINFOA();
95 | bool bSuccess = false; // Assume failure unless you specifically succeed.
96 |
97 | di.pDocName = szDocName;
98 | di.pDataType = "RAW";
99 |
100 | // Open the printer.
101 | if (OpenPrinter(szPrinterName.Normalize(), out hPrinter, IntPtr.Zero)) {
102 | // Start a document.
103 | if (StartDocPrinter(hPrinter, 1, di)) {
104 | // Start a page.
105 | if (StartPagePrinter(hPrinter)) {
106 | // Write your bytes.
107 | bSuccess = WritePrinter(hPrinter, pBytes, dwCount, out dwWritten);
108 | EndPagePrinter(hPrinter);
109 | }
110 | EndDocPrinter(hPrinter);
111 | }
112 | ClosePrinter(hPrinter);
113 | }
114 | // If you did not succeed, GetLastError may give more information
115 | // about why not.
116 | if (bSuccess == false) {
117 | dwError = Marshal.GetLastWin32Error();
118 | }
119 | return bSuccess;
120 | }
121 |
122 | /* ----------------------------------------------------------------- */
123 | /// SendFileToPrinter
124 | /* ----------------------------------------------------------------- */
125 | public static bool SendFileToPrinter(string szPrinterName, string szFileName, string szDocName) {
126 | // Open the file.
127 | FileStream fs = new FileStream(szFileName, FileMode.Open);
128 | // Create a BinaryReader on the file.
129 | BinaryReader br = new BinaryReader(fs);
130 | // Dim an array of bytes big enough to hold the file's contents.
131 | Byte[] bytes = new Byte[fs.Length];
132 | bool bSuccess = false;
133 | // Your unmanaged pointer.
134 | IntPtr pUnmanagedBytes = new IntPtr(0);
135 | int nLength;
136 |
137 | nLength = Convert.ToInt32(fs.Length);
138 | // Read the contents of the file into the array.
139 | bytes = br.ReadBytes(nLength);
140 | // Allocate some unmanaged memory for those bytes.
141 | pUnmanagedBytes = Marshal.AllocCoTaskMem(nLength);
142 | // Copy the managed byte array into the unmanaged array.
143 | Marshal.Copy(bytes, 0, pUnmanagedBytes, nLength);
144 | // Send the unmanaged bytes to the printer.
145 | bSuccess = SendBytesToPrinter(szPrinterName, pUnmanagedBytes, nLength, szDocName);
146 | // Free the unmanaged memory that you allocated earlier.
147 | Marshal.FreeCoTaskMem(pUnmanagedBytes);
148 | return bSuccess;
149 | }
150 | }
151 | }
152 |
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/arrow_first.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/arrow_first.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/arrow_first_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/arrow_first_over.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/arrow_first_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/arrow_first_press.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/arrow_last.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/arrow_last.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/arrow_last_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/arrow_last_over.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/arrow_last_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/arrow_last_press.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/arrow_next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/arrow_next.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/arrow_next_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/arrow_next_over.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/arrow_next_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/arrow_next_press.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/arrow_prev.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/arrow_prev.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/arrow_prev_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/arrow_prev_over.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/arrow_prev_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/arrow_prev_press.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/background.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/background_tab.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/background_tab.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/cubepdf-file.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/cubepdf-file.ico
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/cubepdf-viewer.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/cubepdf-viewer.ico
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/fit2height.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/fit2height.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/fit2height_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/fit2height_over.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/fit2height_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/fit2height_press.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/fit2width.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/fit2width.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/fit2width_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/fit2width_over.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/fit2width_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/fit2width_press.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/hand_move.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/hand_move.cur
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/hidemenu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/hidemenu.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/hidemenu_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/hidemenu_over.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/hidemenu_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/hidemenu_press.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/icon.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/logo.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/logo_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/logo_over.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/logo_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/logo_press.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/open.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/open_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/open_over.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/open_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/open_press.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/print.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/print.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/print_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/print_over.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/print_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/print_press.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/search.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/search_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/search_over.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/search_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/search_press.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/thumbnail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/thumbnail.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/thumbnail_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/thumbnail_over.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/thumbnail_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/thumbnail_press.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/title.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/title.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/zoomin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/zoomin.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/zoomin_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/zoomin_over.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/zoomin_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/zoomin_press.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/zoomout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/zoomout.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/zoomout_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/zoomout_over.png
--------------------------------------------------------------------------------
/cubepdf-viewer/Resources/zoomout_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/Resources/zoomout_press.png
--------------------------------------------------------------------------------
/cubepdf-viewer/SearchArgs.cs:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------------- */
2 | /*
3 | * SearchArgs.cs
4 | *
5 | * Copyright (c) 2010 CubeSoft Inc. All rights reserved.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see < http://www.gnu.org/licenses/ >.
19 | *
20 | * Last-modified: Mon 02 Aug 2010 22:59:00 JST
21 | */
22 | /* ------------------------------------------------------------------------- */
23 | using System;
24 |
25 | namespace Cube {
26 | /* --------------------------------------------------------------------- */
27 | // SearchArgs
28 | /* --------------------------------------------------------------------- */
29 | public class SearchArgs : EventArgs {
30 | /* ----------------------------------------------------------------- */
31 | /// Constructor
32 | /* ----------------------------------------------------------------- */
33 | public SearchArgs() : base() {
34 | text_ = "";
35 | }
36 |
37 | /* ----------------------------------------------------------------- */
38 | /// Constructor
39 | /* ----------------------------------------------------------------- */
40 | public SearchArgs(string s) : base() {
41 | text_ = s;
42 | }
43 |
44 | /* ----------------------------------------------------------------- */
45 | ///
46 | /// Text
47 | ///
48 | ///
49 | /// 検索キーワード
50 | ///
51 | ///
52 | /* ----------------------------------------------------------------- */
53 | public string Text {
54 | get { return text_; }
55 | set { text_ = value; }
56 | }
57 |
58 | /* ----------------------------------------------------------------- */
59 | ///
60 | /// FromBegin
61 | ///
62 | ///
63 | /// 先頭から検索するかどうか.true の場合は文書(または現在の
64 | /// ページ)の先頭から,false の場合は現在の位置から検索を行う.
65 | ///
66 | ///
67 | /* ----------------------------------------------------------------- */
68 | public bool FromBegin {
69 | get { return position_; }
70 | set { position_ = value; }
71 | }
72 |
73 | /* ----------------------------------------------------------------- */
74 | ///
75 | /// WholeDocument
76 | ///
77 | ///
78 | /// 文書全体を検索範囲にするかどうか.true の場合は検索範囲は
79 | /// 文書全体,false の場合は検索範囲は現在のページ.
80 | ///
81 | ///
82 | /* ----------------------------------------------------------------- */
83 | public bool WholeDocument {
84 | get { return range_; }
85 | set { range_ = value; }
86 | }
87 |
88 | /* ----------------------------------------------------------------- */
89 | ///
90 | /// IgnoreCase
91 | ///
92 | ///
93 | /// 大文字・小文字を区別するか.
94 | ///
95 | ///
96 | /* ----------------------------------------------------------------- */
97 | public bool IgnoreCase {
98 | get { return ignore_case_; }
99 | set { ignore_case_ = value; }
100 | }
101 |
102 | /* ----------------------------------------------------------------- */
103 | ///
104 | /// FindNext
105 | ///
106 | ///
107 | /// 検索方法.true の場合は現在の位置よりも後の文章を検索範囲に,
108 | /// false の場合は現在の位置よりも前の文章を検索範囲に指定する.
109 | ///
110 | ///
111 | /* ----------------------------------------------------------------- */
112 | public bool FindNext {
113 | get { return vector_; }
114 | set { vector_ = value; }
115 | }
116 |
117 | /* ----------------------------------------------------------------- */
118 | ///
119 | /// WholeWord
120 | ///
121 | ///
122 | /// 完全一致したもののみを扱うかどうか.
123 | ///
124 | ///
125 | /* ----------------------------------------------------------------- */
126 | public bool WholeWord {
127 | get { return complete_; }
128 | set { complete_ = value; }
129 | }
130 |
131 | /* ----------------------------------------------------------------- */
132 | // メンバ変数の定義
133 | /* ----------------------------------------------------------------- */
134 | #region Member variables
135 | private string text_;
136 | private bool position_ = true; // true: begin / false: the current position
137 | private bool range_ = true; // true: whole document / false: the current page
138 | private bool ignore_case_ = true; // true: ignore case / false: case sensitive
139 | private bool vector_ = true; // true: find next / false: find previous
140 | private bool complete_ = true; // true: completed match word
141 | #endregion
142 | }
143 | }
144 |
--------------------------------------------------------------------------------
/cubepdf-viewer/Thumbnail.cs:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------------- */
2 | /*
3 | * Thumbnail.cs
4 | *
5 | * Copyright (c) 2010 CubeSoft Inc. All rights reserved.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see < http://www.gnu.org/licenses/ >.
19 | *
20 | * Last-modified: Mon 18 Oct 2010 13:40:00 JST
21 | */
22 | /* ------------------------------------------------------------------------- */
23 | using System;
24 | using System.Drawing;
25 | using System.Diagnostics;
26 | using System.Windows.Forms;
27 | using System.ComponentModel;
28 | using System.Runtime.InteropServices;
29 | using Container = System.Collections.Generic;
30 | using PDF = PDFLibNet.PDFWrapper;
31 |
32 | namespace Cube {
33 | /* --------------------------------------------------------------------- */
34 | /// ThumbEventArgs
35 | /* --------------------------------------------------------------------- */
36 | public class ThumbEventArgs : EventArgs {
37 | /* ----------------------------------------------------------------- */
38 | /// Constructor
39 | /* ----------------------------------------------------------------- */
40 | public ThumbEventArgs(int page) : base() {
41 | page_ = page;
42 | }
43 |
44 | /* ----------------------------------------------------------------- */
45 | /// PageNum
46 | /* ----------------------------------------------------------------- */
47 | public int PageNum {
48 | get { return page_; }
49 | }
50 |
51 | /* ----------------------------------------------------------------- */
52 | // メンバ変数の定義
53 | /* ----------------------------------------------------------------- */
54 | #region Member variables
55 | private int page_ = 0;
56 | #endregion
57 | }
58 |
59 | /* --------------------------------------------------------------------- */
60 | ///
61 | /// ThumbEventHandler
62 | ///
63 | ///
64 | /// サムネイル画像の生成が終了すると発生するイベント.
65 | /// 発生するタイミングは 1ページ毎で,どのページのサムネイル画像が
66 | /// 生成されたのかは e.PageNum で取得できる.
67 | ///
68 | ///
69 | /* --------------------------------------------------------------------- */
70 | public delegate void ThumbEventHandler(object sender, ThumbEventArgs e);
71 |
72 | /* --------------------------------------------------------------------- */
73 | ///
74 | /// ThumbEngine
75 | ///
76 | ///
77 | /// サムネイル画像を実際に生成するエンジン.
78 | /// 通常は,Thumbnail.Tag にインスタンスを保持しておく.
79 | /// 生成したものは,オブジェクト内でキャッシュしておく.
80 | ///
81 | ///
82 | /* --------------------------------------------------------------------- */
83 | public class ThumbEngine : IDisposable {
84 | /* ----------------------------------------------------------------- */
85 | /// ThumbEngine
86 | /* ----------------------------------------------------------------- */
87 | public ThumbEngine(PDF core, int width) {
88 | core_ = core;
89 | width_ = width;
90 |
91 | var tmp = System.Environment.GetEnvironmentVariable("tmp");
92 | if (tmp == null) tmp = System.Environment.GetEnvironmentVariable("temp");
93 | if (tmp == null) {
94 | var exec = System.Reflection.Assembly.GetEntryAssembly();
95 | tmp = System.IO.Path.GetDirectoryName(exec.Location);
96 | }
97 | cached_ = tmp + '\\' + System.IO.Path.GetRandomFileName();
98 | System.IO.Directory.CreateDirectory(cached_);
99 |
100 | worker_.DoWork -= new DoWorkEventHandler(DoWorkHandler);
101 | worker_.DoWork += new DoWorkEventHandler(DoWorkHandler);
102 | worker_.RunWorkerCompleted -= new RunWorkerCompletedEventHandler(RunCompletedHandler);
103 | worker_.RunWorkerCompleted += new RunWorkerCompletedEventHandler(RunCompletedHandler);
104 | }
105 |
106 | /* ----------------------------------------------------------------- */
107 | /// Core
108 | /* ----------------------------------------------------------------- */
109 | public PDF Core {
110 | get { return core_; }
111 | set { core_ = value; }
112 | }
113 |
114 | /* ----------------------------------------------------------------- */
115 | /// QueueCount
116 | /* ----------------------------------------------------------------- */
117 | public int QueueCount {
118 | get {
119 | lock (lock_) {
120 | return queue_.Count;
121 | }
122 | }
123 | }
124 |
125 | /* ----------------------------------------------------------------- */
126 | /// QueueLimit
127 | /* ----------------------------------------------------------------- */
128 | public int QueueLimit {
129 | get {
130 | lock (lock_) {
131 | return queue_limit_;
132 | }
133 | }
134 |
135 | set {
136 | lock (lock_) {
137 | queue_limit_ = value;
138 | }
139 | }
140 | }
141 |
142 | /* ----------------------------------------------------------------- */
143 | ///
144 | /// CacheSize
145 | ///
146 | ///
147 | /// 指定されたページ数分だけメモリ上に確保しておく.それ以外の
148 | /// サムネイル画像に関しては,一時ファイルを作成してそこに
149 | /// 保存する.
150 | ///
151 | ///
152 | /* ----------------------------------------------------------------- */
153 | public int CacheSize {
154 | get {
155 | lock (lock_) {
156 | return cache_size_;
157 | }
158 | }
159 |
160 | set {
161 | lock (lock_) {
162 | cache_size_ = value;
163 | }
164 | }
165 | }
166 |
167 | /* ----------------------------------------------------------------- */
168 | /// Contains
169 | /* ----------------------------------------------------------------- */
170 | public bool Contains(int pagenum) {
171 | lock (lock_) {
172 | return images_.ContainsKey(pagenum);
173 | }
174 | }
175 |
176 | /* ----------------------------------------------------------------- */
177 | /// Get
178 | /* ----------------------------------------------------------------- */
179 | public Image Get(int pagenum) {
180 | lock (lock_) {
181 | if (images_.ContainsKey(pagenum)) return images_[pagenum];
182 | }
183 | return null;
184 | }
185 |
186 | /* ----------------------------------------------------------------- */
187 | ///
188 | /// Enqueue
189 | ///
190 | ///
191 | /// MEMO: 不必要なキューの削除は,本来はイベントが発生した段階
192 | /// でクリアするはずなのだが,うまくいっていない(lock_ を奪えてない?)
193 | /// 現状は,必要なさそうな数(画面に表示されるサムネイルは 5 ~ 10
194 | /// 程度)のキューが溜まったら順次 Dequeue() で削除している.
195 | /// TODO: 不必要なキューの削除処理を改善する.
196 | ///
197 | ///
198 | /* ----------------------------------------------------------------- */
199 | public void Enqueue(int pagenum) {
200 | lock (lock_) {
201 | if (!queue_.ContainsKey(pagenum)) {
202 | queue_.Add(pagenum, null);
203 | if (queue_.Count > queue_limit_) {
204 | var first = queue_.Keys[0];
205 | var last = queue_.Keys[queue_.Count - 1];
206 | if (Math.Abs(pagenum - first) > Math.Abs(pagenum - last)) queue_.Remove(first);
207 | else queue_.Remove(last);
208 | }
209 | }
210 | if (!worker_.IsBusy) worker_.RunWorkerAsync();
211 | }
212 | }
213 |
214 | /* ----------------------------------------------------------------- */
215 | /// ClearQueue
216 | /* ----------------------------------------------------------------- */
217 | public void ClearQueue() {
218 | lock (lock_) {
219 | queue_.Clear();
220 | }
221 | }
222 |
223 | /* ----------------------------------------------------------------- */
224 | /// Clear
225 | /* ----------------------------------------------------------------- */
226 | public void Clear() {
227 | lock (lock_) {
228 | foreach (Image item in images_.Values) item.Dispose();
229 | images_.Clear();
230 | queue_.Clear();
231 | }
232 | }
233 |
234 | /* ----------------------------------------------------------------- */
235 | /// Dispose
236 | /* ----------------------------------------------------------------- */
237 | public void Dispose() {
238 | Dispose(true);
239 | GC.SuppressFinalize(this);
240 | }
241 |
242 | /* ----------------------------------------------------------------- */
243 | ///
244 | /// Dispose
245 | ///
246 | ///
247 | /// TODO: worker を何とかする.
248 | ///
249 | ///
250 | /* ----------------------------------------------------------------- */
251 | protected virtual void Dispose(bool disposing) {
252 | if (!disposed_) {
253 | if (disposing) {
254 | lock (internal_lock_) {
255 | lock (lock_) {
256 | queue_.Clear();
257 | }
258 |
259 | worker_.Dispose();
260 | this.Clear();
261 | lock (core_)
262 | {
263 | core_ = null;
264 | }
265 | try {
266 | if (cached_ != null && System.IO.Directory.Exists(cached_)) {
267 | System.IO.Directory.Delete(cached_, true);
268 | }
269 | }
270 | catch (Exception err) {
271 | Utility.ErrorLog(err);
272 | }
273 | }
274 | }
275 | }
276 | disposed_ = true;
277 | }
278 |
279 | /* ----------------------------------------------------------------- */
280 | /// ImageGenerated
281 | /* ----------------------------------------------------------------- */
282 | public event ThumbEventHandler ImageGenerated;
283 | protected virtual void OnImageGenerated(ThumbEventArgs e) {
284 | if (ImageGenerated != null) ImageGenerated(this, e);
285 | }
286 |
287 | /* ----------------------------------------------------------------- */
288 | // 内部処理
289 | /* ----------------------------------------------------------------- */
290 | #region Private methods
291 |
292 | /* ----------------------------------------------------------------- */
293 | /// DoWorkHandler (private)
294 | /* ----------------------------------------------------------------- */
295 | private void DoWorkHandler(object sender, DoWorkEventArgs e) {
296 | int pagenum = 0;
297 | lock (lock_) {
298 | if (queue_.Count > 0) {
299 | pagenum = queue_.Keys[0];
300 | queue_.Remove(queue_.Keys[0]);
301 | }
302 | }
303 | if (pagenum > 0) this.GenerateImage(pagenum);
304 | e.Result = pagenum;
305 | }
306 |
307 | /* ----------------------------------------------------------------- */
308 | /// RunCompletedHandler (private)
309 | /* ----------------------------------------------------------------- */
310 | private void RunCompletedHandler(object sender, RunWorkerCompletedEventArgs e) {
311 | lock (lock_) {
312 | if (queue_.Count > 0) {
313 | lock (internal_lock_) {
314 | worker_.RunWorkerAsync();
315 | }
316 | }
317 | }
318 |
319 | int pagenum = (int)e.Result;
320 | if (pagenum > 0) {
321 | var args = new ThumbEventArgs(pagenum);
322 | this.OnImageGenerated(args);
323 | }
324 | }
325 |
326 | /* ----------------------------------------------------------------- */
327 | ///
328 | /// GenerateImage (private)
329 | ///
330 | ///
331 | /// MEMO: ロックは暫定処理.Microsoft によると public にアクセス
332 | /// 可能なオブジェクトを用いた lock は想定していないらしい.
333 | /// http://msdn.microsoft.com/ja-jp/library/c5kehkcz%28VS.80%29.aspx
334 | ///
335 | ///
336 | /* ----------------------------------------------------------------- */
337 | private void GenerateImage(int pagenum) {
338 | Image image = null;
339 | lock (internal_lock_) {
340 | if (core_ == null || images_ == null || images_.ContainsKey(pagenum)) return;
341 | var path = this.GetArchivedPath(pagenum);
342 | if (System.IO.File.Exists(path)) image = Bitmap.FromFile(path);
343 | else {
344 | lock (core_) {
345 | PDFLibNet.PDFPage page;
346 | if (!core_.Pages.TryGetValue(pagenum, out page)) return;
347 | int rot = page.Rotation;
348 | double ratio = (rot >= 45 && rot < 135) || (rot >= 225 && rot < 315) ?
349 | page.Width / (double)page.Height : page.Height / (double)page.Width;
350 | image = page.GetBitmap(width_, (int)(width_ * ratio));
351 | }
352 | }
353 | }
354 |
355 | int count = 0, first = 0, last = 0;
356 | lock (lock_) {
357 | images_.Add(pagenum, image);
358 | count = images_.Count;
359 | first = images_.Keys[0];
360 | last = images_.Keys[images_.Count - 1];
361 | }
362 |
363 | this.ArchiveImage(pagenum);
364 | if (count > this.CacheSize) {
365 | var archive = Math.Abs(pagenum - first) > Math.Abs(pagenum - last) ? first : last;
366 | this.DeleteImage(archive);
367 | }
368 | }
369 |
370 | /* ----------------------------------------------------------------- */
371 | /// ArchiveImage (private)
372 | /* ----------------------------------------------------------------- */
373 | private void ArchiveImage(int pagenum) {
374 | Image image = null;
375 | lock (internal_lock_) {
376 | if (core_ == null || !images_.ContainsKey(pagenum)) return;
377 |
378 | lock (lock_) {
379 | image = images_[pagenum];
380 | }
381 | }
382 |
383 | var path = this.GetArchivedPath(pagenum);
384 | if (!System.IO.File.Exists(path)) {
385 | lock (image) {
386 | image.Save(path);
387 | }
388 | }
389 | }
390 |
391 | /* ----------------------------------------------------------------- */
392 | /// DeleteImage (private)
393 | /* ----------------------------------------------------------------- */
394 | private void DeleteImage(int pagenum) {
395 | Image image = null;
396 | lock (internal_lock_) {
397 | if (core_ == null || !images_.ContainsKey(pagenum)) return;
398 | lock (lock_) {
399 | image = images_[pagenum];
400 | images_.Remove(pagenum);
401 | }
402 | }
403 | image.Dispose();
404 | }
405 |
406 | /* ----------------------------------------------------------------- */
407 | /// GetArchivedPath
408 | /* ----------------------------------------------------------------- */
409 | private string GetArchivedPath(int pagenum) {
410 | var dest = (cached_ != null && cached_.Length > 0) ? cached_ + "\\" : "";
411 | dest += pagenum.ToString() + ".png";
412 | return dest;
413 | }
414 |
415 | #endregion
416 |
417 | /* ----------------------------------------------------------------- */
418 | // メンバ変数の定義
419 | /* ----------------------------------------------------------------- */
420 | #region Member variables
421 | private PDF core_ = null;
422 | private int width_ = 0;
423 | private Container.SortedList queue_ = new Container.SortedList();
424 | private int queue_limit_ = 10;
425 | private Container.SortedList images_ = new Container.SortedList();
426 | private string cached_ = null;
427 | private int cache_size_ = 5;
428 | private object lock_ = new object();
429 | private object internal_lock_ = new object();
430 | private bool disposed_ = false;
431 | private BackgroundWorker worker_ = new BackgroundWorker();
432 | #endregion
433 | }
434 |
435 | /* --------------------------------------------------------------------- */
436 | /// Thumbnail
437 | /* --------------------------------------------------------------------- */
438 | public class Thumbnail : ListView {
439 | /* ----------------------------------------------------------------- */
440 | ///
441 | /// GetInstance
442 | ///
443 | ///
444 | /// 補助関数.Thumbnail オブジェクトは,何らかの Control
445 | /// オブジェクトに埋め込む (Controls に登録する)形で使用する為,
446 | /// 親となる Control オブジェクトから Thumbnail オブジェクトを
447 | /// 見つける際に使用する.
448 | ///
449 | ///
450 | /* ----------------------------------------------------------------- */
451 | public static Thumbnail GetInstance(Control parent) {
452 | return parent.Controls["Thumbnail"] as Thumbnail;
453 | }
454 |
455 | /* ----------------------------------------------------------------- */
456 | /// Constructor
457 | /* ----------------------------------------------------------------- */
458 | public Thumbnail(Control parent, Control src) : base() {
459 | this.Create(parent, src);
460 | }
461 |
462 | /* ----------------------------------------------------------------- */
463 | /// Engine
464 | /* ----------------------------------------------------------------- */
465 | public ThumbEngine Engine {
466 | get {
467 | lock (lock_) {
468 | return engine_;
469 | }
470 | }
471 | }
472 |
473 | /* ----------------------------------------------------------------- */
474 | /// Reset
475 | /* ----------------------------------------------------------------- */
476 | public void Reset() {
477 | lock (lock_) {
478 | if (this.Items.Count > 0) this.Items.Clear();
479 | engine_.Clear();
480 | }
481 | }
482 |
483 | /* ----------------------------------------------------------------- */
484 | /// Reset
485 | /* ----------------------------------------------------------------- */
486 | public void Reset(Control control) {
487 | this.Restruct(control);
488 | }
489 |
490 | /* ----------------------------------------------------------------- */
491 | /// EraseBackground
492 | /* ----------------------------------------------------------------- */
493 | public bool EraseBackground {
494 | get { return erase_background_; }
495 | set { erase_background_ = value; }
496 | }
497 |
498 | /* ----------------------------------------------------------------- */
499 | /// WndProc
500 | /* ----------------------------------------------------------------- */
501 | protected override void WndProc(ref Message m) {
502 | const int WM_ERASEBKGND = 0x0014;
503 | const int WM_NCCALCSIZE = 0x0083;
504 |
505 | const int SB_HORZ = 0x0000;
506 | //const int SB_VERT = 0x0001;
507 |
508 | lock (lock_) {
509 | if (engine_ != null) {
510 | switch (m.Msg) {
511 | case WM_ERASEBKGND:
512 | if (erase_background_) base.WndProc(ref m);
513 | return;
514 | case WM_NCCALCSIZE:
515 | // 水平スクロールバーは強制非表示
516 | ShowScrollBar(this.Handle, SB_HORZ, false);
517 | break;
518 | default:
519 | break;
520 | }
521 | }
522 | }
523 | base.WndProc(ref m);
524 | }
525 |
526 | /* ----------------------------------------------------------------- */
527 | /// Dispose
528 | /* ----------------------------------------------------------------- */
529 | protected override void Dispose(bool disposing) {
530 | base.Dispose(disposing);
531 | try {
532 | if (disposing) {
533 | lock (lock_) {
534 | if (engine_ != null) {
535 | engine_.ImageGenerated -= new ThumbEventHandler(ImageGeneratedHandler);
536 | engine_.Dispose();
537 | engine_ = null;
538 | }
539 | }
540 | }
541 | }
542 | catch (Exception err) {
543 | Utility.ErrorLog(err);
544 | }
545 | }
546 |
547 | /* ----------------------------------------------------------------- */
548 | /// Create (private)
549 | /* ----------------------------------------------------------------- */
550 | private void Create(Control parent, Control src) {
551 | if (src == null) return;
552 | var src_engine = src.Tag as CanvasEngine;
553 | if (src_engine == null) return;
554 |
555 | this.Name = "Thumbnail";
556 | this.BackColor = Color.DimGray;
557 | this.Alignment = ListViewAlignment.Default;
558 | this.MultiSelect = false;
559 | this.Dock = DockStyle.Fill;
560 | this.OwnerDraw = true;
561 |
562 | lock (lock_) {
563 | engine_ = new ThumbEngine(src_engine.Core, 256);
564 | engine_.ImageGenerated -= new ThumbEventHandler(ImageGeneratedHandler);
565 | engine_.ImageGenerated += new ThumbEventHandler(ImageGeneratedHandler);
566 | }
567 |
568 | parent.Controls.Add(this);
569 | this.Restruct(this);
570 |
571 | this.DrawItem -= new DrawListViewItemEventHandler(DrawItemHandler);
572 | this.DrawItem += new DrawListViewItemEventHandler(DrawItemHandler);
573 | this.Resize -= new EventHandler(ResizeHandler);
574 | this.Resize += new EventHandler(ResizeHandler);
575 | this.MouseEnter -= new EventHandler(MouseEnterHandler);
576 | this.MouseEnter += new EventHandler(MouseEnterHandler);
577 | }
578 |
579 | /* ----------------------------------------------------------------- */
580 | /// Restruct (private)
581 | /* ----------------------------------------------------------------- */
582 | private void Restruct(object sender) {
583 | lock (lock_) {
584 | try {
585 | var control = sender as Control;
586 | if (control == null || engine_ == null) return;
587 |
588 | var parent = control.Parent;
589 | if (parent == null) return;
590 | var core = engine_.Core;
591 |
592 | if (core == null) return;
593 | // 水平スクロールバーが出ないサイズ.
594 | // 16 は垂直スクロールバーの幅(TODO: 垂直スクロールバーの幅の取得方法).
595 | int rot = core.Pages[1].Rotation;
596 | double ratio = (rot >= 45 && rot < 135) || (rot >= 225 && rot < 315) ?
597 | core.Pages[1].Width / (double)core.Pages[1].Height :
598 | core.Pages[1].Height / (double)core.Pages[1].Width;
599 | int width = parent.ClientSize.Width;
600 | if (width * ratio * core.PageCount > parent.Size.Height) width -= 20;
601 | width -= 3; // NOTE: 余白を持たせる.手動で微調整したもの
602 | int height = (int)(width * ratio);
603 | engine_.ClearQueue();
604 | engine_.QueueLimit = parent.Height / height * 2;
605 | engine_.CacheSize = engine_.QueueLimit;
606 |
607 | if (width != this.TileSize.Width) {
608 | this.BeginUpdate();
609 | this.View = View.Tile;
610 | this.TileSize = new Size(width, height);
611 | if (this.Items.Count > 0) this.Items.Clear();
612 | for (int i = 0; i < core.PageCount; i++) this.Items.Add((i + 1).ToString());
613 | this.EndUpdate();
614 | }
615 | }
616 | catch (Exception err) {
617 | Utility.ErrorLog(err);
618 | }
619 | }
620 | }
621 |
622 | /* ----------------------------------------------------------------- */
623 | // イベントハンドラの定義
624 | /* ----------------------------------------------------------------- */
625 | #region Event handlers
626 | /* ----------------------------------------------------------------- */
627 | ///
628 | /// DrawItemHandler (private)
629 | ///
630 | ///
631 | /// サムネイルの DrawItem イベントハンドラ.
632 | ///
633 | ///
634 | /* ----------------------------------------------------------------- */
635 | private void DrawItemHandler(object sender, DrawListViewItemEventArgs e) {
636 | if (e.ItemIndex >= this.Items.Count) return;
637 |
638 | lock (lock_) {
639 | if (engine_ == null) return;
640 |
641 | Rectangle rect = new Rectangle(e.Bounds.Location, e.Bounds.Size);
642 | rect.Inflate(-5, -5);
643 | var image = engine_.Get(e.ItemIndex + 1);
644 | if (image != null) {
645 | lock (image) {
646 | e.Graphics.DrawImage(image, rect);
647 | }
648 | }
649 | else {
650 | engine_.Enqueue(e.ItemIndex + 1);
651 | this.Cursor = Cursors.AppStarting;
652 |
653 | // 生成されてないページは真っ白な画像を表示する.
654 | using (var brush = new SolidBrush(Color.White)) {
655 | e.Graphics.FillRectangle(brush, rect);
656 | }
657 | }
658 | e.Graphics.DrawRectangle(Pens.LightGray, rect);
659 |
660 | // MEMO: キャプションを描画する方法.
661 | // var stringFormat = new StringFormat();
662 | // stringFormat.Alignment = StringAlignment.Center;
663 | // stringFormat.LineAlignment = StringAlignment.Center;
664 | // e.Graphics.DrawString(e.Item.Text, canvas.Font, Brushes.Black, new RectangleF(e.Bounds.X, e.Bounds.Y + e.Bounds.Height - 10, e.Bounds.Width, 10), stringFormat);
665 |
666 | if (e.ItemIndex == engine_.Core.CurrentPage - 1) {
667 | using (var pen = new Pen(Color.FromArgb(255, 50, 0))) {
668 | pen.Width = 2;
669 | e.Graphics.DrawRectangle(pen, rect);
670 | }
671 | }
672 | }
673 | }
674 |
675 | /* ----------------------------------------------------------------- */
676 | /// ResizeHandler
677 | /* ----------------------------------------------------------------- */
678 | private void ResizeHandler(object sender, EventArgs e) {
679 | this.Restruct(sender);
680 | }
681 |
682 | /* ----------------------------------------------------------------- */
683 | /// MouseEnterHandler
684 | /* ----------------------------------------------------------------- */
685 | private void MouseEnterHandler(object sender, EventArgs e) {
686 | this.Focus();
687 | }
688 |
689 | /* ----------------------------------------------------------------- */
690 | /// ImageGeneratedHandler
691 | /* ----------------------------------------------------------------- */
692 | private void ImageGeneratedHandler(object sender, ThumbEventArgs e) {
693 | if (e.PageNum <= 0 && e.PageNum >= this.Items.Count) return;
694 | this.Invalidate(this.Items[e.PageNum - 1].Bounds);
695 |
696 | var engine = sender as ThumbEngine;
697 | if (engine == null || engine.QueueCount <= 0) this.Cursor = Cursors.Default;
698 | else this.Cursor = Cursors.AppStarting;
699 | }
700 |
701 | #endregion
702 |
703 | /* ----------------------------------------------------------------- */
704 | // 使用している Win32 API
705 | /* ----------------------------------------------------------------- */
706 | #region Win32 APIs
707 |
708 | [DllImport("user32.dll")]
709 | private static extern bool ShowScrollBar(IntPtr hWnd, int wBar, bool bShow);
710 |
711 | #endregion
712 |
713 | /* ----------------------------------------------------------------- */
714 | // メンバ変数の定義
715 | /* ----------------------------------------------------------------- */
716 | #region Member variables
717 | private bool erase_background_ = true;
718 | private ThumbEngine engine_ = null;
719 | private object lock_ = new object();
720 | #endregion
721 | }
722 | }
723 |
--------------------------------------------------------------------------------
/cubepdf-viewer/UserSetting.cs:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------------- */
2 | /*
3 | * UserSetting.cs
4 | *
5 | * Copyright (c) 2010 CubeSoft Inc. All rights reserved.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see < http://www.gnu.org/licenses/ >.
19 | *
20 | * Last-modified: Tue 05 Oct 2010 12:24:00 JST
21 | */
22 | /* ------------------------------------------------------------------------- */
23 | using System;
24 | using System.Collections.Generic;
25 | using System.Drawing;
26 |
27 | namespace Cube {
28 | /* --------------------------------------------------------------------- */
29 | /// Navigaion
30 | /* --------------------------------------------------------------------- */
31 | public enum NavigationCondition {
32 | None = 0x00, Thumbnail = 0x01, Bookmark = 0x02
33 | }
34 |
35 | /* --------------------------------------------------------------------- */
36 | /// UserSetting
37 | /* --------------------------------------------------------------------- */
38 | public class UserSetting {
39 | /* ----------------------------------------------------------------- */
40 | /// Constructor
41 | /* ----------------------------------------------------------------- */
42 | public UserSetting() {
43 | var registry = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(REG_ROOT);
44 | navi_ = (NavigationCondition)registry.GetValue(REG_NAVIGATION, NavigationCondition.Thumbnail);
45 | fit_ = (FitCondition)registry.GetValue(REG_FIT, FitCondition.Height);
46 | pos_.X = (int)registry.GetValue(REG_X, 30);
47 | pos_.Y = (int)registry.GetValue(REG_Y, 30);
48 | size_.Width = (int)registry.GetValue(REG_WIDTH, 0);
49 | size_.Height = (int)registry.GetValue(REG_HEIGHT, 0);
50 | thumb_width_ = (int)registry.GetValue(REG_THUMBWIDTH, 0);
51 | menu_ = ((int)registry.GetValue(REG_MENU, 1) != 0);
52 | adobe_ = ((int)registry.GetValue(REG_ADOBE, 1) != 0);
53 | }
54 |
55 | /* ----------------------------------------------------------------- */
56 | /// Save
57 | /* ----------------------------------------------------------------- */
58 | public void Save() {
59 | var registry = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(REG_ROOT);
60 | try {
61 | registry.SetValue(REG_NAVIGATION, (int)navi_);
62 | registry.SetValue(REG_FIT, (int)fit_);
63 | registry.SetValue(REG_X, pos_.X);
64 | registry.SetValue(REG_Y, pos_.Y);
65 | registry.SetValue(REG_WIDTH, size_.Width);
66 | registry.SetValue(REG_HEIGHT, size_.Height);
67 | registry.SetValue(REG_THUMBWIDTH, thumb_width_);
68 | int x = menu_ ? 1 : 0;
69 | registry.SetValue(REG_MENU, x);
70 | x = adobe_ ? 1 : 0;
71 | registry.SetValue(REG_ADOBE, x);
72 | }
73 | catch (Exception err) {
74 | Utility.ErrorLog(err);
75 | }
76 | }
77 |
78 | /* ----------------------------------------------------------------- */
79 | /// Navigation
80 | /* ----------------------------------------------------------------- */
81 | public NavigationCondition Navigaion {
82 | get { return navi_; }
83 | set { navi_ = value; }
84 | }
85 |
86 | /* ----------------------------------------------------------------- */
87 | /// FitCondition
88 | /* ----------------------------------------------------------------- */
89 | public FitCondition Fit {
90 | get { return fit_; }
91 | set { fit_ = value; }
92 | }
93 |
94 | /* ----------------------------------------------------------------- */
95 | /// Position
96 | /* ----------------------------------------------------------------- */
97 | public Point Position {
98 | get { return pos_; }
99 | set { pos_ = value; }
100 | }
101 |
102 | /* ----------------------------------------------------------------- */
103 | /// Size
104 | /* ----------------------------------------------------------------- */
105 | public Size Size {
106 | get { return size_; }
107 | set { size_ = value; }
108 | }
109 |
110 | /* ----------------------------------------------------------------- */
111 | /// ThumbWidth
112 | /* ----------------------------------------------------------------- */
113 | public int ThumbWidth {
114 | get { return thumb_width_; }
115 | set { thumb_width_ = value; }
116 | }
117 |
118 | /* ----------------------------------------------------------------- */
119 | /// ShowMenuWarning
120 | /* ----------------------------------------------------------------- */
121 | public bool ShowMenuInfo {
122 | get { return menu_; }
123 | set { menu_ = value; }
124 | }
125 |
126 | /* ----------------------------------------------------------------- */
127 | /// UseAdobeExtension
128 | /* ----------------------------------------------------------------- */
129 | public bool UseAdobeExtension {
130 | get { return adobe_; }
131 | set { adobe_ = value; }
132 | }
133 |
134 | /* ----------------------------------------------------------------- */
135 | // メンバ変数の定義
136 | /* ----------------------------------------------------------------- */
137 | #region Member variables
138 | private NavigationCondition navi_ = NavigationCondition.Thumbnail;
139 | private FitCondition fit_ = FitCondition.Height;
140 | private Point pos_ = new Point(0, 0);
141 | private Size size_ = new Size(0, 0);
142 | private int thumb_width_ = 0;
143 | private bool menu_ = true;
144 | private bool adobe_ = true;
145 | #endregion
146 |
147 | /* ----------------------------------------------------------------- */
148 | // レジストリの名前の定義
149 | /* ----------------------------------------------------------------- */
150 | #region Registry settings
151 | private static string REG_ROOT = @"Software\CubeSoft\CubePDF Viewer";
152 | private static string REG_NAVIGATION = "Navigation";
153 | private static string REG_FIT = "Fit";
154 | private static string REG_X = "X";
155 | private static string REG_Y = "Y";
156 | private static string REG_WIDTH = "Width";
157 | private static string REG_HEIGHT = "Height";
158 | private static string REG_THUMBWIDTH = "ThumbWidth";
159 | private static string REG_MENU = "MenuWarnDialog";
160 | private static string REG_ADOBE = "AdobeExtension";
161 | #endregion
162 | }
163 | }
164 |
--------------------------------------------------------------------------------
/cubepdf-viewer/Utility.cs:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------------- */
2 | /*
3 | * Utility.cs
4 | *
5 | * Copyright (c) 2010 CubeSoft Inc. All rights reserved.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see < http://www.gnu.org/licenses/ >.
19 | *
20 | * Last-modified: Mon 02 Aug 2010 22:59:00 JST
21 | */
22 | /* ------------------------------------------------------------------------- */
23 | using System;
24 | using System.Diagnostics;
25 | using System.Drawing;
26 | using System.Runtime.InteropServices;
27 |
28 | namespace Cube {
29 | /* --------------------------------------------------------------------- */
30 | /// Utility
31 | /* --------------------------------------------------------------------- */
32 | public abstract class Utility {
33 | /* ----------------------------------------------------------------- */
34 | /// SetupLog
35 | /* ----------------------------------------------------------------- */
36 | public static void SetupLog(string src) {
37 | if (System.IO.File.Exists(src)) System.IO.File.Delete(src);
38 | Trace.Listeners.Remove("Default");
39 | Trace.Listeners.Add(new TextWriterTraceListener(src));
40 | Trace.AutoFlush = true;
41 | }
42 |
43 | /* ----------------------------------------------------------------- */
44 | /// ErrorLog
45 | /* ----------------------------------------------------------------- */
46 | public static void ErrorLog(Exception err) {
47 | Trace.WriteLine(DateTime.Now.ToString() + ": TYPE: " + err.GetType().ToString());
48 | Trace.WriteLine(DateTime.Now.ToString() + ": SOURCE: " + err.Source);
49 | Trace.WriteLine(DateTime.Now.ToString() + ": MESSAGE: " + err.Message);
50 | Trace.WriteLine(DateTime.Now.ToString() + ": STACKTRACE: " + err.StackTrace);
51 | }
52 |
53 | /* ----------------------------------------------------------------- */
54 | /// GetIcon
55 | /* ----------------------------------------------------------------- */
56 | public static Icon GetIcon(string path) {
57 | var info = new SHFILEINFO();
58 | var status = SHGetFileInfo(path, 0, ref info, (uint)Marshal.SizeOf(info), SHGFI_ICON | SHGFI_LARGEICON);
59 | return (status != IntPtr.Zero) ? Icon.FromHandle(info.hIcon) : null;
60 | }
61 |
62 | /* ----------------------------------------------------------------- */
63 | /// TempPath
64 | /* ----------------------------------------------------------------- */
65 | public static string TempPath() {
66 | var dir = System.Environment.GetEnvironmentVariable("tmp");
67 | if (dir == null) dir = System.Environment.GetEnvironmentVariable("temp");
68 | if (dir == null) {
69 | var exec = System.Reflection.Assembly.GetEntryAssembly();
70 | dir = System.IO.Path.GetDirectoryName(exec.Location);
71 | }
72 | var dest = dir + '\\' + System.IO.Path.GetRandomFileName();
73 | return dest;
74 | }
75 |
76 | /* ----------------------------------------------------------------- */
77 | /// IsPSPrinter
78 | /* ----------------------------------------------------------------- */
79 | public static bool IsPSPrinter(string name) {
80 | IntPtr hdc = CreateDC(IntPtr.Zero, name, IntPtr.Zero, IntPtr.Zero);
81 | uint code = POSTSCRIPT_PASSTHROUGH;
82 | if(ExtEscape(hdc, QUERYESCSUPPORT, sizeof(int), BitConverter.GetBytes(code), 0, IntPtr.Zero) > 0) return true;
83 | return false;
84 | }
85 |
86 | /* ----------------------------------------------------------------- */
87 | // GetIcon() の為の Win32 API
88 | /* ----------------------------------------------------------------- */
89 | #region Win32 API for GetIcon().
90 | [DllImport("shell32.dll")]
91 | private static extern IntPtr SHGetFileInfo(string pszPath, uint dwFileAttributes, ref SHFILEINFO psfi, uint cbSizeFileInfo, uint uFlags);
92 |
93 | [DllImport("gdi32.dll")]
94 | static extern int ExtEscape(IntPtr hdc, uint nEscape, uint cbInput, byte[] lpszInData, int cbOutput, IntPtr lpszOutData);
95 |
96 | [DllImport("gdi32.dll")]
97 | static extern IntPtr CreateDC(IntPtr lpszDriver, string lpszDevice, IntPtr lpszOutput, IntPtr lpInitData);
98 |
99 | private const uint SHGFI_ICON = 0x100; // アイコン・リソースの取得
100 | private const uint SHGFI_LARGEICON = 0x0; // 大きいアイコン
101 | private const uint SHGFI_SMALLICON = 0x1; // 小さいアイコン
102 | private const uint POSTSCRIPT_PASSTHROUGH = 4115;
103 | private const uint QUERYESCSUPPORT = 8;
104 |
105 | private struct SHFILEINFO {
106 | public IntPtr hIcon;
107 | public IntPtr iIcon;
108 | public uint dwAttributes;
109 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
110 | public string szDisplayName;
111 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)]
112 | public string szTypeName;
113 | };
114 | #endregion
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/cubepdf-viewer/VersionDialog.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace Cube
2 | {
3 | partial class VersionDialog
4 | {
5 | ///
6 | /// 必要なデザイナー変数です。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 使用中のリソースをすべてクリーンアップします。
12 | ///
13 | /// マネージ リソースが破棄される場合 true、破棄されない場合は false です。
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows フォーム デザイナーで生成されたコード
24 |
25 | ///
26 | /// デザイナー サポートに必要なメソッドです。このメソッドの内容を
27 | /// コード エディターで変更しないでください。
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.MainSplitContainer = new System.Windows.Forms.SplitContainer();
32 | this.TitlePictureBox = new System.Windows.Forms.PictureBox();
33 | this.CubePDFLinkLabel = new System.Windows.Forms.LinkLabel();
34 | this.VersionLabel = new System.Windows.Forms.Label();
35 | this.CopyrightLabel = new System.Windows.Forms.Label();
36 | this.LogoPictureBox = new System.Windows.Forms.PictureBox();
37 | this.OKButton = new System.Windows.Forms.Button();
38 | this.MainSplitContainer.Panel1.SuspendLayout();
39 | this.MainSplitContainer.Panel2.SuspendLayout();
40 | this.MainSplitContainer.SuspendLayout();
41 | ((System.ComponentModel.ISupportInitialize)(this.TitlePictureBox)).BeginInit();
42 | ((System.ComponentModel.ISupportInitialize)(this.LogoPictureBox)).BeginInit();
43 | this.SuspendLayout();
44 | //
45 | // MainSplitContainer
46 | //
47 | this.MainSplitContainer.BackColor = System.Drawing.SystemColors.Control;
48 | this.MainSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
49 | this.MainSplitContainer.IsSplitterFixed = true;
50 | this.MainSplitContainer.Location = new System.Drawing.Point(0, 0);
51 | this.MainSplitContainer.Name = "MainSplitContainer";
52 | this.MainSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
53 | //
54 | // MainSplitContainer.Panel1
55 | //
56 | this.MainSplitContainer.Panel1.BackColor = System.Drawing.Color.White;
57 | this.MainSplitContainer.Panel1.Controls.Add(this.CopyrightLabel);
58 | this.MainSplitContainer.Panel1.Controls.Add(this.VersionLabel);
59 | this.MainSplitContainer.Panel1.Controls.Add(this.TitlePictureBox);
60 | this.MainSplitContainer.Panel1.Controls.Add(this.CubePDFLinkLabel);
61 | this.MainSplitContainer.Panel1.Controls.Add(this.LogoPictureBox);
62 | //
63 | // MainSplitContainer.Panel2
64 | //
65 | this.MainSplitContainer.Panel2.Controls.Add(this.OKButton);
66 | this.MainSplitContainer.Size = new System.Drawing.Size(333, 163);
67 | this.MainSplitContainer.SplitterDistance = 120;
68 | this.MainSplitContainer.SplitterWidth = 2;
69 | this.MainSplitContainer.TabIndex = 0;
70 | //
71 | // TitlePictureBox
72 | //
73 | this.TitlePictureBox.Image = global::Cube.Properties.Resources.title;
74 | this.TitlePictureBox.Location = new System.Drawing.Point(108, 16);
75 | this.TitlePictureBox.Name = "TitlePictureBox";
76 | this.TitlePictureBox.Size = new System.Drawing.Size(146, 36);
77 | this.TitlePictureBox.TabIndex = 12;
78 | this.TitlePictureBox.TabStop = false;
79 | //
80 | // CubePDFLinkLabel
81 | //
82 | this.CubePDFLinkLabel.AutoSize = true;
83 | this.CubePDFLinkLabel.Location = new System.Drawing.Point(60, 92);
84 | this.CubePDFLinkLabel.Name = "CubePDFLinkLabel";
85 | this.CubePDFLinkLabel.Size = new System.Drawing.Size(211, 12);
86 | this.CubePDFLinkLabel.TabIndex = 2;
87 | this.CubePDFLinkLabel.TabStop = true;
88 | this.CubePDFLinkLabel.Text = "http://www.cube-soft.jp/cubepdfviewer/";
89 | this.CubePDFLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.CubePDFLinkLabel_LinkClicked);
90 | //
91 | // VersionLabel
92 | //
93 | this.VersionLabel.AutoSize = true;
94 | this.VersionLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
95 | this.VersionLabel.Location = new System.Drawing.Point(108, 52);
96 | this.VersionLabel.Name = "VersionLabel";
97 | this.VersionLabel.Size = new System.Drawing.Size(44, 12);
98 | this.VersionLabel.TabIndex = 4;
99 | this.VersionLabel.Text = "Version";
100 | //
101 | // CopyrightLabel
102 | //
103 | this.CopyrightLabel.AutoSize = true;
104 | this.CopyrightLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
105 | this.CopyrightLabel.Location = new System.Drawing.Point(108, 64);
106 | this.CopyrightLabel.Name = "CopyrightLabel";
107 | this.CopyrightLabel.Size = new System.Drawing.Size(153, 12);
108 | this.CopyrightLabel.TabIndex = 5;
109 | this.CopyrightLabel.Text = "Copyright (c) 2010 CubeSoft.";
110 | //
111 | // LogoPictureBox
112 | //
113 | this.LogoPictureBox.Image = global::Cube.Properties.Resources.icon;
114 | this.LogoPictureBox.Location = new System.Drawing.Point(62, 26);
115 | this.LogoPictureBox.Name = "LogoPictureBox";
116 | this.LogoPictureBox.Size = new System.Drawing.Size(32, 42);
117 | this.LogoPictureBox.TabIndex = 11;
118 | this.LogoPictureBox.TabStop = false;
119 | //
120 | // OKButton
121 | //
122 | this.OKButton.Location = new System.Drawing.Point(130, 8);
123 | this.OKButton.Name = "OKButton";
124 | this.OKButton.Size = new System.Drawing.Size(75, 23);
125 | this.OKButton.TabIndex = 1;
126 | this.OKButton.Text = "OK";
127 | this.OKButton.UseVisualStyleBackColor = true;
128 | this.OKButton.Click += new System.EventHandler(this.OKButton_Click);
129 | //
130 | // VersionDialog
131 | //
132 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
133 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
134 | this.ClientSize = new System.Drawing.Size(333, 163);
135 | this.Controls.Add(this.MainSplitContainer);
136 | this.DoubleBuffered = true;
137 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
138 | this.MaximizeBox = false;
139 | this.MinimizeBox = false;
140 | this.Name = "VersionDialog";
141 | this.ShowIcon = false;
142 | this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
143 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
144 | this.Text = "CubePDF Viewer について";
145 | this.Shown += new System.EventHandler(this.VersionDialog_Shown);
146 | this.MainSplitContainer.Panel1.ResumeLayout(false);
147 | this.MainSplitContainer.Panel1.PerformLayout();
148 | this.MainSplitContainer.Panel2.ResumeLayout(false);
149 | this.MainSplitContainer.ResumeLayout(false);
150 | ((System.ComponentModel.ISupportInitialize)(this.TitlePictureBox)).EndInit();
151 | ((System.ComponentModel.ISupportInitialize)(this.LogoPictureBox)).EndInit();
152 | this.ResumeLayout(false);
153 |
154 | }
155 |
156 | #endregion
157 |
158 | private System.Windows.Forms.SplitContainer MainSplitContainer;
159 | private System.Windows.Forms.LinkLabel CubePDFLinkLabel;
160 | private System.Windows.Forms.Label VersionLabel;
161 | private System.Windows.Forms.Label CopyrightLabel;
162 | private System.Windows.Forms.PictureBox LogoPictureBox;
163 | private System.Windows.Forms.Button OKButton;
164 | private System.Windows.Forms.PictureBox TitlePictureBox;
165 |
166 |
167 | }
168 | }
--------------------------------------------------------------------------------
/cubepdf-viewer/VersionDialog.cs:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------------- */
2 | /*
3 | * VersionDialog.cs
4 | *
5 | * Copyright (c) 2010 CubeSoft Inc. All rights reserved.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see < http://www.gnu.org/licenses/ >.
19 | *
20 | * Last-modified: Fri 26 Nov 2010 22:44:00 JST
21 | */
22 | /* ------------------------------------------------------------------------- */
23 | using System;
24 | using System.Windows.Forms;
25 |
26 | namespace Cube {
27 | /* --------------------------------------------------------------------- */
28 | /// VersionDialog
29 | /* --------------------------------------------------------------------- */
30 | public partial class VersionDialog : Form {
31 | /* ----------------------------------------------------------------- */
32 | /// Constructor
33 | /* ----------------------------------------------------------------- */
34 | public VersionDialog() {
35 | InitializeComponent();
36 | var version = "unknown";
37 | var registry = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(REG_ROOT, false);
38 | if (registry != null) version = (string)registry.GetValue(REG_VERSION, "unknown");
39 | var edition = (IntPtr.Size == 4) ? "x86" : "x64";
40 | this.VersionLabel.Text = String.Format("Version: {0} ({1})", version, edition);
41 | //LogoPictureBox.Image = Cube.Properties.Resources.cubepdf_viewer.ToBitmap();
42 | }
43 |
44 | /* ----------------------------------------------------------------- */
45 | /// VersionDialog_Shown
46 | /* ----------------------------------------------------------------- */
47 | private void VersionDialog_Shown(object sender, EventArgs e) {
48 | OKButton.Focus();
49 | }
50 |
51 | /* ----------------------------------------------------------------- */
52 | /// CubePDFLinkLabel_LinkClicked
53 | /* ----------------------------------------------------------------- */
54 | private void CubePDFLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) {
55 | System.Diagnostics.Process.Start(CubePDFLinkLabel.Text);
56 | }
57 |
58 | /* ----------------------------------------------------------------- */
59 | /// OKButton_Click
60 | /* ----------------------------------------------------------------- */
61 | private void OKButton_Click(object sender, EventArgs e) {
62 | this.Close();
63 | }
64 |
65 | /* ----------------------------------------------------------------- */
66 | // 定数定義
67 | /* ----------------------------------------------------------------- */
68 | #region constant variables
69 | const string REG_ROOT = @"Software\CubeSoft\CubePDF Viewer";
70 | const string REG_VERSION = "Version";
71 | #endregion
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/cubepdf-viewer/VersionDialog.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/cubepdf-viewer/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | エラー
15 |
16 |
17 | このファイルはパスワードで保護されています。
18 |
19 |
20 | CubePDF Viewer
21 |
22 |
23 | (無題)
24 |
25 |
26 | Cube.Resources.hand_move.cur
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/cubepdf-viewer/cubepdf-viewer.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | x86
6 | 8.0.30703
7 | 2.0
8 | {F78B7F11-1A7A-4181-BC47-832A03D75324}
9 | WinExe
10 | Properties
11 | Cube
12 | cubepdf-viewer
13 | v2.0
14 |
15 |
16 | 512
17 |
18 |
19 | x86
20 | true
21 | full
22 | false
23 | bin\x86\Debug\
24 | DEBUG;TRACE
25 | prompt
26 | 4
27 |
28 |
29 | x86
30 | pdbonly
31 | true
32 | bin\x86\Release\
33 | TRACE
34 | prompt
35 | 4
36 | false
37 |
38 |
39 | cubepdf-viewer.ico
40 |
41 |
42 | true
43 | bin\x64\Debug\
44 | DEBUG;TRACE
45 | full
46 | x64
47 | prompt
48 | false
49 | false
50 |
51 |
52 | bin\x64\Release\
53 | TRACE
54 | true
55 | pdbonly
56 | x64
57 | prompt
58 | false
59 | false
60 |
61 |
62 |
63 | .\Jacksonsoft.CustomTabControl.dll
64 |
65 |
66 | .\PDFLibNet.dll
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 | Form
80 |
81 |
82 | MainForm.cs
83 |
84 |
85 | Form
86 |
87 |
88 | MenuDialog.cs
89 |
90 |
91 | Form
92 |
93 |
94 | PasswordDialog.cs
95 |
96 |
97 |
98 |
99 |
100 | Code
101 |
102 |
103 | Component
104 |
105 |
106 |
107 |
108 | Form
109 |
110 |
111 | VersionDialog.cs
112 |
113 |
114 | MainForm.cs
115 |
116 |
117 | MenuDialog.cs
118 |
119 |
120 | PasswordDialog.cs
121 |
122 |
123 | ResXFileCodeGenerator
124 | Resources.Designer.cs
125 | Designer
126 |
127 |
128 | True
129 | Resources.resx
130 | True
131 |
132 |
133 | VersionDialog.cs
134 |
135 |
136 | Designer
137 |
138 |
139 | SettingsSingleFileGenerator
140 | Settings.Designer.cs
141 |
142 |
143 | True
144 | Settings.settings
145 | True
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
207 |
--------------------------------------------------------------------------------
/cubepdf-viewer/cubepdf-viewer.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/cubepdf-viewer/cubepdf-viewer.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cube-soft/cubepdfviewer/bc4915071d5a223d044dc559019e49a307d73369/cubepdf-viewer/cubepdf-viewer.ico
--------------------------------------------------------------------------------
/cubepdf-viewer/cubepdf-viewer.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual C# Express 2010
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cubepdf-viewer", "cubepdf-viewer.csproj", "{F78B7F11-1A7A-4181-BC47-832A03D75324}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x64 = Debug|x64
9 | Debug|x86 = Debug|x86
10 | Release|x64 = Release|x64
11 | Release|x86 = Release|x86
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {F78B7F11-1A7A-4181-BC47-832A03D75324}.Debug|x64.ActiveCfg = Debug|x64
15 | {F78B7F11-1A7A-4181-BC47-832A03D75324}.Debug|x64.Build.0 = Debug|x64
16 | {F78B7F11-1A7A-4181-BC47-832A03D75324}.Debug|x86.ActiveCfg = Debug|x86
17 | {F78B7F11-1A7A-4181-BC47-832A03D75324}.Debug|x86.Build.0 = Debug|x86
18 | {F78B7F11-1A7A-4181-BC47-832A03D75324}.Release|x64.ActiveCfg = Release|x64
19 | {F78B7F11-1A7A-4181-BC47-832A03D75324}.Release|x64.Build.0 = Release|x64
20 | {F78B7F11-1A7A-4181-BC47-832A03D75324}.Release|x86.ActiveCfg = Release|x86
21 | {F78B7F11-1A7A-4181-BC47-832A03D75324}.Release|x86.Build.0 = Release|x86
22 | EndGlobalSection
23 | GlobalSection(SolutionProperties) = preSolution
24 | HideSolutionNode = FALSE
25 | EndGlobalSection
26 | EndGlobal
27 |
--------------------------------------------------------------------------------
/cubepdf-viewer/cubepdf-viewer2008.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | x86
6 | 9.0.30729
7 | 2.0
8 | {F78B7F11-1A7A-4181-BC47-832A03D75324}
9 | WinExe
10 | Properties
11 | Cube
12 | cubepdf-viewer
13 | v2.0
14 |
15 |
16 | 512
17 |
18 |
19 |
20 |
21 | x86
22 | true
23 | full
24 | false
25 | bin\x86\Debug\
26 | DEBUG;TRACE
27 | prompt
28 | 4
29 |
30 |
31 | x86
32 | pdbonly
33 | true
34 | bin\x86\Release\
35 | TRACE
36 | prompt
37 | 4
38 | false
39 |
40 |
41 | cubepdf-viewer.ico
42 |
43 |
44 | true
45 | bin\x64\Debug\
46 | DEBUG;TRACE
47 | full
48 | x64
49 | prompt
50 | false
51 | false
52 |
53 |
54 | bin\x64\Release\
55 | TRACE
56 | true
57 | pdbonly
58 | x64
59 | prompt
60 | false
61 | false
62 |
63 |
64 |
65 | .\Jacksonsoft.CustomTabControl.dll
66 |
67 |
68 | .\PDFLibNet.dll
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 | Form
82 |
83 |
84 | MainForm.cs
85 |
86 |
87 | Form
88 |
89 |
90 | MenuDialog.cs
91 |
92 |
93 | Form
94 |
95 |
96 | PasswordDialog.cs
97 |
98 |
99 |
100 |
101 |
102 | Code
103 |
104 |
105 | Component
106 |
107 |
108 |
109 |
110 | Form
111 |
112 |
113 | VersionDialog.cs
114 |
115 |
116 | MainForm.cs
117 |
118 |
119 | MenuDialog.cs
120 |
121 |
122 | PasswordDialog.cs
123 |
124 |
125 | ResXFileCodeGenerator
126 | Resources.Designer.cs
127 | Designer
128 |
129 |
130 | True
131 | Resources.resx
132 | True
133 |
134 |
135 | VersionDialog.cs
136 |
137 |
138 | Designer
139 |
140 |
141 | SettingsSingleFileGenerator
142 | Settings.Designer.cs
143 |
144 |
145 | True
146 | Settings.settings
147 | True
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
211 |
--------------------------------------------------------------------------------
/cubepdf-viewer/cubepdf-viewer2008.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 10.00
3 | # Visual C# Express 2008
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cubepdf-viewer2008", "cubepdf-viewer2008.csproj", "{F78B7F11-1A7A-4181-BC47-832A03D75324}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x64 = Debug|x64
9 | Debug|x86 = Debug|x86
10 | Release|x64 = Release|x64
11 | Release|x86 = Release|x86
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {F78B7F11-1A7A-4181-BC47-832A03D75324}.Debug|x64.ActiveCfg = Debug|x64
15 | {F78B7F11-1A7A-4181-BC47-832A03D75324}.Debug|x64.Build.0 = Debug|x64
16 | {F78B7F11-1A7A-4181-BC47-832A03D75324}.Debug|x86.ActiveCfg = Debug|x86
17 | {F78B7F11-1A7A-4181-BC47-832A03D75324}.Debug|x86.Build.0 = Debug|x86
18 | {F78B7F11-1A7A-4181-BC47-832A03D75324}.Release|x64.ActiveCfg = Release|x64
19 | {F78B7F11-1A7A-4181-BC47-832A03D75324}.Release|x64.Build.0 = Release|x64
20 | {F78B7F11-1A7A-4181-BC47-832A03D75324}.Release|x86.ActiveCfg = Release|x86
21 | {F78B7F11-1A7A-4181-BC47-832A03D75324}.Release|x86.Build.0 = Release|x86
22 | EndGlobalSection
23 | GlobalSection(SolutionProperties) = preSolution
24 | HideSolutionNode = FALSE
25 | EndGlobalSection
26 | EndGlobal
27 |
--------------------------------------------------------------------------------