示例#1
0
        /// <summary>
        /// Change the visual style of the controls, depending on the settings.
        /// </summary>
        internal void ChangeVisualStyle()
        {
            _logController.AddLog(new ApplicationLog("Changing MainWindow theme style"));

            GuiManager.ChangeStyle(this);

            try
            {
                SolidColorBrush brush = new SolidColorBrush(Properties.Settings.Default.MetroColor);

                CircularRange rangeNormal  = CgRamUsage.Scales[0].Ranges[0];
                CircularRange rangeWarning = CgRamUsage.Scales[0].Ranges[1];

                rangeNormal.Stroke     = brush;
                rangeNormal.StartValue = 0;
                rangeNormal.EndValue   = Properties.Settings.Default.WarningLevel;

                rangeWarning.StartValue = Properties.Settings.Default.WarningLevel;
                rangeWarning.EndValue   = 100;

                CgRamUsage.Scales[0].Pointers[0].NeedlePointerStroke = brush;
                CgRamUsage.Scales[0].Pointers[0].PointerCapStroke    = brush;
            }
            catch (Exception ex)
            {
                _logController.AddLog(new ErrorLog(ex.Message));
                MessageBox.Show(ex.Message, "MemPlus", MessageBoxButton.OK, MessageBoxImage.Error);
            }

            _logController.AddLog(new ApplicationLog("Done changing MainWindow theme style"));
        }
示例#2
0
 /// <summary>
 /// Change the visual style of the controls, depending on the settings.
 /// </summary>
 private void ChangeVisualStyle()
 {
     _logController.AddLog(new ApplicationLog("Changing ProcessAnalyzerWindow theme style"));
     GuiManager.ChangeStyle(this);
     _logController.AddLog(new ApplicationLog("Done changing ProcessAnalyzerWindow theme style"));
 }
 /// <summary>
 /// Change the visual style of the controls, depending on the settings.
 /// </summary>
 private void ChangeVisualStyle()
 {
     _logController.AddLog(new ApplicationLog("Changing RamStatisticsWindow theme style"));
     GuiManager.ChangeStyle(this);
     _logController.AddLog(new ApplicationLog("Done changing RamStatisticsWindow theme style"));
 }