Beispiel #1
0
        private void CreatePage(string pageText, GDMRecordType recType)
        {
            var summary = new HyperView();

            summary.BorderWidth = 4;
            summary.OnLink     += mPersonSummaryLink;
            summary.Font        = UIHelper.GetDefaultFont();

            var recView = new GKListView(ListManager.Create(fContext, recType));

            recView.MouseDoubleClick     += miRecordEdit_Click;
            recView.SelectedItemsChanged += List_SelectedIndexChanged;
            recView.UpdateContents();
            recView.ContextMenu = contextMenu;

            Splitter spl = new Splitter();

            spl.Panel1           = recView;
            spl.Panel2           = summary;
            spl.RelativePosition = 300;
            spl.Orientation      = Orientation.Horizontal;
            spl.FixedPanel       = SplitterFixedPanel.Panel2;

            TabPage tabPage = new TabPage();

            tabPage.Text    = pageText;
            tabPage.Content = spl;
            tabsRecords.Pages.Add(tabPage);

            fController.SetTabPart(recType, recView, summary);
        }
Beispiel #2
0
        private void CreatePage(string pageText, GDMRecordType recType)
        {
            tabsRecords.SuspendLayout();
            TabPage sheet = new TabPage(pageText);

            tabsRecords.Controls.Add(sheet);
            tabsRecords.ResumeLayout(false);

            var summary = new HyperView();

            summary.BorderWidth = 4;
            summary.Dock        = DockStyle.Right;
            summary.Size        = new Size(300, 290);
            summary.OnLink     += mPersonSummaryLink;

            Splitter spl = new Splitter();

            spl.Dock     = DockStyle.Right;
            spl.Size     = new Size(4, 290);
            spl.MinExtra = 100;
            spl.MinSize  = 100;

            sheet.Controls.Add(summary);
            sheet.Controls.Add(spl);

            var recView = UIHelper.CreateRecordsView(sheet, fContext, recType);

            recView.DoubleClick          += miRecordEdit_Click;
            recView.SelectedIndexChanged += List_SelectedIndexChanged;
            recView.UpdateContents();
            recView.ContextMenuStrip = contextMenu;

            sheet.Controls.SetChildIndex(spl, 1);
            sheet.Controls.SetChildIndex(summary, 2);

            fController.SetTabPart(recType, recView, summary);
        }