• R/O
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#windowsobjective-ccocoaqtpython誰得phprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

デュアルディスプレイのセカンドモニターにPDF、動画、画像を表示。


Commit MetaInfo

Revision36 (tree)
Time2018-10-04 09:41:57
Authorbellyoshi

Log Message

Change Summary

Incremental Difference

--- pdfsecondmonitor/FileViewParam.vb (revision 35)
+++ pdfsecondmonitor/FileViewParam.vb (revision 36)
@@ -10,6 +10,7 @@
1010
1111 Public Sub New(ByVal filename As String)
1212 Me.FileName = filename
13+ Me.zoom = 100
1314 End Sub
1415
1516 Public Sub New()
--- pdfsecondmonitor/FormDispacher.vb (revision 35)
+++ pdfsecondmonitor/FormDispacher.vb (revision 36)
@@ -17,7 +17,7 @@
1717 End Sub
1818 Public Function GetAxPDF() As AxAcroPDFLib.AxAcroPDF
1919
20- Return frmPdfViewer.AxAcroPDF1
20+ Return _frmPdfViewer.AxAcroPDF1
2121
2222 End Function
2323
--- pdfsecondmonitor/ctlPdf.vb (revision 35)
+++ pdfsecondmonitor/ctlPdf.vb (revision 36)
@@ -64,11 +64,11 @@
6464 Return
6565 End If
6666 _backFileName = f.FileName
67-
67+ nudPdfZoom.Value = _fileViewParam.zoom
6868 If Not BackgroundWorker1.IsBusy Then
6969 BackgroundWorker1.RunWorkerAsync()
7070 End If
71- nudPdfZoom.Value = _fileViewParam.zoom
71+
7272 End Sub
7373
7474
@@ -111,18 +111,20 @@
111111 End Sub
112112
113113 Sub setzoom()
114- ' frmView.SetZoom(nudPdfZoom.Value)
114+ axPDF.setZoom(nudPdfZoom.Value)
115115 End Sub
116116
117117 Sub hideScrollbars()
118- ' axPDF.setShowScrollbars(False)
118+ axPDF.setShowScrollbars(False)
119119 End Sub
120120 Sub loadFile()
121+ axPDF.LoadFile(_fileViewParam.FileName)
122+ axPDF.Visible = True
121123 ' frmView.LoadFile(txtPDFFileName.Text)
122124 End Sub
123125
124126 Sub Loadfile2()
125- ' frmView.LoadFile(txtPDFFileName.Text)
127+ axPDF.LoadFile(_fileViewParam.FileName)
126128 End Sub
127129
128130
@@ -132,7 +134,7 @@
132134
133135 Sub hideNabi()
134136 _dispacher.frmPdfViewHideNavi()
135-
137+ 'todo:タスクパネルwinndowの非表示
136138 End Sub
137139
138140 Private Sub btnNavigateHide_Click(sender As Object, e As EventArgs) Handles btnNavigateHide.Click
--- pdfsecondmonitor/frmOperation.Designer.vb (revision 35)
+++ pdfsecondmonitor/frmOperation.Designer.vb (revision 36)
@@ -36,6 +36,7 @@
3636 Me.btnStartStop = New System.Windows.Forms.Button()
3737 Me.tbcFileOpes = New System.Windows.Forms.TabControl()
3838 Me.tpAdobePDF = New System.Windows.Forms.TabPage()
39+ Me.CtlPdf1 = New pdfsecondmonitor.ctlPdf()
3940 Me.tpImage = New System.Windows.Forms.TabPage()
4041 Me.Label6 = New System.Windows.Forms.Label()
4142 Me.txtPDFFileName = New System.Windows.Forms.TextBox()
@@ -45,7 +46,6 @@
4546 Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker()
4647 Me.Button1 = New System.Windows.Forms.Button()
4748 Me.Button2 = New System.Windows.Forms.Button()
48- Me.CtlPdf1 = New pdfsecondmonitor.ctlPdf()
4949 Me.GroupBox1.SuspendLayout()
5050 Me.tpMediaPlayer.SuspendLayout()
5151 Me.tbcFileOpes.SuspendLayout()
@@ -173,6 +173,13 @@
173173 Me.tpAdobePDF.Text = "PDFの表示"
174174 Me.tpAdobePDF.UseVisualStyleBackColor = True
175175 '
176+ 'CtlPdf1
177+ '
178+ Me.CtlPdf1.Location = New System.Drawing.Point(22, 31)
179+ Me.CtlPdf1.Name = "CtlPdf1"
180+ Me.CtlPdf1.Size = New System.Drawing.Size(796, 438)
181+ Me.CtlPdf1.TabIndex = 0
182+ '
176183 'tpImage
177184 '
178185 Me.tpImage.Location = New System.Drawing.Point(4, 25)
@@ -245,13 +252,6 @@
245252 Me.Button2.Text = "ファイルを追加する"
246253 Me.Button2.UseVisualStyleBackColor = True
247254 '
248- 'CtlPdf1
249- '
250- Me.CtlPdf1.Location = New System.Drawing.Point(22, 31)
251- Me.CtlPdf1.Name = "CtlPdf1"
252- Me.CtlPdf1.Size = New System.Drawing.Size(796, 438)
253- Me.CtlPdf1.TabIndex = 0
254- '
255255 'frmOperation
256256 '
257257 Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 15.0!)
--- pdfsecondmonitor/frmOperation.vb (revision 35)
+++ pdfsecondmonitor/frmOperation.vb (revision 36)
@@ -197,7 +197,10 @@
197197 Exit Sub
198198 End If
199199 txtPDFFileName.Text = fileviewinfo.FileName
200-
200+ Dim ext = IO.Path.GetExtension(fileviewinfo.FileName).ToLower()
201+ If ext = ".pdf" Then
202+ CtlPdf1.SetFileInfo(fileviewinfo)
203+ End If
201204 End Sub
202205
203206
@@ -231,6 +234,8 @@
231234
232235
233236
237+
238+
234239 #End Region
235240
236241 End Class
\ No newline at end of file
--- pdfsecondmonitor/frmPdfViewer.Designer.vb (revision 35)
+++ pdfsecondmonitor/frmPdfViewer.Designer.vb (revision 36)
@@ -24,44 +24,31 @@
2424 Private Sub InitializeComponent()
2525 Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmPdfViewer))
2626 Me.AxAcroPDF1 = New AxAcroPDFLib.AxAcroPDF()
27- Me.pnlCover = New System.Windows.Forms.Panel()
2827 CType(Me.AxAcroPDF1, System.ComponentModel.ISupportInitialize).BeginInit()
29- Me.pnlCover.SuspendLayout()
3028 Me.SuspendLayout()
3129 '
3230 'AxAcroPDF1
3331 '
34- Me.AxAcroPDF1.Anchor = System.Windows.Forms.AnchorStyles.None
32+ Me.AxAcroPDF1.Dock = System.Windows.Forms.DockStyle.Fill
3533 Me.AxAcroPDF1.Enabled = True
36- Me.AxAcroPDF1.Location = New System.Drawing.Point(268, 104)
34+ Me.AxAcroPDF1.Location = New System.Drawing.Point(0, 0)
3735 Me.AxAcroPDF1.Name = "AxAcroPDF1"
3836 Me.AxAcroPDF1.OcxState = CType(resources.GetObject("AxAcroPDF1.OcxState"), System.Windows.Forms.AxHost.State)
39- Me.AxAcroPDF1.Size = New System.Drawing.Size(240, 240)
37+ Me.AxAcroPDF1.Size = New System.Drawing.Size(800, 450)
4038 Me.AxAcroPDF1.TabIndex = 2
4139 '
42- 'pnlCover
43- '
44- Me.pnlCover.Controls.Add(Me.AxAcroPDF1)
45- Me.pnlCover.Dock = System.Windows.Forms.DockStyle.Fill
46- Me.pnlCover.Location = New System.Drawing.Point(0, 0)
47- Me.pnlCover.Name = "pnlCover"
48- Me.pnlCover.Size = New System.Drawing.Size(800, 450)
49- Me.pnlCover.TabIndex = 3
50- '
5140 'frmPdfViewer
5241 '
5342 Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 15.0!)
5443 Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
5544 Me.ClientSize = New System.Drawing.Size(800, 450)
56- Me.Controls.Add(Me.pnlCover)
45+ Me.Controls.Add(Me.AxAcroPDF1)
5746 Me.Name = "frmPdfViewer"
5847 Me.Text = "frmPdfViewer"
5948 CType(Me.AxAcroPDF1, System.ComponentModel.ISupportInitialize).EndInit()
60- Me.pnlCover.ResumeLayout(False)
6149 Me.ResumeLayout(False)
6250
6351 End Sub
6452
6553 Friend WithEvents AxAcroPDF1 As AxAcroPDFLib.AxAcroPDF
66- Friend WithEvents pnlCover As Panel
6754 End Class
--- pdfsecondmonitor/frmPdfViewer.vb (revision 35)
+++ pdfsecondmonitor/frmPdfViewer.vb (revision 36)
@@ -1,37 +1,43 @@
11 Public Class frmPdfViewer
22
33 Private Sub frmView_Load(sender As Object, e As EventArgs) Handles MyBase.Load
4- AxAcroPDF1.Top = 0
5- AxAcroPDF1.Left = 0
6- pnlCover.Top = 0
7- pnlCover.Left = 0
4+ 'AxAcroPDF1.Top = 0
5+ 'AxAcroPDF1.Left = 0
6+
87 End Sub
98
109 Private Sub frmView_Resize(sender As Object, e As EventArgs) Handles MyBase.Resize
11- AxAcroPDF1.Top = 0
12- AxAcroPDF1.Left = 0
13- AxAcroPDF1.Size = Size
14- pnlCover.Size = Size
10+ 'AxAcroPDF1.Top = 0
11+ 'AxAcroPDF1.Left = 0
12+ 'AxAcroPDF1.Size = Size
1513 End Sub
1614
17- Private loaded As Boolean = False
18- Public Sub LoadFile(fileName As String)
19- loaded = True
20- AxAcroPDF1.LoadFile(fileName)
21- AxAcroPDF1.Visible = True
22- End Sub
15+ 'Private loaded As Boolean = False
16+ 'Public Sub LoadFile(fileName As String)
17+ ' loaded = True
18+ ' AxAcroPDF1.LoadFile(fileName)
19+ ' AxAcroPDF1.Visible = True
20+ 'End Sub
2321
24- Private zoom As Single = 100
25- Public Sub SetZoom(ByVal zoom As Single)
26- 'If Not loaded Then
27- ' Exit Sub
28- 'End If
29- 'If Math.Abs(Me.zoom - zoom) < 0.1 Then
30- ' Exit Sub
31- 'End If
32- Me.zoom = zoom
22+ 'Private Sub pnlCover_Paint(sender As Object, e As PaintEventArgs)
3323
24+ 'End Sub
3425
35- End Sub
26+ 'Private Sub AxAcroPDF1_Enter(sender As Object, e As EventArgs) Handles AxAcroPDF1.Enter
3627
28+ 'End Sub
29+
30+ 'Private zoom As Single = 100
31+ 'Public Sub SetZoom(ByVal zoom As Single)
32+ ' 'If Not loaded Then
33+ ' ' Exit Sub
34+ ' 'End If
35+ ' 'If Math.Abs(Me.zoom - zoom) < 0.1 Then
36+ ' ' Exit Sub
37+ ' 'End If
38+ ' Me.zoom = zoom
39+
40+
41+ 'End Sub
42+
3743 End Class
\ No newline at end of file