public static string GetString(string word) { var result = FormResources.GetString(word, SelectedCulture); //if(result != null) return(result); //return word; }
private void simpleButton1_Click(object sender, EventArgs e) { try{ FormResources user = new FormResources(); user.Show(); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } }
/// <summary> /// Resolves the value for the specified resource. /// The result may be a <see cref="BindingBase"/> or a literal value. /// </summary> /// <param name="name">Resource name. This is not the object property name.</param> public virtual object ProvideValue(string name) { if (FieldResources.TryGetValue(name, out var resource)) { return(resource.ProvideValue(Context)); } if (FormResources.TryGetValue(name, out resource)) { return(resource.ProvideValue(Context)); } if (ThrowOnNotFound) { throw new InvalidOperationException($"Resource {name} not found."); } return(null); }
public static string GetString(string word) { return(FormResources.GetString(word, SelectedCulture)); }