本文整理汇总了C#中System.Windows.Forms.ControlEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# ControlEventArgs类的具体用法?C# ControlEventArgs怎么用?C# ControlEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ControlEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了ControlEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnControlRemoved
protected override void OnControlRemoved(ControlEventArgs e)
{
base.OnControlRemoved(e);
if (_previewHandler != null)
{
_previewHandler.Unload();
_previewHandler = null;
}
}
示例2: OnControlAdded
protected override void OnControlAdded(ControlEventArgs e)
{
var tabPage = e.Control as TabPage;
if (tabPage != null)
tabPage.BackColor = Color.White;
base.OnControlAdded(e);
}
示例3: layoutControlUC_ControlAdded
void layoutControlUC_ControlAdded(object sender, ControlEventArgs e)
{
if (e.Control is IMainView)
{
(e.Control as IMainView).InitializeControls();
}
}
示例4: pAccounts_ControlRemoved
private void pAccounts_ControlRemoved(object sender, ControlEventArgs e)
{
System.Windows.Forms.Control.ControlCollection allAccounts = pAccounts.Controls;
foreach (Control control in allAccounts)
{
((AccountListItem)control).cbTransferToAccount.Items.Clear();
((AccountListItem)control).cbTransferToAccount.Items.Add("");
}
int position = 0;
foreach (Control control in allAccounts)
{
AccountListItem accountDetailsControl = (AccountListItem)control;
control.Location = new Point(0, position);
foreach (Control control1 in allAccounts)
{
AccountListItem accountDetailsControl1 = (AccountListItem)control1;
if (!accountDetailsControl1.Equals(accountDetailsControl))
{
accountDetailsControl1.Invoke((Action)(delegate
{
accountDetailsControl1.cbTransferToAccount.Items.Add(accountDetailsControl.Account.Login);
}));
accountDetailsControl1.Refresh();
}
}
position += 22;
}
}
示例5: OnControlAdded
protected override void OnControlAdded(ControlEventArgs e) {
base.OnControlAdded(e);
if(e.Control is UserControl) {
AcceptButton = Find(e.Control, (btn) => btn.Text == "OK");
CancelButton = Find(e.Control, (btn) => btn.Text == "Cancel");
}
}
示例6: OnControlRemoved
protected override void OnControlRemoved(ControlEventArgs e)
{
if (current.Equals(e.Control.Name))
current = String.Empty;
base.OnControlRemoved(e);
}
示例7: OnControlAdded
protected override void OnControlAdded(ControlEventArgs e)
{
base.OnControlAdded(e);
if (!this.DesignMode)
{
if (e.Control != null)
{
Control c = e.Control;
if (!(c is IHighlightControl))
{
//throw new Exception("Control needs to be an IHighlightControl");
}
c.Click += new EventHandler(c_Click);
if (c is IHighlightControl)
{
c.MouseMove += new MouseEventHandler(c_MouseMove);
c.MouseLeave += new EventHandler(c_MouseLeave);
}
int index = this.Controls.IndexOf(c);
Size s = c.Size;
c.Location = new Point(0, (s.Height * index) + (Offset.Height * index));
}
}
}
示例8: TabPage_ControlAdded
private void TabPage_ControlAdded(object sender, ControlEventArgs e)
{
TabPage tab = sender as TabPage;
RaiseLoadedEvent(tab);
}
示例9: OnControlRemoved
protected override void OnControlRemoved(ControlEventArgs e)
{
base.OnControlRemoved(e);
if (isAccept)
{
PLMessageBoxExt.ShowNotificationMessage("Để nhận được kết quả sau khi cài bổ trợ.\nVui lòng khởi động lại chương trình.", true);
}
}
示例10: OnControlAdded
protected override void OnControlAdded(ControlEventArgs e)
{
base.OnControlAdded(e);
if (Tools.IsRunningOnMono)
{
ApplyMonoStyle(e.Control);
}
}
示例11: mainTabs_ControlRemoved
private void mainTabs_ControlRemoved(object sender, ControlEventArgs e)
{
if (e.Control is TabPage)
{
TabPage tabPage = e.Control as TabPage;
tabPage.ControlAdded -= TabPage_ControlAdded;
}
}
示例12: OnControlAdded
protected override void OnControlAdded(ControlEventArgs e)
{
base.OnControlAdded(e);
NoBorderTabPage page = e.Control as NoBorderTabPage;
if (page != null && !tabs.TabPages.Contains(page.Page)) {
pages.Add(page);
}
}
示例13: OnControlAdded
protected override void OnControlAdded(ControlEventArgs e) {
if (e.Control is ControlPanelTaskLink) {
(e.Control as ControlPanelTaskLink).NormalColor = _renderer.GetColor(ColorProperty.TextColor);
}
base.OnControlAdded(e);
}
示例14: OnControlAdded
protected override void OnControlAdded(ControlEventArgs e)
{
e.Control.Dock = DockStyle.Fill;
e.Control.Visible = false;
//Current = e.Control.Name;
base.OnControlAdded(e);
}
示例15: OnControlAdded
protected override void OnControlAdded(ControlEventArgs e)
{
base.OnControlAdded(e);
var radioButton = e.Control as RadioButton;
if (radioButton != null)
radioButton.CheckedChanged += radioButton_CheckedChanged;
}