From bdcf46598a3fa4ccdd3b2e0dd4c8ec9961bfda3d Mon Sep 17 00:00:00 2001 From: luni64 <12611497+luni64@users.noreply.github.com> Date: Thu, 12 Aug 2021 07:12:27 +0200 Subject: [PATCH 1/2] Work on cloning core libraries --- .../ViewModel/ProjectTab/ProjectTabVM.cs | 13 +++- VisualTeensy/Views/ProjectTab.xaml | 62 +++++++++++-------- vtCore/Implementation/Project.cs | 1 + vtCore/Interfaces/IProject.cs | 16 ++--- 4 files changed, 58 insertions(+), 34 deletions(-) diff --git a/VisualTeensy/ViewModel/ProjectTab/ProjectTabVM.cs b/VisualTeensy/ViewModel/ProjectTab/ProjectTabVM.cs index 4f4bf79..6089dd6 100644 --- a/VisualTeensy/ViewModel/ProjectTab/ProjectTabVM.cs +++ b/VisualTeensy/ViewModel/ProjectTab/ProjectTabVM.cs @@ -76,6 +76,14 @@ void doClose(object o) { // model.saveSettings(); } + + public RelayCommand cmdCoreSelected { get; private set; } + void doCoreSelected(object o) + { + project.coreStrategy = (CoreStrategies)o; + } + + #endregion #region Properties ---------------------------------------------------- @@ -95,7 +103,7 @@ public BoardVM selectedBoard } - public bool isMakefileBuild => project.buildSystem == BuildSystem.makefile; + public bool isMakefileBuild => project.buildSystem == BuildSystem.makefile; // set // { // if (value != project.isMakefileBuild) @@ -106,7 +114,7 @@ public BoardVM selectedBoard // } //} - + public bool quickSetup { get => project.selectedConfiguration.setupType == SetupTypes.quick ? true : false; @@ -299,6 +307,7 @@ public ProjectTabVM(IProject project, LibManager libManager, SetupData setup) cmdGenerate = new RelayCommand(doGenerate);//, o => project.pathError == null && !String.IsNullOrWhiteSpace(project.selectedConfiguration.makefile) && !String.IsNullOrWhiteSpace(project.tasks_json) && !String.IsNullOrWhiteSpace(project.props_json)); cmdClose = new RelayCommand(doClose); + cmdCoreSelected = new RelayCommand(doCoreSelected); updateBoards(); } diff --git a/VisualTeensy/Views/ProjectTab.xaml b/VisualTeensy/Views/ProjectTab.xaml index a57744a..44fa4a3 100644 --- a/VisualTeensy/Views/ProjectTab.xaml +++ b/VisualTeensy/Views/ProjectTab.xaml @@ -1,24 +1,26 @@  +mc:Ignorable="d" + +d:DataContext="{d:DesignInstance vm:ProjectTabVM, IsDesignTimeCreatable=False}" +d:DesignHeight="800" d:DesignWidth="1000"> + @@ -45,7 +47,7 @@ xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes" - + @@ -97,15 +99,25 @@ xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes" --> -