• R/O
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

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


コミットメタ情報

リビジョン53 (tree)
日時2018-12-21 12:24:17
作者bellyoshi

ログメッセージ

変更サマリ

差分

--- pdfsecondmonitor/CtlImage.vb (revision 52)
+++ pdfsecondmonitor/CtlImage.vb (revision 53)
@@ -42,5 +42,10 @@
4242
4343 End Sub
4444
45+ Public Sub ControlEnabled()
4546
47+ Me.Enabled = Not (_fileViewParam Is Nothing)
48+
49+ End Sub
50+
4651 End Class
--- pdfsecondmonitor/ctlMovie.vb (revision 52)
+++ pdfsecondmonitor/ctlMovie.vb (revision 53)
@@ -41,11 +41,16 @@
4141 End Sub
4242
4343
44+ Public Sub ControlEnabled()
4445
46+ Me.Enabled = Not (_fileViewParam Is Nothing)
4547
48+ End Sub
4649
4750
4851
4952
53+
54+
5055 #End Region
5156 End Class
--- pdfsecondmonitor/ctlPdf.vb (revision 52)
+++ pdfsecondmonitor/ctlPdf.vb (revision 53)
@@ -26,8 +26,14 @@
2626 End Sub
2727 #End Region
2828
29+ Public Sub ControlEnabled()
2930
31+ Me.Enabled = Not (_fileViewParam Is Nothing)
3032
33+ End Sub
34+
35+
36+
3137 Private _backFileName As String
3238 Private _fileViewParam As FileViewParam
3339 Public Sub SetFileInfo(f As FileViewParam)
--- pdfsecondmonitor/frmOperation.vb (revision 52)
+++ pdfsecondmonitor/frmOperation.vb (revision 53)
@@ -1,9 +1,26 @@
11 Public Class frmOperation
22
3+ ''' <summary>
4+ ''' 開ける動画の拡張子
5+ ''' </summary>
6+ Private movieExts = {"avi", "mpeg", "mp4", "wmv", "mov"}
7+
8+ ''' <summary>
9+ ''' 開ける画像の拡張子
10+ ''' </summary>
11+ Private ImageExts = {"jpeg", "jpg", "bmp", "png", "gif", "tiff", "tif"}
12+
13+ ''' <summary>
14+ ''' PDFの拡張子
15+ ''' </summary>
16+ Private PDFExts = {"pdf"}
17+
318 #Region "初期処理"
419
520 Private Sub ControlEnable()
6- 'todo
21+ CtlPdf1.ControlEnabled()
22+ CtlMovie1.ControlEnabled()
23+ CtlImage1.ControlEnabled()
724 End Sub
825 Private Sub frmOperation_Load(sender As Object, e As EventArgs) Handles MyBase.Load
926 screenDetect()
@@ -182,7 +199,7 @@
182199 End If
183200 txtPDFFileName.Text = fileviewinfo.FileName
184201 Dim ext = IO.Path.GetExtension(fileviewinfo.FileName)
185- If IsContain(ext, {".pdf"}) Then
202+ If IsPDFExt(ext) Then
186203 tbcFileOpes.SelectTab(tpAdobePDF.TabIndex)
187204 CtlPdf1.SetFileInfo(fileviewinfo)
188205
@@ -196,6 +213,7 @@
196213 ControlEnable()
197214 End Sub
198215
216+
199217 Private Function IsContain(ext As String, exts As String()) As Boolean
200218 For Each target In exts
201219 If String.Compare($".{target}", ext, True) = 0 Then
@@ -205,9 +223,11 @@
205223 Return False
206224 End Function
207225
208- Private movieExts = {"avi", "mpeg", "mp4", "wmv"}
209226
210- Private ImageExts = {"jpeg", "jpg", "bmp", "png", "gif", "tiff", "tif"}
227+ Private Function IsPDFExt(ext) As Boolean
228+ Return IsContain(ext, PDFExts)
229+ End Function
230+
211231 Private Function IsImageExt(ext) As Boolean
212232 Return IsContain(ext, ImageExts)
213233 End Function
@@ -261,6 +281,7 @@
261281 Private Sub btnUnSelect_Click(sender As Object, e As EventArgs) Handles btnUnSelect.Click
262282 lstPDFFiles.SelectedItem = Nothing
263283 _dispacher.CloseViewers()
284+ ControlEnable()
264285 End Sub
265286
266287 Private Sub lstPDFFiles_DragEnter(sender As Object, e As DragEventArgs) Handles lstPDFFiles.DragEnter