// ReSharper restore InconsistentNaming #region Public Methods and Operators /// <summary> /// Determines whether DTM (HISTOROM module) is offline /// </summary> /// <returns> /// true: if DTM is offline /// false: if DTM is online or an error occurred /// </returns> public bool Run() { bool result = false; string state = new StatusBarElements().ConnectionState; if (state == null) { Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Connection State is null"); } else { string hostApplicationLanguage = CommonFlows.GetHostApplicationLanguage.Run(); string connectionState = string.Empty; ResourceSet languages = OfflineConnectionStateTranslations.ResourceManager.GetResourceSet(CultureInfo.CurrentUICulture, true, true); foreach (DictionaryEntry language in languages) { if (hostApplicationLanguage == language.Key.ToString()) { connectionState = language.Value.ToString(); Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Connection state translated: " + connectionState + "."); break; } } if (state.Equals(connectionState)) { result = true; } } return(result); }
public void should_add_the_predefined_components_to_the_status_bar() { foreach (var element in StatusBarElements.All()) { StatusBarElement elementToAdd = element; A.CallTo(() => _statusBarView.AddItem(elementToAdd)).MustHaveHappened(); } }
public void Initialize() { StatusBarElements.All().Each(_view.AddItem); updateProjectInfo(AppConstants.None, string.Empty, string.Empty, false); update(StatusBarElements.Version) .WithCaption(_moBiConfiguration.FullVersionDisplay); hideProgressBar(); }
/// <summary> /// Searches for button "Operation in Progress" in the lower status bar of the module(found while reading) /// </summary> /// <returns> /// true: if button is found /// false: if button is not found /// </returns> public bool IsOperationInProgress() { Button operationInProgress = new StatusBarElements().ButtonOperationInProgress; return(operationInProgress != null); }
public void Initialize() { StatusBarElements.All().Each(_view.AddItem); }