Esempio n. 1
0
        private void InitializeSaveSettingsOnMove(Window window)
        {
            const int OneSecond    = 1000;
            var       saveSettings = DebounceService.Debounce <Window>(w => SaveSettings(w), OneSecond);

            window.SizeChanged     += delegate { saveSettings(window); };
            window.LocationChanged += delegate { saveSettings(window); };
        }
Esempio n. 2
0
        private void SaveSettingsOnMove(Window window)
        {
            const int OneSecond    = 1000;
            var       saveSettings = DebounceService.Debounce <Window>(w => SaveSettings(w), OneSecond);

            window.SizeChanged     += (_, __) => saveSettings(window);
            window.LocationChanged += (_, __) => saveSettings(window);
        }