Example #1
0
        /// <summary>
        /// 用对话框显示查找窗口
        /// </summary>
        /// <param name="searchPanel"></param>
        /// <param name="sm"></param>
        /// <param name="formName"></param>
        public static void ShowSearchDialog(Control searchPanel, ISearchManager sm, string formName)
        {
            if (searchPanel != null)
            {
                PositionPersistForm searchForm = new PositionPersistForm();
                searchForm.Name = formName;
                searchForm.Text = "查找";

                searchForm.Controls.Add(searchPanel);
                searchPanel.Dock = DockStyle.Fill;

                sm.DataLoaded         += new EventHandler <DataLoadedEventArgs>(searchManager_DataLoaded);
                m_searchForms[sm.Name] = searchForm;
                searchForm.ShowDialog();

                searchForm.Controls.Remove(searchPanel);
                searchForm.Dispose();
            }
        }
Example #2
0
        /// <summary>
        ///
        /// </summary>
        public ArchiveSeeForm(MyGrid masterGrid)
        {
            InitializeComponent();

            base.MergeMenu(this.menuStrip1);
            base.MergeToolStrip(this.toolStrip1);
            base.MergeToolStrip(this.pageNavigator1);

            m_masterGrid = masterGrid;
            if (m_masterGrid != null)
            {
                m_masterGrid.Dock = DockStyle.Fill;
                m_masterGrid.FixedHeaderRows.Add(new Xceed.Grid.ColumnManagerRow());
                this.splitContainer1.Panel1.Controls.Add(m_masterGrid);
            }

            this.tsbView.Image        = Feng.Windows.ImageResource.Get("Feng", "Icons.iconDetail.png").Reference;
            this.tsbRefresh.Image     = Feng.Windows.ImageResource.Get("Feng", "Icons.iconRefresh.png").Reference;
            this.tsbSearch.Image      = Feng.Windows.ImageResource.Get("Feng", "Icons.iconSearch.png").Reference;
            this.tsbFilter.Image      = Feng.Windows.ImageResource.Get("Feng", "Icons.iconFilter.png").Reference;
            this.tsbGroup.Image       = Feng.Windows.ImageResource.Get("Feng", "Icons.iconGroup.png").Reference;
            this.tsbFind.Image        = Feng.Windows.ImageResource.Get("Feng", "Icons.iconFind.png").Reference;
            this.tsbRelatedInfo.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconExternalLink.png").Reference;

            this.tsbAttachment.Image     = Feng.Windows.ImageResource.Get("Feng", "Icons.iconAttach.png").Reference;
            this.tsbExportExcel.Image    = Feng.Windows.ImageResource.Get("Feng", "Icons.iconExportExcel.png").Reference;
            this.tsbPrintPreview.Image   = Feng.Windows.ImageResource.Get("Feng", "Icons.iconPrint.png").Reference;
            this.tsbGenerateReport.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconNewReport.png").Reference;
            this.tsbSetup.Image          = Feng.Windows.ImageResource.Get("Feng", "Icons.iconSetup.png").Reference;

            this.tsmView.Image        = Feng.Windows.ImageResource.Get("Feng", "Icons.iconDetail.png").Reference;
            this.tsmRefresh.Image     = Feng.Windows.ImageResource.Get("Feng", "Icons.iconRefresh.png").Reference;
            this.tsmSearch.Image      = Feng.Windows.ImageResource.Get("Feng", "Icons.iconSearch.png").Reference;
            this.tsmFilter.Image      = Feng.Windows.ImageResource.Get("Feng", "Icons.iconFilter.png").Reference;
            this.tsmGroup.Image       = Feng.Windows.ImageResource.Get("Feng", "Icons.iconGroup.png").Reference;
            this.tsmFind.Image        = Feng.Windows.ImageResource.Get("Feng", "Icons.iconFind.png").Reference;
            this.tsmRelatedInfo.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconExternalLink.png").Reference;

            this.tsmExportExcel.Image    = Feng.Windows.ImageResource.Get("Feng", "Icons.iconExportExcel.png").Reference;
            this.tsmPrintPreview.Image   = Feng.Windows.ImageResource.Get("Feng", "Icons.iconPrint.png").Reference;
            this.tsmGenerateReport.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconNewReport.png").Reference;
            this.tsmSetup.Image          = Feng.Windows.ImageResource.Get("Feng", "Icons.iconSetup.png").Reference;

            this.bindingNavigatorMoveLastItem.Image     = Feng.Windows.ImageResource.Get("Feng", "Icons.iconLast.png").Reference;
            this.bindingNavigatorMoveNextItem.Image     = Feng.Windows.ImageResource.Get("Feng", "Icons.iconNext.png").Reference;
            this.bindingNavigatorMovePreviousItem.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconPrevious.png").Reference;
            this.bindingNavigatorMoveFirstItem.Image    = Feng.Windows.ImageResource.Get("Feng", "Icons.iconFirst.png").Reference;

            if (Feng.Utils.ReflectionHelper.GetObjectValue(typeof(TabbedMdiForm), ServiceProvider.GetService <IApplication>(), "m_twReletedInfos") != null)
            {
                this.tsbRelatedInfo.Visible = this.tsmRelatedInfo.Visible = false;
            }
            else
            {
                this.tsbRelatedInfo.Click += new EventHandler((sender, e) =>
                {
                    GridRelatedControl taskPane = this.GetGridRelatedPanel() as GridRelatedControl;
                    if (taskPane != null)
                    {
                        PositionPersistForm searchForm = new PositionPersistForm();
                        searchForm.Name = taskPane.Name;
                        searchForm.Text = tsbRelatedInfo.Text;

                        searchForm.Controls.Add(taskPane);
                        taskPane.Dock = DockStyle.Fill;
                        searchForm.ShowDialog();

                        searchForm.Controls.Remove(taskPane);
                        searchForm.Dispose();
                    }
                });
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public ArchiveSeeForm(MyGrid masterGrid)
        {
            InitializeComponent();

            base.MergeMenu(this.menuStrip1);
            base.MergeToolStrip(this.toolStrip1);
            base.MergeToolStrip(this.pageNavigator1);

            m_masterGrid = masterGrid;
            if (m_masterGrid != null)
            {
                m_masterGrid.Dock = DockStyle.Fill;
                m_masterGrid.FixedHeaderRows.Add(new Xceed.Grid.ColumnManagerRow());
                this.splitContainer1.Panel1.Controls.Add(m_masterGrid);
            }

            this.tsbView.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconDetail.png").Reference;
            this.tsbRefresh.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconRefresh.png").Reference;
            this.tsbSearch.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconSearch.png").Reference;
            this.tsbFilter.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconFilter.png").Reference;
            this.tsbGroup.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconGroup.png").Reference;
            this.tsbFind.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconFind.png").Reference;
            this.tsbRelatedInfo.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconExternalLink.png").Reference;

            this.tsbAttachment.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconAttach.png").Reference;
            this.tsbExportExcel.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconExportExcel.png").Reference;
            this.tsbPrintPreview.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconPrint.png").Reference;
            this.tsbGenerateReport.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconNewReport.png").Reference;
            this.tsbSetup.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconSetup.png").Reference;

            this.tsmView.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconDetail.png").Reference;
            this.tsmRefresh.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconRefresh.png").Reference;
            this.tsmSearch.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconSearch.png").Reference;
            this.tsmFilter.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconFilter.png").Reference;
            this.tsmGroup.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconGroup.png").Reference;
            this.tsmFind.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconFind.png").Reference;
            this.tsmRelatedInfo.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconExternalLink.png").Reference;

            this.tsmExportExcel.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconExportExcel.png").Reference;
            this.tsmPrintPreview.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconPrint.png").Reference;
            this.tsmGenerateReport.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconNewReport.png").Reference;
            this.tsmSetup.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconSetup.png").Reference;

            this.bindingNavigatorMoveLastItem.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconLast.png").Reference;
            this.bindingNavigatorMoveNextItem.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconNext.png").Reference;
            this.bindingNavigatorMovePreviousItem.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconPrevious.png").Reference;
            this.bindingNavigatorMoveFirstItem.Image = Feng.Windows.ImageResource.Get("Feng", "Icons.iconFirst.png").Reference;

            if (Feng.Utils.ReflectionHelper.GetObjectValue(typeof(TabbedMdiForm), ServiceProvider.GetService<IApplication>(), "m_twReletedInfos") != null)
            {
                this.tsbRelatedInfo.Visible = this.tsmRelatedInfo.Visible = false;
            }
            else
            {
                this.tsbRelatedInfo.Click += new EventHandler((sender, e) =>
                    {
                        GridRelatedControl taskPane = this.GetGridRelatedPanel() as GridRelatedControl;
                        if (taskPane != null)
                        {
                            PositionPersistForm searchForm = new PositionPersistForm();
                            searchForm.Name = taskPane.Name;
                            searchForm.Text = tsbRelatedInfo.Text;

                            searchForm.Controls.Add(taskPane);
                            taskPane.Dock = DockStyle.Fill;
                            searchForm.ShowDialog();

                            searchForm.Controls.Remove(taskPane);
                            searchForm.Dispose();
                        }
                    });
            }
        }
        /// <summary>
        /// �öԻ�����ʾ���Ҵ���
        /// </summary>
        /// <param name="searchPanel"></param>
        /// <param name="sm"></param>
        /// <param name="formName"></param>
        public static void ShowSearchDialog(Control searchPanel, ISearchManager sm, string formName)
        {
            if (searchPanel != null)
            {
                PositionPersistForm searchForm = new PositionPersistForm();
                searchForm.Name = formName;
                searchForm.Text = "����";

                searchForm.Controls.Add(searchPanel);
                searchPanel.Dock = DockStyle.Fill;

                sm.DataLoaded += new EventHandler<DataLoadedEventArgs>(searchManager_DataLoaded);
                m_searchForms[sm.Name] = searchForm;
                searchForm.ShowDialog();

                searchForm.Controls.Remove(searchPanel);
                searchForm.Dispose();
            }
        }