• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Forms.ContainerControl类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Windows.Forms.ContainerControl的典型用法代码示例。如果您正苦于以下问题:C# ContainerControl类的具体用法?C# ContainerControl怎么用?C# ContainerControl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ContainerControl类属于System.Windows.Forms命名空间,在下文中一共展示了ContainerControl类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ToolStripButtonBlink

 public ToolStripButtonBlink(ref ContainerControl ParentControl, ref ToolStripButton TSButton, Image[] ImList)
     : this(ref ParentControl, 
         ref TSButton, 
         ImList,
         new[] {TSButton.ForeColor})
 {
 }
开发者ID:IsaacSanch,项目名称:KoruptLib,代码行数:7,代码来源:IconBlink.cs


示例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;
        }
开发者ID:Davincier,项目名称:openpetra,代码行数:37,代码来源:DataBinding.cs


示例3: AttachTo

		public static Control AttachTo(this Control e, ContainerControl parent)
		{
			parent.Controls.Add(e);
            e.Show();

			return e;
		}
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:7,代码来源:Extensions.cs


示例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;
                }
            }
        }
开发者ID:ryu2048,项目名称:xenadmin,代码行数:31,代码来源:RdpClient.cs


示例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);
 }
开发者ID:Gokimster,项目名称:WebBrowser,代码行数:32,代码来源:GUI.cs


示例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;
 }
开发者ID:zhushengwen,项目名称:example-zhushengwen,代码行数:8,代码来源:cExport.cs


示例7: TestFixtureSetUp

 public void TestFixtureSetUp()
 {
     InitializeApiKeys();
     _shell = new ContainerControl();
     _appManager.Map = new Map();
     _btlPlugin.App = _appManager;
     _btlPlugin.Activate();
     //_appManager.LoadExtensions();
 }
开发者ID:haoas,项目名称:DotSpatial.Plugins,代码行数:9,代码来源:ProjectSerializationTests.cs


示例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);
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:9,代码来源:ApartmentReports.cs


示例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();
 }
开发者ID:khaha2210,项目名称:radio,代码行数:19,代码来源:GridViewUtils.cs


示例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 );
         }
     }
 }
开发者ID:UtrsSoftware,项目名称:ATMLWorkBench,代码行数:11,代码来源:ATMLController.cs


示例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;
        }
开发者ID:apoch,项目名称:formula-engine,代码行数:11,代码来源:ScriptActionEditControl.cs


示例12: TemplateSelector

        public TemplateSelector(NuGenEventHandler handler, NuGenPopupMenu parent):base(handler, parent)
		{
            this.templ = handler.GetTemplates();
			selectListen = handler.GetTemplListener();
			
			// setUndecorated(true);
			System.Windows.Forms.ContainerControl temp_Container;
			temp_Container = new System.Windows.Forms.ContainerControl();
			temp_Container.Parent = this;
			// temp_Container.setWindowDecorationStyle(JRootPane.NONE);
			//UPGRADE_TODO: Method 'java.awt.Component.setSize' was converted to 'System.Windows.Forms.Control.Size' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtComponentsetSize_int_int'"
			Size = new System.Drawing.Size(WIDTH + 10, HEIGHT + 5);
			
			content = new TemplateBorder();
			content.Dock = System.Windows.Forms.DockStyle.Fill;
			Controls.Add(content);
			
			System.Drawing.Color bckgr = BackColor;
			//UPGRADE_TODO: The equivalent in .NET for method 'java.awt.Color.getRed' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
			//UPGRADE_TODO: The equivalent in .NET for method 'java.awt.Color.getGreen' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
			//UPGRADE_TODO: The equivalent in .NET for method 'java.awt.Color.getBlue' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
            System.Drawing.Color shade1 = Color.WhiteSmoke;// System.Drawing.Color.FromArgb(System.Math.Max((int)bckgr.R - 8, 0), System.Math.Max((int)bckgr.G - 8, 0), (int)bckgr.B);
			//UPGRADE_TODO: The equivalent in .NET for method 'java.awt.Color.getRed' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
			//UPGRADE_TODO: The equivalent in .NET for method 'java.awt.Color.getGreen' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
			//UPGRADE_TODO: The equivalent in .NET for method 'java.awt.Color.getBlue' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
			System.Drawing.Color shade2 = System.Drawing.Color.FromArgb(System.Math.Max((int) bckgr.R - 16, 0), System.Math.Max((int) bckgr.G - 16, 0), (int) bckgr.B);
			
			for (int n = 0; n < NUM_WIDGETS; n++)
				if (n < templ.NumTemplates())
				{
					pics[n] = new EditorPane(MOL_WIDTH, MOL_HEIGHT, true);
					pics[n].SetEditable(false);
					pics[n].BackColor = shade1;
					pics[n].Replace(templ.GetTemplate(n));
					pics[n].ScaleToFit();
					//UPGRADE_TODO: Method 'java.awt.Container.add' was converted to 'System.Windows.Forms.ContainerControl.Controls.Add' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtContaineradd_javaawtComponent'"
					content.Controls.Add(pics[n]);
					//UPGRADE_TODO: Method 'java.awt.Component.setLocation' was converted to 'System.Windows.Forms.Control.Location' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtComponentsetLocation_int_int'"
					pics[n].Location = new System.Drawing.Point(FRAME_SIZE + MOL_WIDTH * (n % MOL_COL) + 5, FRAME_SIZE + MOL_HEIGHT * (n / MOL_COL) + 5);
					pics[n].SetToolCursor();
					pics[n].SetMolSelectListener((MolSelectListener)this);
				}
			//UPGRADE_WARNING: Data types in Visual C# might be different.  Verify the accuracy of narrowing conversions. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1042'"
			numPages = (int) System.Math.Ceiling(templ.NumTemplates() / (double) NUM_WIDGETS);

            content.BackColor = Color.DimGray;

            this.Size = new Size(content.Size.Width, content.Size.Height - 10);
            this.MaximumSize = this.Size;
            this.MinimumSize = this.Size;
			
			// addWindowFocusListener(this);
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:53,代码来源:TemplateSelector.cs


示例13: Init

        public static void Init()
        {
            if (instance != null) return;
            control = new ContainerControl();
            control.CreateControl();

            WindowsDeviceConfig.UseForm = false;
            WindowsDeviceConfig.ControlToUse = control;
            new UIHandler();

            instance.IsFixedTimeStep = false;
            instance.RunOneFrame();
        }
开发者ID:zetaPRIME,项目名称:xybrid,代码行数:13,代码来源:UIHandler.cs


示例14: FullScreenAdapter

        public FullScreenAdapter(PresenterModel model, ContainerControl control)
        {
            this.m_Model = model;
            this.m_Control = control;

            this.m_EventQueue = new ControlEventQueue(this.m_Control);
            this.m_FullScreenChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleFullScreenChanged));
            this.m_RoleChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleRoleChanged));

            this.m_Model.ViewerState.Changed["PrimaryMonitorFullScreen"].Add(this.m_FullScreenChangedDispatcher.Dispatcher);
            this.m_FullScreenChangedDispatcher.Dispatcher(this, null);

            this.m_Model.Participant.Changed["Role"].Add(this.m_RoleChangedDispatcher.Dispatcher);
            this.m_RoleChangedDispatcher.Dispatcher(this, null);
            this.m_FullScreenButtons = new FullScreenButtons(this.m_Model, this.m_EventQueue);
            //this.m_FullScreenToolBar.Dock = DockStyle.Top;
        }
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:17,代码来源:FullScreenAdapter.cs


示例15: HookWindowsInputAndSendToWidget

		public HookWindowsInputAndSendToWidget(ContainerControl controlToHook, WidgetForWindowsFormsAbstract widgetToSendTo)
		{
			this.widgetToSendTo = widgetToSendTo;
			controlToHook.GotFocus += new EventHandler(controlToHook_GotFocus);
			controlToHook.LostFocus += new EventHandler(controlToHook_LostFocus);

			controlToHook.KeyDown += new System.Windows.Forms.KeyEventHandler(controlToHook_KeyDown);
			controlToHook.KeyUp += new System.Windows.Forms.KeyEventHandler(controlToHook_KeyUp);
			controlToHook.KeyPress += new System.Windows.Forms.KeyPressEventHandler(controlToHook_KeyPress);

			controlToHook.MouseDown += new MouseEventHandler(controlToHook_MouseDown);
			controlToHook.MouseMove += new MouseEventHandler(formToHook_MouseMove);
			controlToHook.MouseUp += new MouseEventHandler(controlToHook_MouseUp);
			controlToHook.MouseWheel += new MouseEventHandler(controlToHook_MouseWheel);

			controlToHook.MouseCaptureChanged += new EventHandler(controlToHook_MouseCaptureChanged);

			controlToHook.MouseLeave += new EventHandler(controlToHook_MouseLeave);
		}
开发者ID:glocklueng,项目名称:agg-sharp,代码行数:19,代码来源:HookWindowsInputAndSendToWidget.cs


示例16: ActivitySplash

        public ActivitySplash(ContainerControl Parent)
        {
            this.Parent = Parent;

            m_Show = new AutoResetEvent(false);
            m_Hide = new ManualResetEvent(false);
            m_Thread = this.f_GenerateThread();
            m_Thread.Start();

            this.Parent.HandleDestroyed += (o, e) => ThreadPool.QueueUserWorkItem(state => {
                while (!m_IsShown)
                {
                    m_Show.Set();
                    Thread.Sleep(10);
                }
                if (m_Thread != null)
                {
                    m_Thread.Abort();
                    m_Thread = null;
                }
            });

            if (this.Parent is Form)
            {
                var prnt = this.Parent as Form;
                prnt.FormClosing += (o, e) => ThreadPool.QueueUserWorkItem(state =>
                {
                    while (!m_IsShown)
                    {
                        m_Show.Set();
                        Thread.Sleep(10);
                    }
                    if (m_Thread != null)
                    {
                        m_Thread.Abort();
                        m_Thread = null;
                    }
                });
            }

            this.Parent.Resize += this.f_ParentResizeHandler;
        }
开发者ID:IsaacSanch,项目名称:KoruptLib,代码行数:42,代码来源:ActivitySplash.cs


示例17: BorderedTextBox

 public BorderedTextBox()
 {
     Drawn = false;
     textBox = new TextBox() {
         BorderStyle = BorderStyle.FixedSingle,
         Location = new Point(-1, -1),
         Anchor = AnchorStyles.Top | AnchorStyles.Bottom |
                  AnchorStyles.Left | AnchorStyles.Right
     };
     Control container = new ContainerControl() {
         Dock = DockStyle.Fill,
         Padding = new Padding(-1)
     };
     container.Controls.Add(textBox);
     this.Controls.Add(container);
     DefaultBorderColor = SystemColors.ControlDark;
     FocusedBorderColor = Color.Red;
     BackColor = DefaultBorderColor;
     Padding = new Padding(1);
     Size = textBox.Size;
 }
开发者ID:Railec,项目名称:SE1cKBS2,代码行数:21,代码来源:BorderedTextBox.cs


示例18: 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();
        }
开发者ID:nithinphilips,项目名称:SMOz,代码行数:25,代码来源:RedockerContent.cs


示例19: 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);
            }
        }
开发者ID:Guoyingbin,项目名称:Automation.Plugins,代码行数:31,代码来源:MainForm.cs


示例20: MainForm

        /// <summary>
        /// Initializes a new instance of the <see cref="MainForm"/> class.
        /// </summary>
        public MainForm()
        {
            InitializeComponent();

            Shell = this;
            appManager.LoadExtensions();
        }
开发者ID:DIVEROVIEDO,项目名称:DotSpatial,代码行数:10,代码来源:MainForm.cs



注:本文中的System.Windows.Forms.ContainerControl类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Forms.ContextMenu类代码示例发布时间:2022-05-26
下一篇:
C# Forms.CommandBarButton类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap