本文整理汇总了C#中System.Windows.Forms.ContainerControl类的典型用法代码示例。如果您正苦于以下问题:C# ContainerControl类的具体用法?C# ContainerControl怎么用?C# ContainerControl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ContainerControl类属于System.Windows.Forms命名空间,在下文中一共展示了ContainerControl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ToolStripButtonBlink
public ToolStripButtonBlink(ref ContainerControl ParentControl, ref ToolStripButton TSButton, Image[] ImList)
: this(ref ParentControl,
ref TSButton,
ImList,
new[] {TSButton.ForeColor})
{
}
示例2: SetFocusOnDataBoundControlInternal
/// <summary>
/// Sets the Focus to a databound control within a given Form or a UserControl by
/// specifying the column to which it is bound.
///
/// </summary>
/// <param name="AContainerControl">Either a Form or a UserControl.</param>
/// <param name="ABindingManagerBase">BindingManagerBase where the data binding
/// information is stored</param>
/// <param name="AColumnName">Name of the column whose databound control should get the
/// focus.</param>
/// <returns>Name of the control, or empty string if not found.
/// </returns>
public static String SetFocusOnDataBoundControlInternal(ContainerControl AContainerControl,
BindingManagerBase ABindingManagerBase,
String AColumnName)
{
Int16 Counter1;
String ControlName;
ControlName = "";
// MessageBox.Show('SetFocusOnDataBoundControlInternal: looking for control that belongs to DataColumn ' + AColumnName + '...');
// MessageBox.Show('Number of Bindings: ' + ABindingManagerBase.Bindings.Count.ToString);
for (Counter1 = 0; Counter1 <= ABindingManagerBase.Bindings.Count - 1; Counter1 += 1)
{
// MessageBox.Show('ABindingManagerBase.Bindings.Item[Counter1].BindingMemberInfo.BindingField: ' + ABindingManagerBase.Bindings.Item[Counter1].BindingMemberInfo.BindingField);
if (ABindingManagerBase.Bindings[Counter1].BindingMemberInfo.BindingField == AColumnName)
{
// MessageBox.Show('BmbPartnerLocation.Bindings.Item[Counter1].Control.Name: ' + ABindingManagerBase.Bindings.Item[Counter1].Control.Name);
ControlName = TFocusing.SetFocusOnControlInFormOrUserControl(AContainerControl,
ABindingManagerBase.Bindings[Counter1].Control.Name);
break;
}
}
return ControlName;
}
示例3: AttachTo
public static Control AttachTo(this Control e, ContainerControl parent)
{
parent.Controls.Add(e);
e.Show();
return e;
}
示例4: RdpClient
internal RdpClient(ContainerControl parent, Size size, EventHandler resizeHandler)
{
this.parent = parent;
this.size = size;
try
{
rdpControl = new MsRdpClient6();
RDPConfigure(size);
// CA-96135: Try adding rdpControl to parent.Controls list; this will throw exception when
// MsRdpClient6 control cannot be created (there is no appropriate version of dll present)
parent.Controls.Add(rdpControl);
RDPSetSettings();
rdpControl.Resize += resizeHandler;
}
catch (Exception ex)
{
Log.Error("MsRdpClient6 control cannot be added.", ex);
if (rdpControl != null)
{
if (parent.Controls.Contains(rdpControl))
parent.Controls.Remove(rdpControl);
rdpControl.Dispose();
rdpControl = null;
}
}
}
示例5: addFavToMenu
//dynamically add an item to the favourites drop down menu given a Favourite
public void addFavToMenu(Favourite f)
{
ContainerControl cc = new ContainerControl();
cc.BackColor = Color.WhiteSmoke;
ToolStripControlHost c = new ToolStripControlHost(cc);
Button b = new Button();
b.Parent = cc;
initRemoveFavButton(b);
b.Click += (s, e) => { favMenu.DropDownItems.Remove(c);favs.removeFavourite(f); };
TextBox temp = new TextBox();
temp.Text = f.name;
temp.Click += (s, e) => { initNewTab(f.url); };
temp.Parent = cc;
temp.Left = b.Size.Width;
temp.Left = (int)Math.Floor((float)temp.Left * 1.3f);
initFavBox(temp);
Button t = new Button();
t.Text = f.url;
t.Parent = cc;
initMenuButton(t);
t.Top = temp.Height>b.Height?temp.Height :b.Height;
t.Top = (int)Math.Floor((float)t.Top * 1.1f);
t.Left = temp.Left;
t.Enabled = false;
Button eb = new Button();
eb.Parent = cc;
eb.Left = temp.Left + temp.Size.Width;
eb.Click += (s, e) => editButtonClick(temp, eb, f);
initEditButton(eb);
favMenu.DropDownItems.Add(c);
}
示例6: cExport
public cExport(ContainerControl sender, Delegate senderDelegate, cGlobalParas.PublishType pType,string FileName,System.Data.DataTable pData )
{
m_sender = sender;
m_senderDelegate = senderDelegate;
m_pType =pType ;
m_FileName = FileName;
m_pData = pData;
}
示例7: TestFixtureSetUp
public void TestFixtureSetUp()
{
InitializeApiKeys();
_shell = new ContainerControl();
_appManager.Map = new Map();
_btlPlugin.App = _appManager;
_btlPlugin.Activate();
//_appManager.LoadExtensions();
}
示例8: ApartmentReports
public ApartmentReports(System.Windows.Forms.ContainerControl contentControl, System.Windows.Forms.ToolStripSplitButton tsAccountReportMenu, GetCurrentAccountHandler onGetCurrentAccount, bool inAccountant)
{
this.InAccountant = inAccountant;
this.m_AccountReportTypeClasses = new System.Collections.Generic.Dictionary<AccountReportType, object>(10);
this.ContentControl = contentControl;
this.OnGetCurrentAccountHandler = onGetCurrentAccount;
this.AddAccountReportMenuItems();
this.GenerateAccountReportMenu(tsAccountReportMenu);
}
示例9: GridViewUtils
/// <summary>
/// Khởi tạo lớp tiện ích cho phép tùy chọn cấu hình việc ẩn hiện của cột trong một GridView
/// </summary>
/// <param name="_Container">Điều khiển gốc, thường là Form hoặc UserControl. Ví dụ: this(C#),Me(VB)</param>
/// <param name="BranchID">Mã chi nhánh làm việc. Ví dụ: PD1400,PD0200,...</param>
/// <param name="UID">Tên người dùng. Ví dụ: HoanBQ,HungND,...</param>
/// <param name="SubSystem">Mã phân hệ. Ví dụ: Hoadon.DLL,Dodem.dll,...</param>
/// /// <param name="AllowSearchOnGrid">Cho phép nhấn F3 để kích hoạt việc tìm kiếm dữ liệu trên lưới thông qua sự kiện Keydown của DataGrid hiện tại</param>
public GridViewUtils(ContainerControl _Container, string BranchID, string UID, string SubSystem, bool AllowSearchOnGrid)
{
this._Container = _Container;
this.BranchID = BranchID;
this.UID = UID;
this.SubSystem = SubSystem;
this.AllowSearchOnGrid = AllowSearchOnGrid;
_CtxMnu.Items.Add("Ẩn hiện cột trên lưới dữ liệu", null, new EventHandler(_Onclick));
StartUp();
}
示例10: RegisterControls
public void RegisterControls(ContainerControl container)
{
foreach (Control co in container.Controls)
{
if (co is AWBTextBox)
{
AWBTextBox tb = co as AWBTextBox;
editBoxes.Add( tb.AttributeName, tb );
}
}
}
示例11: PopulateMudData
internal static List<MudData.FormulaAction> PopulateMudData(ContainerControl.ControlCollection controls)
{
var ret = new List<MudData.FormulaAction>();
foreach (ScriptActionEditControl ctl in controls)
{
ret.Add(ctl.PopulateActionDictionary());
}
return ret;
}
示例12: InternalConstruct
protected void InternalConstruct(Control callingControl,
Source source,
Content c,
WindowContent wc,
FloatingForm ff,
DockingManager dm,
Point offset)
{
// Store the starting state
_callingControl = callingControl;
_source = source;
_content = c;
_windowContent = wc;
_dockingManager = dm;
_container = _dockingManager.Container;
_floatingForm = ff;
_hotZones = null;
_currentHotZone = null;
_insideRect = new Rectangle();
_outsideRect = new Rectangle();
_offset = offset;
// Begin tracking straight away
EnterTrackingMode();
}
示例13: MainForm
public MainForm()
{
try
{
this.InitializeComponent();
LoadCustomBranding(Properties.Settings.Default);
this.Height = Screen.PrimaryScreen.Bounds.Height;
this.Width = Screen.PrimaryScreen.Bounds.Width;
this.WindowState = FormWindowState.Maximized;
appName = Process.GetCurrentProcess().ProcessName;
if (Process.GetProcessesByName(appName).Length == 1)
{
Shell = this;
AppManager.UseBaseDirectoryForExtensionsDirectory = true;
this.appManager.ExtensionsActivating += (object sender, EventArgs e) =>
{
this.appManager.CompositionAutomationExtension();
};
this.appManager.LoadExtensions();
}
}
catch (Exception ex)
{
string msg = string.Format("MainForm 构造方法执行出错,原因详情:{1}{2}", ex.Message, ex.StackTrace);
Logger.Error(msg);
XtraMessageBox.Show(msg, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
示例14: MainForm
/// <summary>
/// Initializes a new instance of the <see cref="MainForm"/> class.
/// </summary>
public MainForm()
{
InitializeComponent();
Shell = this;
appManager.LoadExtensions();
}
示例15: Form1
public Form1()
{
InitializeComponent();
if (DesignMode) return;
Shell = this;
appManager1.LoadExtensions();
}