當前位置: 首頁>>代碼示例>>C#>>正文


C# Forms.ContainerControl類代碼示例

本文整理匯總了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})
 {
 }
開發者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: 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

示例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);
            }
        }
開發者ID:Guoyingbin,項目名稱:Automation.Plugins,代碼行數:31,代碼來源:MainForm.cs

示例14: 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

示例15: Form1

        public Form1()
        {
            InitializeComponent();
            if (DesignMode) return;
            Shell = this;
            appManager1.LoadExtensions();

        }
開發者ID:koson,項目名稱:ResearchMap1,代碼行數:8,代碼來源:Form1.cs


注:本文中的System.Windows.Forms.ContainerControl類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。