コード例 #1
0
ファイル: Bootstrapper.cs プロジェクト: vbfox/AttachR
        private void ApplyPreferences()
        {
            var s           = new PreferencesSerializer();
            var preferences = s.Load();

            DisplayRootViewFor <MainViewModel>();

            RegisterKeyCombination((_, __) => aggregator.PublishOnUIThread(new RunAllCommand()), preferences.StartAllShortcut, "RunAll");
            RegisterKeyCombination((_, __) => aggregator.PublishOnUIThread(new DebugAllCommand()), preferences.DebugAllShortcut, "DebugAll");
            RegisterKeyCombination((_, __) => aggregator.PublishOnUIThread(new StopAllCommand()), preferences.StopAllShortcut, "StopAll");
        }
コード例 #2
0
ファイル: AgiPlayer.cs プロジェクト: kevinmel2000/AgiPlayer
        private Preferences ReadPreferences()
        {
            var preferences = new Preferences();

            var appFolder        = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            var settingsFilePath = Path.Combine(appFolder, "settings.xml");

            if (File.Exists(settingsFilePath))
            {
                PreferencesSerializer.LoadFrom(preferences, settingsFilePath);
            }

            return(preferences);
        }