Ejemplo n.º 1
0
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                ((TreemapControl)target).SizeChanged += new SizeChangedEventHandler(this.method_1);
                break;

            case 2:
                this.popup_0 = (Popup)target;
                break;

            case 3:
                this.contentControl_0 = (ContentControl)target;
                break;

            case 4:
                this.treemapHost_0 = (TreemapHost)target;
                break;

            case 5:
                this.treemapHighlight_0 = (TreemapHighlight)target;
                break;

            case 6:
                this.canvas_0 = (Canvas)target;
                break;

            case 7:
                this.canvas_1 = (Canvas)target;
                break;

            case 8:
                this.canvas_2             = (Canvas)target;
                this.canvas_2.MouseDown  += new MouseButtonEventHandler(this.canvas_2_MouseDown);
                this.canvas_2.MouseMove  += new MouseEventHandler(this.canvas_2_MouseMove);
                this.canvas_2.MouseEnter += new MouseEventHandler(this.canvas_2_MouseEnter);
                this.canvas_2.MouseLeave += new MouseEventHandler(this.canvas_2_MouseLeave);
                break;

            default:
                this.bool_0 = true;
                break;
            }
        }
Ejemplo n.º 2
0
        private void method_1(TreeItem treeItem_1, TreeSurface treeSurface_0, double double_7)
        {
            Rect   bounds = treeItem_1.Bounds;
            double num    = treeItem_1.Size / bounds.Area();
            double num2   = treeItem_1.Size;
            int    i      = 0;

            while (i < treeItem_1.method_1())
            {
                TreemapHost.Enum2 @enum    = (bounds.Width >= bounds.Height) ? ((TreemapHost.Enum2) 0) : ((TreemapHost.Enum2) 1);
                double            num3     = (@enum == (TreemapHost.Enum2) 1) ? bounds.Width : bounds.Height;
                double            double_8 = num3 * num3 * num;
                int    num4 = i;
                int    num5 = i;
                double num6 = 0.0;
                double size = treeItem_1.method_2(num4).Size;
                double num7 = 1.7976931348623157E+308;
                num5 = TreemapHost.smethod_0(treeItem_1, num5, double_8, size, ref num7, ref num6);
                double num8 = (@enum == (TreemapHost.Enum2) 1) ? bounds.Height : bounds.Width;
                if (num6 < num2)
                {
                    num8 = (double)((int)(num6 / num2 * num8));
                }
                Rect   rect = default(Rect);
                double num9 = TreemapHost.smethod_1(bounds, @enum, num8, ref rect);
                this.method_2(treeItem_1, treeSurface_0, double_7, bounds, @enum, num3, num4, num5, num6, ref rect, ref num9);
                TreemapHost.smethod_2(ref bounds, @enum, num8);
                num2 -= num6;
                i    += num5 - num4;
                if (bounds.Width <= 0.0 || bounds.Height <= 0.0)
                {
                    if (i < treeItem_1.method_1())
                    {
                        treeItem_1.method_2(i).Bounds = default(Rect);
                    }
                    return;
                }
            }
        }
		void IComponentConnector.Connect(int connectionId, object target)
		{
			switch (connectionId)
			{
			case 1:
				((TreemapControl)target).SizeChanged += new SizeChangedEventHandler(this.method_1);
				break;
			case 2:
				this.popup_0 = (Popup)target;
				break;
			case 3:
				this.contentControl_0 = (ContentControl)target;
				break;
			case 4:
				this.treemapHost_0 = (TreemapHost)target;
				break;
			case 5:
				this.treemapHighlight_0 = (TreemapHighlight)target;
				break;
			case 6:
				this.canvas_0 = (Canvas)target;
				break;
			case 7:
				this.canvas_1 = (Canvas)target;
				break;
			case 8:
				this.canvas_2 = (Canvas)target;
				this.canvas_2.MouseDown += new MouseButtonEventHandler(this.canvas_2_MouseDown);
				this.canvas_2.MouseMove += new MouseEventHandler(this.canvas_2_MouseMove);
				this.canvas_2.MouseEnter += new MouseEventHandler(this.canvas_2_MouseEnter);
				this.canvas_2.MouseLeave += new MouseEventHandler(this.canvas_2_MouseLeave);
				break;
			default:
				this.bool_0 = true;
				break;
			}
		}
Ejemplo n.º 4
0
		private void method_2(TreeItem treeItem_1, TreeSurface treeSurface_0, double double_7, Rect rect_0, TreemapHost.Enum2 enum2_0, double double_8, int int_1, int int_2, double double_9, ref Rect rect_1, ref double double_10)
		{
			for (int i = int_1; i < int_2; i++)
			{
				double num = treeItem_1.method_2(i).Size / double_9;
				double num2 = double_10 + num * double_8;
				bool flag;
				if (flag = (i == int_2 - 1 || treeItem_1.method_2(i + 1).Size == 0.0))
				{
					num2 = ((enum2_0 == (TreemapHost.Enum2)1) ? (rect_0.X + double_8) : (rect_0.Y + double_8));
				}
				if (enum2_0 == (TreemapHost.Enum2)1)
				{
					rect_1.X = double_10;
					rect_1.Width = num2 - double_10;
				}
				else
				{
					rect_1.Y = double_10;
					rect_1.Height = num2 - double_10;
				}
				this.method_3(treeItem_1.method_2(i), ref rect_1, treeSurface_0, double_7 * 0.75);
				if (flag)
				{
					break;
				}
				double_10 = num2;
			}
		}
Ejemplo n.º 5
0
		private static void smethod_2(ref Rect rect_0, TreemapHost.Enum2 enum2_0, double double_7)
		{
			if (enum2_0 == (TreemapHost.Enum2)1)
			{
				rect_0.Y += double_7;
				rect_0.Height -= double_7;
			}
			else
			{
				rect_0.X += double_7;
				rect_0.Width -= double_7;
			}
		}
Ejemplo n.º 6
0
		private static double smethod_1(Rect rect_0, TreemapHost.Enum2 enum2_0, double double_7, ref Rect rect_1)
		{
			double result;
			if (enum2_0 == (TreemapHost.Enum2)1)
			{
				rect_1.Y = rect_0.Y;
				rect_1.Height = double_7;
				result = rect_0.X;
			}
			else
			{
				rect_1.X = rect_0.X;
				rect_1.Width = double_7;
				result = rect_0.Y;
			}
			return result;
		}