Пример #1
0
        public override void DoDefaultAction()
        {
            try
            {
                if (DesignerHost == null)
                {
                    DesignerHost = this.GetService(typeof(IDesignerHost)) as IDesignerHost;
                }
                if (DesignedDataSet == null)
                {
                    DesignedDataSet = this.Component as InfoDataSet;
                }
                if (RootComponent == null)
                {
                    RootComponent = DesignerHost.RootComponent as Control;
                }
                if (RootDesigner == null)
                {
                    RootDesigner = DesignerHost.GetDesigner(RootComponent) as IRootDesigner;
                }
                if (View == null)
                {
                    View = RootDesigner.GetView(ViewTechnology.Default) as Control;
                }
                if (ColumnsToCreate == null)
                {
                    ColumnsToCreate = new ColumnsToCreate();
                }

                // if the RootComponent is not a Form
                if (RootComponent == null)
                {
                    return;
                }
                editorDialog = new InfoDataSetEditorDialog();
                editorDialog.ColumnsToCreate = ColumnsToCreate;
                editorDialog.DesignedDataSet = DesignedDataSet;
                editorDialog.DesignerHost = DesignerHost;
                editorDialog.RootDesigner = RootDesigner;
                editorDialog.RootComponent = RootComponent;
                editorDialog.View = View;

                editorDialog.InitialTreeView();
                editorDialog.Show();
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }
        }
Пример #2
0
        public InfoDataSetEditorDialog()
        {
            InitializeComponent();

            ColumnsToCreate = new ColumnsToCreate();
        }