Example #1
0
            public ImageCollection(MozItem item)
            {
                m_item               = item;
                m_imageIndex         = -1;
                m_focusImageIndex    = -1;
                m_selectedImageIndex = -1;

                m_image         = null;
                m_focusImage    = null;
                m_selectedImage = null;
            }
Example #2
0
		public MozItemClickEventArgs(MozItem mozItem, MouseButtons button)
		{
			this.m_mozItem = mozItem;
			this.m_button = button;
		}
Example #3
0
		public MozItemEventArgs(MozItem mozItem)
		{
			this.m_mozItem = mozItem;
		}
Example #4
0
		/// <summary>
		/// Initializes a new instance of the MozItemEventArgs class with default settings
		/// </summary>
		public MozItemClickEventArgs()
		{
			m_mozItem = null;
			m_button = MouseButtons.Left;
		}
Example #5
0
			public bool Contains(MozItem mozItem)
			{
				if (mozItem == null)
				{
					throw new ArgumentNullException("mozItem");
				}

				return (this.IndexOf(mozItem) != -1);
			}
Example #6
0
		/// <summary>
		/// Initializes a new instance of the MozItemEventArgs class with default settings
		/// </summary>
		public MozItemEventArgs()
		{
			m_mozItem = null;
		}
Example #7
0
		private void MozItem_GotFocus(object sender, MozItemEventArgs e)
		{
			//Check if item is selected
			if (e.MozItem.state != MozItemState.Selected)
			{
				// if not set its state to focus
				e.MozItem.state = MozItemState.Focus;
   				m_mouseOverItem = e.MozItem;
				if (ItemGotFocus != null) ItemGotFocus(this,e);
			}
		}
Example #8
0
 /// <summary>
 /// Initializes a new instance of the MozItemEventArgs class with default settings
 /// </summary>
 public MozItemClickEventArgs()
 {
     m_mozItem = null;
     m_button  = MouseButtons.Left;
 }
Example #9
0
			public void MoveToTop(MozItem value)
			{
				this.Move(value, 0);
			}
Example #10
0
			public void MoveToBottom(MozItem value)
			{
				this.Move(value, this.Count);
			}
Example #11
0
			public void Move(MozItem value, int index)
			{
				if (value == null)
				{
					throw new ArgumentNullException("value");
				}

				if (index < 0)
				{
					index = 0;
				}
				else if (index > this.Count)
				{
					index = this.Count;
				}

				if (!this.Contains(value) || this.IndexOf(value) == index)
				{
					return;
				}

				this.List.Remove(value);

				if (index > this.Count)
				{
					this.List.Add(value);
				}
				else
				{
					this.List.Insert(index, value);
				}

				if (this.owner != null && !this.owner.deserializing)
				{
				  this.owner.MatchControlCollToMozItemsColl();
				}
			}
Example #12
0
			public void Remove(MozItem value)
			{
				if (value == null)
				{
					throw new ArgumentNullException("value");
				}

				this.List.Remove(value);

				if (this.owner != null && !this.owner.deserializing)
				{
					this.owner.Controls.Remove(value);

					this.owner.OnMozItemRemoved(new MozItemEventArgs(value));
				}
			}
Example #13
0
			public int IndexOf(MozItem mozItem)
			{
				if (mozItem == null)
				{
					throw new ArgumentNullException("mozItem");
				}
				
				for (int i=0; i<this.Count; i++)
				{
					if (this[i] == mozItem)
					{
						return i;
					}
				}

				return -1;
			}
Example #14
0
 /// <summary>
 /// Initializes a new instance of the MozItemEventArgs class with default settings
 /// </summary>
 public MozItemEventArgs()
 {
     m_mozItem = null;
 }
Example #15
0
		private void MozItem_LostFocus(object sender, MozItemEventArgs e)
		{
			// check if item is selected
			if (e.MozItem.state != MozItemState.Selected)
			{
				// if not set its state to normal
				e.MozItem.state = MozItemState.Normal;
				m_mouseOverItem = null;
				if (ItemLostFocus != null) ItemLostFocus(this,e);
			}
		}
Example #16
0
 public MozItemEventArgs(MozItem mozItem)
 {
     this.m_mozItem = mozItem;
 }
Example #17
0
			public ImageCollection(MozItem item)
			{
				
				m_item = item;
				m_imageIndex = -1;
			    m_focusImageIndex = -1;
			    m_selectedImageIndex = -1;

				m_image = null;
				m_focusImage = null;
				m_selectedImage = null;
			}
Example #18
0
 public MozItemClickEventArgs(MozItem mozItem, MouseButtons button)
 {
     this.m_mozItem = mozItem;
     this.m_button  = button;
 }
Example #19
0
			public void AddRange(MozItem[] mozItems)
			{
				if (mozItems == null)
				{
					throw new ArgumentNullException("mozItems");
				}

				for (int i=0; i<mozItems.Length; i++)
				{
					this.Add(mozItems[i]);
				}
			}