本文整理汇总了C#中WeifenLuo.WinFormsUI.Docking.DockContent.Show方法的典型用法代码示例。如果您正苦于以下问题:C# DockContent.Show方法的具体用法?C# DockContent.Show怎么用?C# DockContent.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WeifenLuo.WinFormsUI.Docking.DockContent
的用法示例。
在下文中一共展示了DockContent.Show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: newDocumentToolStripMenuItem_Click
private void newDocumentToolStripMenuItem_Click(object sender, EventArgs e)
{
DockContent dc = new DockContent();
dc.Text = "Testing";
ScriptEditorControl sec = new ScriptEditorControl();
sec.Dock = DockStyle.Fill;
dc.Controls.Add(sec);
if (dockMain.DocumentStyle == DocumentStyle.SystemMdi)
{
dc.MdiParent = this;
dc.Show();
}
else
dc.Show(dockMain);
}
示例2: FrmMain
public FrmMain()
{
InitializeComponent();
var v = Assembly.GetEntryAssembly().GetName().Version;
this.Version = string.Format("v{0}.{1}", v.Major, v.Minor);
string title = string.Format("编程辅助工具{0}", this.Version);
this.Text = title;
BackgroundWorker worker = new BackgroundWorker();
worker.DoWork += new DoWorkEventHandler(worker_DoWork);
worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted);
worker.RunWorkerAsync();
this.IsMdiContainer = true;
this.dockPanel.DocumentStyle = DocumentStyle.DockingMdi;
//详细信息
DockContent dc = new DockContent();
dc.CloseButtonVisible = false;
dc.Text = "详细信息";
DetailTabPage dtpage = new DetailTabPage();
dtpage.Dock = DockStyle.Fill;
dc.Controls.Add(dtpage);
dc.Show(this.dockPanel, DockState.Document);
//数据
DockContent dc2 = new DockContent();
dc2.CloseButtonVisible = false;
dc2.Text = "数据";
SchemaTreeView stpage = new SchemaTreeView();
stpage.Dock = DockStyle.Fill;
dc2.Controls.Add(stpage);
dc2.Show(this.dockPanel, DockState.DockLeft);
}
示例3: CreateContent
public void CreateContent()
{
this.Text = "DockPanelSuite TestApp";
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 600);
//
var dockPanel = new DockPanel();
dockPanel.AllowDrop = true;
dockPanel.TabIndex = 1;
dockPanel.DocumentStyle = DocumentStyle.DockingWindow;
dockPanel.AllowEndUserDocking = true;
dockPanel.AllowEndUserNestedDocking = true;
dockPanel.Dock = DockStyle.Fill;
this.Controls.Add(dockPanel);
//
var dc = new DockContent();
dc.TabText = "Hello Doc!";
dc.DockPanel = dockPanel;
dc.DockAreas = DockAreas.Document;
var rtb = new RichTextBox();
rtb.Dock = DockStyle.Fill;
dc.Controls.Add(rtb);
dc.Show();
//
DockContent dc2 = new DockContent();
dc2.TabText = "Hello Doc!";
dc2.DockPanel = dockPanel;
dc2.DockAreas = DockAreas.Document;
var rtb2 = new RichTextBox();
rtb2.Dock = DockStyle.Fill;
dc2.Controls.Add(rtb2);
dc2.Show();
//
DockContent dc3 = new DockContent();
dc3.AllowEndUserDocking = true;
dc3.AllowDrop = true;
dc3.TabText = "Hello Tab!";
dc3.DockPanel = dockPanel;
dc3.DockAreas = DockAreas.DockBottom | DockAreas.DockLeft | DockAreas.DockRight | DockAreas.DockTop;
dc3.DockState = DockState.DockRight;
var rtb3 = new RichTextBox();
rtb3.Dock = DockStyle.Fill;
dc3.Controls.Add(rtb3);
dc3.Show();
//
DockContent dc4 = new DockContent();
dc4.AllowEndUserDocking = true;
dc4.AllowDrop = true;
dc4.TabText = "Hello Tab!";
dc4.DockPanel = dockPanel;
dc4.DockAreas = DockAreas.DockBottom | DockAreas.DockLeft | DockAreas.DockRight | DockAreas.DockTop | DockAreas.Float;
dc4.DockState = DockState.DockBottomAutoHide;
var rtb4 = new RichTextBox();
rtb4.Dock = DockStyle.Fill;
dc4.Controls.Add(rtb4);
dc4.Show();
}
示例4: FormEditor
/// <summary>
/// Creates a new editor window
/// </summary>
/// <param name="p">Parent window</param>
/// <param name="openFile">File to open, null if template should be used, empty if blank should be used</param>
public FormEditor(FormMain p, string openFile = "")
{
IsClosed = false;
InitializeComponent();
// Docking
//dockPanel.Controls.Add(editor);
var ed = new DockContent {CloseButton = false, CloseButtonVisible = false};
ed.Controls.Add(editor);
editor.Dock = DockStyle.Fill;
ed.Show(dockPanel);
_parent = p;
LoadEditorSettings();
if (openFile == null)
New(true);
else
{
if (!String.IsNullOrEmpty(openFile))
OpenFile(openFile);
}
UpdateGui();
// Sorting the toolstrips
toolStripMain.Location = new Point(0, menuStripMain.Height);
toolStripSendTo.Location = new Point(toolStripMain.Width + 3, menuStripMain.Height);
// Adjusting the dock
dockPanel.DockBottomPortion = 0.4;
dockPanel.DockLeftPortion = 0.3;
dockPanel.DockTopPortion = 0.4;
dockPanel.DockRightPortion = 0.3;
// Adding the charmap
_charmapWindow = new FormCharmapWindow(this, _fontCollection);
_charmapWindow.Show(dockPanel, DockState.DockBottomAutoHide);
// Adding the help
_helpWindow = new FormHelpWindow(CommandsFile, _fontCollection);
_helpWindow.Show(dockPanel, DockState.DockBottomAutoHide);
_helpWindow.ReferenceLoaded += (o, args) => SearchReference(true);
}
示例5: ShowMapWindow
public void ShowMapWindow(Situation situation, WarPresentationModel model)
{
// �Ƃ肠�����S�ẴE�B���h�E��\������
// MapWindow �C���X�^���X�̐���
var mapWindow = new MapWindow(model);
mainDock = mapWindow;
mainDock.AllowEndUserDocking = false;
mainDock.Show(dockPanel, DockState.Document);
var commandWindow = new CommandWindow(model);
commandWindow.Show(mapWindow.Pane, DockAlignment.Top, 0.12);
var mapChipInfoWindow = new MapChipInfoWindow(model);
mapChipInfoWindow.Show(commandWindow.Pane, DockAlignment.Right, 0.5);
// UnitMiniInfoWindow�\���p
Action<Point2> showUnitMiniInfoWindow = delegate(Point2 p) {
var unit = model.WarMap[p].Unit;
if (unit != null)
{
MiniUnitInfoWindow.ShowWindow(this, unit);
}
else
{
MiniUnitInfoWindow.HideWindow();
}
};
// MapChip�N���b�N�ɂ��UnitInfoWindow�̕\���̃f���Q�[�g��lj�
model.SelectMapChipEvent += p => {
var unit = model.WarMap[p].Unit;
if (unit != null && model.Scope == null)
UnitInfoWindow.ShowWindow(this, unit);
else
UnitInfoWindow.HideWindow();
};
model.CursorChipPointChangedEvent += showUnitMiniInfoWindow;
model.CursorEnterEvent += showUnitMiniInfoWindow;
model.CursorLeaveEvent += delegate {
if (MiniUnitInfoWindow.IsInitialized && !MiniUnitInfoWindow.IsOnCursor)
MiniUnitInfoWindow.HideWindow();
};
}
示例6: DockableDocument
public DockableDocument(String filePath, DockPanel dockPanel)
{
Editor.ModifiedChanged += new EventHandler(Editor_ModifiedChanged);
try
{
dockContent = new DockContent();
dockContent.ShowHint = DockState.Document;
dockContent.BackColor = Color.Black;
dockContent.DockAreas = DockAreas.Document | DockAreas.Float;
dockContent.Controls.Add(this.Editor);
Editor.Dock = DockStyle.Fill;
dockContent.Show(dockPanel);
dockContent.Tag = this;
if (String.IsNullOrEmpty(filePath))
{
Editor.Text = newDocumentTemplate;
Editor.Selection.Start = Editor.Selection.End = Editor.Text.Length;
Editor.UndoRedo.EmptyUndoBuffer();
Editor.Modified = false;
dockContent.TabText = "Untitled";
return;
}
if (OpenDoc(filePath))
{
FilePath = filePath;
dockContent.Name = filePath;
dockContent.TabText = DocTitle;
}
}
catch
{
}
}
示例7: DocumentTab
/// <summary>
/// Creates a new Sphere Studio document tab.
/// </summary>
/// <param name="ide">The IDE form that the tab will be created in.</param>
/// <param name="view">The IDocumentView the tab is hosting.</param>
/// <param name="fileName">The fully-qualified filename of the document, or null if untitled.</param>
/// <param name="restoreView">'true' to restore the last saved view state. Has no effect on untitled tabs.</param>
public DocumentTab(MainWindow ide, DocumentView view, string fileName = null, bool restoreView = false)
{
FileName = fileName;
View = view;
View.Dock = DockStyle.Fill;
_tabText = fileName != null ? Path.GetFileName(fileName)
: string.Format("Untitled{0}", _unsavedID++);
_ide = ide;
_content = new DockContent();
_content.FormClosing += on_FormClosing;
_content.FormClosed += on_FormClosed;
_content.Tag = this;
_content.Icon = View.Icon;
_content.TabText = _tabText;
_content.ToolTipText = FileName;
_content.Controls.Add(View);
_content.Show(ide.MainDock, DockState.Document);
View.DirtyChanged += on_DirtyChanged;
UpdateTabText();
if (View is ScriptView)
{
ScriptView scriptView = View as ScriptView;
scriptView.Breakpoints = Core.Project.GetBreakpoints(FileName);
scriptView.BreakpointChanged += on_BreakpointSet;
}
if (restoreView && FileName != null)
{
string setting = string.Format("viewState:{0:X8}", FileName.GetHashCode());
try { View.ViewState = Core.Project.User.GetString(setting, ""); }
catch (Exception) { } // *munch*
}
}
示例8: InitializeDocking
private void InitializeDocking()
{
Controls.Remove(DirectionSplitter);
SpriteDrawer.Dock = DockStyle.Fill;
_drawContent = new DockContent { Text = @"Sprite Drawer", DockAreas = DockAreas.Document };
_drawContent.DockHandler.CloseButtonVisible = false;
_drawContent.Controls.Add(SpriteDrawer);
DirectionHolder.Dock = DockStyle.Fill;
_directionContent = new DockContent { Text = @"Sprite Directions", DockAreas = DockAreas.Document };
_directionContent.DockHandler.CloseButtonVisible = false;
_directionContent.Controls.Add(DirectionHolder);
ImagePanel.Dock = DockStyle.Fill;
_imageContent = new DockContent
{
Text = @"Spriteset Images",
DockAreas = DockAreas.DockLeft | DockAreas.DockRight | DockAreas.Float
};
_imageContent.DockHandler.CloseButtonVisible = false;
_imageContent.Controls.Add(ImagePanel);
AnimPanel.Dock = DockStyle.Fill;
_animContent = new DockContent
{
Text = @"Direction Animation",
DockAreas =
DockAreas.DockLeft | DockAreas.DockRight | DockAreas.Float | DockAreas.DockBottom |
DockAreas.DockTop
};
_animContent.DockHandler.CloseButtonVisible = false;
_animContent.Controls.Add(AnimPanel);
BasePanel.Dock = DockStyle.Fill;
_baseContent = new DockContent
{
Text = @"Base Editor",
DockAreas =
DockAreas.Document | DockAreas.DockTop | DockAreas.DockBottom | DockAreas.DockLeft |
DockAreas.DockRight
};
_baseContent.DockHandler.CloseButtonVisible = false;
_baseContent.Controls.Add(BasePanel);
_mainDockPanel = new DockPanel { DocumentStyle = DocumentStyle.DockingWindow, Dock = DockStyle.Fill };
if (File.Exists("SpriteEditor.xml"))
{
DeserializeDockContent dc = GetContent;
_mainDockPanel.LoadFromXml("SpriteEditor.xml", dc);
}
else
{
_directionContent.Show(_mainDockPanel, DockState.Document);
_baseContent.Show(_directionContent.Pane, DockAlignment.Bottom, 0.40);
_drawContent.Show(_baseContent.PanelPane, _baseContent);
_imageContent.Show(_mainDockPanel, DockState.DockRight);
_animContent.Show(_imageContent.Pane, DockAlignment.Bottom, 0.40);
}
Controls.Add(_mainDockPanel);
}
示例9: HandleDockContentToolStripMenuClick
private void HandleDockContentToolStripMenuClick(DockContent dockWindow, DockState state)
{
if (dockWindow.IsHidden || dockWindow.DockState == DockState.Unknown)
{
dockWindow.Show(dockPanel, state);
}
else
{
dockWindow.Close();
}
}
示例10: SetDetailView
public void SetDetailView(IGameDetailView view)
{
detailView = view as DockContent;
detailView.Show (dockPanel, DockState.DockRight);
}
示例11: ShowWatch
private DockContent ShowWatch()
{
if (m_WatchDock != null)
{
m_WatchDock.Show();
return m_WatchDock;
}
m_WatchDock = Helpers.WrapDockContent(dockPanel, watchBox);
m_WatchDock.HideOnClose = true;
if (m_VariablesDock != null)
{
m_WatchDock.Show(m_VariablesDock.Pane, m_VariablesDock);
}
else
{
m_WatchDock.Show(dockPanel, DockState.DockBottom);
}
return m_WatchDock;
}
示例12: LoadTemplates
private void LoadTemplates()
{
TreeView tbTemp = new TreeView();
tbTemp.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.tbTemp_NodeMouseDoubleClick);
//模板
TreeNode tmpNode = new TreeNode("模板");
int i = 0;
foreach (var item in UIs)
{
item.Name = string.Format("TempUI_{0}", i);
TreeNode node = new TreeNode(item.ToString());
node.Tag = item;
tmpNode.Nodes.Add(node);
i++;
}
tbTemp.Nodes.Add(tmpNode);
tmpNode.Expand();
//工具
TreeNode toolNode = new TreeNode("工具");
i = 0;
foreach (var item in ToolUIs)
{
item.Name = string.Format("Tool_{0}", i);
TreeNode node = new TreeNode(item.ToString());
node.Tag = item;
toolNode.Nodes.Add(node);
i++;
}
tbTemp.Nodes.Add(toolNode);
toolNode.Expand();
DockContent dc2 = new DockContent();
dc2.CloseButtonVisible = false;
dc2.Text = "工具";
tbTemp.Dock = DockStyle.Fill;
dc2.Controls.Add(tbTemp);
dc2.Show(this.dockPanel, DockState.DockLeft);
}
示例13: tbTemp_NodeMouseDoubleClick
private void tbTemp_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
{
if (e.Node.Tag is UserControl)
{
Type tp = e.Node.Tag.GetType();
var item = Activator.CreateInstance(tp) as UserControl;
DockContent dc = new DockContent();
dc.Text = item.ToString();
item.Dock = DockStyle.Fill;
dc.Controls.Add(item);
dc.Show(this.dockPanel, DockState.Document);
}
}
示例14: AddPanel
public static Form AddPanel(string title = "", bool noTabber = false)
{
try
{
if (title == "")
{
title = Language.strNewPanel;
}
DockContent pnlcForm = new DockContent();
UI.Window.Connection cForm = new UI.Window.Connection(pnlcForm);
pnlcForm = cForm;
//create context menu
ContextMenuStrip cMen = new ContextMenuStrip();
//create rename item
ToolStripMenuItem cMenRen = new ToolStripMenuItem();
cMenRen.Text = Language.strRename;
cMenRen.Image = Resources.Rename;
cMenRen.Tag = pnlcForm;
cMenRen.Click += new EventHandler(cMenConnectionPanelRename_Click);
ToolStripMenuItem cMenScreens = new ToolStripMenuItem();
cMenScreens.Text = Language.strSendTo;
cMenScreens.Image = Resources.Monitor;
cMenScreens.Tag = pnlcForm;
cMenScreens.DropDownItems.Add("Dummy");
cMenScreens.DropDownOpening += new EventHandler(cMenConnectionPanelScreens_DropDownOpening);
cMen.Items.AddRange(new ToolStripMenuItem[] { cMenRen, cMenScreens });
pnlcForm.TabPageContextMenuStrip = cMen;
cForm.SetFormText(title.Replace("&", "&&"));
//ToDo: Fix this
try
{
frmMain.Default.pnlDock.DocumentStyle = frmMain.Default.pnlDock.DocumentsCount > 1 ? DocumentStyle.DockingMdi : DocumentStyle.DockingSdi;
pnlcForm.Show(frmMain.Default.pnlDock, DockState.Document);
}
catch (Exception exp)
{
//MessageBox.Show(exp.ToString());
frmMain.Default.pnlDock.DocumentStyle = DocumentStyle.DockingSdi;
pnlcForm.Show(frmMain.Default.pnlDock, DockState.Document);
}
if (noTabber)
{
cForm.TabController.Dispose();
}
else
{
WindowList.Add(cForm);
}
return cForm;
}
catch (Exception ex)
{
MessageCollector.AddMessage(MessageClass.ErrorMsg,
(string)
("Couldn\'t add panel" + Constants.vbNewLine + ex.Message));
return null;
}
}
示例15: Show
public static void Show(Type WindowType,
PortScanMode PortScanMode = PortScanMode.Normal)
{
try
{
switch (WindowType)
{
case Type.About:
if (aboutForm == null || aboutPanel == null | aboutPanel.VisibleState==DockState.Unknown)
{
aboutForm = new About(aboutPanel);
aboutPanel = aboutForm;
aboutForm.Show(frmMain.Default.pnlDock);
}
else
{
aboutPanel.Focus();
aboutPanel.Show();
aboutPanel.BringToFront();
aboutForm.Focus();
}
break;
case Type.ADImport:
adimportForm = new ADImport(adimportPanel);
adimportPanel = adimportForm;
adimportPanel.Show(frmMain.Default.pnlDock);
break;
case Type.Options:
optionsForm = new frmOptions(optionsPanel);
optionsForm.Show(frmMain.Default.pnlDock);
break;
case Type.SaveAs:
saveasForm = new SaveAs(saveasPanel);
saveasPanel = saveasForm;
saveasForm.Show(frmMain.Default.pnlDock);
break;
case Type.SSHTransfer:
sshtransferForm = new SSHTransfer(sshtransferPanel);
sshtransferPanel = sshtransferForm;
sshtransferForm.Show(frmMain.Default.pnlDock);
break;
case Type.Update:
if (updateForm == null || updatePanel == null || updatePanel.VisibleState == DockState.Unknown)
{
updateForm = new UI.Window.Update(updatePanel);
updatePanel = updateForm;
updateForm.Show(frmMain.Default.pnlDock);
}
else
{
updatePanel.Focus();
updatePanel.Show();
updatePanel.BringToFront();
updateForm.Focus();
}
break;
case Type.Help:
helpForm = new Help(helpPanel);
helpPanel = helpForm;
helpForm.Show(frmMain.Default.pnlDock);
break;
case Type.ExternalApps:
if (externalappsForm == null || externalappsPanel == null || externalappsPanel.VisibleState == DockState.Unknown)
{
externalappsForm = new ExternalApps(externalappsPanel);
externalappsPanel = externalappsForm;
externalappsForm.Show(frmMain.Default.pnlDock);
}
else
{
externalappsPanel.Focus();
externalappsPanel.Show();
externalappsPanel.BringToFront();
externalappsForm.Focus();
}
break;
case Type.PortScan:
portscanForm = new PortScan(portscanPanel, PortScanMode);
portscanPanel = portscanForm;
portscanForm.Show(frmMain.Default.pnlDock);
break;
case Type.UltraVNCSC:
ultravncscForm = new UltraVNCSC(ultravncscPanel);
ultravncscPanel = ultravncscForm;
ultravncscForm.Show(frmMain.Default.pnlDock);
break;
case Type.ComponentsCheck:
if (componentscheckForm == null || componentscheckPanel == null || componentscheckPanel.VisibleState == DockState.Unknown)
{
componentscheckForm = new ComponentsCheck(componentscheckPanel);
componentscheckPanel = componentscheckForm;
componentscheckForm.Show(frmMain.Default.pnlDock);
}
else
{
componentscheckPanel.Focus();
componentscheckPanel.Show();
componentscheckPanel.BringToFront();
componentscheckForm.Focus();
//.........这里部分代码省略.........