// Constructors public ResourceItem() { this.itemName = "Generic Item"; this.imageResource = null; this.itemType = 0; }
public void TestResourceConstructor01() { Properties.Resources resource = new Properties.Resources(); //Post Check Assert.IsNotNull(resource); }
public void ThereShouldBeNoErrors() { var culture = Properties.Resources.Culture; Properties.Resources.Culture = culture; var resources = new Properties.Resources(); Assert.IsNotNullOrEmpty(Properties.Resources.InvalidVersionId); }
private IDictionary <string, string> getAllCurrenciesShortcuts() { IDictionary <string, string> returnedCurrencies = new Dictionary <string, string>(); Properties.Resources resources = new Properties.Resources(); Type resourcesType = resources.GetType(); var props = resourcesType.GetProperties(); foreach (var prop in props) { if (prop.Name.ToLower().Contains("currencyshortcut") && prop.Name.Length > "currencyshortcut".Length + 1) { returnedCurrencies.Add(prop.Name, prop.GetValue(resources).ToString()); } } return(returnedCurrencies); }
public string Translate(string source) { if (source == null) { return(null); } Properties.Resources resources = new Properties.Resources(); Type resourcesType = resources.GetType(); var props = resourcesType.GetProperties(); foreach (var prop in props) { if (prop.Name.ToLower() == source.ToLower()) { return(prop.GetValue(resources).ToString()); } } return(null); }
public void setItemImageResouce(Properties.Resources res) { this.imageResource = res; }
public ResourceItem(String name, Properties.Resources resource, int type) { this.itemName = name; this.imageResource = resource; this.itemType = type; }
private void Window_Loaded(object sender, RoutedEventArgs e) { Properties.Resources res = new Properties.Resources(); MainMenuBackground.Source = TypesConverter.BitmapToWPFBitmapSource(Properties.Resources.rails); PermissionManager.CheckPermission(this); }