/// <summary>
        /// Edits the specified object's value using the editor style indicated by the <see cref="M:System.Drawing.Design.UITypeEditor.GetEditStyle"/> method.
        /// </summary>
        /// <returns>
        /// The new value of the object. If the value of the object has not changed, this should return the same object it was passed.
        /// </returns>
        /// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext"/> that can be used to gain additional context information. </param><param name="provider">An <see cref="T:System.IServiceProvider"/> that this editor can use to obtain services. </param><param name="value">The object to edit. </param>
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            AppearanceEditor editor;

            if (context != null && context.Instance != null && provider != null)
            {
                object currentValue = value;
                if (value is string)
                {
                    var convet = new GenericConverter <MonthCalanderAppearance>();
                    currentValue = convet.ConvertTo(value, typeof(MonthCalanderAppearance));
                }
                editor = new AppearanceEditor((MonthCalanderAppearance)currentValue);
                editor.ShowDialog();
                value = editor.Value;
                if (context.Instance is MonthCalander)
                {
                    ((MonthCalander)context.Instance).Appearance.Assign(editor.Value);
                    ((MonthCalander)context.Instance).SetThemeDefaults();
                }
            }
            return(value);
        }
Esempio n. 2
0
        public static string[] AlteOderGeloeschteDateienLoeschenUndHochzuladendeZurueckGeben(
            string gaitoBotEditorID,
            DateiPublizierungsInfos[] dateien)
        {
            de.springwald.gaitobot.publizierung.Gaitobot_de_publizieren.DateiPublizierungsInfos[] dateien1 = GenericConverter <DateiPublizierungsInfos[], de.springwald.gaitobot.publizierung.Gaitobot_de_publizieren.DateiPublizierungsInfos[]> .ConvertTo(dateien);

            return(PublizierDienst.Webdienst.AlteOderGeloeschteDateienLoeschenUndHochzuladendeZurueckGeben(gaitoBotEditorID, dateien1));
        }