// Initialize the Mesh Master Values list private void InitComboBoxValues(JuisDevice device) { AnnexValues = JuisDevice.GetAnnexValues().AppendMissingAsUnknown(device.Annex); BuildTypeValues = JuisDevice.GetFirmwareBuildTypeValues().AppendMissingAsUnknown(device.FirmwareBuildType); CountryValues = Device.GetCountryValues().AppendMissingAsUnknown(device.Country); LanguageValues = Device.GetLanguageValues().AppendMissingAsUnknown(device.Language); OEMValues = Device.GetOemValues().AppendMissingAsUnknown(device.OEM); MeshMasterValues = new List <ComboBoxValue>(); foreach (JuisDevice masterDevice in App.GetMainWindow().Devices.Where(d => d is JuisDevice && d.ID != device.ID)) { MeshMasterValues.Add(new ComboBoxValue(masterDevice.ID, masterDevice.DeviceName)); } MeshMasterValues.Sort(new ComboBoxValueComparer(new NaturalStringComparer(App.defaultDisplayStringComparison))); MeshMasterValues.Prepend(string.Empty, JCstring.ComboBoxValueNoMaster); MeshMasterValues.AppendMissingAsUnknown(device.MeshMaster); }
private void Backstage_Init1() { Backstage_DefaultAnnexValues = JuisDevice.GetAnnexValues().Prepend(string.Empty, JCstring.ComboBoxValueNotSet); Backstage_DefaultBuildTypeValues = JuisDevice.GetFirmwareBuildTypeValues().Prepend("-1", JCstring.ComboBoxValueNotSet); Backstage_DefaultCountryValues = Device.GetCountryValues().Prepend(string.Empty, JCstring.ComboBoxValueNotSet); Backstage_DefaultLanguageValues = Device.GetLanguageValues().Prepend(string.Empty, JCstring.ComboBoxValueNotSet); Backstage_DefaultOEMValues = Device.GetOemValues().Prepend(string.Empty, JCstring.ComboBoxValueNotSet); Backstage_UILanguageValues = new List <ComboBoxValue>(); foreach (string language in App.AdditionalLanguages) { if (languageDictionary.TryGetValue(language, out string languageFull)) { Backstage_UILanguageValues.Add(new ComboBoxValue(language, languageFull)); } } Backstage_UILanguageValues.Add(new ComboBoxValue("en", JCstring.ComboBoxValueLanguageEN)); // Main language Backstage_UILanguageValues.Prepend("auto", JCstring.ComboBoxValueAutomatic); Backstage_UILanguageValues.Sort(1, Backstage_UILanguageValues.Count - 1, new ComboBoxValueComparer(App.defaultDisplayStringComparison)); }