Пример #1
0
        private CancellationTokenSource m_cancellationTokenSource; // For cancelling thread awaiting rider start



        public MainForm(IServiceProvider serviceProvider, IConfiguration configuration, ZPMonitorService zpMonitorService, ILoggerFactory loggerFactory)
        {
            m_logger           = loggerFactory.CreateLogger <MainForm>();;
            m_serviceProvider  = serviceProvider;
            m_zpMonitorService = zpMonitorService;
            m_loggerFactory    = loggerFactory;

            m_maCollection  = new Dictionary <DurationType, MovingAverageWrapper>();
            m_summaryHelper = new SummaryHelper(new SummaryListViewItem(new SummaryItem()));
            //m_labelUnits = new Dictionary<string, string>();

            //m_labelHelpers = new List<LabelHelper>();

            m_normalizedPower = new NormalizedPower(zpMonitorService, loggerFactory);
            m_normalizedPower.NormalizedPowerChangedEvent += NormalizedPowerChangedEventHandler;
            m_normalizedPower.MetricsChangedEvent         += MetricsChangedEventHandler;

            InitializeComponent();

            // This rounds the edges of the borderless window
            this.Region = System.Drawing.Region.FromHrgn(ZAMsettings.CreateRoundRectRgn(0, 0, Width, Height, 15, 15));
            btnClose.FlatAppearance.BorderColor = Color.FromArgb(0, 255, 255, 255); //transparent

            //MainForm.colorListViewHeader(ref lvViewer, lvViewer.BackColor, Color.White); // transparent ListView headers
            //MainForm.colorListViewHeader(ref lvOverall, lvOverall.BackColor, Color.White); // transparent ListView headers
            SetListViewHeaderColor(ref lvViewer, Color.FromArgb(255, 243, 108, 61), Color.White);  // Orange ListView headers
            SetListViewHeaderColor(ref lvOverall, Color.FromArgb(255, 243, 108, 61), Color.White); // Orange ListView headers
        }
Пример #2
0
        private bool m_mouseDown;                                   // for moving window

        public AboutForm()
        {
            InitializeComponent();

            // This rounds the edges of the borderless window
            this.Region = System.Drawing.Region.FromHrgn(ZAMsettings.CreateRoundRectRgn(0, 0, Width, Height, 15, 15));
            btnClose.FlatAppearance.BorderColor = Color.FromArgb(0, 255, 255, 255); //transparent
        }
Пример #3
0
        public MainForm(IServiceProvider serviceProvider)
        {
            Logger            = ZAMsettings.LoggerFactory.CreateLogger <MainForm>();
            m_serviceProvider = serviceProvider;

            InitializeComponent();

            // This rounds the edges of the borderless window
            this.Region = System.Drawing.Region.FromHrgn(ZAMsettings.CreateRoundRectRgn(0, 0, Width, Height, 15, 15));
            btnClose.FlatAppearance.BorderColor = Color.FromArgb(0, 255, 255, 255); //transparent
        }
Пример #4
0
        public EventCompletion()
        {
            InitializeComponent();

            this.CountdownTimer          = new();
            this.CountdownTimer.Interval = 1000;
            this.CountdownTimer.Tick    += this.CountdownTimer_Tick;

            // This rounds the edges of the borderless window
            this.Region = System.Drawing.Region.FromHrgn(ZAMsettings.CreateRoundRectRgn(0, 0, Width, Height, 15, 15));
            btnClose.FlatAppearance.BorderColor = Color.FromArgb(0, 255, 255, 255); //transparent
        }