public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { if (context == null) { return null; } if (context.Instance == null) { return null; } // Get Settings DiagramPrinterSettings settingsPrinter = context.Instance as DiagramPrinterSettings; if (settingsPrinter == null) { return null; } // Get Printer Name string printerName = settingsPrinter.PrinterName; PrintDocument printerDocument = new PrintDocument(); PrinterSettings printerSettings = printerDocument.PrinterSettings; printerSettings.PrinterName = string.IsNullOrEmpty(printerName) ? null : printerName; // List<string> list = new List<string>(); foreach (PaperSize paperSize in printerSettings.PaperSizes) { list.Add(paperSize.PaperName); } // Sort list.Sort(); list.Insert(0, Resources.TEXT_DEFAULT_BR); // Return List StandardValuesCollection svc = new StandardValuesCollection(list); return svc; }
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { List<Server> baseServers = new List<Server> { new Server("useast.battle.net", 6112), new Server("uswest.battle.net", 6112), new Server("europe.battle.net", 6112), new Server("asia.battle.net", 6112) }; List<Server> serverCollection = new List<Server>(); foreach (Server s in baseServers) { serverCollection.Add(s); try { IPHostEntry iphe = Dns.GetHostEntry(s.Host); foreach (IPAddress ipa in iphe.AddressList) { serverCollection.Add(new Server(ipa.ToString(), 6112)); } } catch { Debug.WriteLine(s, "Unable to resolve server."); } } StandardValuesCollection svc = new StandardValuesCollection(serverCollection); return svc; }
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { if (charSets == null) PopulateList(context.Instance); StandardValuesCollection coll = new StandardValuesCollection(charSets); return coll; }
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { List <Server> baseServers = new List <Server> { new Server("useast.battle.net", 6112), new Server("uswest.battle.net", 6112), new Server("europe.battle.net", 6112), new Server("asia.battle.net", 6112) }; List <Server> serverCollection = new List <Server>(); foreach (Server s in baseServers) { serverCollection.Add(s); try { IPHostEntry iphe = Dns.GetHostEntry(s.Host); foreach (IPAddress ipa in iphe.AddressList) { serverCollection.Add(new Server(ipa.ToString(), 6112)); } } catch { Debug.WriteLine(s, "Unable to resolve server."); } } StandardValuesCollection svc = new StandardValuesCollection(serverCollection); return(svc); }
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { List<string> listToFill = new List<string>(); listToFill.Clear(); listToFill.AddRange(FacadeContainer.Self.ApplicationSettings.AvailableBuildTools); if (ShowNewApplication) { listToFill.Add("New Application..."); } if (!string.IsNullOrEmpty(SourceFileExtensionRestriction)) { // Only get build tools that start with the right extension string whatToStartWith = "*." + SourceFileExtensionRestriction; for (int i = listToFill.Count - 1; i > -1; i--) { if (listToFill[i].StartsWith(whatToStartWith) == false) { listToFill.RemoveAt(i); } } } if(ShowNoneOption) { listToFill.Insert(0, "<None>"); } StandardValuesCollection svc = new StandardValuesCollection(listToFill); return svc; }
/// <summary> /// Gets a collection of standard values collection for a System.Globalization.CultureInfo /// object using the specified context. /// </summary> public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { StandardValuesCollection values = null; if (context.PropertyDescriptor != null) { ExtenderProvidedPropertyAttribute attr = context.PropertyDescriptor.Attributes[typeof(ExtenderProvidedPropertyAttribute)] as ExtenderProvidedPropertyAttribute; if (attr != null) { LanguageExtenders provider = attr.Provider as LanguageExtenders; if (provider != null) { values = provider.SupportedCultures; } } } if (values is null) { values = base.GetStandardValues(context); } return(values); }
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { var conn_attr = context. PropertyDescriptor.Attributes[typeof(ConnectionListAttribute)]; var list = new List <string>(); StandardValuesCollection vals = new StandardValuesCollection(list); if (conn_attr != null) { ConnectionListAttribute lst = (ConnectionListAttribute)conn_attr; foreach (var conn in DBGlobalService.CurrentProject.Connections) { list.Add(conn.Name); } vals = new TypeConverter.StandardValuesCollection(list); } return(vals); }
public override StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) { // Passes the local array. StandardValuesCollection svc = new StandardValuesCollection(languages); return(svc); }
public override TypeConverter.StandardValuesCollection GetStandardValues( ITypeDescriptorContext context) { StandardValuesCollection svc = new StandardValuesCollection(defaultValues); return(svc); }
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { //the actual list of standard items to return StandardValuesCollection list = null; if (context.Instance is IScreenParameter) { IScreenParameter parameter = (IScreenParameter)context.Instance; if (parameter.InputType == ScreenInputType.Special) { List <string> listItems = GetSpecialInputKeys(); string[] items = listItems.ToArray <string>(); list = new StandardValuesCollection(items); } if (parameter.InputType == ScreenInputType.User) { string[] items = Configuration.GetInstance().App.ProfileProperties.ToArray <string>(); list = new StandardValuesCollection(items); } } return(list); }
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { var library = ApplicationServices.Get<IAppModuleInstance>(LipSyncMapDescriptor.ModuleID) as LipSyncMapLibrary; List<string> maps = library.Library.Values.Select(data => data.ToString()).ToList(); StandardValuesCollection values = new StandardValuesCollection(maps); return values; }
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { ServiceController owner = (context == null) ? null : context.Instance as ServiceController; string machineName = "."; if (owner != null) { machineName = owner.MachineName; } if (values == null || machineName != previousMachineName) { try { ServiceController[] installedServices = ServiceController.GetServices(machineName); string[] serviceNames = new string[installedServices.Length]; for (int i = 0; i < installedServices.Length; i++) { serviceNames[i] = installedServices[i].ServiceName; } values = new StandardValuesCollection(serviceNames); previousMachineName = machineName; } catch { //Do Nothing } } return(values); }
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { StandardValuesCollection svc = new StandardValuesCollection(IfcDraughtingPreDefinedCurveFont.PrefinedCurveFonts); return(svc); }
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { if (context == null) { return(null); } if (context.Instance == null) { return(null); } // List <string> list = new List <string>(); foreach (string printer in PrinterSettings.InstalledPrinters) { list.Add(printer); } // Sort field name list and insert "None" item list.Sort(); list.Insert(0, Resources.TEXT_DEFAULT_BR); // Return sort field name list StandardValuesCollection svc = new StandardValuesCollection(list); return(svc); }
/// <include file='doc\LogConverter.uex' path='docs/doc[@for="LogConverter.GetStandardValues"]/*' /> /// <internalonly/> /// <devdoc> /// <para>Gets a collection of standard values for the data type this validator is /// designed for.</para> /// </devdoc> public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { EventLog component = (context == null) ? null : context.Instance as EventLog; string machineName = "."; if (component != null) { machineName = component.MachineName; } if (values == null || machineName != oldMachineName) { try { EventLog[] eventLogs = EventLog.GetEventLogs(machineName); object[] names = new object[eventLogs.Length]; for (int i = 0; i < names.Length; i++) { names[i] = eventLogs[i].Log; } values = new StandardValuesCollection(names); oldMachineName = machineName; } catch (Exception) { //Do Nothing } } return(values); }
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { if (context == null) { return(base.GetStandardValues(context)); } PropertyTextbox pt = context.Instance as PropertyTextbox; if (pt == null) { return(base.GetStandardValues(context)); } // Populate with the list of datasets and group names ArrayList ar = new ArrayList(); ar.Add(""); // add an empty string to the collection object[] dsn = pt.Draw.DataSetNames; if (dsn != null) { ar.AddRange(dsn); } object[] grps = pt.Draw.GroupingNames; if (grps != null) { ar.AddRange(grps); } StandardValuesCollection svc = new StandardValuesCollection(ar); return(svc); }
/// <summary> /// Obtains the <see cref="TypeConverter.StandardValuesCollection"/> from <see cref="EnumConverter.GetStandardValues"/>, /// and adds the current value to the beginning of the <see cref="TypeConverter.StandardValuesCollection"/>, if necessary. /// </summary> /// <remarks> /// The current value will be added to the beginning of the <see cref="TypeConverter.StandardValuesCollection"/> returned /// by <see cref="EnumConverter.GetStandardValues"/> if the following conditions are met: /// <list type="bullet"> /// <item><description><paramref name="context"/> is not <see langword="null"/></description></item> /// <item><description><see cref="ITypeDescriptorContext.Instance"/> is not <see langword="null"/>.</description></item> /// <item><description><see cref="ITypeDescriptorContext.PropertyDescriptor"/> is not <see langword="null"/>.</description></item> /// <item><description><see cref="PropertyDescriptor.GetValue"/> returns a value of type <typeparamref name="TEnum"/>.</description></item> /// <item><description><see cref="Enum.IsDefined"/> returns <see langword="true"/> for that value.</description></item> /// <item><description>The <see cref="TypeConverter.StandardValuesCollection"/> returned by <see cref="EnumConverter.GetStandardValues"/> does not already contain that value.</description></item> /// </list> /// </remarks> /// <seealso cref="TypeConverter.GetStandardValues(ITypeDescriptorContext)"/> public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { StandardValuesCollection standardValuesCollection = base.GetStandardValues(context); object component; PropertyDescriptor propertyDescriptor; if (context != null && (component = context.Instance) != null && (propertyDescriptor = context.PropertyDescriptor) != null) { TEnum? valueNullable = propertyDescriptor.GetValue(component) as TEnum?; TEnum value; EnumValueInfo?valueInfoNullable; if (valueNullable.HasValue && (valueInfoNullable = GetValueInfo(value = valueNullable.Value)).HasValue) { // Since we found an EnumValueInfo for the value, we know that Enum.IsDefined would return true if (!valueInfoNullable.Value.Browsable) { // Since the value is not browsable, it will not be in the StandardValuesCollection we retrieved from EnumConverter, // so we have to add it. TEnum[] newStandardValues = new TEnum[standardValuesCollection.Count + 1]; newStandardValues[0] = value; standardValuesCollection.CopyTo(newStandardValues, 1); return(new StandardValuesCollection(newStandardValues)); } } } return(standardValuesCollection); }
public static void Initialize(ICollection<string> importers) { var list = new List<string>(importers); list.Add(NoValue); list.Sort(); standardValues = new StandardValuesCollection(list); }
/// <summary> /// Gets a collection of standard values for a <see cref="CultureInfo"/> object using the specified context. /// </summary> /// <param name="context">An <see cref="ITypeDescriptorContext"/> that provides a format context.</param> /// <returns>A <see cref="TypeConverter.StandardValuesCollection"/> containing a standard set of valid values, /// or null if the data type does not support a standard set of values.</returns> public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { base.GetStandardValues(context); if (this.values == null) { List<CultureInfo> list = new List<CultureInfo>(CultureInfo.GetCultures(CultureTypes.AllCultures)); list.RemoveAll(c => c.IsNeutralCulture); list.Sort((c1, c2) => { if (c1 == null) { return c2 == null ? 0 : -1; } if (c2 == null) { return 1; } return CultureInfo.CurrentCulture.CompareInfo.Compare(c1.DisplayName, c2.DisplayName, CompareOptions.StringSort); }); this.values = new StandardValuesCollection(list); } return this.values; }
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { if (context == null) { return null; } if (context.Instance == null) { return null; } // Get Model DiagrammerEnvironment de = DiagrammerEnvironment.Default; if (de == null) { return null; } SchemaModel model = de.SchemaModel; if (model == null) { return null; } // Get Domains List<Domain> domains = model.GetDomains(); // Create List List<string> list = new List<string>(); // foreach (Domain domain in domains) { list.Add(domain.Name); } // Sort List and Add (None) list.Sort(); list.Insert(0, Resources.TEXT_NONE_BR); // Passes the local integer array. StandardValuesCollection svc = new StandardValuesCollection(list); return svc; }
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { ArrayList arrayList = new ArrayList(); StandardValuesCollection standardValues = base.GetStandardValues(context); StandardValuesCollection standardValuesCollection = null; this.FillList(arrayList, standardValues); ReferenceConverter referenceConverter = null; referenceConverter = new ReferenceConverter(typeof(IListSource)); standardValuesCollection = referenceConverter.GetStandardValues(context); this.FillList(arrayList, standardValuesCollection); referenceConverter = new ReferenceConverter(typeof(DataView)); standardValuesCollection = referenceConverter.GetStandardValues(context); this.FillList(arrayList, standardValuesCollection); referenceConverter = new ReferenceConverter(typeof(IDbDataAdapter)); standardValuesCollection = referenceConverter.GetStandardValues(context); this.FillList(arrayList, standardValuesCollection); referenceConverter = new ReferenceConverter(typeof(IDataReader)); standardValuesCollection = referenceConverter.GetStandardValues(context); this.FillList(arrayList, standardValuesCollection); referenceConverter = new ReferenceConverter(typeof(IDbCommand)); standardValuesCollection = referenceConverter.GetStandardValues(context); this.FillList(arrayList, standardValuesCollection); arrayList.Add(null); return(new StandardValuesCollection(arrayList)); }
/// <summary> /// Personal appears twice in type editor because its numeric value matches with MyDocuments. /// This code filters out the duplicate value. /// </summary> public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { StandardValuesCollection values = base.GetStandardValues(context); var list = new ArrayList(); int count = values.Count; bool personalSeen = false; for (int i = 0; i < count; i++) { if (values[i] is Environment.SpecialFolder && values[i].Equals(Environment.SpecialFolder.Personal)) { if (!personalSeen) { personalSeen = true; list.Add(values[i]); } } else { list.Add(values[i]); } } return(new StandardValuesCollection(list)); }
public SortedEnumTypeConverter(Type type) : base(type) { var values = Enum.GetNames(EnumType); Array.Sort(values); _values = new StandardValuesCollection(values); }
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { if (context == null) { return(null); } if (context.Instance == null) { return(null); } // Create List List <string> list = new List <string>(); // Add Compression Types list.Add("FGDBR"); list.Add("IMAGINE Image"); list.Add("SDR"); // Sort List list.Sort(); // Passes the local integer array. StandardValuesCollection svc = new StandardValuesCollection(list); return(svc); }
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { ICollection <StandardValueAttribute> col = null; if (context?.PropertyDescriptor is CustomPropertyDescriptor) { var cpd = context.PropertyDescriptor as CustomPropertyDescriptor; UpdateEnumDisplayText(cpd); col = cpd.StandardValues; } var list = new List <StandardValueAttribute>(); foreach (var sva in col) { if (sva.Visible) { list.Add(sva); } } if (list.Count > 0) { var svc = new StandardValuesCollection(list); return(svc); } return(base.GetStandardValues(context)); }
GetStandardValues(ITypeDescriptorContext context) { // We can't cache this because the same object may reuse its type converter when properties change on the property grid RefreshList(); StandardValuesCollection svc = new StandardValuesCollection(mAvailableChains); return(svc); }
GetStandardValues(ITypeDescriptorContext context) { List <string> converters = GetAvailableConverters(); StandardValuesCollection svc = new StandardValuesCollection(converters); return(svc); }
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) { var val = (new string[] { "YES", "NO" }); StandardValuesCollection svc = new StandardValuesCollection(val); return(svc); }
GetStandardValues(ITypeDescriptorContext context) { List<string> converters = GetAvailableConverters(); StandardValuesCollection svc = new StandardValuesCollection(converters); return svc; }
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) { var val = ColumnType.SupportTypes; StandardValuesCollection svc = new StandardValuesCollection((from m in val orderby m select m).ToArray()); return(svc); }
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { if (s_values == null) { s_values = new StandardValuesCollection(new object[] { null }); } return(s_values); }
GetStandardValues(ITypeDescriptorContext context) { var list = ExposedVariableManager.GetAvailableNewVariableTypes(AllowNone); StandardValuesCollection svc = new StandardValuesCollection(list); return(svc); }
/// <summary> /// <para>Gets a collection of standard values for the Boolean data type.</para> /// </summary> public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { if (s_values == null) { s_values = new StandardValuesCollection(new object[] { true, false }); } return s_values; }
public void ListViewItemStateImageIndexConverter_GetStandardValues_Null_Context_ReturnsExpected() { var converter = new ListViewItemStateImageIndexConverter(); StandardValuesCollection result = converter.GetStandardValues(context: null); Assert.Equal(0, result.Count); }
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { var library = ApplicationServices.Get <IAppModuleInstance>(LipSyncMapDescriptor.ModuleID) as LipSyncMapLibrary; List <string> maps = library.Library.Values.Select(data => data.ToString()).ToList(); StandardValuesCollection values = new StandardValuesCollection(maps); return(values); }
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { if(standardValues == null) { standardValues = new StandardValuesCollection(values); } return standardValues; }
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { if (_values == null) { object[] values = new object[] { 0 }; _values = new StandardValuesCollection(values); } return _values; }
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { bool[] bools = { true, false }; var svc = new StandardValuesCollection(bools); return(svc); }
/// <internalonly/> /// <devdoc> /// </devdoc> public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { if (values == null) { values = new StandardValuesCollection(targetValues); } return(values); }
/// <summary> /// Returns a collection of standard values for the data type this type converter is designed for when provided with a format context. /// </summary> /// <param name="context">An <see cref="ITypeDescriptorContext"/> that provides a format context that can be used to extract additional information about the environment from which this converter is invoked. This parameter or properties of this parameter can be a null reference.</param> /// <returns>A <see cref="TypeConverter.StandardValuesCollection"/> that holds a standard set of valid values, or a null reference (Nothing in Visual Basic) if the data type does not support a standard set of values.</returns> public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { StandardValuesCollection svc = new StandardValuesCollection(new object[6] { QuaternionD.Zero, QuaternionD.Identity, QuaternionD.XAxis, QuaternionD.YAxis, QuaternionD.ZAxis, QuaternionD.WAxis }); return(svc); }
/// <summary> /// Returns a collection of standard values for the data type this type converter is designed for when provided with a format context. /// </summary> /// <param name="context">An <see cref="ITypeDescriptorContext"/> that provides a format context that can be used to extract additional information about the environment from which this converter is invoked. This parameter or properties of this parameter can be a null reference.</param> /// <returns>A <see cref="TypeConverter.StandardValuesCollection"/> that holds a standard set of valid values, or a null reference (Nothing in Visual Basic) if the data type does not support a standard set of values.</returns> public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { StandardValuesCollection svc = new StandardValuesCollection(new object[4] { Vector3D.Zero, Vector3D.XAxis, Vector3D.YAxis, Vector3D.ZAxis }); return(svc); }
public static void Initialize(ICollection<string> processors) { var names = processors; var list = new List<string>(names); list.Remove(PassThroughProcessorValue); list.Add(NoValue); list.Sort(); standardValues = new StandardValuesCollection(list); }
/// <include file='doc\MessageFormatterConverter.uex' path='docs/doc[@for="MessageFormatterConverter.GetStandardValues"]/*' /> /// <internalonly/> public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { StandardValuesCollection values = new StandardValuesCollection(new object[] { new ActiveXMessageFormatter(), new BinaryMessageFormatter(), new XmlMessageFormatter(), null }); return(values); }
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { Debug.Assert(context.Instance is Table); Table table = context.Instance as Table; if (engineList == null) PopulateList(table); StandardValuesCollection coll = new StandardValuesCollection(engineList); return coll; }
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) { // Passes the local integer array. ArrayList values = new ArrayList(); foreach (DictionaryEntry entry in templateType.Pairs) { values.Add(entry.Key); } StandardValuesCollection svc = new StandardValuesCollection(values); return svc; }
/// <summary> /// Constructor</summary> /// <param name="values">Values to include in the collection</param> public StandardValuesConverter(Array values) { if (values == null) throw new ArgumentNullException("values"); m_values = new StandardValuesCollection(values); // Check if all items are exclusive using a hash set var set = new HashSet<object>(); m_exclusive = values.Cast<object>().All(set.Add); }
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { List<string> stdVals = new List<string>(); foreach (IconProviderConfiguration config in JinxBotConfiguration.Instance.Globals.IconProviders) { stdVals.Add(config.Name); } StandardValuesCollection svc = new StandardValuesCollection(stdVals); return svc; }
/// <summary> /// Initializes a new instance of the <see cref="ColumnDomainConverter"/> class. /// </summary> /// <param name="ds">The database holding domain data</param> /// <param name="cd">The column domain that is being converted (not null)</param> public ColumnDomainConverter(IDataServer ds, IColumnDomain cd) { if (ds == null || cd == null) throw new ArgumentNullException(); m_DataServer = ds; m_ColumnDomain = cd; IDomainTable dt = cd.Domain; string[] lookups = dt.GetLookupValues(ds.ConnectionString); m_Values = new StandardValuesCollection(lookups); }
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { Table table = (context.Instance is Table) ? (context.Instance as Table) : (context.Instance as Column).OwningTable; if (collationData == null) PopulateList(table); StandardValuesCollection coll = new StandardValuesCollection(GetRelevantCollations(context.Instance)); return coll; }
GetStandardValues(ITypeDescriptorContext context) { stringToReturn.Clear(); stringToReturn.AddRange(Facades.FacadeContainer.Self.ApplicationSettings.AvailableApplications);// EditorData.FileAssociationSettings.AvailableApplications); stringToReturn.Add("New Application..."); StandardValuesCollection svc = new StandardValuesCollection(stringToReturn); return svc; }
GetStandardValues(ITypeDescriptorContext context) { var list = ExposedVariableManager.GetAvailableNewVariableTypes(AllowNone); StandardValuesCollection svc = new StandardValuesCollection(list); return svc; }
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { if (Values == null) { Array objValues = Enum.GetValues(EnumType); //IComparer comparer = Comparer; object[] names = new object[objValues.Length]; for (int i = 0; i < names.Length; i++) names[i] = ConvertTo(context, null, objValues.GetValue(i), typeof(string)); Array.Sort(names, objValues, 0, objValues.Length, System.Collections.Comparer.Default); Values = new StandardValuesCollection(objValues); } return Values; }
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { var list = Enum.GetNames(typeof(DataTypeConstants)).ToList(); //These are unsupported list.Remove(DataTypeConstants.Structured.ToString()); list.Remove(DataTypeConstants.Udt.ToString()); list.Remove(DataTypeConstants.Variant.ToString()); var cols = new StandardValuesCollection(list); return cols; }
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { if (context == null) { return null; } if (context.Instance == null) { return null; } // Sort List and Add (None) List<string> list = new List<string>(); list.Add(Resources.TEXT_NONE_BR); // Passes the local integer array. StandardValuesCollection svc = new StandardValuesCollection(list); return svc; }
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { listOfStates.Clear(); GetListOfStates(listOfStates, context.PropertyDescriptor.DisplayName); StandardValuesCollection svc = new StandardValuesCollection(listOfStates); return svc; }
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { stringToReturn.Clear(); foreach (FontFamily font in System.Drawing.FontFamily.Families) { stringToReturn.Add(font.Name); } StandardValuesCollection svc = new StandardValuesCollection(stringToReturn); return svc; }
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { List<string> listToFill = new List<string>(); var list = ExposedEventManager.GetExposableEventsFor(NamedObjectSave, Element); foreach (var item in list) { listToFill.Add(item.Name); } StandardValuesCollection svc = new StandardValuesCollection(listToFill); return svc; }
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { List<string> supportedProducts = new List<string> { Product.StarcraftRetail.ProductCode, Product.StarcraftBroodWar.ProductCode, Product.Warcraft2BNE.ProductCode, Product.Diablo2Retail.ProductCode, Product.Diablo2Expansion.ProductCode, Product.Warcraft3Retail.ProductCode, Product.Warcraft3Expansion.ProductCode }; StandardValuesCollection svc = new StandardValuesCollection(supportedProducts); return svc; }
GetStandardValues(ITypeDescriptorContext context) { values.Clear(); for (int i = 0; i < 32; i++) { values.Add((i + 1) + " cells"); } StandardValuesCollection svc = new StandardValuesCollection(values); return svc; }