コード例 #1
0
        /// <summary>
        /// PinTHのプロパティ編集ダイアログの起動
        /// </summary>
        /// <param name="obj">編集対象PinTHオブジェクト</param>
        /// <param name="editPinNumberMode">ピン番号文字列も編集するときtrue</param>
        /// <returns></returns>
        private bool EditPropertyPTH(MbeObjPTH obj, bool editPinNumberMode)
        {
            SetPTHForm dlg = new SetPTHForm();

            dlg.LandHeight           = obj.PadSize.Height;
            dlg.LandWidth            = obj.PadSize.Width;
            dlg.Drill                = obj.Diameter;
            dlg.Shape                = obj.Shape;
            dlg.No_ResistMask        = obj.No_ResistMask;
            dlg.ThermalReliefSetting = obj.ThermalRelief;
            dlg.EditPinNumberMode    = true;
            if (editPinNumberMode)
            {
                dlg.PinNumber = obj.PinNum;
            }
            DialogResult retv = dlg.ShowDialog();

            if (retv == DialogResult.OK)
            {
                obj.PadSize       = new Size(dlg.LandWidth, dlg.LandHeight);
                obj.Diameter      = dlg.Drill;
                obj.Shape         = dlg.Shape;
                obj.ThermalRelief = dlg.ThermalReliefSetting;
                obj.No_ResistMask = dlg.No_ResistMask;
                if (editPinNumberMode)
                {
                    obj.PinNum = dlg.PinNumber;
                }
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #2
0
ファイル: MbeObj.cs プロジェクト: ShuDiamonds/PIC-project
        /// <summary>
        /// ReadCE3のストリームから、startWordで始まるMbeObjを読み取る
        /// </summary>
        /// <param name="readMb3"></param>
        /// <param name="startWord"></param>
        /// <param name="obj"></param>
        /// <returns></returns>
        public static ReadCE3.RdStatus ReadMbeObj(ReadCE3 readMb3, string startWord, out MbeObj obj)
        {
            ReadCE3.RdStatus result = ReadCE3.RdStatus.NoError;
            obj = null;
            if (startWord == "+MBE_HOLE")
            {
                obj = new MbeObjHole();
            }
            else if (startWord == "+MBE_PTH")
            {
                obj = new MbeObjPTH();
            }
            else if (startWord == "+MBE_PINSMD")
            {
                obj = new MbeObjPinSMD(true);
            }
            else if (startWord == "+MBE_FLASHMARK")
            {
                obj = new MbeObjPinSMD(false);
            }
            else if (startWord == "+MBE_LINE")
            {
                obj = new MbeObjLine();
            }
            else if (startWord == "+MBE_POLYGON")
            {
                obj = new MbeObjPolygon();
            }
            else if (startWord == "+MBE_TEXT")
            {
                obj = new MbeObjText();
            }
            else if (startWord == "+MBE_ARC")
            {
                obj = new MbeObjArc();
            }
            else if (startWord == "+MBE_COMPONENT")
            {
                obj = new MbeObjComponent();
            }
            else
            {
                string strSkipTo = "-" + startWord.Substring(1);
                readMb3.SkipTo(strSkipTo);
            }

            if (obj != null)
            {
                result = obj.RdMb3(readMb3);
                if (result != ReadCE3.RdStatus.NoError)
                {
                    obj = null;
                }
            }
            return(result);
        }
コード例 #3
0
 /// <summary>
 /// コピーコンストラクタ
 /// </summary>
 /// <param name="mbeObjPin"></param>
 public MbeObjPTH(MbeObjPTH mbeObjPinTh)
     : base(mbeObjPinTh)
 {
     dia = mbeObjPinTh.dia;
 }
コード例 #4
0
        /// <summary>
        /// 複製を行う
        /// </summary>
        /// <returns></returns>
        public override MbeObj Duplicate()
        {
            MbeObj newObj = new MbeObjPTH(this);

            return(newObj);
        }