Пример #1
0
        private void contextMenuRecordReport_Click(object sender, EventArgs e)
        {
            var dockParent = FindDockContent(this);
            foreach (BaseRecord r in PluginTree.SelectedRecords.OfType<BaseRecord>())
            {
                var form = new RichTextContent();
                form.UpdateRecord(r);
                form.StartPosition = FormStartPosition.CenterScreen;

                if (dockParent != null)
                {
                    var sz = form.Size;
                    form.Show(dockParent.DockHandler.DockPanel, DockState.Float);
                    form.Pane.FloatWindow.Size = sz;
                }
                else
                {
                    form.Show(this);
                }
            }
        }
Пример #2
0
        private void reportToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var selRecord = PluginTree.SelectedRecord;

            var r = selRecord as Record;
            var form = new RichTextContent();
            form.UpdateRecord(selRecord);
            form.StartPosition = FormStartPosition.CenterScreen;

            var dockParent = FindDockContent(this);
            if (dockParent != null)
            {
                var sz = form.Size;
                form.Show(dockParent.DockHandler.DockPanel, DockState.Float);
                form.Pane.FloatWindow.Size = sz;
            }
            else
            {
                form.Show(this);
            }

        }