private void JobFailed(Base.ErrorType error) { tmJob.Stop(); MessageBox.Show(string.Format(Translate("{0},_because_{1}._{2}", true), Translate("ikas_cannot_get_the_latest_job"), Translate(error.ToString()), Translate("after_you_solve_the_problems_above,_if_this_error_message_continues_to_appear,_please_consider_submitting_the_issue.") ), "Ikas", MessageBoxButton.OK, MessageBoxImage.Warning); // Stop loading jobWindow.StopLoading(); }
private void ShiftFailed(Base.ErrorType error) { if (Depot.CurrentMode == Depot.Mode.salmon_run) { lbMode.Content = "Ikas"; // Fade in label ((Storyboard)FindResource("fade_in")).Begin(lbMode); } tmShift.Stop(); MessageBox.Show(string.Format(Translate("{0},_because_{1}._{2}", true), Translate("ikas_cannot_get_shift"), Translate(error.ToString()), Translate("after_you_solve_the_problems_above,_if_this_error_message_continues_to_appear,_please_consider_submitting_the_issue.") ), "Ikas", MessageBoxButton.OK, MessageBoxImage.Warning); // Stop loading shiftWindow.StopLoading(); }
private void SessionTokenGet(Base.ErrorType error, string sessionToken) { if (sessionToken == null || sessionToken == "") { MessageBox.Show(string.Format(Translate("{0},_because_{1}._{2}", true), Translate("ikas_cannot_get_session_token"), Translate(error.ToString()), Translate("after_you_solve_the_problems_above,_if_this_error_message_continues_to_appear,_please_consider_submitting_the_issue.") ), "Ikas", MessageBoxButton.OK, MessageBoxImage.Warning); txtSessionToken.Text = ""; // Fade out loading ((Storyboard)FindResource("fade_out")).Begin(bdLoading); bdLoading.IsHitTestVisible = false; lbOk.IsEnabled = true; } else { MessageBox.Show(Translate("get_session_token_successfully.", true), "Ikas", MessageBoxButton.OK, MessageBoxImage.Information); txtSessionToken.Text = sessionToken; TxtSessionToken_LostFocus(null, null); // Update cookie if (gridUserLogIn.Visibility == Visibility.Visible) { ((Storyboard)FindResource("grid_fade_out")).Begin(gridUserLogIn); ((Storyboard)FindResource("grid_fade_in")).Begin(gridUserLoggedIn); // Fade out loading ((Storyboard)FindResource("fade_out")).Begin(bdLoading); bdLoading.IsHitTestVisible = false; lbOk.IsEnabled = true; BdUpdateCookie_MouseDown(null, null); } else { // Fade out loading ((Storyboard)FindResource("fade_out")).Begin(bdLoading); bdLoading.IsHitTestVisible = false; lbOk.IsEnabled = true; } } }
private void CookieGet(Base.ErrorType error, string cookie) { if (cookie == null || cookie == "") { MessageBox.Show(string.Format(Translate("{0},_because_{1}._{2}", true), Translate("ikas_cannot_update_cookie"), Translate(error.ToString()), Translate("after_you_solve_the_problems_above,_if_this_error_message_continues_to_appear,_please_consider_submitting_the_issue.") ), "Ikas", MessageBoxButton.OK, MessageBoxImage.Warning); } else { if (Visibility == Visibility.Visible) { MessageBox.Show(Translate("update_cookie_successfully.", true), "Ikas", MessageBoxButton.OK, MessageBoxImage.Information); } txtCookie.Text = cookie; Depot.Cookie = txtCookie.Text; } // Fade out loading ((Storyboard)FindResource("fade_out")).Begin(bdLoading); bdLoading.IsHitTestVisible = false; lbOk.IsEnabled = true; }