public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { es = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (es == null) return value; bot = BarSettingsStorage.Instance.GetBarSettingsByName((string) value); // открыть модальный диалог выбора пары / ТФ var dlg = new TimeframeSettingsForm(bot); return dlg.ShowDialog() != DialogResult.OK ? value : BarSettingsStorage.Instance.GetBarSettingsFriendlyName(dlg.Timeframe); }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { es = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (es == null) { return(value); } bot = BarSettingsStorage.Instance.GetBarSettingsByName((string)value); // открыть модальный диалог выбора пары / ТФ var dlg = new TimeframeSettingsForm(bot); return(dlg.ShowDialog() != DialogResult.OK ? value : BarSettingsStorage.Instance.GetBarSettingsFriendlyName(dlg.Timeframe)); }