public override PropertyDescriptor GetDefaultProperty() => GetProperties()[0]; // "default" ?? public override PropertyDescriptorCollection GetProperties() { var s1 = SettingsInfo.LayerNames.Select(l => new LayerPropertyDescriptor(l)) .Cast <PropertyDescriptor>(); var s2 = SettingsInfo.Settings .Select(m => MednaPropertyDescriptor.Create(m, true)); return(new PropertyDescriptorCollection(s1.Concat(s2).ToArray())); }
public override PropertyDescriptor GetDefaultProperty() => GetProperties()[0]; // "default" ?? public override PropertyDescriptorCollection GetProperties() { var s1 = SettingsInfo.LayerNames.Select(l => new LayerPropertyDescriptor(l)) .Cast <PropertyDescriptor>(); var s2 = SettingsInfo.AllSettings .Where(s => { var o = SettingsInfo.AllOverrides[s.SettingsKey]; return(!o.Hide && o.NonSync); }) .Select(m => MednaPropertyDescriptor.Create(m, true)); return(new PropertyDescriptorCollection(s1.Concat(s2).ToArray())); }
public override PropertyDescriptor GetDefaultProperty() => GetProperties()[0]; // "default" ?? public override PropertyDescriptorCollection GetProperties() { var s1 = SettingsInfo.Ports .Select((p, i) => new PortPropertyDescriptor(p, i)) .Cast <PropertyDescriptor>(); var s2 = SettingsInfo.SyncSettings .Select(m => MednaPropertyDescriptor.Create(m, true)); return(new PropertyDescriptorCollection(s1.Concat(s2).ToArray())); }
public override PropertyDescriptor GetDefaultProperty() => GetProperties()[0]; // "default" ?? public override PropertyDescriptorCollection GetProperties() { var s1 = SettingsInfo.Ports .Select((p, i) => new PortPropertyDescriptor(p, i)) .Cast <PropertyDescriptor>(); var s2 = SettingsInfo.Settings .Where(s => !SettingsInfo.HiddenSettings.Contains(s.SettingsKey)) .Select(m => MednaPropertyDescriptor.Create(m)); return(new PropertyDescriptorCollection(s1.Concat(s2).ToArray())); }
public override PropertyDescriptor GetDefaultProperty() => GetProperties()[0]; // "default" ?? public override PropertyDescriptorCollection GetProperties() { var s1 = SettingsInfo.Ports .Select((p, i) => new PortPropertyDescriptor(p, i)) .Cast <PropertyDescriptor>(); var s2 = SettingsInfo.AllSettings .Where(s => { var o = SettingsInfo.AllOverrides[s.SettingsKey]; return(!o.Hide && !o.NonSync); }) .Select(m => { m.DefaultValue = SettingsInfo.AllOverrides[m.SettingsKey].Default ?? m.DefaultValue; return(MednaPropertyDescriptor.Create(m, true)); }); return(new PropertyDescriptorCollection(s1.Concat(s2).ToArray())); }