Example #1
0
        public ContainerG(AlexPi.Scr.Logic.GlobalEventHandler globalEventHandler) : base(globalEventHandler)
        {
            InitializeComponent();

            contentControl1.Content = VerHelper.IsVIP
          ? new MailInfoUserControl {
                Height = 130, Width = 130
            }
          : (object)new Button {
                Height = 130, Width = 130, Content = "No Mail for the masses :("
            };
        }
        public ContainerB(AlexPi.Scr.Logic.GlobalEventHandler globalEventHandler) : base(globalEventHandler)
        {
            InitializeComponent();

            //_perfCountAA = new PerformanceCounter("Memory", "Available MBytes"), // new PerformanceCounter(categoryName: "Process", counterName: "Private Bytes", instanceName: "AlexPi.Scr.scr"),
            //_perfCountEx = new PerformanceCounter(categoryName: "Process", counterName: "Private Bytes", instanceName: "Explorer"),
            ////_perfCounGPU = new PerformanceCounter("GPU", "% GPU Time", "_Total"), // % GPU Time-Base - https://github.com/Alexey-Kamenev/GpuPerfCounters/blob/master/src/GpuPerfCounters/PerfCounterService.cs
            //_ramCounterr = new PerformanceCounter("Memory", "Available MBytes");

            Task <PerformanceCounter> .Run(() => new PerformanceCounter("Processor", "% Processor Time", "_Total")).ContinueWith(_ => // new (...) takes forever => using Task to unfreeze (Aug 2019)
            {
                _perfCounCPU = _.Result;
                new DispatcherTimer(TimeSpan.FromSeconds(5), DispatcherPriority.Background, new EventHandler((s, e) => measure_Cpu_for_arrows_only()), Dispatcher.CurrentDispatcher).Start();
            }, TaskScheduler.FromCurrentSynchronizationContext());
        }
 public BackgroundWindow(AlexPi.Scr.Logic.GlobalEventHandler globalEventHandler) : base(globalEventHandler)
 {
     InitializeComponent();
     DataContext = this;
     Name        = "ths";
 }
Example #4
0
 public ContainerK(AlexPi.Scr.Logic.GlobalEventHandler globalEventHandler) : base(globalEventHandler) => InitializeComponent();
Example #5
0
namespace AlexPi.Scr.Vws { public partial class ContainerE : TopmostUnCloseableWindow { public ContainerE(AlexPi.Scr.Logic.GlobalEventHandler globalEventHandler) : base(globalEventHandler) => InitializeComponent(); } }