/// <summary> /// The run. /// </summary> /// <returns> /// The <see cref="bool"/>. /// </returns> public bool Run() { Logging.Enter(this, MethodBase.GetCurrentMethod().Name); Reporting.Info("Function Connect Device is not supported by Host Application: DeviceCare"); return(false); }
/// <summary> /// The run. /// </summary> /// <returns> /// The <see cref="bool"/>. /// </returns> public bool Run() { Logging.Enter(this, MethodBase.GetCurrentMethod().Name); Reporting.Info("Function Register Device Type is not implemented by Host Application: DeviceCare"); return(false); }
/// <summary> /// Opens a FDT specified DTM function by its name and validates if the action was successful /// </summary> /// <param name="functionName">The name of the DTM function</param> /// <returns>True if the action was successful</returns> public bool Run(string functionName) { Logging.Enter(this, MethodBase.GetCurrentMethod().Name); return(DtmFunctions.OpenDtmFunction(functionName)); }
/// <summary> /// The open dtm function. /// </summary> /// <returns> /// The <see cref="bool"/>. /// </returns> public static bool PrintDeviceReport() { Logging.Enter(typeof(DeviceReport), MethodBase.GetCurrentMethod().Name); Reporting.Error("Not implemented yet"); return(false); }
/// <summary> /// The run. /// </summary> /// <returns> /// The <see cref="bool"/>. /// </returns> public bool Run() { Logging.Enter(typeof(WriteDataToDevice), MethodBase.GetCurrentMethod().Name); bool methodResult; // check if device is connected if (Functions.StatusArea.StatusBar.Validation.Connection.IsDeviceConnected()) { // check if device supports offline functionality if (Functions.MenuArea.MenuBar.Validation.DtmFunctions.IsOfflineParameterizeAvailable()) { methodResult = Functions.MenuArea.MenuBar.Execution.ProgramFunctions.OpenMenu(); methodResult &= Functions.MenuArea.MenuBar.Execution.ProgramFunctions.RunWriteToDevice(); if (methodResult) { // wait until read is finished // check progress indicator, see create project methodResult &= Functions.StatusArea.StatusBar.Validation.ProgressIndicator.WaitUntilProgressIndicatorBecomesAvailable(); methodResult &= Functions.StatusArea.StatusBar.Validation.ProgressIndicator.WaitUntilProgressIndicatorBecomesNotAvailable(); if (methodResult) { // check event log, see get last message if (Functions.Dialogs.Execution.EventLog.OpenEventLog()) { string lastMessage = Functions.Dialogs.Execution.EventLog.GetLastMessageFromEventLog(); if (lastMessage.Equals(string.Empty)) { Reporting.Error("No message is shown after Write Data To Device"); return(false); } if (Functions.Dialogs.Execution.EventLog.CloseEventLog()) { return(true); } // get device care language string hostApplicationLanguage = new GetHostApplicationLanguage().Run(); string download = string.Empty; string successful = string.Empty; // get language dependent words ResourceSet languages = GUI.StringTranslation.ResourceManager.GetResourceSet(CultureInfo.CurrentUICulture, true, true); foreach (DictionaryEntry language in languages) { if (language.Key.ToString().Contains(hostApplicationLanguage) && language.Key.ToString().Contains("download") && language.Key.ToString().Contains("successful")) { string[] seperator = { "_" }; string[] words = language.Value.ToString().Split(seperator, StringSplitOptions.None); download = words[0]; successful = words[1]; } } if (lastMessage.ToLower().Contains(download) && lastMessage.ToLower().Contains(successful)) { Reporting.Debug("Download finished successful."); Reporting.Debug(lastMessage); return(true); } Reporting.Error("There is no information about an successful download"); return(false); } return(false); } return(false); } return(false); } Reporting.Error("This device does not support an Offline Parameterize. Up / Download is not possible."); return(false); } return(false); }
/// <summary> /// The run. /// </summary> /// <param name="filePathAndName"> /// The file path and name. /// </param> /// <returns> /// The <see cref="bool"/>. /// </returns> public bool Run(string filePathAndName) { Logging.Enter(this, MethodBase.GetCurrentMethod().Name); return(this.Run(filePathAndName, Common.DefaultValues.GeneralTimeout)); }
/// <summary> /// The run. /// </summary> /// <param name="filePath"> /// The file path. /// </param> /// <param name="fileName"> /// The file name. /// </param> /// <returns> /// The <see cref="bool"/>. /// </returns> public bool Run(string filePath, string fileName) { Logging.Enter(this, MethodBase.GetCurrentMethod().Name); Reporting.Info("Function Restore Device Data is not supported by Host Application: DeviceCare"); return(false); }
/// <summary> /// The run. /// </summary> /// <returns> /// The <see cref="string"/>. /// </returns> public string Run() { Logging.Enter(this, MethodBase.GetCurrentMethod().Name); Reporting.Info("Function Select Device is not supported by Host Application: DeviceCare"); return(string.Empty); }
/// <summary> /// The run. /// </summary> /// <returns> /// The <see cref="bool"/>. /// </returns> public List <string> Run() { Logging.Enter(this, MethodBase.GetCurrentMethod().Name); Reporting.Info("Function Get Device List is not supported by Host Application: DeviceCare"); return(null); }
/// <summary> /// The run. /// </summary> /// <param name="communication"> /// The communication. /// </param> /// <param name="devices"> /// The devices. /// </param> /// <returns> /// The <see cref="string"/>. /// </returns> public bool Run(List <string /*communications*/> communication, List <string /*device*/> devices) { Logging.Enter(this, MethodBase.GetCurrentMethod().Name); Reporting.Info("Function Select Device is not supported by Host Application: DeviceCare"); return(false); }