static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); try { var files = AppDomain.CurrentDomain.SetupInformation.ActivationArguments?.ActivationData; if (files != null) { //Abrir File } var splash = new frmSplashScreen(); if (splash.ShowDialog() != DialogResult.OK) { return; } var selAvt = new frmSelAventura(); if (selAvt.ShowDialog() == DialogResult.OK) { Application.Run(new frmPrincipal(selAvt.Id)); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Erro não tratado!", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public static void CloseForm() { if (splashScreen != null) { splashScreen.opacityInc = -splashScreen.opacityDec; } splashThread = null; splashScreen = null; }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); frmSplashScreen splash = new frmSplashScreen(); splash.Show(); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); frmSplashScreen sp = new frmSplashScreen(); if (sp.ShowDialog() == DialogResult.OK) { Application.Run(new frmLog()); } }
public string CheckFileFormat() { frmMain Main = new frmMain(); var splash = new frmSplashScreen(); OpenFileDialog openFile = new OpenFileDialog(); string outfile = "C:\\Users\\MSI\\Documents\\file.pdf"; //Limits the user to open file openFile.Filter = "DOC files (*.doc)|*.docx "; openFile.Filter = "Office Files|*.docx;*.pdf;*.pptx;*.xls;*.xlsx"; if (openFile.ShowDialog() == DialogResult.OK) { splash.Show(); string file = openFile.FileName; string extension = Path.GetExtension(file); if (extension == ".doc" || extension == ".docx") { ExcelFormat = false; outfile = ConvertDocToPdf(openFile.FileName); } else if (extension == ".pptx" || extension == ".ptx") { outfile = ConvertPPTtoPDF(openFile.FileName); ExcelFormat = false; } else if (extension == ".xls" || extension == ".xlsx" || extension == ".xlsm") { outfile = ConvertExcelToPDF(openFile.FileName); ExcelFormat = true; } else if (extension == ".pdf") { FileInDocFormat = ConvertPDFtoWord(openFile.FileName); outfile = file; ExcelFormat = false; } //return null; } else { outfile = ""; } splash.Close(); FileToBePrinted = outfile; return(outfile); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //SplashScreen Thread t = new Thread(() => { frmSplashScreen frm = new frmSplashScreen(); Application.Run(frm); }); t.Start(); Thread.Sleep(3000); t.Abort(); //End SplashScreen Application.Run(new LoginForm()); }
void Loading() { frmSplashScreen frm = new frmSplashScreen(); Application.Run(frm); }
private static void ShowForm() { splashScreen = new frmSplashScreen(); Application.Run(splashScreen); }
public string CheckFileFormat(bool DirectoryLocation) { try { frmMain Main = new frmMain(); OpenFileDialog openFile = new OpenFileDialog(); string outfile = Properties.Settings.Default.FolderPath + "file.pdf"; //Limits the user to open file if (DirectoryLocation) { openFile.InitialDirectory = @"C:\FTP_Location"; } else { openFile.InitialDirectory = "This PC"; } openFile.Filter = "DOC files (*.doc)|*.docx "; openFile.Filter = "Office Files|*.docx;*.doc;*.pdf;*.pptx;*.ppt;*.xls;*.xlsx"; if (openFile.ShowDialog() == DialogResult.OK) { var splash = new frmSplashScreen(); splash.Show(); string file = openFile.FileName; string extension = Path.GetExtension(file); if (extension == ".doc" || extension == ".docx") { ExcelFormat = false; outfile = ConvertDocToPdf(openFile.FileName); } else if (extension == ".pptx" || extension == ".ptx") { outfile = ConvertPPTtoPDF(openFile.FileName); ExcelFormat = false; } else if (extension == ".xls" || extension == ".xlsx" || extension == ".xlsm") { outfile = ConvertExcelToPDF(openFile.FileName); ExcelFormat = true; } else if (extension == ".pdf") { FileInDocFormat = ConvertPDFtoWord(openFile.FileName); outfile = file; ExcelFormat = false; } //return null; splash.Close(); } else { outfile = ""; } FileToBePrinted = outfile; return(outfile); } catch (Exception ex) { //if (splash.Visible) // splash.Close(); var MsgStat = new MessageAlerts(); MsgStat.ExceptionMessage(ex.Message); return(null); } }