Ejemplo n.º 1
0
        //=====================================================================
        /// <summary>
        /// View the demo for the selected item
        /// </summary>
        /// <param name="sender">The sender of the event</param>
        /// <param name="e">The event arguments</param>
        private void btnDemo_Click(object sender, System.EventArgs e)
        {
            DataRowView drv = (DataRowView)this.RowSource;

            switch((string)drv["DemoName"])
            {
                case "CheckBoxList":
                    using(CheckBoxListTestForm dlg = new CheckBoxListTestForm())
                    {
                        dlg.ShowDialog();
                    }
                    break;

                case "DataList":
                    using(DataListTestForm dlg = new DataListTestForm())
                    {
                        dlg.ShowDialog();
                    }
                    break;

                case "DataNavigator":
                    using(DataNavigatorTestForm dlg = new DataNavigatorTestForm())
                    {
                        dlg.ShowDialog();
                    }
                    break;

                case "ExtendedTreeView":
                    using(ExtendedTreeViewTestForm dlg = new ExtendedTreeViewTestForm())
                    {
                        dlg.ShowDialog();
                    }
                    break;

                case "MultiColumnComboBox":
                    using(ComboBoxTestForm dlg = new ComboBoxTestForm())
                    {
                        dlg.ShowDialog();
                    }
                    break;

                case "RadioButtonList":
                    using(RadioButtonListTestForm dlg = new RadioButtonListTestForm())
                    {
                        dlg.ShowDialog();
                    }
                    break;

                case "UserControlComboBox":
                    using(UserControlComboTestForm dlg = new UserControlComboTestForm())
                    {
                        dlg.ShowDialog();
                    }
                    break;

                case "Relationship Test":
                    using(RelationTestForm dlg = new RelationTestForm())
                    {
                        dlg.ShowDialog();
                    }
                    break;

                default:
                    MessageBox.Show("Unknown demo.  Please contact tech support", "List Control Demo",
                        MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    break;
            }
        }
Ejemplo n.º 2
0
        //=====================================================================

        /// <summary>
        /// View the demo for the selected item
        /// </summary>
        /// <param name="sender">The sender of the event</param>
        /// <param name="e">The event arguments</param>
        private void btnDemo_Click(object sender, System.EventArgs e)
        {
            DataRowView drv = (DataRowView)this.RowSource;

            switch ((string)drv["DemoName"])
            {
            case "CheckBoxList":
                using (CheckBoxListTestForm dlg = new CheckBoxListTestForm())
                {
                    dlg.ShowDialog();
                }
                break;

            case "DataList":
                using (DataListTestForm dlg = new DataListTestForm())
                {
                    dlg.ShowDialog();
                }
                break;

            case "DataNavigator":
                using (DataNavigatorTestForm dlg = new DataNavigatorTestForm())
                {
                    dlg.ShowDialog();
                }
                break;

            case "ExtendedTreeView":
                using (ExtendedTreeViewTestForm dlg = new ExtendedTreeViewTestForm())
                {
                    dlg.ShowDialog();
                }
                break;

            case "MultiColumnComboBox":
                using (ComboBoxTestForm dlg = new ComboBoxTestForm())
                {
                    dlg.ShowDialog();
                }
                break;

            case "RadioButtonList":
                using (RadioButtonListTestForm dlg = new RadioButtonListTestForm())
                {
                    dlg.ShowDialog();
                }
                break;

            case "UserControlComboBox":
                using (UserControlComboTestForm dlg = new UserControlComboTestForm())
                {
                    dlg.ShowDialog();
                }
                break;

            case "Relationship Test":
                using (RelationTestForm dlg = new RelationTestForm())
                {
                    dlg.ShowDialog();
                }
                break;

            default:
                MessageBox.Show("Unknown demo.  Please contact tech support", "List Control Demo",
                                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                break;
            }
        }