当前位置: 首页>>代码示例>>C#>>正文


C# Control.CreateControl方法代码示例

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


在下文中一共展示了Control.CreateControl方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: WindowsFormsSynchronizationContext

		static WindowsFormsSynchronizationContext ()
		{
			invoke_control = new Control ();
			invoke_control.CreateControl ();
			auto_installed = true;
			previous_context = SynchronizationContext.Current;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:7,代码来源:WindowsFormsSynchronizationContext.cs

示例2: BindingsTest

		public void BindingsTest ()
		{
			Control c1 = new Control ();
			Control c2 = new Control ();

			c1.CreateControl ();
			c2.CreateControl ();

			Binding binding;
			BindingManagerBase bm, bm2;

			c1.BindingContext = new BindingContext ();
			c2.BindingContext = c1.BindingContext;

			bm = c2.BindingContext[c1, "Text"];
			bm2 = c2.BindingContext[c1];

#if NET_2_0
			bm.BindingComplete += delegate (object sender, BindingCompleteEventArgs e) { Console.WriteLine (Environment.StackTrace); };
			bm2.BindingComplete += delegate (object sender, BindingCompleteEventArgs e) { Console.WriteLine (Environment.StackTrace); };
#endif

			binding = c2.DataBindings.Add ("Text", c1, "Text");

			Assert.AreEqual (0, bm.Bindings.Count, "1");
			Assert.AreEqual (1, bm2.Bindings.Count, "2");

			Assert.AreEqual (bm2.Bindings[0], binding, "3");
		}
开发者ID:nlhepler,项目名称:mono,代码行数:29,代码来源:BindingManagerBaseTest.cs

示例3: TeImportUi

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="T:TeImportUi"/> class.
		/// </summary>
		/// <param name="progressDialog">The progress dialog.</param>
		/// ------------------------------------------------------------------------------------
		public TeImportUi(ProgressDialogWithTask progressDialog)
		{
			m_progressDialog = progressDialog;
			if (m_progressDialog != null)	// might be null for tests
				m_progressDialog.Cancel += new CancelHandler(OnCancelPressed);
			m_ctrl = new Control();
			m_ctrl.CreateControl();
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:14,代码来源:TeImportUi.cs

示例4: AdnFileDownloader

        public AdnFileDownloader(Uri url, string location)
        {
            _sw = new Stopwatch();
            _url = url;
            _location = location;

            _syncCtrl = new Control();
            _syncCtrl.CreateControl();
        }
开发者ID:CADblokeCADforks,项目名称:workflow-wpf-view.and.data.api,代码行数:9,代码来源:AdnFileDownloader.cs

示例5: TeImportUi

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="TeImportUi"/> class.
		/// </summary>
		/// <param name="progressDialog">The progress dialog.</param>
		/// <param name="helpTopicProvider">The help topic provider.</param>
		/// ------------------------------------------------------------------------------------
		public TeImportUi(ProgressDialogWithTask progressDialog, IHelpTopicProvider helpTopicProvider)
		{
			m_progressDialog = progressDialog;
			if (m_progressDialog != null)
				m_progressDialog.Canceling += OnCancelPressed;
			m_helpTopicProvider = helpTopicProvider;
			m_ctrl = new Control();
			m_ctrl.CreateControl();
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:16,代码来源:TeImportUi.cs

示例6: SpawnUIUpdateThread

 public static void SpawnUIUpdateThread()
 {
     mainThread = Thread.CurrentThread;
     mainThreadCtrl = new Panel();
     mainThreadCtrl.CreateControl();
     uiUpdateThread = new Thread(UIUpdateThread);
     uiUpdateThread.IsBackground = true;
     uiUpdateThread.Start();
 }
开发者ID:zetaPRIME,项目名称:xybrid,代码行数:9,代码来源:UIManager.cs

示例7: CtorEmptyProperty

		public void CtorEmptyProperty ()
		{
			Binding b = new Binding ("Text", 6, String.Empty);
			Control c = new Control ();
			c.BindingContext = new BindingContext ();
			c.CreateControl ();

			c.DataBindings.Add (b);
			Assert.AreEqual ("6", c.Text, "A1");
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:10,代码来源:BindingTest.cs

示例8: Initialize

        /// <summary>
        /// WPFを使うための初期化処理を行います。
        /// </summary>
        public static void Initialize()
        {
            Initializer.Initialize();

            Synchronizer = new Control();
            Synchronizer.CreateControl();

            Util.SetPropertyChangedCaller(CallPropertyChanged);
            Util.SetColletionChangedCaller(CallCollectionChanged);
            Util.SetEventCaller(UIProcess);
        }
开发者ID:leontius,项目名称:Ragnarok,代码行数:14,代码来源:FormsUtil.cs

示例9: StatusBarProgressHandler

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="T:StatusBarProgressHandler"/> class.
		/// </summary>
		/// <param name="label">The label that will display the message.</param>
		/// <param name="progressBar">The progress bar.</param>
		/// ------------------------------------------------------------------------------------
		public StatusBarProgressHandler(ToolStripStatusLabel label,
			ToolStripProgressBar progressBar)
		{
			m_label = label;
			m_progressBar = progressBar;

			// Create a (invisible) control for multithreading purposes. We have to do this
			// because ToolStripStatusLabel and ToolStripProgressBar don't derive from Control
			// and so don't provide an implementation of Invoke.
			m_control = new Control();
			m_control.CreateControl();
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:19,代码来源:StatusBarProgressHandler.cs

示例10: TranslationNotifier

        public TranslationNotifier(
            AdnViewDataClient client,
            string fileId,
            int pollingPeriod = 1000)
        {
            _worker = null;
            _client = client;
            _fileId = fileId;
            _pollingPeriod = pollingPeriod;

            _syncCtrl = new Control();
            _syncCtrl.CreateControl();
        }
开发者ID:CADblokeCADforks,项目名称:library-dotnet-view.and.data.api,代码行数:13,代码来源:TranslationNotifier.cs

示例11: ConfigurationForm

        public ConfigurationForm()
        {
            m_localControlForInvoke = new Control();
            m_localControlForInvoke.CreateControl();
#if DEBUG
            //    Debugger.Launch();
#endif
            InitializeComponent();
            MPTVSeriesLog.AddNotifier(ref listBox_Log);

            MPTVSeriesLog.Write("**** Plugin started in configuration mode ***");

            Translation.Init();

            // set height/width
            int height = DBOption.GetOptions(DBOption.cConfigSizeHeight);
            int width = DBOption.GetOptions(DBOption.cConfigSizeWidth);
            if (height > this.MinimumSize.Height && width > this.MinimumSize.Width)
            {
                System.Drawing.Size s = new Size(width, height);
                this.Size = s;
            }
            this.Resize += new EventHandler(ConfigurationForm_Resize);            

            load = new loadingDisplay();

            OnlineParsing.OnlineParsingCompleted += new OnlineParsing.OnlineParsingCompletedHandler(OnlineParsing_OnCompleted);
            
            InitSettingsTreeAndPanes();
            InitExtraTreeAndPanes();
            
            LoadImportPathes();
            LoadExpressions();
            LoadReplacements();
            
            initLoading = false;
            LoadTree();

            // Only Advanced Users / Skin Designers need to see these.
            // Tabs are visible if import="false" TVSeries.SkinSettings.xml
            if (SkinSettings.ImportFormatting) tabControl_Details.TabPages.Remove(tabFormattingRules);
            if (SkinSettings.ImportLogos) tabControl_Details.TabPages.Remove(tabLogoRules);
            
            if (load != null) load.Close();
            instance = this;

            this.aboutScreen.setUpMPInfo(Settings.Version.ToString(), Settings.BuildDate);
            this.aboutScreen.setUpPaths();
        }
开发者ID:barneh,项目名称:mptvseries,代码行数:49,代码来源:GUIConfiguration.cs

示例12: HtmlThumbNailer

        public HtmlThumbNailer(NavigationIsolator isolator)
        {
            if (_theOnlyOneAllowed != null)
            {
                Debug.Fail("Something tried to make a second HtmlThumbnailer; there should only be one.");
                throw new ApplicationException("Something tried to make a second HtmlThumbnailer; there should only be one.");
            }

            _theOnlyOneAllowed = this;

            _isolator = isolator;

            _syncControl = new Control();
            _syncControl.CreateControl();
        }
开发者ID:BloomBooks,项目名称:BloomDesktop,代码行数:15,代码来源:HtmlThumbNailer.cs

示例13: WinFormsExceptionHandler

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Set exception handler. Needs to be done before we create splash screen (don't
		/// understand why, but otherwise some exceptions don't get caught).
		/// </summary>
		/// ------------------------------------------------------------------------------------
		public WinFormsExceptionHandler()
		{
			// We need to create a control on the UI thread so that we have a control that we
			// can use to invoke the error reporting dialog on the correct thread.
			ControlOnUIThread = new Control();
			ControlOnUIThread.CreateControl();

			// Using Application.ThreadException rather than
			// AppDomain.CurrentDomain.UnhandledException has the advantage that the
			// program doesn't necessarily ends - we can ignore the exception and continue.
			Application.ThreadException += HandleTopLevelError;

			// We also want to catch the UnhandledExceptions for all the cases that
			// ThreadException don't catch, e.g. in the startup.
			AppDomain.CurrentDomain.UnhandledException += HandleUnhandledException;
		}
开发者ID:JohnThomson,项目名称:libpalaso,代码行数:22,代码来源:WinFormsExceptionHandler.cs

示例14: TreeViewX

		public TreeViewX(IApp app) {
			App = app;

			HotTracking = true;
			HideSelection = false;
			ShowLines = false;
			BorderStyle = BorderStyle.FixedSingle;
			DrawMode = TreeViewDrawMode.OwnerDrawAll;
			ImageList = new ImageList();
			ImageList.Images.Add(new Bitmap(16, 16));

			scratch = new Control();
			scratch.CreateControl();

			Font = new Font("Segoe UI", 9);
			SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
		}
开发者ID:mamingxiu,项目名称:dnExplorer,代码行数:17,代码来源:TreeViewX.cs

示例15: Create

        public static bool Create(Form mainApplicationForm)
        {
            if (windowHandleControl != null)
                Log.Fatal("WinFormsAppWorld: Create: WinformsAppWorld is already created.");
            if (!mainApplicationForm.IsHandleCreated)
                Log.Fatal("WinFormsAppWorld: Create: mainApplicationForm: Handle is not created.");

            windowHandleControl = new Control();
            windowHandleControl.Parent = mainApplicationForm;
            windowHandleControl.Location = new System.Drawing.Point(0, 0);
            windowHandleControl.Size = new System.Drawing.Size(10, 10);
            windowHandleControl.Visible = false;
            windowHandleControl.CreateControl();

            EngineApp.Instance.WindowHandle = mainApplicationForm.Handle;
            if (!EngineApp.Instance.Create())
                return false;

            return true;
        }
开发者ID:AKNightHawk,项目名称:AssaultKnights2,代码行数:20,代码来源:WinFormsAppWorld.cs


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