public AgentContentView(LoadingPopup LoadingPopup) { InitializeComponent(); this.loadingPopup = LoadingPopup; this.BindingContext = viewModel = new AllListPageViewModel(); Init(); }
// show the setup dialog public void ShowPlugin() { MovingPicturesConfig configScr; try { LoadingPopup loadingPopup = new LoadingPopup(); Thread initThread = new Thread(new ThreadStart(MovingPicturesCore.Initialize)); initThread.IsBackground = true; initThread.Start(); loadingPopup.ShowDialog(); configScr = new MovingPicturesConfig(); } catch (Exception e) { logger.FatalException("Unexpected error from plug-in initialization!", e); return; } try { configScr.ShowDialog(); } catch (Exception e) { MessageBox.Show("There was an unexpected error in the Moving Pictures Configuration screen!", "Fatal Error", MessageBoxButtons.OK, MessageBoxIcon.Error); logger.FatalException("Unexpected error from the Configuration Screen!", e); return; } try { MovingPicturesCore.Shutdown(); } catch (Exception e) { logger.FatalException("Unexpected error from plug-in shutdown!", e); } }
public LoanContentView(LoadingPopup LoadingPopup) { InitializeComponent(); this.loadingPopup = LoadingPopup; this.BindingContext = viewModel = new GoiVayFilterresultViewModel(); Init(); }
public void LoadAssets() { var dictList = ((CompactMainForm)MainView).GetCustomDictionary(); var loader = new LoadingPopup(); loader.BeginLoading(dictList); loader.ShowDialog(); }
public LoanContentView() { InitializeComponent(); loadingPopup = new LoadingPopup() { IsVisible = true }; Children.Add(loadingPopup); this.BindingContext = viewModel = new GoiVayFilterresultViewModel(); Init(); }
public AgentContentView() { InitializeComponent(); loadingPopup = new LoadingPopup() { IsVisible = true }; this.Children.Add(loadingPopup); this.BindingContext = viewModel = new AllListPageViewModel(); Init(); }
private void InitPopup() { if (this.loadingPopup == null) { this.loadingPopup = new LoadingPopup(); } this.loadingPopup.LoadingError += new LoadingPopup.EventHandler(loadingPopup_LoadingError); this.loadingPopup.LoadingComplete += new LoadingPopup.EventHandler(loadingPopup_LoadingComplete); if (this.popup == null) { this.popup = new Popup(); this.popup.Child = this.loadingPopup; } }
private void UpdateIsLoggingInOnline() { if (ViewModel.IsLoggingInOnline) { if (_loadingPopupIsLoggingInOnline == null) { _loadingPopupIsLoggingInOnline = new LoadingPopup() { Text = LocalizedResources.GetString("LoginPage_String_LoggingIn") }; } _loadingPopupIsLoggingInOnline.Show(); } else { _loadingPopupIsLoggingInOnline?.Close(); } }
private void UpdateIsCheckingOnlinePassword() { if (ViewModel.IsCheckingOnlinePassword) { if (_loadingCheckingOnlinePassword == null) { _loadingCheckingOnlinePassword = new LoadingPopup() { Text = LocalizedResources.GetString("LoginPage_String_CheckingOnlinePassword") }; } _loadingCheckingOnlinePassword.Show(); } else { _loadingCheckingOnlinePassword?.Close(); } }
private void UpdateIsSyncingAccount() { if (ViewModel.IsSyncingAccount) { if (_loadingPopupIsSyncingAccount == null) { _loadingPopupIsSyncingAccount = new LoadingPopup() { Text = LocalizedResources.GetString("LoginPage_String_SyncingAccount") }; } _loadingPopupIsSyncingAccount.Show(); } else { _loadingPopupIsSyncingAccount?.Close(); } }
public void UpdateStatus() { if (ViewModel.IsCreatingOnlineAccount) { if (_loadingPopupCreatingOnlineAccount == null) { _loadingPopupCreatingOnlineAccount = new LoadingPopup() { Text = "Creating account", IsCancelable = false }; } _loadingPopupCreatingOnlineAccount.Show(); } else { if (_loadingPopupCreatingOnlineAccount != null) { _loadingPopupCreatingOnlineAccount.Close(); } } }
private async void Mainbutton_Clicked(object sender, EventArgs e) { lock (syncLock) { if (isInCall) { return; } isInCall = true; } try { var data = Xamarin.Forms.Application.Current.Properties; var SenderName = (sender as Xamarin.Forms.Button).ClassId; var loadingPage = new LoadingPopup(); await Navigation.PushPopupAsync(loadingPage); //KYR EDW AMA KOLLAEI ContentPage contentPage = null; //switch (SenderName) //{ // case "Overview": // break; // case "Breakfast": // break; // case "Brunch": // break; // case "Lunch": // break; // case "Supper": // break; // case "Dinner": // break; // case "Extra": // break; // case "Settings": // break; //} if (SenderName == "Overview") { //string x = "Calories: " + data["todayscal"].ToString() + " Fat: " + data["todaysfat"].ToString() + " Prot: " + data["todaysprot"].ToString() + " Carb: " + data["todayscarb"].ToString(); //var datestoshow = Convert.ToInt32(data["datestoshow"]); //if (datestoshow > 0) //{ // for (int i = 1; i <= datestoshow; i++) // { // x += UnixTimeStampToDateTime(Convert.ToDouble(data[i.ToString() + "datetoshow"].ToString())); // x += "\n"; // x += "Calories: " + data[i.ToString() + "cal"].ToString() + " Fat: " + data[i.ToString() + "fat"].ToString() + " Prot: " + data[i.ToString() + "prot"].ToString() + " Carb: " + data[i.ToString() + "carb"].ToString(); // x += "\n"; // } //} //var alert = new PopupAlert(x); //await Navigation.RemovePopupPageAsync(loadingPage); //await Navigation.PushPopupAsync(alert); var exists = data["goalset"].ToString(); if (exists != "true") { var alert = new PopupAlert("Set your goals in the settings menu first!"); await Navigation.PushPopupAsync(alert); await Navigation.RemovePopupPageAsync(loadingPage); return; } contentPage = new OverviewView(); } else if (SenderName == "Settings") { contentPage = new SettingsView(); } else { int.TryParse(SenderName, out int i); contentPage = new MealView((FoodModel.TimeOfDayEmum)i); } string myinput = await OpenPageFromMain(this.Navigation, loadingPage, contentPage, SenderName); if (myinput == "ok") { } } finally { lock (syncLock) { isInCall = false; } } }
private async void FarmingView_ItemTapped(object sender, ItemTappedEventArgs e) { try { var loading = new LoadingPopup(""); await PopupNavigation.Instance.PushAsync(loading); var item = e.Item as FarmingModel; int idx = e.ItemIndex; if (item.Status) { var answer = await App.Current.MainPage.DisplayAlert("파밍", $"[{item.Name}] 리젠 타이머를 취소합니다.", "확인", "취소"); if (!answer) { await PopupNavigation.Instance.RemovePageAsync(loading); return; } } var date = DateTime.Now; switch (CurrentFarmingList) { case "Mineral": var mineralDb = App.Database.Table <MineralFarmingTable>().ToList().Where(f => f.Name == item.Name).FirstOrDefault(); mineralDb.Status = !mineralDb.Status; if (item.Status) { mineralDb.CompleteTime = null; } else { mineralDb.CompleteTime = date.ToString(); } App.Database.Update(mineralDb); if (item.Status) { if (App.UseNotification) { if (App.Notifications.Contains(item.Id)) { App.Notifications.Remove(item.Id); } DependencyService.Get <INotificationManager>().Cancel(item.Id); } Minerals[idx].CompleteTime = null; Minerals[idx].RespawnTime = null; } else { if (App.UseNotification) { if (!App.Notifications.Contains(item.Id)) { App.Notifications.Add(item.Id); } DependencyService.Get <INotificationManager>().Send("광물 리젠 알림", $"[{item.Name}] 광물이 리젠되었습니다.", item.Id, DateTime.Now.AddHours(item.RespawnHour), item.IconPath); } Minerals[idx].CompleteTime = date.ToString(); Minerals[idx].RespawnTime = date.AddHours(item.RespawnHour).ToString("M월 d일 tt h시 m분 s초", new CultureInfo("ko-KR")); } Minerals[idx].Status = !Minerals[idx].Status; break; case "Collection": var collectionDb = App.Database.Table <CollectionFarmingTable>().ToList().Where(f => f.Name == item.Name).FirstOrDefault(); collectionDb.Status = !collectionDb.Status; if (item.Status) { collectionDb.CompleteTime = null; } else { collectionDb.CompleteTime = date.ToString(); } App.Database.Update(collectionDb); if (item.Status) { if (App.UseNotification) { if (App.Notifications.Contains(item.Id)) { App.Notifications.Remove(item.Id); } DependencyService.Get <INotificationManager>().Cancel(item.Id); } Collections[idx].CompleteTime = null; Collections[idx].RespawnTime = null; } else { if (App.UseNotification) { if (!App.Notifications.Contains(item.Id)) { App.Notifications.Add(item.Id); } DependencyService.Get <INotificationManager>().Send("채집물 리젠 알림", $"[{item.Name}] 채집물이 리젠되었습니다.", item.Id, DateTime.Now.AddHours(item.RespawnHour), item.IconPath); } Collections[idx].CompleteTime = date.ToString(); Collections[idx].RespawnTime = date.AddHours(item.RespawnHour).ToString("M월 d일 tt h시 m분 s초", new CultureInfo("ko-KR")); } Collections[idx].Status = !Collections[idx].Status; break; } FarmingListRefresh(); // 안드로이드, 진동 0.05초 동안 울림 if (App.UseVibration && Device.RuntimePlatform == Device.Android) { Vibration.Vibrate(TimeSpan.FromMilliseconds(50)); } await PopupNavigation.Instance.RemovePageAsync(loading); } catch (Exception ex) { App.DisplayEx(ex); } }