Esempio n. 1
0
 public void select(bool flag)
 {
     this.isSelected = flag;
     if (flag)
     {
         this.Background = SystemColors.HotTrackBrush;
     }
     else
     {
         this.Background = new SolidColorBrush(item.Color);
         if (item.Confidence < Properties.Settings.Default.UncertaintyLevel)
         {
             var         res = new PatternBrushes();
             VisualBrush vb  = (System.Windows.Media.VisualBrush)res.Resources[CONFBRUSH];
             this.Background = vb;
         }
         //this.Opacity = 0.75;
     }
 }
Esempio n. 2
0
        public void update2()
        {
            double start = MainHandler.Time.PixelFromTime(MainHandler.Time.SelectionStart);
            double stop  = MainHandler.Time.PixelFromTime(item.Stop);
            double len   = Math.Max(MIN_WIDTH, stop - start);

            this.Text = item.Label;

            if (len >= 0 && start >= 0)
            {
                this.Height     = tier.ActualHeight;
                this.Width      = len;
                this.Background = new SolidColorBrush(item.Color);
                if (item.Confidence < Properties.Settings.Default.UncertaintyLevel)
                {
                    var         res = new PatternBrushes();
                    VisualBrush vb  = (System.Windows.Media.VisualBrush)res.Resources[CONFBRUSH];
                    this.Background = vb;
                }
                Canvas.SetLeft(this, start);
            }
        }