Beispiel #1
0
 private void miFormat_Click(object sender, EventArgs e)
 {
     using (FormatEditorForm form = new FormatEditorForm())
     {
         form.TextObject = FTextObjects.First;
         if (form.ShowDialog() == DialogResult.OK)
         {
             FTextObjects.SetFormat(form.Formats);
             Change();
         }
     }
 }
Beispiel #2
0
 private void miFormat_Click(object sender, EventArgs e)
 {
     using (FormatEditorForm form = new FormatEditorForm())
     {
         form.TextObject = FTopCell;
         if (form.ShowDialog() == DialogResult.OK)
         {
             SelectedTextBaseObjects components = new SelectedTextBaseObjects(Designer);
             components.Update();
             components.SetFormat(form.Formats);
             Change();
         }
     }
 }
Beispiel #3
0
        public override object EditValue(ITypeDescriptorContext context,
                                         IServiceProvider provider, object Value)
        {
            Report report = context.Instance is Base ?
                            (context.Instance as Base).Report :
                            (((object[])context.Instance)[0] as Base).Report;
            SelectedTextBaseObjects objects = new SelectedTextBaseObjects(report.Designer);

            objects.Update();

            using (FormatEditorForm form = new FormatEditorForm())
            {
                form.TextObject = objects.First as TextObjectBase;
                if (form.ShowDialog() == DialogResult.OK)
                {
                    objects.SetFormat(form.Formats);
                    report.Designer.SetModified(null, "Change");
                }
            }

            return(Value);
        }