aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Power/Views/MainView.xaml.cs
blob: e1ce284147c6c49e793f0a02c82918eefd42027c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Tango.PPC.Power.Views
{
    /// <summary>
    /// Interaction logic for MainView.xaml
    /// </summary>
    public partial class MainView : UserControl
    {
        public MainView()
        {
            InitializeComponent();
        }
    }
}
/span> { internal TextAnchorNode left, right, parent; internal bool color; internal int length; internal int totalLength; // totalLength = length + left.totalLength + right.totalLength public TextAnchorNode(TextAnchor anchor) : base(anchor) { } internal TextAnchorNode LeftMost { get { TextAnchorNode node = this; while (node.left != null) node = node.left; return node; } } internal TextAnchorNode RightMost { get { TextAnchorNode node = this; while (node.right != null) node = node.right; return node; } } /// <summary> /// Gets the inorder successor of the node. /// </summary> internal TextAnchorNode Successor { get { if (right != null) { return right.LeftMost; } else { TextAnchorNode node = this; TextAnchorNode oldNode; do { oldNode = node; node = node.parent; // go up until we are coming out of a left subtree } while (node != null && node.right == oldNode); return node; } } } /// <summary> /// Gets the inorder predecessor of the node. /// </summary> internal TextAnchorNode Predecessor { get { if (left != null) { return left.RightMost; } else { TextAnchorNode node = this; TextAnchorNode oldNode; do { oldNode = node; node = node.parent; // go up until we are coming out of a right subtree } while (node != null && node.left == oldNode); return node; } } } public override string ToString() { return "[TextAnchorNode Length=" + length + " TotalLength=" + totalLength + " Target=" + Target + "]"; } } }