Example #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);
        }
Example #2
0
        private void InitializeComponent()
        {
            SuspendLayout();

            hyperView1             = new HyperView();
            hyperView1.BorderWidth = 0;
            hyperView1.LinkColor   = Colors.Blue;
            hyperView1.WordWrap    = true;

            Content = hyperView1;

            SetPredefProperties(630, 405);
            ResumeLayout();
        }
Example #3
0
        public void Init()
        {
            fForm            = new Form();
            fForm.ClientSize = new Size(383, 221);
            fForm.Text       = "ImageViewTests";

            fHyperView      = new HyperView();
            fHyperView.Dock = DockStyle.Fill;

            fForm.SuspendLayout();
            fForm.Controls.Add(fHyperView);
            fForm.ResumeLayout(false);
            fForm.PerformLayout();
        }
Example #4
0
        public TextSearchWin(Plugin plugin, IBaseWindow baseWin)
        {
            InitializeComponent();

            fPlugin = plugin;
            fBase   = baseWin;
            Text    = fPlugin.LangMan.LS(TLS.LSID_PluginTitle) + string.Format(" [{0}]", Path.GetFileName(fBase.Context.FileName));

            SuspendLayout();
            fResultsText          = new HyperView();
            fResultsText.Dock     = DockStyle.Fill;
            fResultsText.Location = new Point(0, 0);
            fResultsText.Size     = new Size(300, 200);
            fResultsText.OnLink  += mTextLink;
            Controls.Add(fResultsText);
            ResumeLayout(false);
            Controls.SetChildIndex(fResultsText, 0);

            SetLocale();
        }
Example #5
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);
        }
        private void InitializeComponent()
        {
            SuspendLayout();

            btnBold = new ButtonToolItem();
            //btnBold.Font = new Font("Tahoma", 9F, FontStyle.Bold);
            btnBold.Text   = "B";
            btnBold.Click += btnBold_Click;

            btnItalic = new ButtonToolItem();
            //btnItalic.Font = new Font("Tahoma", 9F, FontStyle.Italic);
            btnItalic.Text   = "I";
            btnItalic.Click += btnItalic_Click;

            btnUnderline = new ButtonToolItem();
            //btnUnderline.Font = new Font("Tahoma", 9F, FontStyle.None, FontDecoration.Underline);
            btnUnderline.Text   = "U";
            btnUnderline.Click += btnUnderline_Click;

            btnURL = new ButtonToolItem();
            //btnURL.Font = new Font("Tahoma", 9F, FontStyle.None, FontDecoration.Underline);
            //btnURL.TextColor = Colors.Blue;
            btnURL.Text   = "URL";
            btnURL.Click += btnURL_Click;

            cmbSizes      = new ButtonToolItem();
            cmbSizes.Text = "cmbSizes";
            //cmbSizes.SelectedIndexChanged += cmbSizes_SelectedIndexChanged;
            cmbSizes.Click += (sender, e) => menuSizes.Show(this);

            ddbtnActions        = new ButtonToolItem();
            ddbtnActions.Text   = "Actions";
            ddbtnActions.Click += (sender, e) => menuActions.Show(this);

            toolStrip1           = new ToolBar();
            toolStrip1.TextAlign = ToolBarTextAlign.Right;
            toolStrip1.Items.AddRange(new ToolItem[] {
                btnBold,
                btnItalic,
                btnUnderline,
                btnURL,
                cmbSizes,
                new SeparatorToolItem(),
                ddbtnActions
            });

            menuSizes = new ContextMenu();

            miSelectAndCopy        = new ButtonMenuItem();
            miSelectAndCopy.Text   = "miSelectAndCopy";
            miSelectAndCopy.Click += miSelectAndCopy_Click;

            miImport        = new ButtonMenuItem();
            miImport.Text   = "miImport";
            miImport.Click += miImport_Click;

            miExport        = new ButtonMenuItem();
            miExport.Text   = "miExport";
            miExport.Click += miExport_Click;

            miClear        = new ButtonMenuItem();
            miClear.Text   = "miClear";
            miClear.Click += miClear_Click;

            menuActions = new ContextMenu();
            menuActions.Items.AddRange(new MenuItem[] {
                miSelectAndCopy,
                miImport,
                miExport,
                miClear
            });

            //

            txtNote = new TextArea();
            txtNote.AcceptsReturn = true;

            hyperView1             = new HyperView();
            hyperView1.BorderWidth = 0;

            var pan2 = new Panel();

            //pan2.Content = hyperView1;

            //

            pageEditor         = new TabPage();
            pageEditor.Content = txtNote;
            pageEditor.Text    = "pageEditor";

            pagePreview         = new TabPage();
            pagePreview.Content = pan2;
            pagePreview.Text    = "pagePreview";

            tabControl1 = new TabControl();
            tabControl1.Pages.Add(pageEditor);
            tabControl1.Pages.Add(pagePreview);
            tabControl1.SelectedIndexChanged += tabControl1_SelectedIndexChanged;
            tabControl1.Size = new Size(400, 260);

            btnAccept = new Button();
            btnAccept.ImagePosition = ButtonImagePosition.Left;
            btnAccept.Size          = new Size(130, 26);
            btnAccept.Text          = "btnAccept";
            btnAccept.Click        += btnAccept_Click;

            btnCancel = new Button();
            btnCancel.ImagePosition = ButtonImagePosition.Left;
            btnCancel.Size          = new Size(130, 26);
            btnCancel.Text          = "btnCancel";
            btnCancel.Click        += btnCancel_Click;

            Content = new DefTableLayout {
                Rows =
                {
                    new TableRow {
                        ScaleHeight = true,
                        Cells       = { tabControl1 }
                    },
                    UIHelper.MakeDialogFooter(null, btnAccept, btnCancel)
                }
            };

            DefaultButton = btnAccept;
            AbortButton   = btnCancel;
            Title         = "NoteEditDlgEx";
            ToolBar       = toolStrip1;

            SetPredefProperties(460, 400);
            ResumeLayout();
        }