示例#1
0
 private static bool CheckPalletSettings(SettingsController settingsController)
 {
     var palletColors = settingsController.GetPalletRange();
     if (palletColors == 4)
         return false;
     return true;
 }
示例#2
0
        private void LoadColorsAndTemps()
        {
            var settingsController = new SettingsController();
             _1ColorRect.Fill = new SolidColorBrush(
                Color.FromRgb(
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[0].Substring(0, 2), 16)),
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[0].Substring(2, 2), 16)),
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[0].Substring(4, 2), 16))));
            _2ColorRect.Fill = new SolidColorBrush(
                Color.FromRgb(
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[1].Substring(0, 2), 16)),
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[1].Substring(2, 2), 16)),
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[1].Substring(4, 2), 16))));
            _3ColorRect.Fill = new SolidColorBrush(
                Color.FromRgb(
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[2].Substring(0, 2), 16)),
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[2].Substring(2, 2), 16)),
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[2].Substring(4, 2), 16))));
            _4ColorRect.Fill = new SolidColorBrush(
                Color.FromRgb(
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[3].Substring(0, 2), 16)),
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[3].Substring(2, 2), 16)),
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[3].Substring(4, 2), 16))));
            _5ColorRect.Fill = new SolidColorBrush(
                Color.FromRgb(
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[4].Substring(0, 2), 16)),
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[4].Substring(2, 2), 16)),
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[4].Substring(4, 2), 16))));
            _6ColorRect.Fill = new SolidColorBrush(
                Color.FromRgb(
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[5].Substring(0, 2), 16)),
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[5].Substring(2, 2), 16)),
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[5].Substring(4, 2), 16))));
            _7ColorRect.Fill = new SolidColorBrush(
                Color.FromRgb(
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[6].Substring(0, 2), 16)),
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[6].Substring(2, 2), 16)),
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[6].Substring(4, 2), 16))));
            _8ColorRect.Fill = new SolidColorBrush(
                Color.FromRgb(
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[7].Substring(0, 2), 16)),
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[7].Substring(2, 2), 16)),
                Convert.ToByte(Convert.ToInt32(settingsController.Settings.ColorList[7].Substring(4, 2), 16))));

            _1Color.Text = Temps[0].ToString();
            _2Color.Text = Temps[1].ToString();
            _3Color.Text = Temps[2].ToString();
            _4Color.Text = Temps[3].ToString();
            _5Color.Text = Temps[4].ToString();
            _6Color.Text = Temps[5].ToString();
            _7Color.Text = Temps[6].ToString();
            _8Color.Text = Temps[7].ToString();

            _1TempRect.Fill = _1ColorRect.Fill;
            _2TempRect.Fill = _2ColorRect.Fill;
            _3TempRect.Fill = _3ColorRect.Fill;
            _4TempRect.Fill = _4ColorRect.Fill;
            _5TempRect.Fill = _5ColorRect.Fill;
            _6TempRect.Fill = _6ColorRect.Fill;
            _7TempRect.Fill = _7ColorRect.Fill;
            _8TempRect.Fill = _8ColorRect.Fill;
        }
示例#3
0
        private void MakeGraphData()
        {
            var setController = new SettingsController();

            _colors = setController.Settings.ColorList;

            foreach (var area in _areaCollection)
            {

            }
        }
示例#4
0
 private void UpdateColorsFromSettings(SettingsController settingsController)
 {
     ShowColorRect(settingsController, _1ColorRect, 0);
     ShowColorRect(settingsController, _2ColorRect, 1);
     ShowColorRect(settingsController, _3ColorRect, 2);
     ShowColorRect(settingsController, _4ColorRect, 3);
     ShowColorRect(settingsController, _5ColorRect, 4);
     ShowColorRect(settingsController, _6ColorRect, 5);
     ShowColorRect(settingsController, _7ColorRect, 6);
     ShowColorRect(settingsController, _8ColorRect, 7);
     ShowPalletTable(settingsController);
 }
示例#5
0
 private void ShowPalletTable(SettingsController controller)
 {
     if (CheckPalletSettings(controller))
     {
         ShowPalletRow(_5Color, _5ColorRect, _5C);
         ShowPalletRow(_6Color, _6ColorRect, _6C);
         ShowPalletRow(_7Color, _7ColorRect, _7C);
         ShowPalletRow(_8Color, _8ColorRect, _8C);
     }
     else
     {
         ClosePalletRow(_5Color, _5ColorRect, _5C);
         ClosePalletRow(_6Color, _6ColorRect, _6C);
         ClosePalletRow(_7Color, _7ColorRect, _7C);
         ClosePalletRow(_8Color, _8ColorRect, _8C);
     }
 }
示例#6
0
 private void ShowColorRect(SettingsController controller, Rectangle elem, int arrayColorIndex)
 {
     elem.Fill = new SolidColorBrush(Color.FromRgb(
         Convert.ToByte(Convert.ToInt32(controller.Settings.ColorList[arrayColorIndex].Substring(0, 2), 16)),
         Convert.ToByte(Convert.ToInt32(controller.Settings.ColorList[arrayColorIndex].Substring(2, 2), 16)),
         Convert.ToByte(Convert.ToInt32(controller.Settings.ColorList[arrayColorIndex].Substring(4, 2), 16))));
 }
 private void Init()
 {
     var settingController = new SettingsController();
     _settings = settingController.GetSettings();
 }
 private void OnOkBtnClick(object sender, RoutedEventArgs args)
 {
     UpdateSettingsFromUI();
     var settingsController = new SettingsController();
     settingsController.UpdateSettingsFile(_settings);
     Close();
 }
 private void OnApplySettingsBtnClick(object sender, RoutedEventArgs args)
 {
     UpdateSettingsFromUI();
     var settingsController = new SettingsController(_settings);
     settingsController.UpdateSettingsFile(_settings);
     InitResolutionRb();
     InitColorPallet();
     InitColorList();
 }