private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { int idx = comboBox1.SelectedIndex; if (idx != -1) { Content = (ILocalizeContent <object>)Activator.CreateInstance((Type)comboBox1.Items[idx]); propertyGrid1.SelectedObject = Content; } }
public static void ShowPanel(DockPanel panel, string key, ILocalizeContent <object> content) { if (_panel == null || _panel.IsDisposed) { _panel = new LocalizeContentEditorPanel(); _panel.Show(panel, DockState.DockRight); } _panel.Text = key; _panel.SelectContent(content); }
public CreateContentDialog(ILocalizeContent <object> content) { InitializeComponent(); FindContentTypes(); comboBox1.SelectedIndex = 0; if (content != null) { Content = content; propertyGrid1.SelectedObject = Content; } }
public bool TryGetValue(string key, out ILocalizeContent <object> value) { return(_contents.TryGetValue(key, out value)); }
public void Add(string key, ILocalizeContent <object> value) { _contents.Add(key, value); }
private void SelectContent(ILocalizeContent <object> content) { propertyGrid1.SelectedObject = content; }