public override ReadCE3.RdStatus RdMb3Member(string str1, string str2, ReadCE3 readCE3) { switch (str1) { case "P": libPath = ReadCE3.DecodeCE3String(str2); return(ReadCE3.RdStatus.NoError); default: return(ReadCE3.RdStatus.NoError); } }
/// <summary> /// Mb3ファイルの読み込み時のメンバーの解釈を行う /// </summary> /// <param name="str1">変数名または"+"で始まるブロックタグ</param> /// <param name="str2">変数値</param> /// <param name="readCE3">ブロック読み込み時に使うReadCE3クラス</param> /// <returns>正常終了時にReadCE3.RdStatus.NoErrorを返す</returns> public override ReadCE3.RdStatus RdMb3Member(string str1, string str2, ReadCE3 readCE3) { switch (str1) { case "HEIGHT": try { Height = Convert.ToInt32(str2); } catch (Exception) { Height = DEFAULT_HEIGHT; } return(ReadCE3.RdStatus.NoError); case "WIDTH": try { Width = Convert.ToInt32(str2); } catch (Exception) { Width = DEFAULT_WIDTH; } return(ReadCE3.RdStatus.NoError); case "SHAPE": shape = GetPadShapeValue(str2); if (shape == PadShape.ERR) { shape = PadShape.Obround; } return(ReadCE3.RdStatus.NoError); case "THMLRLF": thermalRelief = GetThermalReliefTypeValue(str2); if (thermalRelief == PadThermalRelief.ERR) { thermalRelief = PadThermalRelief.ThmlRlfInComp; } return(ReadCE3.RdStatus.NoError); case "PINNUM": PinNum = ReadCE3.DecodeCE3String(str2); return(ReadCE3.RdStatus.NoError); case "SRMARGIN": try { SrMargin = Convert.ToInt32(str2); } catch (Exception) { SrMargin = DEFAULT_SRMARGIN; } return(ReadCE3.RdStatus.NoError); case "NO_RM": try { int n = Convert.ToInt32(str2); no_ResistMask = (n != 0); } catch (Exception) { no_ResistMask = false; } return(ReadCE3.RdStatus.NoError); default: return(base.RdMb3Member(str1, str2, readCE3)); } //return true; }
/// <summary> /// Mb3ファイルの読み込み時のメンバーの解釈を行う /// </summary> /// <param name="str1">変数名または"+"で始まるブロックタグ</param> /// <param name="str2">変数値</param> /// <param name="readCE3">ブロック読み込み時に使うReadCE3クラス</param> /// <returns>正常終了時にReadCE3.RdStatus.NoErrorを返す</returns> public virtual ReadCE3.RdStatus RdMb3Member(string str1, string str2, ReadCE3 readCE3) { //ReadCE3.RdStatus result = ReadCE3.RdStatus.NoError; switch (str1) { case "LAYER": Layer = MbeLayer.GetLayerValue(str2); return(ReadCE3.RdStatus.NoError); case "SIGNAME": SigName = ReadCE3.DecodeCE3String(str2); return(ReadCE3.RdStatus.NoError); } if ((str1.Substring(1, 3) == "POS") && (str1.Length > 4)) { string strIndex = str1.Substring(4); int index; int value; try { index = Convert.ToInt32(strIndex); value = Convert.ToInt32(str2); } catch (Exception) { return(ReadCE3.RdStatus.FormatError); } if (str1[0] == 'X') { SetXPos(value, index); return(ReadCE3.RdStatus.NoError); } else if (str1[0] == 'Y') { SetYPos(value, index); return(ReadCE3.RdStatus.NoError); } } if (str1[0] == '+' && str1.Length >= 2) { string strSkipTo = "-" + str1.Substring(1); if (!readCE3.SkipTo(strSkipTo)) { return(ReadCE3.RdStatus.FileError); } } return(ReadCE3.RdStatus.NoError); }
public override ReadCE3.RdStatus RdMb3Member(string str1, string str2, ReadCE3 readCE3) { switch (str1) { case "A": { int n = 0; try { n = Convert.ToInt32(str2); } catch (Exception) { n = 0; } active = (n != 0); } return(ReadCE3.RdStatus.NoError); case "M": { int n = 0; try { n = Convert.ToInt32(str2); } catch (Exception) { n = 0; } mirror = (n != 0); } return(ReadCE3.RdStatus.NoError); case "N": name = ReadCE3.DecodeCE3String(str2); return(ReadCE3.RdStatus.NoError); case "L": { ulong u = 0; try { u = Convert.ToUInt64(str2); } catch (Exception) { u = 0; } checkvalue = u; } return(ReadCE3.RdStatus.NoError); default: return(ReadCE3.RdStatus.NoError); } }
/// <summary> /// Mb3ファイルの読み込み時のメンバーの解釈を行う /// </summary> /// <param name="str1">変数名または"+"で始まるブロックタグ</param> /// <param name="str2">変数値</param> /// <param name="readCE3">ブロック読み込み時に使うReadCE3クラス</param> /// <returns>正常終了時にReadCE3.RdStatus.NoErrorを返す</returns> public override ReadCE3.RdStatus RdMb3Member(string str1, string str2, ReadCE3 readCE3) { string _str1; string _str2; ReadCE3.RdStatus result = ReadCE3.RdStatus.NoError; switch (str1) { case "PACKAGE": packageName = ReadCE3.DecodeCE3String(str2); return(ReadCE3.RdStatus.NoError); case "REMARKS": remarksText = ReadCE3.DecodeCE3String(str2); return(ReadCE3.RdStatus.NoError); case "ANGLEX10": try { AngleX10 = Convert.ToInt32(str2); } catch (Exception) { AngleX10 = -1; } return(ReadCE3.RdStatus.NoError); case "+REFNUM": { while (readCE3.GetRecord(out _str1, out _str2)) { if (_str1[0] == '-') { break; } else { if (_str1 == "") { continue; } MbeObj obj; result = MbeObjIO.ReadMbeObj(readCE3, _str1, out obj); if (obj != null && obj.Id() == MbeObjID.MbeText) { refNum = (MbeObjText)obj; } } } return(result); } case "+CONTENTS": { LinkedList <MbeObj> objLList = new LinkedList <MbeObj>(); while (readCE3.GetRecord(out _str1, out _str2)) { if (_str1[0] == '-') { break; } else { if (_str1 == "") { continue; } MbeObj obj; result = MbeObjIO.ReadMbeObj(readCE3, _str1, out obj); if (obj != null) { objLList.AddLast(obj); } } } int nCount = objLList.Count; if (nCount == 0) { contentsObj = null; return(result); } SetContentsWithLinkedList(objLList); return(result); } default: return(base.RdMb3Member(str1, str2, readCE3)); } }