private static void SplashImageAssync(ComplexDlgOptions Options) { SplashDialog thisSplash = null; System.Drawing.Image thisImage = null; if (splashDialogs.ContainsKey(Options.GUIID)) { thisSplash = splashDialogs[Options.GUIID]; if (thisSplash.InvokeRequired) { thisSplash.Invoke(new AsyncCallDlgOptions(SplashImageAssync), Options); } } if (thisSplash != null) { Options.AppendShowHideTo(thisSplash); } else { thisSplash = new SplashDialog(); splashDialogs.Add(Options.GUIID, thisSplash); } Options.AppendTo(thisSplash); #region Splash specific Options if (File.Exists(Options.Param1)) { try { thisImage = System.Drawing.Bitmap.FromFile(Options.Param1); } catch (Exception) { ErrorLevel = 1; return; } if (thisImage != null) { thisSplash.Image = thisImage; } } #endregion Splash specific Options if (!Options.Hide && !thisSplash.Visible) { thisSplash.Show(); } }
private static void ProgressAssync(ComplexDlgOptions Options) { ProgressDialog thisProgress = null; if (progressDialgos.ContainsKey(Options.GUIID)) { thisProgress = progressDialgos[Options.GUIID]; if (thisProgress.InvokeRequired) { thisProgress.Invoke(new AsyncCallDlgOptions(ProgressAssync), Options); } } if (thisProgress != null) { Options.AppendShowHideTo(thisProgress); } else { thisProgress = new ProgressDialog(); progressDialgos.Add(Options.GUIID, thisProgress); } Options.AppendTo(thisProgress); #region Parse Progress specific Options short num; if (!short.TryParse(Options.Param1, out num)) { num = 0; } thisProgress.ProgressValue = num; #endregion Parse Progress specific Options if (!Options.Hide && !thisProgress.Visible) { thisProgress.Show(); } }
private static void SplashImageAssync(ComplexDlgOptions Options) { SplashDialog thisSplash = null; System.Drawing.Image thisImage = null; if(splashDialogs.ContainsKey(Options.GUIID)) { thisSplash = splashDialogs[Options.GUIID]; if(thisSplash.InvokeRequired) { thisSplash.Invoke(new AsyncCallDlgOptions(SplashImageAssync), Options); } } if(thisSplash != null) { Options.AppendShowHideTo(thisSplash); } else { thisSplash = new SplashDialog(); splashDialogs.Add(Options.GUIID, thisSplash); } Options.AppendTo(thisSplash); #region Splash specific Options if(File.Exists(Options.Param1)) { try { thisImage = System.Drawing.Bitmap.FromFile(Options.Param1); } catch(Exception) { ErrorLevel = 1; return; } if(thisImage != null) { thisSplash.Image = thisImage; } } #endregion if(!Options.Hide && !thisSplash.Visible) thisSplash.Show(); }
private static void ProgressAssync(ComplexDlgOptions Options) { ProgressDialog thisProgress = null; if(progressDialgos.ContainsKey(Options.GUIID)) { thisProgress = progressDialgos[Options.GUIID]; if(thisProgress.InvokeRequired) { thisProgress.Invoke(new AsyncCallDlgOptions(ProgressAssync), Options); } } if(thisProgress != null) { Options.AppendShowHideTo(thisProgress); } else { thisProgress = new ProgressDialog(); progressDialgos.Add(Options.GUIID, thisProgress); } Options.AppendTo(thisProgress); #region Parse Progress specific Options short num; if(!short.TryParse(Options.Param1, out num)) { num = 0; } thisProgress.ProgressValue = num; #endregion if(!Options.Hide && !thisProgress.Visible) thisProgress.Show(); }