public void SetLists() { if (firstRun) { firstRun = false; StationID = "Workstation"; } Apps.Clear(); List_VerLbls.Clear(); List_UninBtns.Clear(); List_CurBtns.Clear(); if (StationID == "Workstation") { // Update lists Apps.AddRange(new App[] { IPA, DVR, XBCA, Util, LCU }); List_VerLbls.AddRange(new Label[] { lbl_IPAVer, lbl_DVRVer, lbl_XBCAVer, lbl_UtilVer, lbl_LCUVer }); List_UninBtns.AddRange(new Button[] { btn_IPAUninstall, btn_DVRUninstall, btn_XBCAUninstall, btn_UtilUninstall, btn_LCUUninstall }); List_CurBtns.AddRange(new Button[] { btn_IPACurrent, btn_DVRCurrent, btn_XBCACurrent, btn_UtilCurrent, btn_LCUCurrent }); } else { // Update lists Apps.AddRange(new App[] { IPAS, Util, GECA, LCU, MP }); List_VerLbls.AddRange(new Label[] { lbl_IPASVer, lbl_UtilVer, lbl_GECAVer, lbl_LCUVer, lbl_MPVer }); List_UninBtns.AddRange(new Button[] { btn_IPASUninstall, btn_UtilUninstall, btn_GECAUninstall, btn_LCUUninstall, btn_MPUninstall }); List_CurBtns.AddRange(new Button[] { btn_IPASCurrent, btn_UtilCurrent, btn_GECACurrent, btn_LCUCurrent, btn_MPCurrent }); } UpdateVersions(false); }
private void InitBaseDataIfDatabaseEmpty() { if (!Roles.Any()) { Roles.AddRange(RolesFactory.GetAllRoles()); } if (!Apps.Any()) { Apps.AddRange(AppsFactory.GetApps()); } }
public void Reload() { AppInfo.FetchApps(Context, Settings.Instance.Blacklist, true, Settings.RENAME_MAPPINGS, r => { Apps.Clear(); Apps.AddRange(r); Settings.Instance.SanitizeAppOrder(Apps); Sort(); Context.RunOnUiThread(NotifyDataSetChanged); }); }
public void Reload() { AppInfo.FetchApps(Context, false, r => { Apps.Clear(); Apps.AddRange(r); Settings.Instance.SanitizeAppOrder(Apps); Sort(); Context.RunOnUiThread(NotifyDataSetChanged); }); }