Example #1
0
        public Graphlet1(string name, IEnumerable<int> includedChannels, Multigraph mg)
        {
            InitializeComponent();

            this.mg = mg;
            this.DataContext = mg;
            this.gp = mg.gp;
            this.name.Content = name;
            this.Height = MainWindow.graphletSize;
            this.Width = this.Height * mg.aspect;
            StringBuilder tooltip = new StringBuilder(includedChannels.Count() > 1 ? name : "");
            bool colon = true;
            foreach (int chan in includedChannels)
            {
                if (includedChannels.Count() > 1)
                    tooltip.Append((colon ? ": " : ", "));
                tooltip.Append(Multigraph.trimChannelName(mg.fis.ChannelNames(chan)) + "(" + (chan + 1).ToString("0") + ")");
                colon = false;
                this.channels.Add(chan);
            }
            this.graphletName.Text = tooltip.ToString();
            if (mg.typeAxis == AxisType.Pos)
                offset = MainWindow._baseSize;
            else if (mg.typeAxis == AxisType.PosNeg)
            {
                offset = MainWindow._baseSize / 2D;
                Canvas.SetBottom(xAxis, offset);
            }
            else
            {
                offset = 0D;
                Canvas.SetBottom(xAxis, MainWindow._baseSize);
            }
        }
Example #2
0
 public Setup(MainWindow mw)
 {
     this.gp = mw;
     InitializeComponent();
 }