private static void RunPriv(object o) { UpdateCheckParams p = (o as UpdateCheckParams); if(p == null) { Debug.Assert(false); return; } IStatusLogger sl = null; try { if(p.ForceUI) { Form fStatusDialog; sl = StatusUtil.CreateStatusDialog(p.Parent, out fStatusDialog, KPRes.UpdateCheck, KPRes.CheckingForUpd + "...", true, true); } List<UpdateComponentInfo> lInst = GetInstalledComponents(); List<string> lUrls = GetUrls(lInst); Dictionary<string, List<UpdateComponentInfo>> dictAvail = DownloadInfoFiles(lUrls, sl); if(dictAvail == null) return; // User cancelled MergeInfo(lInst, dictAvail); bool bUpdAvail = false; foreach(UpdateComponentInfo uc in lInst) { if(uc.Status == UpdateComponentStatus.NewVerAvailable) { bUpdAvail = true; break; } } if(sl != null) { sl.EndLogging(); sl = null; } if(bUpdAvail || p.ForceUI) { UpdateCheckForm dlg = new UpdateCheckForm(); dlg.InitEx(lInst, p.ForceUI); UIUtil.ShowDialogAndDestroy(dlg); } } catch(Exception) { Debug.Assert(false); } finally { try { if(sl != null) sl.EndLogging(); } catch(Exception) { Debug.Assert(false); } } }
private static void ShowUpdateDialogPriv(List<UpdateComponentInfo> lInst, bool bModal) { try { UpdateCheckForm dlg = new UpdateCheckForm(); dlg.InitEx(lInst, bModal); UIUtil.ShowDialogAndDestroy(dlg); } catch(Exception) { Debug.Assert(false); } }
private static void ShowUpdateDialogPriv(List<UpdateComponentInfo> lInst, bool bModal) { try { // Do not show the update dialog while auto-typing; // https://sourceforge.net/p/keepass/bugs/1265/ if(SendInputEx.IsSending) return; UpdateCheckForm dlg = new UpdateCheckForm(); dlg.InitEx(lInst, bModal); UIUtil.ShowDialogAndDestroy(dlg); } catch(Exception) { Debug.Assert(false); } }