本文整理汇总了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;
}
示例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");
}
示例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();
}
示例4: AdnFileDownloader
public AdnFileDownloader(Uri url, string location)
{
_sw = new Stopwatch();
_url = url;
_location = location;
_syncCtrl = new Control();
_syncCtrl.CreateControl();
}
示例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();
}
示例6: SpawnUIUpdateThread
public static void SpawnUIUpdateThread()
{
mainThread = Thread.CurrentThread;
mainThreadCtrl = new Panel();
mainThreadCtrl.CreateControl();
uiUpdateThread = new Thread(UIUpdateThread);
uiUpdateThread.IsBackground = true;
uiUpdateThread.Start();
}
示例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");
}
示例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);
}
示例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();
}
示例10: TranslationNotifier
public TranslationNotifier(
AdnViewDataClient client,
string fileId,
int pollingPeriod = 1000)
{
_worker = null;
_client = client;
_fileId = fileId;
_pollingPeriod = pollingPeriod;
_syncCtrl = new Control();
_syncCtrl.CreateControl();
}
示例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();
}
示例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();
}
示例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;
}
示例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);
}
示例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;
}