예제 #1
0
        /// <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();
        }
예제 #2
0
        private void listBox_DoubleClick(object sender, EventArgs e)
        {
            IEnvironmentItem item = (IEnvironmentItem)listBox.SelectedItem;

            if (item != null)
            {
                UpdateItem(item);
            }
        }
예제 #3
0
        /// <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());
        }
예제 #4
0
        /// <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);
            }
        }
예제 #5
0
        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);
            }
        }
예제 #6
0
        /// <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();
            }
        }
예제 #7
0
 /// <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));
 }
예제 #8
0
 /// <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));
 }
예제 #9
0
 /// <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));
 }
예제 #10
0
 /// <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);
 }
예제 #11
0
 /// <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));
 }
예제 #12
0
        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);
            }
        }
예제 #13
0
 /// <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);
 }
예제 #14
0
 protected virtual void Construct(IEnvironmentItem model, IEnvironmentSettings settings)
 {
     ItemModel    = model;
     ItemSettings = settings.ItemSettingsMap[model.Type];
 }
예제 #15
0
 /// <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);
 }
예제 #16
0
 /// <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);
 }
예제 #17
0
 /// <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));
 }
예제 #18
0
 /// <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);
 }
예제 #19
0
 /// <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);
 }