public static void StartUpdateDialog(Form owner, MegaUpdater updater) { using (var w = new ModUpdateProgressDialog()) { w.Icon = owner.Icon; w.StartPosition = FormStartPosition.CenterParent; w._megaUpdater = updater; w.ShowDialog(owner); } }
public static List <SideloaderUpdateItem> ShowWindow(ModUpdateProgressDialog owner, IEnumerable <SideloaderUpdateItem> updateTasks) { try { using (var w = new ModUpdateSelectDialog()) { w.Icon = owner.Icon; w.StartPosition = FormStartPosition.CenterParent; w._updateTasks = updateTasks.OrderBy(x => x.UpToDate).ThenBy(x => x.RelativePath).ToList(); w.ShowDialog(); return(w._selectedItems); } } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Failed to get updates", MessageBoxButtons.OK, MessageBoxIcon.Error); } return(null); }