Beispiel #1
0
 public HTAction(HTDraw model)
 {
     this.model = model;
     startPoint = new HTCoordE();
     endPoint   = new HTCoordE();
     clickPoint = new HTCoordS();
 }
Beispiel #2
0
 public HTAction(HTDraw model)
 {
     this.model = model;
     startPoint = new HTCoordE();
     endPoint = new HTCoordE();
     clickPoint = new HTCoordS();
 }
        public SilverlightHTView(HTModel model)
        {
            this.model = model;
            draw = new HTDraw(model, this);
            action = new HTAction(draw);
            this.Width = 500;
            this.Height = 500;

            StartMouseListening();
        }
Beispiel #4
0
        public SilverlightHTView(HTModel model)
        {
            this.model  = model;
            draw        = new HTDraw(model, this);
            action      = new HTAction(draw);
            this.Width  = 500;
            this.Height = 500;

            StartMouseListening();
        }
Beispiel #5
0
        public HTDrawNode(HTDrawNodeComposite father, HTModelNode node, HTDraw model)
        {
            this.father = father;
            this.node = node;
            this.model = model;

            label = new HTNodeLabel(this);

            ze = new HTCoordE(node.GetCoordinates());
            oldZe = new HTCoordE(ze);
            zs = new HTCoordS();

            model.MapNode(node.GetNode(), this);
            return;
        }
Beispiel #6
0
        public HTDrawNode(HTDrawNodeComposite father, HTModelNode node, HTDraw model)
        {
            this.father = father;
            this.node   = node;
            this.model  = model;

            label = new HTNodeLabel(this);

            ze    = new HTCoordE(node.GetCoordinates());
            oldZe = new HTCoordE(ze);
            zs    = new HTCoordS();

            model.MapNode(node.GetNode(), this);
            return;
        }
        public SilverlightHTView(HTModel model)
        {
            InitializeComponent();  //What does this method do?
            this.model  = model;
            draw        = new HTDraw(model, this);
            action      = new HTAction(draw);
            this.Width  = 500;
            this.Height = 500;

            /*TextBlock tiptext = new TextBlock() { TextWrapping = TextWrapping.Wrap };
             * tiptext.Text = toolTipText;
             *
             * ToolTipService.SetToolTip(this,tiptext);*/

            StartMouseListening();
        }
        public SilverlightHTView(HTModel model)
        {
            InitializeComponent();  //What does this method do?
            this.model = model;
            draw = new HTDraw(model, this);
            action = new HTAction(draw);
            this.Width = 500;
            this.Height = 500;

            /*TextBlock tiptext = new TextBlock() { TextWrapping = TextWrapping.Wrap };
            tiptext.Text = toolTipText;

            ToolTipService.SetToolTip(this,tiptext);*/

            StartMouseListening();
        }
        internal HTDrawNodeComposite(HTDrawNodeComposite father, HTModelNodeComposite node, HTDraw model)
            : base(father, node, model)
        {
            this.node = node;
            this.children = new ObservableCollection<HTDrawNode>();
            this.geodesics = new Dictionary<HTDrawNode, HTGeodesic>();

            HTModelNode childNode = null;
            HTDrawNode child = null;
            HTDrawNode brother = null;
            bool first = true;
            bool second = false;
            for (IEnumerator i = node.Children(); i.MoveNext(); )
            {
                childNode = (HTModelNode)i.Current;
                if (childNode.IsLeaf())
                {
                    child = new HTDrawNode(this, childNode, model);
                }
                else
                {
                    child = new HTDrawNodeComposite(this, (HTModelNodeComposite)childNode, model);
                }
                AddChild(child);
                if (first)
                {
                    brother = child;
                    first = false;
                    second = true;
                }
                else if (second)
                {
                    child.SetBrother(brother);
                    brother.SetBrother(child);
                    brother = child;
                    second = false;
                }
                else
                {
                    child.SetBrother(brother);
                    brother = child;
                }
            }
        }
Beispiel #10
0
        internal HTDrawNodeComposite(HTDrawNodeComposite father, HTModelNodeComposite node, HTDraw model)
            : base(father, node, model)
        {
            this.node      = node;
            this.children  = new ObservableCollection <HTDrawNode>();
            this.geodesics = new Dictionary <HTDrawNode, HTGeodesic>();

            HTModelNode childNode = null;
            HTDrawNode  child     = null;
            HTDrawNode  brother   = null;
            bool        first     = true;
            bool        second    = false;

            for (IEnumerator i = node.Children(); i.MoveNext();)
            {
                childNode = (HTModelNode)i.Current;
                if (childNode.IsLeaf())
                {
                    child = new HTDrawNode(this, childNode, model);
                }
                else
                {
                    child = new HTDrawNodeComposite(this, (HTModelNodeComposite)childNode, model);
                }
                AddChild(child);
                if (first)
                {
                    brother = child;
                    first   = false;
                    second  = true;
                }
                else if (second)
                {
                    child.SetBrother(brother);
                    brother.SetBrother(child);
                    brother = child;
                    second  = false;
                }
                else
                {
                    child.SetBrother(brother);
                    brother = child;
                }
            }
        }