mirror of
https://onedev.site.tesses.net/crosslang/crosslangdevstudio
synced 2026-02-08 09:15:45 +00:00
New dev build
This commit is contained in:
@@ -122,7 +122,12 @@ public partial class MainWindowViewModel : ViewModelBase
|
||||
|
||||
OpenProjectConfig();
|
||||
}),
|
||||
new ProjectFileNode("Packages")
|
||||
new ProjectFileNode("Packages", ()=>{
|
||||
OpenProjectPackages();
|
||||
}),
|
||||
new ProjectFileNode("Project Dependencies",()=>{
|
||||
|
||||
})
|
||||
])
|
||||
|
||||
};
|
||||
@@ -151,6 +156,33 @@ public partial class MainWindowViewModel : ViewModelBase
|
||||
ProjectFiles.Add(new ProjectFileNode(Path.GetFileName(obj), entries));
|
||||
}
|
||||
|
||||
private void OpenProjectPackages()
|
||||
{
|
||||
if (Directory.Exists(CurrentProject))
|
||||
{
|
||||
var config = Path.Combine(CurrentProject, "cross.json");
|
||||
if (File.Exists(config))
|
||||
{
|
||||
foreach (var item in TabItems)
|
||||
{
|
||||
if (item.Body is PackageManagerViewModel vm)
|
||||
{
|
||||
if (vm.Packages is ProjectPackageManager)
|
||||
{
|
||||
SelectedTab = item;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
AddTab(new TabItemViewModel()
|
||||
{
|
||||
Header = "Project Packages",
|
||||
Body = new PackageManagerViewModel(this, new ProjectPackageManager(config))
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OpenProjectConfig()
|
||||
{
|
||||
|
||||
@@ -161,6 +193,7 @@ public partial class MainWindowViewModel : ViewModelBase
|
||||
{
|
||||
if (item.Body is ProjectConfigurationViewModel model && model.FilePath == config)
|
||||
{
|
||||
SelectedTab = item;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user