-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathResizeOverlays.vb
More file actions
537 lines (439 loc) · 22.8 KB
/
ResizeOverlays.vb
File metadata and controls
537 lines (439 loc) · 22.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
Imports System.IO
Imports System.Text.RegularExpressions
Imports System.Drawing
Imports System.ComponentModel
Public Class ResizeOverlays
Private Sub ButtonGetBack1_Click(sender As Object, e As EventArgs) Handles ButtonGetBack1.Click
OverlayManager.Show()
Me.Close()
End Sub
Private Sub ResizeOverlays_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'Hide des elements
GroupBoxOriginalOverlay.Hide()
ActualOverlay.Hide()
PicXrandr.Hide()
Call ImporterlesGamelists()
End Sub
Sub ImporterlesGamelists()
'On Importe toutes les GameLists
For Each folder As String In My.Computer.FileSystem.GetDirectories(My.Settings.DossierOverlay, FileIO.SearchOption.SearchTopLevelOnly)
GameLists.Items.Add(System.IO.Path.GetFileName(folder))
Next
End Sub
Private Sub BouttonImport_Click(sender As Object, e As EventArgs) Handles buttonImport.Click
'Conditionnelle pour ne rien lancer si aucun selectionnés
If GameLists.SelectedItems.Count = 0 Then
MsgBox("Merci de Selectionner des Plateformes")
Exit Sub
End If
'On clear par Securité
DataGridOverlays.Columns.Clear()
On Error Resume Next
DataGridOverlays.Rows.Clear()
On Error GoTo 0
If GameLists.Items.Count = 0 Then Exit Sub
Dim gamelist As String = GameLists.Items(0)
Dim table As New DataTable()
Dim dv As DataView
Dim column As DataColumn
column = New DataColumn()
With column
.DataType = Type.GetType("System.String")
.ColumnName = "Console"
End With
table.Columns.Add(column)
column = New DataColumn()
With column
.DataType = Type.GetType("System.String")
.ColumnName = "Titre"
End With
table.Columns.Add(column)
column = New DataColumn()
With column
.DataType = Type.GetType("System.String")
.ColumnName = "NomdeRom"
End With
table.Columns.Add(column)
column = New DataColumn()
With column
.DataType = Type.GetType("System.String")
.ColumnName = "CheminOverlay"
End With
table.Columns.Add(column)
column = New DataColumn()
With column
.DataType = Type.GetType("System.String")
.ColumnName = "custom_viewport_x"
End With
table.Columns.Add(column)
column = New DataColumn()
With column
.DataType = Type.GetType("System.String")
.ColumnName = "custom_viewport_y"
End With
table.Columns.Add(column)
column = New DataColumn()
With column
.DataType = Type.GetType("System.String")
.ColumnName = "custom_viewport_width"
End With
table.Columns.Add(column)
column = New DataColumn()
With column
.DataType = Type.GetType("System.String")
.ColumnName = "custom_viewport_height"
End With
table.Columns.Add(column)
column = New DataColumn()
With column
.DataType = Type.GetType("System.String")
.ColumnName = "pngW"
End With
table.Columns.Add(column)
column = New DataColumn()
With column
.DataType = Type.GetType("System.String")
.ColumnName = "pngH"
End With
table.Columns.Add(column)
For Each i In GameLists.SelectedItems
Dim nomconsole As String = i
Dim nbdansdossier As Integer
If InStr(My.Settings.DossierOverlay, "overlays") > 0 Then
nbdansdossier = Directory.GetFiles(My.Settings.RecalboxFolder & "\overlays\" & nomconsole, "*.cfg").Count
Else
nbdansdossier = Directory.GetFiles(My.Settings.RecalboxFolder & "\decorations\" & nomconsole, "*.cfg").Count
End If
If nbdansdossier = 0 Then
GoTo nextconsole
End If
Dim di As New IO.DirectoryInfo(My.Settings.DossierOverlay & nomconsole)
Dim aryFi As IO.FileInfo() = di.GetFiles("*.cfg")
Dim fi As IO.FileInfo
Dim nomfichiercfg As String
Dim cheminducfg As String
Dim pathdelarom As String
For Each fi In aryFi
If fi.Name = nomconsole & "_overlay.cfg" Then GoTo fichiersuivant
cheminducfg = fi.FullName
nomfichiercfg = fi.Name
If InStr(My.Settings.DossierOverlay, "overlays") > 0 Then
pathdelarom = Replace(Replace(cheminducfg, "\overlays\", "\roms\"), ".cfg", "")
Else
pathdelarom = Replace(Replace(cheminducfg, "\decorations\", "\roms\"), ".cfg", "")
End If
'On va rechercher le nom de la rom
Dim romname = Path.GetFileName(pathdelarom)
'On recupere les valeurs dans les overlay custom
Dim cvx As Integer = Getcustomcfg(cheminducfg, "custom_viewport_x")
Dim cvy As Integer = Getcustomcfg(cheminducfg, "custom_viewport_y")
Dim cvw As Integer = Getcustomcfg(cheminducfg, "custom_viewport_width")
Dim cvh As Integer = Getcustomcfg(cheminducfg, "custom_viewport_height")
Dim imagedupng = LectureDesCfgs(nomconsole, cheminducfg)
Dim pngw As Integer
Dim pngh As Integer
Using png As System.Drawing.Image = System.Drawing.Image.FromFile(imagedupng)
pngw = png.Width
pngh = png.Height
End Using
'on ajoute au tableau
table.Rows.Add(nomconsole, romname, nomfichiercfg, cheminducfg, cvx, cvy, cvw, cvh, pngw, pngh)
fichiersuivant:
Next
nextconsole:
Next
'Sorting A-Z the console
dv = table.DefaultView
DataGridOverlays.DataSource = table
'On ajoute la checkbox pour les overlays
Dim chk As DataGridViewCheckBoxColumn = New DataGridViewCheckBoxColumn With {
.HeaderText = "CocheOverlay",
.Name = "CocheOverlay"
}
DataGridOverlays.Columns.Add(chk)
'Reajusting Interface and Showing Final Interface
dv.Sort = "Console asc, Titre asc"
'Width for columns
DataGridOverlays.RowHeadersWidth = 25
DataGridOverlays.Columns("Console").Width = 40
DataGridOverlays.Columns("Titre").Width = 105
DataGridOverlays.Columns("NomdeRom").Width = 10
DataGridOverlays.Columns("CheminOverlay").Width = 50
DataGridOverlays.Columns("CocheOverlay").Width = 25
DataGridOverlays.Columns("custom_viewport_x").Width = 40
DataGridOverlays.Columns("custom_viewport_y").Width = 40
DataGridOverlays.Columns("custom_viewport_width").Width = 40
DataGridOverlays.Columns("custom_viewport_height").Width = 40
DataGridOverlays.Columns("pngw").Width = 40
DataGridOverlays.Columns("pngH").Width = 40
'Hiding les colonnes
DataGridOverlays.Columns("NomdeRom").Visible = False
DataGridOverlays.Columns("CheminOverlay").Visible = True
'On met la derniere colonne coche en readonly
DataGridOverlays.Columns("CocheOverlay").ReadOnly = True
'On compte le nombre total d'entrées
TotalOverlay.Text = DataGridOverlays.Rows.Count - 1
'On remplit les Coches Overlays
Call CompletiondesoverlaysRoms()
'Show les groupbox et l'image
GroupBoxOriginalOverlay.Show()
ActualOverlay.Show()
End Sub
Function Recherchenomdelarom(console As String, pathdelarom As String)
Dim lagamelist As String = My.Settings.RecalboxFolder & "\roms\" & console & "\gamelist.xml"
Dim nomdelarom = Path.GetFileName(pathdelarom)
'Si il n'existe pas de gamelist, on va mettre les infos generique
If Not System.IO.File.Exists(lagamelist) Then
Return "#NOGAMELIST#-" & nomdelarom
End If
Dim gamelistXml As XElement = XElement.Load(lagamelist)
'getting the list for the xml with nodes
Dim query2 = From st In gamelistXml.Descendants("game") Select st
Dim genpathdelarom As String
genpathdelarom = My.Settings.RecalboxFolder & "\roms\" & console & "\" & nomdelarom
For Each xEle As XElement In query2
Dim romname As String = xEle.Element("name")
Dim temprom As String = Replace(Replace(Replace(xEle.Element("path"), "/", "\"), "./", ""), ".\", "")
Dim rompath As String = My.Settings.RecalboxFolder & "\roms\" & console & "\" & temprom
If console = nomdelarom Then
Return "#CONSOLE#"
End If
If rompath = pathdelarom Then
Return romname
GoTo lignesuivante
End If
lignesuivante:
Next
Return "#PASDANSXML#"
End Function
Sub CompletiondesoverlaysRoms()
For ligne = 0 To DataGridOverlays.RowCount - 2
Dim testcheminoverlay As String = DataGridOverlays.Rows(ligne).Cells(DataGridOverlays.Columns("CheminOverlay").Index).Value
DataGridOverlays.Rows(ligne).Cells(DataGridOverlays.Columns("CheminOverlay").Index).Value = testcheminoverlay
If System.IO.File.Exists(testcheminoverlay) Then
DataGridOverlays.Rows(ligne).Cells(DataGridOverlays.Columns("CocheOverlay").Index).Value = True
DataGridOverlays.Rows(ligne).Cells(DataGridOverlays.Columns("CocheOverlay").Index).Style.BackColor = Color.FromArgb(162, 255, 162)
Else
DataGridOverlays.Rows(ligne).Cells(DataGridOverlays.Columns("CocheOverlay").Index).Value = False
DataGridOverlays.Rows(ligne).Cells(DataGridOverlays.Columns("CocheOverlay").Index).Style.BackColor = Color.FromArgb(255, 139, 139)
End If
Next
End Sub
Function Getcustomcfg(pathducfg As String, parametresouhaite As String)
'on va lire le cfg pour trouver le cfg overlay
File.ReadAllLines(pathducfg)
Dim readText() As String = File.ReadAllLines(pathducfg)
Dim s As String
For Each s In readText
If InStr(s, parametresouhaite) > 0 Then
Dim valeuregal As Integer = InStr(s, "=")
Dim valeurvalue As String = s.Substring(valeuregal + 2)
Dim vraievaleur As Integer = Integer.Parse(Regex.Replace(valeurvalue, "[^\d]", ""))
Return vraievaleur
End If
Next
End Function
Function LectureDesCfgs(consolerom As String, nomducfg As String)
Dim modifgamelistenrom As String = nomducfg
Dim fichier1cfg As String = nomducfg
Dim fichier2overlaycfg As String
Dim fichier3png As String
Dim cheminpropreoverlay2 As String
Dim justefichier2 As String
fichier3png = 0
justefichier2 = 0
fichier2overlaycfg = 0
cheminpropreoverlay2 = 0
'on va lire le cfg pour trouver le cfg overlay
File.ReadAllLines(fichier1cfg)
Dim readText() As String = File.ReadAllLines(fichier1cfg)
Dim s As String
For Each s In readText
Dim detectinputoverlay As String
If InStr(My.Settings.DossierOverlay, "overlays") > 0 Then
detectinputoverlay = InStr(s, "/overlays/")
Else
detectinputoverlay = InStr(s, "/decorations/")
End If
If detectinputoverlay > 0 Then
'Dim cheminducfgoverlay = s.Substring(detectinputoverlay + 9)
'Dim detectdupointcfg = InStr(cheminducfgoverlay, ".cfg")
'Dim cheminfinaloverlaycfg = cheminducfgoverlay.Substring(0, detectdupointcfg + 3)
Dim chemincfgoverlaydanscfg As String
If InStr(My.Settings.DossierOverlay, "overlays") > 0 Then
chemincfgoverlaydanscfg = s.Substring(InStr(s, "/overlays/") + 9).Substring(0, InStr(s.Substring(InStr(s, "/overlays/") + 9), ".cfg") + 3)
Else
chemincfgoverlaydanscfg = s.Substring(InStr(s, "/decorations/") + 9).Substring(0, InStr(s.Substring(InStr(s, "/decorations/") + 9), ".cfg") + 3)
End If
cheminpropreoverlay2 = My.Settings.DossierOverlay & Replace(chemincfgoverlaydanscfg, "/", "\")
justefichier2 = FileNameWithoutExtension(cheminpropreoverlay2) & ".cfg"
Exit For
End If
Next
'on lit le deuxieme fichier overlay cfg pour trouver le png
If Not File.Exists(cheminpropreoverlay2) Then Exit Function
File.ReadAllLines(cheminpropreoverlay2)
Dim readText2() As String = File.ReadAllLines(cheminpropreoverlay2)
Dim t As String
For Each t In readText2
Dim detectoverlayzero As String = InStr(t, "overlay0_overlay")
If detectoverlayzero > 0 Then
Dim enlevelesguill = Replace(t, Chr(34), "")
'Dim leegal = InStr(enlevelesguill, "=")
'Dim chemindupng = enlevelesguill.Substring(leegal + 1)
'Dim detectpng = InStr(chemindupng, "png")
'Dim cheminfinalpng = chemindupng.Substring(0, detectpng + 2)
Dim cheminpng = enlevelesguill.Substring(InStr(enlevelesguill, "=") + 1).Substring(0, InStr(enlevelesguill.Substring(InStr(enlevelesguill, "=") + 1), "png") + 2)
fichier3png = Replace(cheminpropreoverlay2, justefichier2, cheminpng)
Exit For
End If
Next
'on ajoute a la listbox
Return fichier3png
End Function
Public Function FileNameWithoutExtension(ByVal FullPath _
As String) As String
Return System.IO.Path.GetFileNameWithoutExtension(FullPath)
End Function
Private Sub DataGridOverlays_SelectionChanged(sender As Object, e As EventArgs) Handles DataGridOverlays.SelectionChanged
Dim row As DataGridViewRow = DataGridOverlays.CurrentRow
Dim totalline As Integer = DataGridOverlays.RowCount - 1
lepng.Text = ""
If DataGridOverlays.SelectedRows.Count = 0 Then
Exit Sub
ElseIf DataGridOverlays.CurrentRow.Index >= totalline Then
Exit Sub
End If
'Chargement de l'image
Dim console As String = row.Cells(DataGridOverlays.Columns("Console").Index).Value
Dim adressecfg As String = row.Cells(DataGridOverlays.Columns("CheminOverlay").Index).Value
Dim png As String = LectureDesCfgs(console, adressecfg)
On Error Resume Next
ActualOverlay.Image = Image.FromFile(png)
lepng.Text = png
'Recuperer la taille du fichier
LargeurOriginale.Text = row.Cells(DataGridOverlays.Columns("pngW").Index).Value
HauteurOriginale.Text = row.Cells(DataGridOverlays.Columns("pngH").Index).Value
On Error GoTo 0
End Sub
Private Sub ButtonGoResize_Click(sender As Object, e As EventArgs) Handles ButtonGoResize.Click
If MsgBox("Etes vous sur de vouloir redimensionner l'intégralité du tableau ?", vbYesNo) = vbNo Then Exit Sub
'On va boucler pour le tableau entier
For i = 0 To DataGridOverlays.Rows.Count - 2
'Lecture des values originales
Dim console As String = DataGridOverlays.Rows(i).Cells(DataGridOverlays.Columns("Console").Index).Value
Dim adressecfg As String = DataGridOverlays.Rows(i).Cells(DataGridOverlays.Columns("CheminOverlay").Index).Value
Dim cvx As Integer = DataGridOverlays.Rows(i).Cells(DataGridOverlays.Columns("custom_viewport_x").Index).Value
Dim cvy As Integer = DataGridOverlays.Rows(i).Cells(DataGridOverlays.Columns("custom_viewport_y").Index).Value
Dim cvw As Integer = DataGridOverlays.Rows(i).Cells(DataGridOverlays.Columns("custom_viewport_width").Index).Value
Dim cvh As Integer = DataGridOverlays.Rows(i).Cells(DataGridOverlays.Columns("custom_viewport_height").Index).Value
'Chargement de l'image
Dim png As String = LectureDesCfgs(console, adressecfg)
lepng.Text = png
'On copie le fichier au prealable
Dim nouveauchemincfg As String = My.Settings.DossierOverlay & "aCUSTOM RESOLUTION - " & NouveauX.Text & "x" & NouveauY.Text
If (Not System.IO.Directory.Exists(nouveauchemincfg)) Then
System.IO.Directory.CreateDirectory(nouveauchemincfg)
End If
'et on copie le fichier cfg vers le nouveau
If (Not System.IO.Directory.Exists(nouveauchemincfg & "\" & console)) Then
System.IO.Directory.CreateDirectory(nouveauchemincfg & "\" & console)
End If
Dim nouveauchemin = nouveauchemincfg & "\" & console & "\" & Path.GetFileName(adressecfg)
Dim nouveaupngtemp = Replace(png, My.Settings.DossierOverlay, nouveauchemincfg & "\")
If (Not System.IO.Directory.Exists(Path.GetDirectoryName(nouveaupngtemp))) Then
System.IO.Directory.CreateDirectory(Path.GetDirectoryName(nouveaupngtemp))
End If
'on va copier le fichier temp png en png
ResizeImage(Image.FromFile(png), NouveauX.Text, NouveauY.Text, nouveaupngtemp)
'et on copie le cfg
File.Copy(adressecfg, nouveauchemin, True)
'On en deduit le 2eme cfg
Dim nouveau2cfg = Replace(png, ".png", "_overlay.cfg")
Dim secondcfg = Replace(nouveaupngtemp, ".png", "_overlay.cfg")
File.Copy(nouveau2cfg, secondcfg, True)
'On lit le fichier cfg
IO.File.ReadAllText(nouveauchemin)
Dim detectfullscreenx As Integer = InStr(IO.File.ReadAllText(nouveauchemin), "video_fullscreen_x")
Dim detectfullscreeny As Integer = InStr(IO.File.ReadAllText(nouveauchemin), "video_fullscreen_y")
'detect video fullscreen
If detectfullscreenx = 0 Then 'Si la ligne fullscreen n'existe pas on va la creer
Using file As StreamWriter = New StreamWriter(adressecfg, True)
file.Write(vbNewLine & "video_fullscreen_x = " & Chr(34) & NouveauX.Text & Chr(34))
file.Write(vbNewLine & "video_fullscreen_y = " & Chr(34) & NouveauY.Text & Chr(34))
End Using
Else
'On fait du ligne a ligne pour trouver la bonnne ligne et on remplace
Dim nomdufichiercfg As String
Dim lines() As String = IO.File.ReadAllLines(nouveauchemin)
For j As Integer = 0 To lines.Length - 1
If lines(j).Contains("video_fullscreen_x") Then
Dim ligneoriginaleX = Integer.Parse(Regex.Replace(j.ToString, "[^\d]", ""))
Dim nouvelleligneX = "video_fullscreen_x =" & Chr(34) & Replace(j, ligneoriginaleX, NouveauX.Text) & Chr(34)
lines(j) = nouvelleligneX
End If
If lines(j).Contains("video_fullscreen_y") Then
Dim ligneoriginaleY = Integer.Parse(Regex.Replace(j.ToString, "[^\d]", ""))
Dim nouvelleligneY = "video_fullscreen_y =" & Chr(34) & Replace(j, ligneoriginaleY, NouveauY.Text) & Chr(34)
lines(j) = nouvelleligneY
End If
Next
IO.File.WriteAllLines(nouveauchemin, lines) 'assuming you want to write the file
End If
'On va maintenant remplacer les valeurs par les nouvelles calculées
Dim ratiodux As Double = LargeurOriginale.Text / NouveauX.Text
Dim ratioduy As Double = HauteurOriginale.Text / NouveauY.Text
Dim newvalx As Integer = Math.Round(cvx / ratiodux, 0)
Dim newvaly As Integer = Math.Round(cvy / ratioduy, 0)
Dim newvalw As Integer = Math.Round(cvw / ratiodux, 0)
Dim newvalh As Integer = Math.Round(cvh / ratioduy, 0)
Dim lines2() As String = IO.File.ReadAllLines(nouveauchemin)
For j As Integer = 0 To lines2.Length - 1
If lines2(j).Contains("custom_viewport_x") Then
Dim ligneoriginaleX = Integer.Parse(Regex.Replace(lines2(j).ToString, "[^\d]", ""))
Dim nouvelleligneX = "custom_viewport_x = " & Chr(34) & newvalx & Chr(34)
lines2(j) = nouvelleligneX
End If
If lines2(j).Contains("custom_viewport_y") Then
Dim ligneoriginaleY = Integer.Parse(Regex.Replace(lines2(j).ToString, "[^\d]", ""))
Dim nouvelleligneY = "custom_viewport_y = " & Chr(34) & newvaly & Chr(34)
lines2(j) = nouvelleligneY
End If
If lines2(j).Contains("custom_viewport_width") Then
Dim ligneoriginaleW = Integer.Parse(Regex.Replace(lines2(j).ToString, "[^\d]", ""))
Dim nouvelleligneW = "custom_viewport_width = " & Chr(34) & newvalw & Chr(34)
lines2(j) = nouvelleligneW
End If
If lines2(j).Contains("custom_viewport_height") Then
Dim ligneoriginaleH = Integer.Parse(Regex.Replace(lines2(j).ToString, "[^\d]", ""))
Dim nouvelleligneH = "custom_viewport_height = " & Chr(34) & newvalh & Chr(34)
lines2(j) = nouvelleligneH
End If
Next
IO.File.WriteAllLines(nouveauchemin, lines2)
'Fichier suivant
Next i
MsgBox("Votre Dossier s'appelle : " & Chr(10) & Chr(10) & "aCUSTOM RESOLUTION - " & NouveauX.Text & "x" & NouveauY.Text)
Process.Start(Path.GetDirectoryName(My.Settings.DossierOverlay))
End Sub
Public Shared Function ResizeImage(ByVal InputBitmap As Bitmap, width As Integer, height As Integer, pathdesortie As String) As Bitmap
Dim converted As New Bitmap(InputBitmap, New Size(width, height))
converted.Save(pathdesortie, Imaging.ImageFormat.Png)
End Function
Private Sub ButtonKnowResolution_Click(sender As Object, e As EventArgs) Handles ButtonKnowResolution.Click
If PicXrandr.Visible = True Then
PicXrandr.Hide()
Exit Sub
End If
If PicXrandr.Visible = False Then
PicXrandr.Show()
MsgBox("Ouvrir Putty en SSH (Putty)" & Chr(10) & "Apres avoir mis le mot de passe de votre distribution, ecrire" & Chr(10) & "xrandr" & Chr(10) & "on vous indique la resolution (en rose)")
End If
End Sub
Private Sub ResizeOverlays_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
Form1.Show()
Me.Show()
End Sub
Private Sub DataGridOverlays_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridOverlays.CellContentClick
End Sub
End Class