Exemplo n.º 1
0
 public CCDField(CCDField RHS)
 {
     this.fieldId=RHS.fieldId;
     this.fieldName=RHS.fieldName;
     this.frenchFieldName=RHS.frenchFieldName;
     this.format=RHS.format;
     this.valuestr=RHS.valuestr;
 }
Exemplo n.º 2
0
		/// <summary>Input a single field.<summary>
		public string InputField(string message,string fieldId){
			CCDField field=new CCDField(fieldId,isVersion2);
			int len=field.GetRequiredLength(this);
			if(len<0 || message==null || message.Length<len){
				return null;
			}
			if(len==0){
				return message;
			}
			string substr=message.Substring(0,len);
			//if(!field.CheckValue(this,substr)){
			//  throw new ApplicationException("Invalid value for CCD message field '"+field.fieldName+"'"+((substr==null)?"":(": "+substr)));
			//}
			field.valuestr=substr;
			fieldList.Add(field);
			return message.Substring(substr.Length,message.Length-substr.Length);//Skip text that has already been read in.
		}
Exemplo n.º 3
0
		public CCDField[] GetLoadedFields(){
			CCDField[] loadedFields=new CCDField[fieldList.Count];
			fieldList.CopyTo(loadedFields);
			return loadedFields;
		}