Exemplo n.º 1
0
            public EventSink(NuGenTabControl tabControl)
            {
                if (tabControl == null)
                {
                    Assert.Fail("tabControl cannot be null.");
                }

                tabControl.SelectedIndexChanged += delegate
                {
                    _selectedIndexChanged.Inc();
                };

                tabControl.TabPageAdded += delegate(object sender, NuGenCollectionEventArgs <NuGenTabPage> e)
                {
                    _tabPageAdded.Inc();
                    _tabPageAddedObjectList.AddActual(e.Item);
                    _tabPageAddedIndexList.AddActual(e.Index);
                };

                tabControl.TabPageRemoved += delegate(object sender, NuGenCollectionEventArgs <NuGenTabPage> e)
                {
                    _tabPageRemoved.Inc();
                    _tabPageRemovedObjectList.AddActual(e.Item);
                    _tabPageRemovedIndexList.AddActual(e.Index);
                };
            }
        /// <summary>
        /// Initializes a new instance of the <see cref="NuGenTabControlActionList"/> class.
        /// </summary>
        /// <exception cref="ArgumentNullException">
        ///	<para>
        ///		<paramref name="tabControl"/> is <see langword="null"/>.
        /// </para>
        /// </exception>
        public NuGenTabControlActionList(NuGenTabControl tabControl)
            : base(tabControl)
        {
            if (tabControl == null)
            {
                throw new ArgumentNullException("tabControl");
            }

            _tabControl = tabControl;
            _tabControl.TabPageRemoved += _tabControl_TabPageRemoved;
        }
Exemplo n.º 3
0
        /*
         * Initialize
         */

        /// <summary>
        /// Initializes the designer with the specified component.
        /// </summary>
        /// <param name="component">The <see cref="T:System.ComponentModel.IComponent"></see> to associate with the designer.</param>
        public override void Initialize(IComponent component)
        {
            Debug.Assert(component != null, "component != null");
            _tabControl = (NuGenTabControl)component;
            base.Initialize(component);
        }
			public EventSink(NuGenTabControl tabControl)
			{
				if (tabControl == null)
				{
					Assert.Fail("tabControl cannot be null.");
				}

				tabControl.SelectedIndexChanged += delegate
				{
					_selectedIndexChanged.Inc();
				};

				tabControl.TabPageAdded += delegate(object sender, NuGenCollectionEventArgs<NuGenTabPage> e)
				{
					_tabPageAdded.Inc();
					_tabPageAddedObjectList.AddActual(e.Item);
					_tabPageAddedIndexList.AddActual(e.Index);
				};

				tabControl.TabPageRemoved += delegate(object sender, NuGenCollectionEventArgs<NuGenTabPage> e)
				{
					_tabPageRemoved.Inc();
					_tabPageRemovedObjectList.AddActual(e.Item);
					_tabPageRemovedIndexList.AddActual(e.Index);
				};
			}
Exemplo n.º 5
0
 public NuGenSmoothTabControlActionList(NuGenTabControl tabControl)
     : base(tabControl)
 {
 }
		/*
		 * Initialize
		 */

		/// <summary>
		/// Initializes the designer with the specified component.
		/// </summary>
		/// <param name="component">The <see cref="T:System.ComponentModel.IComponent"></see> to associate with the designer.</param>
		public override void Initialize(IComponent component)
		{
			Debug.Assert(component != null, "component != null");
			_tabControl = (NuGenTabControl)component;
			base.Initialize(component);
		}
		/// <summary>
		/// Initializes a new instance of the <see cref="NuGenTabControlActionList"/> class.
		/// </summary>
		/// <exception cref="ArgumentNullException">
		///	<para>
		///		<paramref name="tabControl"/> is <see langword="null"/>.
		/// </para>
		/// </exception>
		public NuGenTabControlActionList(NuGenTabControl tabControl)
			: base(tabControl)
		{
			if (tabControl == null)
			{
				throw new ArgumentNullException("tabControl");
			}

			_tabControl = tabControl;
			_tabControl.TabPageRemoved += _tabControl_TabPageRemoved;
		}