diff --git a/SourceGen/MainController.cs b/SourceGen/MainController.cs index ab4aa30..e9f1f23 100644 --- a/SourceGen/MainController.cs +++ b/SourceGen/MainController.cs @@ -1350,6 +1350,8 @@ namespace SourceGen { mGenerationLog = null; + UpdateTitle(); + // Not necessary, but it lets us check the memory monitor to see if we got // rid of everything. GC.Collect(); diff --git a/SourceGen/WpfGui/MainWindow.xaml b/SourceGen/WpfGui/MainWindow.xaml index 609033c..313fc9e 100644 --- a/SourceGen/WpfGui/MainWindow.xaml +++ b/SourceGen/WpfGui/MainWindow.xaml @@ -585,21 +585,23 @@ limitations under the License. Command="{StaticResource NewProjectCmd}"/> - diff --git a/SourceGen/WpfGui/MainWindow.xaml.cs b/SourceGen/WpfGui/MainWindow.xaml.cs index 8445688..84ab973 100644 --- a/SourceGen/WpfGui/MainWindow.xaml.cs +++ b/SourceGen/WpfGui/MainWindow.xaml.cs @@ -1436,22 +1436,58 @@ namespace SourceGen.WpfGui { } } + public Visibility RecentProjectVisibility1 { + get { return mRecentProjectVisibility1; } + set { mRecentProjectVisibility1 = value; OnPropertyChanged(); } + } + private Visibility mRecentProjectVisibility1; + + public string RecentProjectName1 { + get { return mRecentProjectName1; } + set { mRecentProjectName1 = value; OnPropertyChanged(); } + } + private string mRecentProjectName1; + + public string RecentProjectPath1 { + get { return mRecentProjectPath1; } + set { mRecentProjectPath1 = value; OnPropertyChanged(); } + } + private string mRecentProjectPath1; + + public Visibility RecentProjectVisibility2 { + get { return mRecentProjectVisibility2; } + set { mRecentProjectVisibility2 = value; OnPropertyChanged(); } + } + private Visibility mRecentProjectVisibility2; + + public string RecentProjectName2 { + get { return mRecentProjectName2; } + set { mRecentProjectName2 = value; OnPropertyChanged(); } + } + private string mRecentProjectName2; + + public string RecentProjectPath2 { + get { return mRecentProjectPath2; } + set { mRecentProjectPath2 = value; OnPropertyChanged(); } + } + private string mRecentProjectPath2; + public void UpdateRecentLinks() { List pathList = mMainCtrl.RecentProjectPaths; if (pathList.Count >= 1) { - recentProjectName1.Text = Path.GetFileName(pathList[0]); - recentProjectButton1.Visibility = Visibility.Visible; + RecentProjectPath1 = pathList[0]; + RecentProjectName1 = Path.GetFileName(pathList[0]); + RecentProjectVisibility1 = Visibility.Visible; } else { - recentProjectName1.Text = string.Empty; - recentProjectButton1.Visibility = Visibility.Collapsed; + RecentProjectVisibility1 = Visibility.Collapsed; } if (pathList.Count >= 2) { - recentProjectName2.Text = Path.GetFileName(pathList[1]); - recentProjectButton2.Visibility = Visibility.Visible; + RecentProjectPath2 = pathList[1]; + RecentProjectName2 = Path.GetFileName(pathList[1]); + RecentProjectVisibility2 = Visibility.Visible; } else { - recentProjectName2.Text = string.Empty; - recentProjectButton2.Visibility = Visibility.Collapsed; + RecentProjectVisibility2 = Visibility.Collapsed; } }