本文整理汇总了C#中IControlFactory.CreateBorderLayoutManager方法的典型用法代码示例。如果您正苦于以下问题:C# IControlFactory.CreateBorderLayoutManager方法的具体用法?C# IControlFactory.CreateBorderLayoutManager怎么用?C# IControlFactory.CreateBorderLayoutManager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IControlFactory
的用法示例。
在下文中一共展示了IControlFactory.CreateBorderLayoutManager方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CollapsiblePanelManager
///<summary>
/// Constructor for <see cref="CollapsiblePanelManager"/>
///</summary>
///<param name="collapsiblePanel"></param>
///<param name="controlFactory"></param>
public CollapsiblePanelManager(ICollapsiblePanel collapsiblePanel, IControlFactory controlFactory)
{
_controlFactory = controlFactory;
_collapsiblePanel = collapsiblePanel;
_collapseButton = _controlFactory.CreateButtonCollapsibleStyle();
_collapseButton.Click += delegate { Collapsed = !Collapsed; };
_pinLabel = controlFactory.CreateLabelPinOffStyle();
_pinLabel.Click += delegate { Pinned = !Pinned; };
IPanel buttonPanel = _controlFactory.CreatePanel();
BorderLayoutManager buttonLayoutManager =
_controlFactory.CreateBorderLayoutManager(buttonPanel);
buttonPanel.Height = _collapseButton.Height;
buttonLayoutManager.AddControl(_collapseButton, BorderLayoutManager.Position.Centre);
buttonLayoutManager.AddControl(_pinLabel, BorderLayoutManager.Position.East);
_layoutManager = _controlFactory.CreateBorderLayoutManager(collapsiblePanel);
_layoutManager.AddControl(buttonPanel, BorderLayoutManager.Position.North);
_collapseButton.BackColor = System.Drawing.Color.Transparent;
_collapseButton.ForeColor = System.Drawing.Color.Transparent;
}
示例2: FilterControlVWG
///<summary>
///</summary>
///<param name="controlFactory"></param>
public FilterControlVWG(IControlFactory controlFactory)
{
this.Height = 50;
_controlFactory = controlFactory;
_groupBox = _controlFactory.CreateGroupBox();
//_groupBox.Anchor = AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom;
//_groupBox.Top = 0;
//_groupBox.Left = 0;
//_groupBox.Width = this.Width;
//_groupBox.Height = this.Height;
//this.Controls.Add((Control) _groupBox);
_controlFactory.CreateBorderLayoutManager(this).AddControl(_groupBox, BorderLayoutManager.Position.Centre);
_groupBox.Text = "Filter the Grid";
BorderLayoutManager layoutManager = controlFactory.CreateBorderLayoutManager(_groupBox);
layoutManager.BorderSize = 20;
IPanel filterButtonPanel = controlFactory.CreatePanel();
filterButtonPanel.Height = 50;
filterButtonPanel.Width = 110;
CreateFilterButtons(filterButtonPanel);
layoutManager.AddControl(filterButtonPanel, BorderLayoutManager.Position.West);
_filterPanel = controlFactory.CreatePanel();
_filterPanel.Width = this.Width;
layoutManager.AddControl(_filterPanel, BorderLayoutManager.Position.Centre);
_filterControlManager = new FilterControlManager(controlFactory, new FlowLayoutManager(_filterPanel, controlFactory));
}
示例3: HelpAboutBoxManager
///<summary>
/// Constructor for the <see cref="HelpAboutBoxManager"/>
///</summary>
///<param name="controlFactory"></param>
///<param name="formHabanero"></param>
///<param name="programName"></param>
///<param name="producedForName"></param>
///<param name="producedByName"></param>
///<param name="versionNumber"></param>
public HelpAboutBoxManager(IControlFactory controlFactory, IFormHabanero formHabanero, string programName, string producedForName, string producedByName, string versionNumber)
{
_FormHabanero = formHabanero;
_mainPanel = controlFactory.CreatePanel();
GridLayoutManager mainPanelManager = new GridLayoutManager(_mainPanel, controlFactory);
mainPanelManager.SetGridSize(4, 2);
mainPanelManager.FixAllRowsBasedOnContents();
mainPanelManager.FixColumnBasedOnContents(0);
mainPanelManager.FixColumnBasedOnContents(1);
mainPanelManager.AddControl(controlFactory.CreateLabel("Programme Name:", false));
mainPanelManager.AddControl(controlFactory.CreateLabel(programName, false));
mainPanelManager.AddControl(controlFactory.CreateLabel("Produced For:", false));
mainPanelManager.AddControl(controlFactory.CreateLabel(producedForName, false));
mainPanelManager.AddControl(controlFactory.CreateLabel("Produced By:", false));
mainPanelManager.AddControl(controlFactory.CreateLabel(producedByName, false));
mainPanelManager.AddControl(controlFactory.CreateLabel("Version:", false));
mainPanelManager.AddControl(controlFactory.CreateLabel(versionNumber, false));
IButtonGroupControl buttons = controlFactory.CreateButtonGroupControl();
buttons.AddButton("OK", new EventHandler(OKButtonClickHandler));
BorderLayoutManager manager = controlFactory.CreateBorderLayoutManager(formHabanero);
manager.AddControl(_mainPanel, BorderLayoutManager.Position.Centre);
manager.AddControl(buttons, BorderLayoutManager.Position.South);
formHabanero.Width = 300;
formHabanero.Height = 200;
formHabanero.Text = "About";
}
示例4: ExtendedComboBoxVWG
///<summary>
/// Constructor with a specified Control Factory
///</summary>
///<param name="controlFactory"></param>
public ExtendedComboBoxVWG(IControlFactory controlFactory)
{
_controlFactory = controlFactory;
IUserControlHabanero userControlHabanero = this;
ComboBox = _controlFactory.CreateComboBox();
Button = _controlFactory.CreateButton("...");
BorderLayoutManager borderLayoutManager = controlFactory.CreateBorderLayoutManager(userControlHabanero);
borderLayoutManager.AddControl(ComboBox, BorderLayoutManager.Position.Centre);
borderLayoutManager.AddControl(Button, BorderLayoutManager.Position.East);
}
示例5: ExtendedComboBoxWin
///<summary>
/// Constructs the <see cref="ExtendedComboBoxWin"/> with the specified <see cref="IControlFactory"/>.
///</summary>
public ExtendedComboBoxWin(IControlFactory controlFactory)
{
_controlFactory = controlFactory;
IUserControlHabanero userControlHabanero = this;
_comboBox = _controlFactory.CreateComboBox();
_button = _controlFactory.CreateButton("...");
_button.MinimumSize = new Size(0, 0);
BorderLayoutManager borderLayoutManager = controlFactory.CreateBorderLayoutManager(userControlHabanero);
borderLayoutManager.AddControl(_comboBox, BorderLayoutManager.Position.Centre);
borderLayoutManager.AddControl(_button, BorderLayoutManager.Position.East);
}
示例6: ExtendedTextBoxWin
///<summary>
/// Constructor with a specified Control Factory
///</summary>
///<param name="factory"></param>
public ExtendedTextBoxWin(IControlFactory factory)
{
Button = factory.CreateButton("...");
TextBox = factory.CreateTextBox();
Button.MinimumSize = new Size(0, 0);
TextBox.Enabled = false;
this.Height = TextBox.Height;
BorderLayoutManager borderLayoutManager = factory.CreateBorderLayoutManager(this);
this.Padding = Padding.Empty;
borderLayoutManager.AddControl(TextBox, BorderLayoutManager.Position.Centre);
borderLayoutManager.AddControl(Button, BorderLayoutManager.Position.East);
}
示例7: StaticDataEditorManager
///<summary>
/// Constrcutor for the <see cref="StaticDataEditorManager"/>
///</summary>
///<param name="staticDataEditor"></param>
///<param name="controlFactory"></param>
public StaticDataEditorManager(IStaticDataEditor staticDataEditor, IControlFactory controlFactory)
{
_staticDataEditor = staticDataEditor;
this._controlFactory = controlFactory;
_items = new Dictionary<string, IClassDef>();
_treeView = _controlFactory.CreateTreeView("TreeView");
_treeView.Width = 200;
_gridControl = _controlFactory.CreateEditableGridControl();
BorderLayoutManager layoutManager = _controlFactory.CreateBorderLayoutManager(_staticDataEditor);
layoutManager.AddControl(_gridControl, BorderLayoutManager.Position.Centre);
layoutManager.AddControl(_treeView, BorderLayoutManager.Position.West);
_treeView.AfterSelect += ((sender, e) => SelectItem(e.Node.Text));
_treeView.BeforeSelect += _treeView_OnBeforeSelect;
_gridControl.Enabled = false;
_gridControl.FilterControl.Visible = false;
}
示例8: EditableGridControlVWG
///<summary>
/// Constructs a new instance of a <see cref="EditableGridControlVWG"/>.
///</summary>
///<param name="controlFactory">The <see cref="IControlFactory"/> to use to construct the control.</param>
public EditableGridControlVWG(IControlFactory controlFactory)
{
if (controlFactory == null) throw new HabaneroArgumentException("controlFactory",
"Cannot create an editable grid control if the control factory is null");
_controlFactory = controlFactory;
_grid = _controlFactory.CreateEditableGrid();
_editableGridManager = new EditableGridControlManager(this, controlFactory);
Buttons = _controlFactory.CreateEditableGridButtonsControl();
FilterControl = _controlFactory.CreateFilterControl();
InitialiseButtons();
InitialiseFilterControl();
BorderLayoutManager manager = controlFactory.CreateBorderLayoutManager(this);
manager.AddControl(FilterControl, BorderLayoutManager.Position.North);
manager.AddControl(_grid, BorderLayoutManager.Position.Centre);
manager.AddControl(Buttons, BorderLayoutManager.Position.South);
this.Grid.BusinessObjectSelected += Grid_OnBusinessObjectSelected;
this.AllowUsersToAddBO = true;
}
示例9: FilterControlWin
///<summary>
/// Constructor for <see cref="FilterControlWin"/>
///</summary>
///<param name="controlFactory"></param>
public FilterControlWin(IControlFactory controlFactory)
{
Height = 50;
_controlFactory = controlFactory;
FilterGroupBox = _controlFactory.CreateGroupBox();
// _groupBox = _controlFactory.CreatePanel();
_controlFactory.CreateBorderLayoutManager(this).AddControl(FilterGroupBox, BorderLayoutManager.Position.Centre);
FilterGroupBox.Text = "Filter the Grid";
BorderLayoutManager layoutManager = controlFactory.CreateBorderLayoutManager(FilterGroupBox);
layoutManager.BorderSize = 20;
_filterButtonPanel = controlFactory.CreatePanel();
_filterButtonPanel.Height = 50;
_filterButtonPanel.Width = 120; //110;
_filterButtonPanel.Visible = false;
CreateFilterButtons(_filterButtonPanel);
_controlPanel = controlFactory.CreatePanel();
_controlPanel.Width = Width;
this.EnsureButtonsFit();
this._filterButtonPanel.Resize += (sender, e) => { this.EnsureButtonsFit(); };
layoutManager.AddControl(_controlPanel, BorderLayoutManager.Position.Centre);
layoutManager.AddControl(_filterButtonPanel, BorderLayoutManager.Position.East);
Height = 50;
this._controlPanel.Resize += (sender, e) =>
{
this.Height = this._controlPanel.Height + layoutManager.BorderSize;
if ((this.FilterGroupBox.Height - layoutManager.BorderSize) < this.Height)
{
this.FilterGroupBox.Height = this.Height;
}
};
_filterControlManager = new FilterControlManager(controlFactory,
new FlowLayoutManager(_controlPanel, controlFactory));
}
示例10: OKCancelPanelVWG
public OKCancelPanelVWG(IControlFactory controlFactory)
{
//_controlFactory = controlFactory;
//// create content panel
//_contentPanel = _controlFactory.CreatePanel();
//_contentPanel.Dock = DockStyle.Fill;
//this.Controls.Add((Control)_contentPanel);
//// create buttons
//IButtonGroupControl buttonGroupControl = _controlFactory.CreateButtonGroupControl();
//buttonGroupControl.Dock = DockStyle.Bottom;
//_okButton = buttonGroupControl.AddButton("OK");
//_okButton.NotifyDefault(true);
//_cancelButton = buttonGroupControl.AddButton("Cancel");
//this.Controls.Add((Control)buttonGroupControl);
_controlFactory = controlFactory;
// create content panel
_contentPanel = _controlFactory.CreatePanel();
// create buttons
_buttonGroupControl = _controlFactory.CreateButtonGroupControl();
_cancelButton = _buttonGroupControl.AddButton("Cancel");
_okButton = _buttonGroupControl.AddButton("OK");
_okButton.NotifyDefault(true);
BorderLayoutManager layoutManager = controlFactory.CreateBorderLayoutManager(this);
layoutManager.AddControl(_contentPanel, BorderLayoutManager.Position.Centre);
layoutManager.AddControl(_buttonGroupControl, BorderLayoutManager.Position.South);
}
示例11: SetupGridAndBOEditorControlWin
private void SetupGridAndBOEditorControlWin(IControlFactory controlFactory, IBOEditorControl iboEditorControl, string gridUiDefName)
{
if (controlFactory == null) throw new ArgumentNullException("controlFactory");
if (iboEditorControl == null) throw new ArgumentNullException("iboEditorControl");
_controlFactory = controlFactory;
_iboEditorControl = iboEditorControl;
SetupReadOnlyGridControl(gridUiDefName);
SetupButtonGroupControl();
UpdateControlEnabledState();
BorderLayoutManager layoutManager = _controlFactory.CreateBorderLayoutManager(this);
layoutManager.AddControl(_readOnlyGridControl, BorderLayoutManager.Position.West);
layoutManager.AddControl(_iboEditorControl, BorderLayoutManager.Position.Centre);
layoutManager.AddControl(_buttonGroupControl, BorderLayoutManager.Position.South);
_readOnlyGridControl.BusinessObjectSelected +=
((sender, e) => FireBusinessObjectSelected(e.BusinessObject));
_readOnlyGridControl.Grid.SelectionChanged += GridSelectionChanged;
}
示例12: OKCancelPanelWin
public OKCancelPanelWin(IControlFactory controlFactory)
{
_controlFactory = controlFactory;
// create content panel
_contentPanel = _controlFactory.CreatePanel();
// create buttons
_buttonGroupControl = _controlFactory.CreateButtonGroupControl();
_cancelButton = ButtonGroupControl.AddButton("Cancel");
_okButton = ButtonGroupControl.AddButton("OK");
_okButton.NotifyDefault(true);
BorderLayoutManager layoutManager = controlFactory.CreateBorderLayoutManager(this);
layoutManager.AddControl(_contentPanel, BorderLayoutManager.Position.Centre);
layoutManager.AddControl(ButtonGroupControl, BorderLayoutManager.Position.South);
}
示例13: GetUiForm
internal static IPanelInfo CreatePanelInfo
(IControlFactory controlFactory, IClassDef classDef, string uiDefName, IBOEditorControl iboEditorControl)
{
IUIForm uiForm = GetUiForm(classDef, uiDefName);
PanelBuilder panelBuilder = new PanelBuilder(controlFactory);
IPanelInfo panelInfo = panelBuilder.BuildPanelForForm(uiForm);
BorderLayoutManager layoutManager = controlFactory.CreateBorderLayoutManager(iboEditorControl);
layoutManager.AddControl(panelInfo.Panel, BorderLayoutManager.Position.Centre);
return panelInfo;
}
示例14: CloseBOEditorDialogWin
/*
///<summary>
/// Construct the Dialog form for any situation e.g. where the Form being closed has
/// Mutliple Business Objects is a wizard etc.
///</summary>
/// <param name="controlFactory">The control Factory used to construct buttons, labels etc by ths control</param>
///<param name="fullDisplayName">Full display name for the BusienssObject(s)</param>
///<param name="isInValidState">Are the BusinessObject(s) in a valid state</param>
///<param name="isDirty"></param>
///<exception cref="ArgumentNullException">control Factory must not be null</exception>
public CloseBOEditorDialogWin(IControlFactory controlFactory, string fullDisplayName, bool isInValidState, bool isDirty)
{
if (controlFactory == null) throw new ArgumentNullException("controlFactory");
ConstructControl(controlFactory, fullDisplayName, isInValidState, isDirty);
SetSize();
}*/
private void ConstructControl(IControlFactory controlFactory)
{
IButtonGroupControl buttonGroupControl = controlFactory.CreateButtonGroupControl();
CancelCloseBtn = buttonGroupControl.AddButton("CancelClose", "Cancel Close", ButtonClick);
CloseWithoutSavingBtn = buttonGroupControl.AddButton("CloseWithoutSaving", "&Close without saving", ButtonClick);
SaveAndCloseBtn = buttonGroupControl.AddButton("SaveAndClose","&Save & Close", ButtonClick);
_label = controlFactory.CreateLabel();
BorderLayoutManager layoutManager = controlFactory.CreateBorderLayoutManager(this);
layoutManager.AddControl(_label, BorderLayoutManager.Position.Centre);
layoutManager.AddControl(buttonGroupControl, BorderLayoutManager.Position.South);
}