Esempio n. 1
0
 private static void closeSplash(frmSplash form)
 {
     if (!form.IsDisposed)
     {
         if (form.InvokeRequired)
         {
             form.Invoke(new closeSplashDlg(closeSplash), new object[] { form });
         }
         else
         {
             form.Close();
         }
     }
 }
Esempio n. 2
0
 private static void setOpacity(frmSplash form, float opacity)
 {
     if (!form.IsDisposed)
     {
         if (form.InvokeRequired)
         {
             form.Invoke(new setOpacityDlg(setOpacity), new object[] { form, opacity });
         }
         else
         {
             form.Opacity = opacity;
         }
     }
 }
Esempio n. 3
0
 private static void setOpacity(frmSplash form, float opacity)
 {
     if (!form.IsDisposed)
     {
         if (form.InvokeRequired)
         {
             form.Invoke(new setOpacityDlg(setOpacity), new object[] { form, opacity });
         }
         else
         {
             form.Opacity = opacity;
         }
     }
 }
Esempio n. 4
0
 private static void closeSplash(frmSplash form)
 {
     if (!form.IsDisposed)
     {
         if (form.InvokeRequired)
         {
             form.Invoke(new closeSplashDlg(closeSplash), new object[] { form });
         }
         else
         {
             form.Close();
         }
     }
 }
Esempio n. 5
0
        static void showHideSplash(object obj)
        {
            frmSplash form = obj as frmSplash;

            if (obj != null)
            {
                for (float opacity = 0.0f; opacity < 1.0f; opacity += 0.05f)
                {
                    setOpacity(form, opacity);
                    Thread.Sleep(20);
                }
                Thread.Sleep(1500);
                for (float opacity = 1.0f; opacity > 0.0f; opacity -= 0.05f)
                {
                    setOpacity(form, opacity);
                    Thread.Sleep(20);
                }
                closeSplash(form);
            }
        }
Esempio n. 6
0
        static void Main()
        {
            string logPath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "UWOLMaps.log");

            try
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                if (Properties.Settings.Default.MostrarSplash)
                {
                    frmSplash splash = new frmSplash();
                    splash.Show();
                    Thread showSplash = new Thread(new ParameterizedThreadStart(showHideSplash));
                    showSplash.Start(splash);
                }

                Application.Run(new frmEditor());
            }
            catch (Exception ex)
            {
                System.IO.File.AppendAllText(logPath, ex.ToString() + "\\n");
                throw ex;
            }
        }
Esempio n. 7
0
        static void Main()
        {
            string logPath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "UWOLMaps.log");

            try
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                if (Properties.Settings.Default.MostrarSplash)
                {
                    frmSplash splash = new frmSplash();
                    splash.Show();
                    Thread showSplash = new Thread(new ParameterizedThreadStart(showHideSplash));
                    showSplash.Start(splash);
                }

                Application.Run(new frmEditor());
            }
            catch (Exception ex)
            {
                System.IO.File.AppendAllText(logPath, ex.ToString() + "\\n");
                throw ex;
            }
        }