Пример #1
0
        private void AddIndicatorWindow(VitalIndicator indicator, Vital monitoringVital)
        {
            var borderedIndicator = new BorderedVitalIndicator(indicator, this.indicatorWidth, this.indicatorHeight);
            var indicatorWindow   = new IndicatorWindow(borderedIndicator, monitoringVital, (indicator.Width - 70.0), indicator.Height);

            indicatorWindows.Add(indicatorWindow);
        }
Пример #2
0
        public IndicatorWindow(BorderedVitalIndicator indicator, Vital monitoringVital, double width, double height)
        {
            this.Width              = width;
            this.Height             = height;
            this.AllowsTransparency = true;
            this.WindowStyle        = WindowStyle.None;
            this.indicator          = indicator;
            this.monitoringVital    = monitoringVital;
            var windowBlur = new WindowBlur(this);
            Uri iconUri    = new Uri("pack://application:,,,/heart.ico", UriKind.RelativeOrAbsolute);

            this.ShowInTaskbar = false;
            this.Content       = indicator;
            this.Background    = new SolidColorBrush(Color.FromArgb((byte)30, (byte)255, (byte)255, (byte)255));;
            this.Loaded       += (object sender, RoutedEventArgs e) => { windowBlur.Apply(); };
            this.Title         = monitoringVital.ToString();
            this.Icon          = System.Windows.Media.Imaging.BitmapFrame.Create(iconUri);
        }