private void PhoneNumberPanelOnClickCountry() { var data = LocalCore.GetDataFromJsonFromPath <CountryModel>("CountryCode", "CountryCode").ToList(); _countryPanel.gameObject.SetActive(true); _countryPanel.InitData(data); _countryPanel.Init(data); }
private void InitContacts() { var data = LocalCore.GetDataFromJsonFromPath <ContactModel>("Contacts", "Contacts").ToList(); _contactPanel.gameObject.SetActive(true); _contactPanel.InitData(data); _contactPanel.Init(data); }
private void PartAppOnClick(ESettingsType type) { DestroyElmnt(); var data = LocalCore.GetDataFromJsonFromPath <ParamModel>(type.ToString(), "Settings").ToList(); _container.SetActive(true); InitParams(data, type); }
protected void RebuildContextMenuItems(LibRetroCoreItem item, LocalCore core) { _contextMenuItems.Clear(); string name = item.Downloaded ? "[Emulators.CoreUpdater.Update]" : "[Emulators.CoreUpdater.Download]"; ListItem contextItem = new ListItem(Consts.KEY_NAME, name); contextItem.Command = new MethodDelegateCommand(() => DownloadCoreAsync(item, core)); _contextMenuItems.Add(contextItem); _contextMenuItems.FireChange(); }
protected void DownloadCoreAsync(LibRetroCoreItem item, LocalCore core) { var sm = ServiceRegistration.Get <IScreenManager>(); Guid?dialogId = null; ServiceRegistration.Get <IThreadPool>().Add(() => { ProgressLabel = LocalizationHelper.Translate("[Emulators.CoreUpdater.Downloading]", core.CoreName); dialogId = sm.ShowDialog(DIALOG_CORE_UPDATE_PROGRESS); DownloadCore(item, core); }, e => { if (dialogId.HasValue) { sm.CloseDialog(dialogId.Value); } }); }
protected ListItem CreateListItem(LocalCore core, bool downloaded, bool configured) { LibRetroCoreItem item = new LibRetroCoreItem(); item.SetLabel(LABEL_CORE_NAME, core.CoreName); item.AdditionalProperties[KEY_CORE] = core; item.Downloaded = downloaded; item.Configured = configured; item.Command = new MethodDelegateCommand(() => ShowContextMenu(item, core)); if (core.Info != null) { item.SetLabel(Consts.KEY_NAME, core.Info.DisplayName); item.AdditionalProperties[KEY_CORE_INFO] = core.Info; } else { item.SetLabel(Consts.KEY_NAME, Path.GetFileNameWithoutExtension(core.CoreName)); } return(item); }
protected void DownloadCore(LibRetroCoreItem item, LocalCore core) { lock (_downloadSync) { if (_downloadingUrls.Contains(core.Url)) { return; } _downloadingUrls.Add(core.Url); } try { if (_coreHandler.DownloadCore(core)) { item.Downloaded = true; } } finally { lock (_downloadSync) _downloadingUrls.Remove(core.Url); } }
protected void ShowContextMenu(LibRetroCoreItem item, LocalCore core) { RebuildContextMenuItems(item, core); DialogHeader = item.Label(Consts.KEY_NAME, core.CoreName).Evaluate(); ServiceRegistration.Get <IScreenManager>().ShowDialog(DIALOG_CONTEXT_MENU); }