Exemple #1
0
        private void viewToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var ele = new ElePropsForm()
            {
                Element = CurEle
            };


            if (ele.ShowDialog() == DialogResult.OK)
            {
                EleType = CurEle.Type;
            }
        }
        private void viewToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var ele = new ElePropsForm()
            {
                Element = CurEle
            };


            if (ele.ShowDialog() == DialogResult.OK)
            {
                var axis = ele.Element as EleCylinder;

                var props = typeof(EleCylinder).GetProperties();
                foreach (var p in props)
                {
                    p.SetValue(CurEle, p.GetValue(axis));
                }


                EleType = CurEle.Type;
            }
        }