Beispiel #1
0
        private long UpdateAdapterId(long adapterId, DisplaySettings current)
        {
            var name = Adapters[adapterId].Name;

            if (current.Adapters.All(x => x.Value.Name != name))
            {
                MissingAdapters.Add(Adapters[adapterId]);
                return(adapterId);
            }
            return(current.Adapters.Where(x => x.Value.Name == name).Select(x => x.Key).First());
        }
Beispiel #2
0
 public static void SaveCurrentDisplaySettings(string filename)
 {
     File.WriteAllText(filename, JsonConvert.SerializeObject(DisplaySettings.GetCurrent(activeOnly: true), JsonSerializerSettings));
 }