public void TransfercurrentFirmwareToNewFirmware() { if (currentFirmwareHelper.GetFeatureValue(Feature) == null && NewFirmwareHelper.GetFeatureValue(Feature) != null) { MessageBox.Show(@"The feature " + Feature + @" is not available in the old Marlin Firmware." + Environment.NewLine + @"This might be a new feature." + Environment.NewLine + @"Read the documentation and set this value manually.", @"New feature", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } var result = MessageBox.Show(@"Do you want to transfer value from Current Firmware to the New Firmware?", @"Transfer value", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2); if (result == DialogResult.Yes) { NewFirmwareHelper.SetFeatureValue(Feature, currentFirmwareHelper.GetFeatureValue(Feature)); int resultValue; if (int.TryParse(NewFirmwareHelper.GetFeatureValue(Feature), out resultValue)) { numUpDnControl.Value = resultValue; } UpdateStatus(); } }
public void DataChanged() { NewFirmwareHelper?.SetFeatureValue(Feature, chkBxProperty.Checked); UpdateStatus(); ToolTip(); }
public void DataChanged() { ComboboxItem selectedItem = (ComboboxItem)cmbBxControl.SelectedItem; NewFirmwareHelper.SetFeatureValue(Feature, selectedItem.Value.ToString()); UpdateStatus(); ToolTip(); }
public void Migrate() { if (ledBulbEqualcurrentFirmware.Color == Color.Red || ledBulbEqualcurrentFirmware.Color == Color.Green) { NewFirmwareHelper.SetFeatureValue(Feature, currentFirmwareHelper.GetFeatureValue(Feature)); UpdateStatus(); } }
public void Migrate() { if (ledBulbEqualcurrentFirmware.Color == Color.Red || ledBulbEqualcurrentFirmware.Color == Color.Green) { var oldChecked = Convert.ToBoolean(currentFirmwareHelper.GetEnabledFeature(Feature)); NewFirmwareHelper.SetFeatureValue(Feature, currentFirmwareHelper.GetFeatureValue(Feature), oldChecked); UpdateStatus(); } }
public void DataChanged() { if (NewFirmwareHelper != null) { NewFirmwareHelper.SetFeatureValue(Feature, numUpDnControl.Value.ToString()); //TODO: Kan det bli decimaltalcomma?? } UpdateStatus(); ToolTip(); }
public void Migrate() { bool oldvalue; if (ledBulbEqualcurrentFirmware.Color == Color.Red || ledBulbEqualcurrentFirmware.Color == Color.Green) { oldvalue = Convert.ToBoolean(currentFirmwareHelper.GetEnabledFeature(Feature)); NewFirmwareHelper.SetFeatureValue(Feature, "", oldvalue); chkBxProperty.Checked = oldvalue; UpdateStatus(); } }
public void Migrate() { if (ledBulbEqualcurrentFirmware.Color == Color.Red || ledBulbEqualcurrentFirmware.Color == Color.Green) { int resultValue; if (int.TryParse(currentFirmwareHelper.GetFeatureValue(Feature), out resultValue)) { NewFirmwareHelper.SetFeatureValue(Feature, resultValue.ToString().Replace(",", ".")); } UpdateStatus(); } }
public void DataChanged() { NewFirmwareHelper.SetFeatureValue(Feature, txtBxValue.Text); ToolTip(); }
public void DataChanged() { NewFirmwareHelper?.SetFeatureValue(Feature, numUpDnControl.Value.ToString(CultureInfo.InvariantCulture)); //TODO: Kan det bli decimaltalcomma?? UpdateStatus(); ToolTip(); }