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

            StartMouseListening();
        }
예제 #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();
        }
예제 #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;
        }
예제 #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;
        }
예제 #7
0
        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();
        }
예제 #8
0
        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();
        }
예제 #9
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;
                }
            }
        }
예제 #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;
                }
            }
        }