Esempio n. 1
0
        public Config(OptimusMiniSettingsList currentSettings)
        {
            InitializeComponent();
              _Settings = currentSettings;
              _LocationDataProvider = new LocationDataProvider();

              // Unit
              if (_Settings["Unit"] != "")
              {
            if (_Settings["Unit"] == "m") { radioMetricUnit.Checked = true; }
              else { radioEnglishUnit.Checked = true; }
              }

              // Show
              if (currentSettings["ShowToday"] != "") { checkToday.Checked = (currentSettings["ShowToday"] == "1"); }
              if (currentSettings["ShowTomorrow"] != "") { checkTomorrow.Checked = (currentSettings["ShowTomorrow"] == "1"); }
              if (currentSettings["ShowDayAfterTomorrow"] != "") { checkDayAfterTomorrow.Checked = (currentSettings["ShowDayAfterTomorrow"] == "1"); }
              if (currentSettings["ShowWeekend"] != "") { checkWeekend.Checked = (currentSettings["ShowWeekend"] == "1"); }

              // Wait
              if (currentSettings["Wait"] != "") { textWait.Text = currentSettings["Wait"]; }

              // Location
              if (currentSettings["LocationCode"] != "")
              {
            labelCurrentLocation.Text = currentSettings["LocationCode"];
              }
              else
              {
            labelCurrentLocation.Text = "not set";
              }
        }
Esempio n. 2
0
        public Config(OptimusMiniSettingsList currentSettings)
        {
            InitializeComponent();
            _Settings             = currentSettings;
            _LocationDataProvider = new LocationDataProvider();

            // Unit
            if (_Settings["Unit"] != "")
            {
                if (_Settings["Unit"] == "m")
                {
                    radioMetricUnit.Checked = true;
                }
                else
                {
                    radioEnglishUnit.Checked = true;
                }
            }

            // Show
            if (currentSettings["ShowToday"] != "")
            {
                checkToday.Checked = (currentSettings["ShowToday"] == "1");
            }
            if (currentSettings["ShowTomorrow"] != "")
            {
                checkTomorrow.Checked = (currentSettings["ShowTomorrow"] == "1");
            }
            if (currentSettings["ShowDayAfterTomorrow"] != "")
            {
                checkDayAfterTomorrow.Checked = (currentSettings["ShowDayAfterTomorrow"] == "1");
            }
            if (currentSettings["ShowWeekend"] != "")
            {
                checkWeekend.Checked = (currentSettings["ShowWeekend"] == "1");
            }

            // Wait
            if (currentSettings["Wait"] != "")
            {
                textWait.Text = currentSettings["Wait"];
            }

            // Location
            if (currentSettings["LocationCode"] != "")
            {
                labelCurrentLocation.Text = currentSettings["LocationCode"];
            }
            else
            {
                labelCurrentLocation.Text = "not set";
            }
        }