private void WriteGaugesEnabled(BinaryWriter writer, GaugeSet set) { Log.Info("storing gauges enabled/disabled states"); writer.Write((Int16)set.Count()); Log.Info("writing " + set.Count() + " gauge states"); foreach (int id in set.Keys()) { writer.Write((Int32)id); bool enabled = set.IsGaugeEnabled(id); writer.Write(enabled); Log.Detail("window state written for window id " + id + ": " + enabled); } }
private void WriteWindowPositions(BinaryWriter writer, GaugeSet set) { Log.Info("storing window positions"); writer.Write((Int16)set.Count()); Log.Detail("writing " + set.Count() + " window positions"); foreach (int id in set.Keys()) { Pair <int, int> position = set.GetWindowPosition(id); writer.Write((Int32)id); writer.Write((Int16)position.first); writer.Write((Int16)position.second); Log.Trace("window position for window id " + id + " written: " + position.first + "/" + position.second); } }
private void WriteGaugesEnabled(BinaryWriter writer, GaugeSet set) { Log.Info("storing gauges enabled/disabled states for gauge set " + set); writer.Write((Int16)set.Count()); Log.Detail("writing " + set.Count() + " gauge states"); foreach (int id in set.Keys()) { // never write the aligment gauge if (id == Constants.WINDOW_ID_GAUGE_ALIGNMENT) { continue; } // writer.Write((Int32)id); bool enabled = set.IsGaugeEnabled(id); writer.Write(enabled); Log.Trace("window state written for window id " + id + ": " + enabled); } }
private void WriteWindowPositions(BinaryWriter writer, GaugeSet set) { Log.Info("storing window positions"); writer.Write((Int16)set.Count()); Log.Detail("writing " + set.Count() + " window positions"); foreach (int id in set.Keys()) { // never write the aligment gauge if (id == Constants.WINDOW_ID_GAUGE_ALIGNMENT) { continue; } // Pair <int, int> position = set.GetWindowPosition(id); writer.Write((Int32)id); writer.Write((Int16)position.first); writer.Write((Int16)position.second); Log.Trace("window position for window id " + id + " written: " + position.first + "/" + position.second); } }