示例#1
0
 public static MyText Show(Form parrentForm, PointF textLocation, float lineWeight)
 {
     using (fTextEditor formTextEditor = new fTextEditor())
     {
         formTextEditor.nudLineWeight.Value = (decimal)lineWeight;
         if (formTextEditor.ShowDialog(parrentForm) == DialogResult.OK)
         {
             formTextEditor.MyText.Begin      = textLocation;
             formTextEditor.MyText.LineWeight = (float)formTextEditor.nudLineWeight.Value;
             return(formTextEditor.MyText);
         }
     }
     return(null);
 }
示例#2
0
        public static void Show(Form parrentForm, List <MyShape> listShapes)
        {
            using (fTextEditor formTextEditor = new fTextEditor())
            {
                List <MyText> listTextEditor = new List <MyText>();
                listShapes.FindAll(shape => shape.IsSelected && shape is MyText).ForEach(text => listTextEditor.Add(text as MyText));

                formTextEditor.MyText.GetProperty(listTextEditor[0]);
                if (formTextEditor.ShowDialog(parrentForm) == DialogResult.OK)
                {
                    for (int i = 0; i < listTextEditor.Count; i++)
                    {
                        listTextEditor[i].GetProperty(formTextEditor.MyText);
                    }
                }
            }
        }