/// <summary> /// Creates a dialog that is suitable for entering a new environment item. /// </summary> /// <returns>The dialog to display</returns> public Form GetEntryDialog(IEnvironmentItem item) { if (item != null) throw new NotSupportedException("Domain updates not supported"); //return new DomainForm(item as IEditDomainTable); return new DomainForm(); }
private void listBox_DoubleClick(object sender, EventArgs e) { IEnvironmentItem item = (IEnvironmentItem)listBox.SelectedItem; if (item != null) { UpdateItem(item); } }
/// <summary> /// Creates a dialog that is suitable for entering a new environment item. /// </summary> /// <returns>The dialog to display</returns> public Form GetEntryDialog(IEnvironmentItem item) { if (item != null) { throw new NotSupportedException("Domain updates not supported"); } //return new DomainForm(item as IEditDomainTable); return(new DomainForm()); }
/// <summary> /// Updates the currently selected environment item. /// </summary> public virtual void UpdateSelectedItem() { IEnvironmentItem item = (IEnvironmentItem)listBox.SelectedItem; if (item == null) { MessageBox.Show("You must first select an item from the list"); } else { UpdateItem(item); } }
void UpdateItem(IEnvironmentItem item) { // Some pages don't support the update function try { using (Form dial = m_DataProvider.GetEntryDialog(item)) { if (dial.ShowDialog() == DialogResult.OK) { RefreshList(); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// Removes the currently selected environment item. /// </summary> public virtual void DeleteSelectedItem() { IEnvironmentItem item = (IEnvironmentItem)listBox.SelectedItem; if (item == null) { MessageBox.Show("You must first select an item from the list"); return; } // Deletions should be disallowed if the environment has been "published" if (item is IEditControl) { (item as IEditControl).Delete(); RefreshList(); } else { throw new NotSupportedException(); } }
/// <summary> /// Creates a dialog that is suitable for entering a new environment item. /// </summary> /// <returns>The dialog to display</returns> public Form GetEntryDialog(IEnvironmentItem item) { return(new EntityForm(item as IEditEntity)); }
/// <summary> /// Creates a dialog that is suitable for entering a new environment item. /// </summary> /// <returns>The dialog to display</returns> public Form GetEntryDialog(IEnvironmentItem item) { return(new FontForm(item as IEditFont)); }
/// <summary> /// Creates a dialog that is suitable for entering a new environment item. /// </summary> /// <returns>The dialog to display</returns> public Form GetEntryDialog(IEnvironmentItem item) { return(new IdGroupForm(item as IEditIdGroup)); }
/// <summary> /// Creates a dialog that is suitable for entering a new environment item. /// </summary> /// <returns>The dialog to display</returns> public Form GetEntryDialog(IEnvironmentItem item) { return new FontForm(item as IEditFont); }
/// <summary> /// Creates a dialog that is suitable for entering a new environment item. /// </summary> /// <returns>The dialog to display</returns> public Form GetEntryDialog(IEnvironmentItem item) { return(new ThemeForm(item as IEditTheme)); }
void UpdateItem(IEnvironmentItem item) { // Some pages don't support the update function try { using (Form dial = m_DataProvider.GetEntryDialog(item)) { if (dial.ShowDialog() == DialogResult.OK) RefreshList(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// Creates a dialog that is suitable for entering a new environment item. /// </summary> /// <returns>The dialog to display</returns> public Form GetEntryDialog(IEnvironmentItem item) { return new IdGroupForm(item as IEditIdGroup); }
protected virtual void Construct(IEnvironmentItem model, IEnvironmentSettings settings) { ItemModel = model; ItemSettings = settings.ItemSettingsMap[model.Type]; }
/// <summary> /// Creates a dialog that is suitable for entering a new environment item. /// </summary> /// <returns>The dialog to display</returns> public Form GetEntryDialog(IEnvironmentItem item) { return new TemplateForm(item as IEditTemplate); }
/// <summary> /// Creates a dialog that is suitable for entering a new environment item. /// </summary> /// <returns>The dialog to display</returns> public Form GetEntryDialog(IEnvironmentItem item) { return new ZoneForm(item as IEditZone); }
/// <summary> /// Creates a dialog that is suitable for entering a new environment item. /// </summary> /// <returns>The dialog to display</returns> public Form GetEntryDialog(IEnvironmentItem item) { return(new LayerForm(item as IEditLayer)); }
/// <summary> /// Creates a dialog that is suitable for entering a new environment item. /// </summary> /// <returns>The dialog to display</returns> public Form GetEntryDialog(IEnvironmentItem item) { return new EntityForm(item as IEditEntity); }
/// <summary> /// Creates a dialog that is suitable for entering a new environment item. /// </summary> /// <returns>The dialog to display</returns> public Form GetEntryDialog(IEnvironmentItem item) { return new LayerForm(item as IEditLayer); }