Commit 0883d3b9de8d2a6dd2744f7b9cf8ec21932baf02

Authored by MoraesCaio
1 parent 96d9d8fe
Exists in Au-ghub/master

Prompt de inicializacao do player

Adicionado prompts (gui) sobre inicialização do player ao final da
instalação.
Showing 1 changed file with 15 additions and 2 deletions   Show diff stats
Program.cs
1 1 using System;
2 2 using System.Diagnostics;
3   -using System.Net;
  3 +//using System.Net;
  4 +using System.Windows.Forms;
4 5 using Microsoft.Win32;
5 6 using System.IO;
6 7 using System.IO.Compression;
... ... @@ -269,7 +270,19 @@ namespace AtualizadorVLibras
269 270  
270 271 //CONCLUSÃO
271 272 Console.WriteLine("Pré-requisitos verificados.");
272   -
  273 + DialogResult dialogResult = MessageBox.Show("Deseja iniciar o player?", @"Instalação concluída", MessageBoxButtons.YesNo);
  274 + if (dialogResult == DialogResult.Yes){
  275 + string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
  276 + string lnkPath = System.IO.Path.Combine(desktopPath, "VLibras.lnk");
  277 + if(!File.Exists(lnkPath)){
  278 + MessageBox.Show("Por favor, execute novamente o Atualizador VLibras e repita o processo.", "Atalho do player não encontrado!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
  279 + }else{
  280 + ProcessStartInfo info = new ProcessStartInfo(lnkPath);
  281 + Process process = Process.Start(info);
  282 + }
  283 + }else if (dialogResult == DialogResult.No){
  284 + //do something else
  285 + }
273 286  
274 287 //RODA O VLIBRAS
275 288  
... ...