public ErrorStatus ConvertToDouble(string String, ref double dZahl, int?Zähler) { ErrorStatus eStatus = ErrorStatus.OutOfRange; if (!(String == String.Empty || String == "\r")) { string sZahl = ""; //',' gegen '.' tauschen String = String.Replace(',', '.'); //Vorzeichen berücksichtigen try { if (String[0] == '-') { sZahl = "-"; } } catch { } //alphazeichen aus String entfernen for (int i = 0; i < String.Length; i++) { if ((String[i] >= '0') && (String[i] <= '9') || String[i] == '.' || String[i] == ',') { sZahl += String[i]; } } int test = String.Length - sZahl.Length; try { if (sZahl != String.Empty) { dZahl = Convert.ToDouble(sZahl, CultureInfo.InvariantCulture); eStatus = ErrorStatus.OK; } } #pragma warning disable CS0168 // Die Variable "e" ist deklariert, wird aber nie verwendet. catch (System.FormatException e) #pragma warning restore CS0168 // Die Variable "e" ist deklariert, wird aber nie verwendet. { System.Windows.Forms.MessageBox.Show(sZahl + " konnte nicht konvertiert werden. (Zeile " + Zähler.ToString() + ")"); } } //MP ohne Höhe else { eStatus = ErrorStatus.NullExtents; } return(eStatus); }
public int Create(History history) { ErrorStatus errorStatus = ErrorStatus.New; switch (history.Action) { case HistoryAction.Opening: errorStatus = ErrorStatus.Opened; break; case HistoryAction.Closing: errorStatus = ErrorStatus.Closed; break; case HistoryAction.Resolving: errorStatus = ErrorStatus.Resolved; break; } _errorRepository.Update(new Error { Id = history.ErrorId, Status = errorStatus }); return(_historyRepository.Add(history)); }
/// <summary> /// Check if a status is deemed a success. If not, possibly display an interactive message /// to a user, incorporating the displayContext-string in the message. This is typically /// a file name or some other language independent context. /// </summary> /// <param name="status">The status to check.</param> /// <param name="displayContext">A language independent context for the error, typically a file name.</param> /// <returns> /// True if the status indicated success, false otherwise. /// </returns> public bool CheckStatusAndShowMessage(ErrorStatus status, string displayContext, string message) { bool success = status == ErrorStatus.Success; ErrorSeen |= !success; return(success); }
public void MergeFrom(ConversationEvent other) { if (other == null) { return; } if (other.Conversation.Length != 0) { Conversation = other.Conversation; } if (other.Type != global::Google.Cloud.Dialogflow.V2.ConversationEvent.Types.Type.Unspecified) { Type = other.Type; } if (other.errorStatus_ != null) { if (errorStatus_ == null) { ErrorStatus = new global::Google.Rpc.Status(); } ErrorStatus.MergeFrom(other.ErrorStatus); } switch (other.PayloadCase) { case PayloadOneofCase.NewMessagePayload: if (NewMessagePayload == null) { NewMessagePayload = new global::Google.Cloud.Dialogflow.V2.Message(); } NewMessagePayload.MergeFrom(other.NewMessagePayload); break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
private void _parse() { _requestId = new AsnObj(m_io, this, m_root); _errorStatus = new ErrorStatus(m_io, this, m_root); _errorIndex = new AsnObj(m_io, this, m_root); _variableBindings = new VariableBindings(m_io, this, m_root); }
/// <summary> /// Creates an error response. /// </summary> public ErrorResponse(ErrorStatus status, [Localizable(false)] string message) { Contract.Requires(message != null); Message = message; Status = status; }
public override int GetHashCode() { int hash = 1; if (Conversation.Length != 0) { hash ^= Conversation.GetHashCode(); } if (Type != global::Google.Cloud.Dialogflow.V2.ConversationEvent.Types.Type.Unspecified) { hash ^= Type.GetHashCode(); } if (errorStatus_ != null) { hash ^= ErrorStatus.GetHashCode(); } if (payloadCase_ == PayloadOneofCase.NewMessagePayload) { hash ^= NewMessagePayload.GetHashCode(); } hash ^= (int)payloadCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
/// <summary> /// בדיקת מס' כרטיס אשראי /// </summary> /// <param name="creditCard">(מס' כרטיס האשראי (ללא ישראכארד</param> /// <param name="notEmpty">האם חייב להיות מלא</param> /// <returns>תקין/שגוי</returns> private static ErrorStatus CheckCreditCardNumber(string creditCard, bool notEmpty) { ErrorStatus status = ErrorStatus.NONE; if (creditCard == "") { if (notEmpty) { status = ErrorStatus.EMPTY; } } else { string cc = JustDigits(creditCard); if (cc.Length >= 11 && cc.Length <= 19 && Global.IsLuhn(cc)) { status = ErrorStatus.NONE; } else { status = ErrorStatus.ERROR; } } return(status); }
public CommStatusUpdatedEventArgs(ErrorStatus error_status, CommStatus comm_status, CommStatus comm_status_old) { ErrorStatus = error_status; CommStatus = comm_status; CommStatusMask = comm_status ^ comm_status_old; }
/// <summary> /// בדיקת שדה זמן /// </summary> /// <param name="time">מחרוזת הזמן לבדיקה</param> /// <param name="notEmpty">האם חייב להיות מלא</param> /// <returns>האם חייב להיות מלא</returns> public static ErrorStatus CheckTime(object time, bool notEmpty) { ErrorStatus status = ErrorStatus.NONE; if (Convert.ToString(time) == "") { if (notEmpty) { status = ErrorStatus.EMPTY; } } else { if (!Global.IsTime(time)) { status = ErrorStatus.ERROR; } else if (!notEmpty) { status = ErrorStatus.EMPTY; } } return(status); }
/// <summary> /// בדיקת שדה תאריך /// </summary> /// <param name="date">מחרוזת התאריך לבדיקה</param> /// <param name="notEmpty">האם חייב להיות מלא</param> /// <returns>ב</returns> public static ErrorStatus CheckDate(object date, bool notEmpty) { ErrorStatus status = ErrorStatus.NONE; if (date.ToString() == "") { if (notEmpty) { status = ErrorStatus.EMPTY; } } else { if (!Global.IsDate(date)) { status = ErrorStatus.ERROR; } else if (notEmpty && DateTime.Parse(date.ToString()) == DateTime.MinValue) { status = ErrorStatus.EMPTY; } } return(status); }
//鼠标松开的时候插入CAD文件,并终止trans,以及析构trans,同时接触文件的锁定。 public override void OnDrop(DragEventArgs e) { System.Drawing.Point TempPt = new System.Drawing.Point(e.X, e.Y); //单纯使用this.Ed.PointToWord(Pt),会出现问题 ErrorStatus Stat = this.InsertDWGFile(TempPt); switch (Stat) { case ErrorStatus.InvalidDwgVersion: Autodesk.AutoCAD.ApplicationServices.Application.ShowAlertDialog("待引入的DWG文件版本过高,引入失败,请将图库文件转换成更低的版本"); break; case ErrorStatus.CantOpenFile: Autodesk.AutoCAD.ApplicationServices.Application.ShowAlertDialog("异常,插入图库失败"); break; case ErrorStatus.UnsupportedFileFormat: Autodesk.AutoCAD.ApplicationServices.Application.ShowAlertDialog("错误,不支持的文件格式"); break; case ErrorStatus.FileNotFound: Autodesk.AutoCAD.ApplicationServices.Application.ShowAlertDialog("错误,未找到相应文件"); break; default: break; } this.Dispose(); }
bool ReadStream(GitCommand command) { StreamReader output_stream = command.StandardError; if (StorageType == StorageType.LargeFiles) { output_stream = command.StandardOutput; } double percentage = 0; double speed = 0; string information = ""; while (!output_stream.EndOfStream) { string line = output_stream.ReadLine(); ErrorStatus error = GitCommand.ParseProgress(line, out percentage, out speed, out information); if (error != ErrorStatus.None) { Error = error; information = line; command.Kill(); command.Dispose(); Logger.LogInfo("Git", Name + " | Error status changed to " + Error); return(false); } OnProgressChanged(percentage, speed, information); } return(true); }
public ErrorStatus getTextStyleId(string Textstil, ref ObjectId TextstilId) { Database db = HostApplicationServices.WorkingDatabase; Transaction myT = db.TransactionManager.StartTransaction(); ErrorStatus es = ErrorStatus.KeyNotFound; try { TextStyleTable tsTbl = (TextStyleTable)myT.GetObject(db.TextStyleTableId, OpenMode.ForRead, true, true); foreach (ObjectId objId in tsTbl) { TextStyleTableRecord tsTblRec = new TextStyleTableRecord(); tsTblRec = (TextStyleTableRecord)myT.GetObject(objId, OpenMode.ForWrite); if (Textstil == tsTblRec.Name) { TextstilId = objId; //m_myT.Commit(); break; } } es = ErrorStatus.OK; } finally { myT.Commit(); } return(es); }
//methods public void Start() { Blöcke.Instance.Init(); ErrorStatus es = Blöcke.Instance.SelectWindow(); _lsMP = Blöcke.Instance.LsMP; //Blöcke.Instance.Dispose(); if (es == ErrorStatus.OK) { PromptIntegerResult resInt = _ed.GetInteger("Kommastellen: "); if (resInt.Status == PromptStatus.OK) { _digits = resInt.Value; foreach (Messpunkt mp in _lsMP) { if (mp.RoundHeight(_digits) == ErrorStatus.OK) { counter++; } } MessageBox.Show(counter + " Punkte gerundet"); } } }
//something plobrem //文件的名称必须和块的名称一致 //不一致将会发生错误 //将图块写入到当前文档中 private bool WBlockBetweenDataBase(string BlockName) { Database SourceDB = new Database(false, true); ErrorStatus Stats = this.GetInsertDwgFile(ref SourceDB); Document Doc = AcadApp.DocumentManager.MdiActiveDocument; Database TargetDB = Doc.Database; ObjectIdCollection SourceIds = new ObjectIdCollection(); using (Transaction Tr = SourceDB.TransactionManager.StartTransaction()) { using (Transaction Tr2 = TargetDB.TransactionManager.StartTransaction()) { BlockTable SourceBt = (BlockTable)Tr.GetObject(SourceDB.BlockTableId, OpenMode.ForRead); if (SourceBt.Has(BlockName)) { SourceIds.Add(SourceBt[BlockName]); } Tr.Commit(); } } if (SourceIds.Count != 0) { IdMapping IdMap = new IdMapping(); TargetDB.WblockCloneObjects(SourceIds, TargetDB.BlockTableId, IdMap, DuplicateRecordCloning.Ignore, false); SourceDB.Dispose(); return(true); } else { SourceDB.Dispose(); return(false); } }
public FeedPage( Guid correlationId, ErrorStatus error, TaggedResolvedEvent[] events, CheckpointTag lastReaderPosition) { CorrelationId = correlationId; Error = error; Events = events; LastReaderPosition = lastReaderPosition; }
public override bool ReportAlarmHappend(ErrorStatus alarm_status, string error_code, string desc) { string alcd = SCAppConstants.AlarmStatus.convert2MCS(alarm_status); string alid = error_code; string altx = desc; return(iBSEMDriver.S5F1SendAlarmReport(alcd, alid, altx)); }
public override bool ReportAlarmHappend(ErrorStatus alarm_status, E_ALARM_LVL alarm_lvl, string error_code, string desc) { //string alcd = SECSConst.AlarmStatus.convert2MCS(alarm_status, alarm_lvl); //string alid = error_code; //string altx = desc; //return iBSEMDriver.S5F1SendAlarmReport(alcd, alid, altx); return(false); }
private void Row_DoubleClick_Show_Valid_Status(object sender, MouseButtonEventArgs e) { Ventilator_status selectedVentilatorStatus = (Ventilator_status)validStatus.SelectedItem; Employee selectedEmployee = (Employee)ServiceTechnicians.SelectedItem; ErrorStatus window = new ErrorStatus(selectedVentilatorStatus, selectedEmployee); window.Show(); }
/// <summary> /// エラー時 /// </summary> protected void OnError(ErrorStatus errorStatus, Action onRetry) { Debug.LogErrorFormat("エラー発生:{0}:{1}", errorStatus, this.path); this.status = Status.Stop; this.errorStatus = errorStatus; this.onRestart = onRetry; this.onError?.Invoke(this); }
public static DescriptiveObject Error(string customDescription, ErrorStatus metadata = ErrorStatus.CUSTOM) { return(new DescriptiveObject { IsErrorState = true, ErrorMetaData = metadata, ErrorDescription = customDescription }); }
public static DescriptiveObject Error(ErrorStatus status) { return(new DescriptiveObject { IsErrorState = true, ErrorMetaData = status, ErrorDescription = status.ToString() }); }
public static new DescriptiveResponse <T> Error(ErrorStatus status) { return(new DescriptiveResponse <T> { IsErrorState = true, ErrorMetaData = status, ErrorDescription = status.ToString() }); }
public static new DescriptiveResponse <T> Error(string customdescription, ErrorStatus metaData = ErrorStatus.CUSTOM) { return(new DescriptiveResponse <T> { IsErrorState = true, ErrorMetaData = metaData, ErrorDescription = customdescription }); }
public override bool newReportUnitAlarmClear(string eq_id, ErrorStatus alarm_status, E_ALARM_LVL alarm_lvl, string error_code, string desc, List <AMCSREPORTQUEUE> reportqueues) { ////string alcd = SECSConst.AlarmStatus.convert2MCS(alarm_status, alarm_lvl); //string alid = SECSConst.ALID.convert2MCS(alarm_lvl); //string altx = SECSConst.ALTX.convert2MCS(alarm_lvl); //bool isSuccsess = true; //isSuccsess = isSuccsess && iBSEMDriver.S6F11SendUnitAlarmCleared(alid, altx, error_code, desc, reportqueues); return(false); }
public void tExtract() // This method can have any name { // Put your command code here Document doc = Application.DocumentManager.MdiActiveDocument; Editor ed; if (doc != null) { ed = doc.Editor; PromptSelectionResult psr = ed.GetSelection(); if (psr.Status != PromptStatus.OK) { return; } using (Transaction t = doc.Database.TransactionManager.StartOpenCloseTransaction()) { Database db = doc.Database; SelectionSet acSSet = psr.Value; // Step through the objects in the selection set foreach (SelectedObject acSSObj in acSSet) { // Check to make sure a valid SelectedObject object was returned if (acSSObj != null) { // Open the selected object for write PointCloudEx acEnt = t.GetObject(acSSObj.ObjectId, OpenMode.ForRead) as PointCloudEx; if (acEnt != null) { Elements elements = new Elements(); ErrorStatus es = getCylinder(acEnt.ObjectId.OldIdPtr, ref elements); if (es == ErrorStatus.OK) { ed.WriteMessage("_axis {0},origin {1},height {2},raidus {3}" + elements._axis.ToString() + "\t" + elements._origin.ToString() + "\t" + elements._height + "\t" + elements._raidus); } else { ed.WriteMessage(es.ToString()); } break; } } } } ed.WriteMessage("Hello, this is your first command."); } }
public bool ReportAlarmCleared(string vhID, string transferID, ErrorStatus alarm_status, string error_code, string desc, List <AMCSREPORTQUEUE> reportqueues) { string alcd = SCAppConstants.AlarmStatus.convert2MCS(alarm_status); string alid = error_code; string altx = $"[{SCUtility.Trim(vhID, true) }]{desc}"; iBSEMDriver.S6F11SendUnitAlarmCleared(vhID, transferID, alid, altx); iBSEMDriver.S5F1SendAlarmReport(alcd, alid, altx); return(true); }
/// <summary> /// ComboBox-בדיקת אם נבחר איבר חוקי ב /// </summary> /// <param name="value">ComboBox של slectedValue-ה</param> /// <returns></returns> public static ErrorStatus CheckCombo(int value) { ErrorStatus status = ErrorStatus.NONE; if (value == 0) { status = ErrorStatus.EMPTY; } return(status); }
public ValidationException(ErrorStatus status, string description) { if (status == ErrorStatus.EMPTY) { message = "יש למלא " + description; } else if (status == ErrorStatus.ERROR) { message = description + " שגוי"; } }
public override void Error(ErrorStatus errorStatus) { switch (errorStatus) { case ErrorStatus.InvalidToken: { APNsTableAdapter ta = new APNsTableAdapter(); ta.UpdateInvalidDeviceToken(apnsId); break; } default: logger.Error("APNs returned error:" + errorStatus.ToString() + " APNs id:" + apnsId); break; } }
protected AxCryptException(string message, ErrorStatus errorStatus, Exception innerException) : base(message, innerException) { ErrorStatus = errorStatus; }
public InternalErrorException(string message, ErrorStatus errorStatus, Exception innerException) : base(message, errorStatus, innerException) { }
public abstract void Error(ErrorStatus errorStatus);
public FileFormatException(string message, ErrorStatus errorStatus) : base(message, errorStatus) { }
/// <summary> /// Constructor. /// </summary> /// <param name="id">The Id of the Dynamixel reporting an error.</param> /// <param name="errorStatus">The ErrorStatus value being reported.</param> public DynamixelErrorArgs(int id, ErrorStatus errorStatus) { _Id = id; _errorStatus = errorStatus; }
/// <summary> /// Returns a textual representation of the ErrorStatus value. /// </summary> /// <param name="errorType">The ErrorStatus value to examine.</param> /// <returns>A list with a text string for each error flagged in the ErrorStatus value.</returns> public static List<string> ErrorText(ErrorStatus errorType) { List<string> text = new List<string>(); foreach (ErrorStatus e in Enum.GetValues(typeof(ErrorStatus))) { // check each ErrorStatus flag if ((errorType & e) != 0) { // get a friendlier text string from the enum value's Description attribute FieldInfo fi = e.GetType().GetField(e.ToString()); DescriptionAttribute[] attributes = (DescriptionAttribute[])fi.GetCustomAttributes(typeof(DescriptionAttribute), false); text.Add(attributes[0].Description); } } return text; }
public InternalErrorException(string message, ErrorStatus errorStatus) : base(message, errorStatus) { }
public bool HasError(ErrorStatus error) { foreach(ErrorStatus es in GetErrors()) { if(es == error) { return true; } } return false; }
public InvalidDataException(string message, ErrorStatus errorStatus) : base(message, errorStatus) { }
public InvalidDataException(string message, ErrorStatus errorStatus, Exception innerException) : base(message, errorStatus, innerException) { }
protected AxCryptException(string message, ErrorStatus errorStatus) : base(message) { ErrorStatus = errorStatus; }
public FileFormatException(string message, ErrorStatus errorStatus, Exception innerException) : base(message, errorStatus, innerException) { }