private void AddChildComponents(IComponent component, IContainer container, IDesignerHost host) { Control control = this.GetControl(component); if (control != null) { Control control2 = control; Control[] array = new Control[control2.Controls.Count]; control2.Controls.CopyTo(array, 0); IContainer container2 = null; for (int i = 0; i < array.Length; i++) { ISite site = array[i].Site; if (site != null) { string name = site.Name; if (container.Components[name] != null) { name = null; } container2 = site.Container; if (container2 != null) { container2.Remove(array[i]); } if (name != null) { container.Add(array[i], name); } else { container.Add(array[i]); } if (array[i].Parent != control2) { control2.Controls.Add(array[i]); } else { int childIndex = control2.Controls.GetChildIndex(array[i]); control2.Controls.Remove(array[i]); control2.Controls.Add(array[i]); control2.Controls.SetChildIndex(array[i], childIndex); } IComponentInitializer designer = host.GetDesigner(component) as IComponentInitializer; if (designer != null) { designer.InitializeExistingComponent(null); } this.AddChildComponents(array[i], container, host); } } } }
/// <summary> /// Set up the window /// </summary> private void InitializeComponent() { components = new Container(); this.LoadingText = new Label(); components.Add(LoadingText); this.Progress = new ProgressBar(); components.Add(Progress); this.SuspendLayout(); // // LoadingText // this.LoadingText.AutoEllipsis = true; this.LoadingText.BackColor = Color.Transparent; this.LoadingText.Dock = DockStyle.Bottom; this.LoadingText.Location = new Point(0, Picture.Height + 22); this.LoadingText.Name = "LoadingText"; // this.LoadingText.Size = new Size(Picture.Width - 1, 20); this.LoadingText.TabIndex = 0; this.LoadingText.Text = "Loading..."; this.LoadingText.UseWaitCursor = true; // // Progress // this.Progress.Location = new Point(0, Picture.Height - 1); this.Progress.Maximum = this.maximum; this.Progress.Name = "Progress"; this.Progress.Size = new Size(Picture.Width - 1, 23); this.Progress.Step = 1; this.Progress.TabIndex = 1; this.Progress.UseWaitCursor = true; this.Progress.Style = ProgressBarStyle.Continuous; // // Splash // this.BackColor = SystemColors.Window; this.BackgroundImage = Picture; this.BackgroundImageLayout = ImageLayout.None; this.ClientSize = new Size(Picture.Width, Picture.Height + 42); this.Controls.Add(this.Progress); this.Controls.Add(this.LoadingText); this.DoubleBuffered = true; this.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular, GraphicsUnit.Point, (byte) 0); this.FormBorderStyle = FormBorderStyle.Fixed3D; this.MaximizeBox = false; this.Name = "Splash"; this.StartPosition = FormStartPosition.CenterScreen; this.Text = "Loading Ponykart..."; this.UseWaitCursor = true; this.ResumeLayout(false); base.Icon = Resources.Icon_2; }
public OWindowManager(IContainer container) { container.Add(this); init(); InitializeComponent(); }
public UICommand(IContainer container) { container.Add(this); InitializeComponent(); ClickForwarderDelegate = new EventHandler(ClickForwarder); }
public CardLayoutPanel(IContainer container) { container.Add(this); InitializeComponent(); current = String.Empty; }
public ModbusSerialPort(IContainer container) { container.Add(this); InitializeComponent(); this.InitializeComponent2(); }
public UsbDs3(IContainer container) : base(USB_CLASS_GUID) { container.Add(this); InitializeComponent(); }
public BusDevice(IContainer container) : base(DS3_BUS_CLASS_GUID) { container.Add(this); InitializeComponent(); }
/// <devdoc> /// Summary of ContextMenuStrip. /// </devdoc> public ContextMenuStrip(IContainer container) : base() { // this constructor ensures ContextMenuStrip is disposed properly since its not parented to the form. if (container == null) { throw new ArgumentNullException("container"); } container.Add(this); }
/// <include file='doc\Timer.uex' path='docs/doc[@for="Timer.Timer1"]/*' /> /// <devdoc> /// <para>Initializes a new instance of the <see cref='System.Windows.Forms.Timer'/> class with the specified container.</para> /// </devdoc> public Timer(IContainer container) : this() { if (container == null) { throw new ArgumentNullException("container"); } container.Add(this); }
public PanelOutput( IContainer container ) { container.Add( this ); InitializeComponent(); UpdateBitmap(); }
public FormChrome(IContainer container) { if (container != null) container.Add(this); AdjustWhenMaximized = true; }
public ManufacturerContactListView(IContainer container) { container.Add(this); InitializeComponent(); initColumns(); }
public CodeGeneration(IContainer container) { container.Add(this); InitializeComponent(); InitializeDelegates(); }
public BindingNavigator(IContainer container) : this(false) { if (container == null) { throw new ArgumentNullException("container"); } container.Add(this); }
/// <summary> /// Initializes a new instance of the <see cref="TaskDialogItem"/> class with the specified container. /// </summary> /// <param name="container">The <see cref="IContainer"/> to add the <see cref="TaskDialogItem"/> to.</param> protected TaskDialogItem(IContainer container) { if( container != null ) container.Add(this); InitializeComponent(); }
public MetroMenuStrip(IContainer Container) { if (Container != null) { Container.Add(this); } }
public BusListView(IContainer container) { container.Add(this); InitializeComponent(); initColumns(); }
public GlobalImageCollectionHolder(IContainer container) { InitializeComponent(); this.scaledImageCollection = this.rawImageCollection; SetSharedImageCollectionImages(this.rawImageCollection); container?.Add(this); }
public zqctext(IContainer container) { container.Add(this); InitializeComponent(); m_EnterToTable = true; }
public TriggerPortTypeComboBox(IContainer container) { container.Add(this); InitializeComponent(); if (!this.IsInDesignMode()) Items.AddRange(Enum.GetNames(typeof (TriggerPortType))); }
public WritableHeaderExtender(IContainer container) { container.Add(this); InitializeComponent(); _Header = new WritableGridHeader(); }
public SimpleLinkGrid(IContainer container) { container.Add(this); viewComponentHelper = new ViewComponentHelper(this); InitializeComponent(); }
/// <summary> /// LogView /// </summary> /// <param name="container"></param> public LogView(IContainer container) { container.Add(this); InitializeComponent(); this.Init(); }
public ConnictionFormComponent(IContainer container) { container.Add(this); InitializeComponent(); _ConnectionForm = new ConnectionForm(); }
public OutputPanelHammersley( IContainer container ) { container.Add( this ); InitializeComponent(); WMath.Hammersley QRNG = new WMath.Hammersley(); double[,] Sequence = QRNG.BuildSequence( SAMPLES_COUNT, 2 ); for ( int SampleIndex=0; SampleIndex < SAMPLES_COUNT; SampleIndex++ ) { float Angle = 2.0f * (float) Math.PI * (float) Sequence[SampleIndex,0]; float Radius = (float) Math.Sqrt( Sequence[SampleIndex,1] ); // Uniform // float Radius = (float) Sequence[SampleIndex,1]; m_Samples[SampleIndex] = new WMath.Vector2D( Radius * (float) Math.Cos( Angle ), Radius * (float) Math.Sin( Angle ) ); } string Format = "const uint SHADOW_SAMPLES_COUNT = " + SAMPLES_COUNT + ";\r\n" + "const float2 SamplesOffset[SHADOW_SAMPLES_COUNT] = {\r\n"; for ( int SampleIndex=0; SampleIndex < SAMPLES_COUNT; SampleIndex++ ) { Format += " float2( " + m_Samples[SampleIndex].x + ", " + m_Samples[SampleIndex].y + " ),\r\n"; } Format += "};\r\n\r\n"; OnSizeChanged( EventArgs.Empty ); }
public TableLayoutPanelEx(IContainer container) { container.Add(this); InitializeComponent(); this.DoubleBuffered = true; }
public TimerComponent(IContainer container) { container.Add(this); this.ID = 1; this.Name = "Timer"; InitializeComponent(); }
/// <summary> /// Creates a new instance. /// </summary> /// <param name="container">Container the new instance should be added to.</param> public ExtendedPictureBoxAlphaAnimator(IContainer container) { container.Add(this); InitializeComponent(); Initialize(); }
/// <summary>Initializes a new instance of the <see cref="TextMessageListView"/> class.</summary> /// <param name="container">The container.</param> public TextMessageListView(IContainer container) { container.Add(this); InitializeComponent(); SetupListViewSorter(); }
public TVKingButton(IContainer container) { container.Add(this); InitializeComponent(); this.Cursor = Cursors.Hand; }
/// <summary> /// Constructor with a given owning container. /// </summary> /// <param name="container">The given owning container.</param> public SecurityValue(IContainer container) : base() { Password = null; Initialize(); container?.Add(this); }
/// <summary> /// Constructor with a given password and a given owning container. /// </summary> /// <param name="value">The given password.</param> /// <param name="container">The given owning container.</param> internal CharacteristicDictionary(string value, IContainer container) : base() { Initialize(value); _name = ToString(); container?.Add(this, $"Characteristic [{GetHashCode()}]"); }
/// <summary> /// Constructor with a given password and a given owning container. /// </summary> /// <param name="password">The given password.</param> /// <param name="container">The given owning container.</param> public SecurityValue(IPassword password, IContainer container) : base() { Password = password; Initialize(); container?.Add(this, $"Password Security ({Security}) [{Password.Site}]"); }
/// <summary> /// Constructor with a given password and a given owning container. /// </summary> /// <param name="password">The given password.</param> /// <param name="container">The given owning container.</param> public SecurityValue(string password, IContainer container) : base() { Password = lib.Password.Password.GetPassword(password, container); Initialize(); container?.Add(this, $"Password Security ({Security}) [{Password.Site}]"); }
/// <summary> /// Constructor with a given owning container. /// </summary> /// <param name="container">The given owning container.</param> public CharacteristicDictionary(IContainer container) : base() { Initialize(); _name = $"CharacteristicDictionary_[{GetHashCode()}]"; container?.Add(this, $"Characteristic [{GetHashCode()}]"); }
/// <summary> /// Initializes a new instance of the <see cref="TrayIcon"/> class with the specfied container. /// </summary> /// <param name="container">An <see cref="System.ComponentModel.IContainer"/> that represents the container for the <see cref="TrayIcon"/> control.</param> public TrayIcon(IContainer container) { container?.Add(this); InitializeComponent(); m_mouseState = new MouseStateOut(this); }
/// <summary> /// Construtor. /// </summary> /// <param name="container">Container</param> public MyTextBox(IContainer?container) { this.LogClassInstantiate(); container?.Add(this); InitializeComponent(); InitializeComponent2(); }
public ColorableCheckBox(IContainer container) { container?.Add(this); InitializeComponent(); FlatAppearance.MouseDownBackColor = ColorManager.ControlDarkest; FlatAppearance.MouseOverBackColor = ColorManager.ControlDarker; BackColorChanged += OnBackColorChanged; }
/// <summary> /// Initializes a new instance of the <see cref="OperationsProgressDialog"/> class, adding it to the specified container. /// </summary> /// <param name="container">The <see cref="IContainer"/> to which the component should be added.</param> public OperationsProgressDialog(IContainer container) { container?.Add(this); InitializeComponent(); ProgressBarStyle = ProgressBarStyle.ProgressBar; ShowCancelButton = true; MinimizeBox = true; }
public HealthExplorerReportForm(IContainer parentContainer) : base(parentContainer) { parentContainer?.Add(this); //System.IServiceProvider serviceProvider = (System.IServiceProvider)parentContainer; InitializeComponent(); if (!DesignMode) { IsConsoleMaximized = false; reportControl = (HealthExplorerReportControl)SetDisplayPanelType(typeof(HealthExplorerReportControl)); } }
public EmulatedGameBoy(IContainer container) { synchronizationContext = SynchronizationContext.Current; bus = new GameBoyMemoryBus(); frameStopwatch = new Stopwatch(); frameRateStopwatch = new Stopwatch(); bus.EmulationStarted += OnEmulationStarted; bus.EmulationStopped += OnEmulationStopped; bus.BorderChanged += OnBorderChanged; bus.ClockManager = this; emulationStatus = bus.UseBootRom ? EmulationStatus.Paused : EmulationStatus.Stopped; container?.Add(this); }
/// <summary> /// Initializes a new instance of the <see cref="ProgressDialog"/> class, adding it to the specified container. /// </summary> /// <param name="container">The <see cref="IContainer"/> to which the component should be added.</param> public ProgressDialog(IContainer container) { container?.Add(this); InitializeComponent(); ProgressBarStyle = ProgressBarStyle.ProgressBar; ShowCancelButton = true; MinimizeBox = true; // Set a default animation for XP. if (!NativeMethods.IsWindowsVistaOrLater) { Animation = AnimationResource.GetShellAnimation(ShellAnimation.FlyingPapers); } }
public SynchronizedBindingSource(IContainer container) : this() { container?.Add(this); }
protected TaskDialogItem(IContainer container) { container?.Add(this); InitializeComponent(); }
public void Add() { ParentContainer?.Add(View); }
/// <summary> /// Initializes a new instance of the <see cref="FtpFileWatcher"/> class. /// </summary> /// <param name="container"><see cref="IContainer"/> object that contains the <see cref="FtpFileWatcher"/>.</param> public FtpFileWatcher(IContainer container) : this() { container?.Add(this); }
public BindingValidator(IContainer container) { container?.Add(this); }
/// <summary> /// Initializes a new instance of the <see cref="DotRas.Design.RasComponent"/> class. /// </summary> /// <param name="container">An <see cref="System.ComponentModel.IContainer"/> that will contain this component.</param> protected RasComponent(IContainer container) { container?.Add(this); }
public RadContextMenu(IContainer owner) : this() { owner?.Add((IComponent)this); }
public V5ToolTip(IContainer container) { container.Add(this); InitializeComponent(); }
public static T WithParentContainer <T>(this T entity, IContainer parent) where T : IEntity { parent?.Add(entity); return(entity); }
/// <summary> /// Initializes a new instance of the <see cref="FtpClient"/> class. /// </summary> /// <param name="container"><see cref="IContainer"/> object that contains the <see cref="FtpClient"/>.</param> public FtpClient(IContainer container) : this() { container?.Add(this); }
/// <summary> /// Initializes a new instance of the <see cref="DotRas.CredentialPromptDialog"/> class. /// </summary> /// <param name="container">An <see cref="System.ComponentModel.IContainer"/> that will contain the component.</param> public CredentialPromptDialog(IContainer container) { container?.Add(this); InitializeComponent(); }
/// <summary> /// Initializes a new instance of the <see cref="DotRas.RasAutoDialManager"/> class. /// </summary> /// <param name="container">An <see cref="System.ComponentModel.IContainer"/> that will contain this component.</param> public RasAutoDialManager(IContainer container) { container?.Add(this); InitializeComponent(); }
public PrinterManager(IContainer container) { container.Add(this); }
public AeroButton(IContainer container) { container.Add(this); InitializeComponent(); }
/// <summary> /// The constructor. /// </summary> /// <param name="container">The container of the component.</param> public MyCaffeTrainerDual(IContainer container) { container.Add(this); InitializeComponent(); }
public ServiceHost(IContainer container) : this() { container?.Add(this); }
public UserLoginComponent(IContainer container) { container.Add(this); InitializeComponent(); }