public ContentViewModel(IMessanger messanger) { //logger.Info("asd"); messanger.Subscribe <string>(OnMessageArrived).ExecuteOn(MessageProcessingThread.Dispatcher); Button = new DummyCommand(this, messanger); base.Title = "asd"; Items = new ObservableCollection <string>(new[] { "-- All --", "Anna", "annie", "cookie", "lolo test" }); Reset = new ResetKey(); }
public XmlElement ToXml(XmlDocument document, string name = "HotkeyProfile") { var parent = document.CreateElement(name); var splitKey = document.CreateElement("SplitKey"); if (SplitKey != null) { splitKey.InnerText = SplitKey.ToString(); } parent.AppendChild(splitKey); var resetKey = document.CreateElement("ResetKey"); if (ResetKey != null) { resetKey.InnerText = ResetKey.ToString(); } parent.AppendChild(resetKey); var skipKey = document.CreateElement("SkipKey"); if (SkipKey != null) { skipKey.InnerText = SkipKey.ToString(); } parent.AppendChild(skipKey); var undoKey = document.CreateElement("UndoKey"); if (UndoKey != null) { undoKey.InnerText = UndoKey.ToString(); } parent.AppendChild(undoKey); var pauseKey = document.CreateElement("PauseKey"); if (PauseKey != null) { pauseKey.InnerText = PauseKey.ToString(); } parent.AppendChild(pauseKey); var toggleKey = document.CreateElement("ToggleGlobalHotkeys"); if (ToggleGlobalHotkeys != null) { toggleKey.InnerText = ToggleGlobalHotkeys.ToString(); } parent.AppendChild(toggleKey); var switchComparisonPrevious = document.CreateElement("SwitchComparisonPrevious"); if (SwitchComparisonPrevious != null) { switchComparisonPrevious.InnerText = SwitchComparisonPrevious.ToString(); } parent.AppendChild(switchComparisonPrevious); var switchComparisonNext = document.CreateElement("SwitchComparisonNext"); if (SwitchComparisonNext != null) { switchComparisonNext.InnerText = SwitchComparisonNext.ToString(); } parent.AppendChild(switchComparisonNext); CreateSetting(document, parent, "GlobalHotkeysEnabled", GlobalHotkeysEnabled); CreateSetting(document, parent, "DeactivateHotkeysForOtherPrograms", DeactivateHotkeysForOtherPrograms); CreateSetting(document, parent, "DoubleTapPrevention", DoubleTapPrevention); CreateSetting(document, parent, "HotkeyDelay", HotkeyDelay); return(parent); }