Exemple #1
0
        protected override void DisposeViewModel()
        {
            this.viewModelMapping = null;
            base.DisposeViewModel();
            this.clientInputContext.Stop();
            this.clientInputContext = null;

            if (Instance == this)
            {
                Instance = null;
            }
        }
Exemple #2
0
        public ViewModelRebindKeyWindow(
            ViewModelButtonMappingControl viewModelMapping,
            bool isSecondaryKey,
            Action onClose)
        {
            this.viewModelMapping = viewModelMapping;
            this.buttonToRebind   = viewModelMapping.Button;

            this.onClose        = onClose;
            this.isSecondaryKey = isSecondaryKey;

            // ReSharper disable once CanExtractXamlLocalizableStringCSharp
            this.clientInputContext = ClientInputContext.Start("Key binding")
                                      .HandleAll(this.InputCallback);

            Instance = this;
        }