예제 #1
0
        /// <summary>
        /// Adds the new desktop element.
        /// </summary>
        /// <param name="instance">The new desktop element.</param>
        /// <param name="position">The position.</param>
        public void AddElement(DesktopElement element)
        {
            element.Parent = this;

            this.Children.Add(element);

            this.DeactivateAll();
            element.Activate();
        }
예제 #2
0
        /// <summary>
        /// Adds the new desktop element.
        /// </summary>
        /// <param name="instance">The new desktop element.</param>
        /// <param name="position">The position.</param>
        public void AddElement(DesktopElement element, Point position)
        {
            element.Parent = this;

            this.Children.Add(element);

            element.Move(Math.Max(0, position.X), Math.Max(0, position.Y));
            element.SetZIndex(0);

            this.DeactivateAll();
            element.Activate();
        }
예제 #3
0
파일: Desktop.cs 프로젝트: cipjota/Chronos
        /// <summary>
        /// Removes the given element from the desktop.
        /// </summary>
        /// <param name="element">The element.</param>
        public void RemoveElement(DesktopElement instance)
        {
            Debug.Assert(instance is UIElement, "instance");

            this.Children.Remove(instance as UIElement);
        }
예제 #4
0
파일: Desktop.cs 프로젝트: cipjota/Chronos
        /// <summary>
        /// Adds the new desktop element.
        /// </summary>
        /// <param name="instance">The new desktop element.</param>
        /// <param name="position">The position.</param>
        public void AddElement(DesktopElement element, Point position)
        {
            element.Parent = this;

            this.Children.Add(element);

            element.Move(Math.Max(0, position.X), Math.Max(0, position.Y));
            element.SetZIndex(0);

            this.DeactivateAll();
            element.Activate();
        }
예제 #5
0
파일: Desktop.cs 프로젝트: cipjota/Chronos
        /// <summary>
        /// Adds the new desktop element.
        /// </summary>
        /// <param name="instance">The new desktop element.</param>
        /// <param name="position">The position.</param>
        public void AddElement(DesktopElement element)
        {
            element.Parent = this;

            this.Children.Add(element);

            this.DeactivateAll();
            element.Activate();
        }
예제 #6
0
        /// <summary>
        /// Removes the given element from the desktop.
        /// </summary>
        /// <param name="element">The element.</param>
        public void RemoveElement(DesktopElement instance)
        {
            Debug.Assert(instance is UIElement, "instance");

            this.Children.Remove(instance as UIElement);
        }