Exemple #1
0
 /// <summary>
 /// コピーコンストラクタ
 /// </summary>
 /// <param name="mbeObjPin"></param>
 public MbeObjArc(MbeObjArc mbeObjArc)
     : base(mbeObjArc)
 {
     lineWidth  = mbeObjArc.lineWidth;
     startAngle = mbeObjArc.startAngle;
     endAngle   = mbeObjArc.endAngle;
     radius     = mbeObjArc.radius;
     SetupPosition();
 }
Exemple #2
0
        /// <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);
        }
Exemple #3
0
        private bool EditPropertyArc(MbeObjArc obj)
        {
            SetArcForm dlg = new SetArcForm();

            dlg.LineWidth  = obj.LineWidth;
            dlg.Radius     = obj.Radius;
            dlg.StartAngle = obj.StartAngle;
            dlg.EndAngle   = obj.EndAngle;
            DialogResult retv = dlg.ShowDialog();

            if (retv == DialogResult.OK)
            {
                obj.LineWidth  = dlg.LineWidth;
                obj.Radius     = dlg.Radius;
                obj.StartAngle = dlg.StartAngle;
                obj.EndAngle   = dlg.EndAngle;
                obj.SetupPosition();
                return(true);
            }
            return(false);
        }
Exemple #4
0
        /// <summary>
        /// 複製を行う
        /// </summary>
        /// <returns></returns>
        public override MbeObj Duplicate()
        {
            MbeObj newObj = new MbeObjArc(this);

            return(newObj);
        }