コード例 #1
0
        private void UpdateRecentsList(string path)
        {
            if (string.IsNullOrEmpty(path))
            {
                return;
            }

            int idx;

            if ((idx = RecentsList.IndexOf(path)) != -1)
            {
                RecentsList.RemoveAt(idx);
            }
            RecentsList.Insert(0, path);
            while (RecentsList.Count > 10)
            {
                RecentsList.RemoveAt(10);
            }
        }
コード例 #2
0
        private async void MainWindow_OnLoaded(object sender, RoutedEventArgs e)
        {
            if (Settings.Default.MRU_List != null)
            {
                foreach (var s in Settings.Default.MRU_List)
                {
                    RecentsList.Add(s);
                }
            }
            if (Settings.Default.CheckUpdatesOnStartup)
            {
                bool hasUpdates = await Update.CheckUpdateAvailable();

                if (hasUpdates)
                {
                    MessageBox.Show(MainResources.Message_UpdateAvailable,
                                    WINDOW_TITLE,
                                    MessageBoxButton.OK,
                                    MessageBoxImage.Information);
                }
            }
        }
コード例 #3
0
 private void MainWindow_OnClosed(object sender, EventArgs e)
 {
     Settings.Default.MRU_List = RecentsList.ToArray();
 }