From 350b13c41045364120105b6d24a782e21901884f Mon Sep 17 00:00:00 2001 From: Aleksandar Toplek Date: Wed, 7 Jan 2015 05:31:05 +0100 Subject: [PATCH 1/6] Bumped version to 1.2 --- .../SparkiyClient.Windows/Package.appxmanifest | 2 +- .../SparkiyClient.Windows/Properties/AssemblyInfo.cs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SparkiyClient/SparkiyClient/SparkiyClient.Windows/Package.appxmanifest b/SparkiyClient/SparkiyClient/SparkiyClient.Windows/Package.appxmanifest index 859c2b7..6ccd120 100644 --- a/SparkiyClient/SparkiyClient/SparkiyClient.Windows/Package.appxmanifest +++ b/SparkiyClient/SparkiyClient/SparkiyClient.Windows/Package.appxmanifest @@ -1,6 +1,6 @@  - + Sparkiy Aleksandar Toplek diff --git a/SparkiyClient/SparkiyClient/SparkiyClient.Windows/Properties/AssemblyInfo.cs b/SparkiyClient/SparkiyClient/SparkiyClient.Windows/Properties/AssemblyInfo.cs index 9275df4..320c297 100644 --- a/SparkiyClient/SparkiyClient/SparkiyClient.Windows/Properties/AssemblyInfo.cs +++ b/SparkiyClient/SparkiyClient/SparkiyClient.Windows/Properties/AssemblyInfo.cs @@ -5,12 +5,12 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("SparkiyClient.Windows")] +[assembly: AssemblyTitle("Sparkiy for Windows")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] +[assembly: AssemblyCompany("Sparkiy")] [assembly: AssemblyProduct("SparkiyClient.Windows")] -[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyCopyright("Copyright © Sparkiy 2014")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -24,6 +24,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.2.0.0")] +[assembly: AssemblyFileVersion("1.2.0.0")] [assembly: ComVisible(false)] \ No newline at end of file From 0a7245d9948653263388d3993e75b1f85adfdfa5 Mon Sep 17 00:00:00 2001 From: Aleksandar Toplek Date: Wed, 7 Jan 2015 05:36:55 +0100 Subject: [PATCH 2/6] Fixed DebugPage bug --- .../ViewModels/DebugPageViewModel.cs | 26 +++++++++++++++++-- .../Views/DebugPage.xaml.cs | 14 +++------- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/SparkiyClient/SparkiyClient.UILogic.Windows/ViewModels/DebugPageViewModel.cs b/SparkiyClient/SparkiyClient.UILogic.Windows/ViewModels/DebugPageViewModel.cs index 84b1e86..bb0dcd4 100644 --- a/SparkiyClient/SparkiyClient.UILogic.Windows/ViewModels/DebugPageViewModel.cs +++ b/SparkiyClient/SparkiyClient.UILogic.Windows/ViewModels/DebugPageViewModel.cs @@ -2,6 +2,7 @@ using System.Collections.ObjectModel; using System.Threading.Tasks; using Windows.UI.Xaml; +using Windows.UI.Xaml.Navigation; using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Views; using SparkiyClient.Common; @@ -31,6 +32,7 @@ public interface IDebugPageViewModel public class DebugPageViewModel : ExtendedViewModel, IDebugPageViewModel { + private readonly IProjectService projectService; private readonly INavigationService navigationService; private IProjectPlayEngineManagement projectPlayEngineManager; private IProjectPlayStateManagment projectPlayStateManager; @@ -39,8 +41,9 @@ public class DebugPageViewModel : ExtendedViewModel, IDebugPageViewModel private DispatcherTimer messagesCheckTimer; - public DebugPageViewModel(INavigationService navigationService) + public DebugPageViewModel(IProjectService projectService, INavigationService navigationService) { + this.projectService = projectService; this.navigationService = navigationService; this.messagesCheckTimer = new DispatcherTimer(); @@ -52,6 +55,22 @@ public DebugPageViewModel(INavigationService navigationService) this.NavigateToEditorCommand = new RelayCommand(this.NavigateToEditorCommandExecute); } + public async override void OnNavigatedTo(NavigationEventArgs e) + { + base.OnNavigatedTo(e); + + // Retrieve passed project + var project = e.Parameter as Project; + if (project == null) + throw new NullReferenceException("Passed data is not in expected format."); + + // Load project + await project.LoadAsync(this.projectService); + + // Assign the project to the engine + await this.AssignProjectAsync(project); + } + private void NavigateToEditorCommandExecute() { this.navigationService.GoBack(); @@ -85,8 +104,11 @@ public void AssignProjectPlayStateManager(IProjectPlayStateManagment projectPlay public async Task AssignProjectAsync(Project project) { this.project = project; + + // Assign project to the engine this.projectPlayEngineManager.AssignProject(this.project); + // Run the project this.projectPlayStateManager.PlayProject(); } @@ -103,7 +125,7 @@ public async Task AssignProjectAsync(Project project) public sealed class DebugPageViewModelDesignTime : DebugPageViewModel { - public DebugPageViewModelDesignTime() : base(null) + public DebugPageViewModelDesignTime() : base(null, null) { this.OutputMessages.Add(new EngineMessage() { Message = "Test1" }); this.OutputMessages.Add(new EngineMessage() { Message = "Test2" }); diff --git a/SparkiyClient/SparkiyClient/SparkiyClient.Windows/Views/DebugPage.xaml.cs b/SparkiyClient/SparkiyClient/SparkiyClient.Windows/Views/DebugPage.xaml.cs index d8fdfbb..5c2e317 100644 --- a/SparkiyClient/SparkiyClient/SparkiyClient.Windows/Views/DebugPage.xaml.cs +++ b/SparkiyClient/SparkiyClient/SparkiyClient.Windows/Views/DebugPage.xaml.cs @@ -36,15 +36,8 @@ public DebugPage() } - protected override async void OnNavigatedTo(NavigationEventArgs e) + protected override void OnNavigatedTo(NavigationEventArgs e) { - base.OnNavigatedTo(e); - - // Retrieve passed project - var project = e.Parameter as Project; - if (project == null) - throw new NullReferenceException("Passed data is not in expected format."); - // Assign play engine this.ViewModel.AssignProjectPlayEngineManager(this.PlayView); @@ -52,11 +45,10 @@ protected override async void OnNavigatedTo(NavigationEventArgs e) this.ViewModel.AssignProjectPlayStateManager(this.PlayView); this.PlaybackControlsControl.AssignPlayStateManager(this.PlayView); - // Assign project - await this.ViewModel.AssignProjectAsync(project); - // Watch output messages changes this.ViewModel.OutputMessages.CollectionChanged += OutputMessagesOnCollectionChanged; + + base.OnNavigatedTo(e); } private void OutputMessagesOnCollectionChanged(object sender, NotifyCollectionChangedEventArgs notifyCollectionChangedEventArgs) From f7e03f12c8e02f045b0df5f6646bbe04ef0d2ceb Mon Sep 17 00:00:00 2001 From: Aleksandar Toplek Date: Wed, 7 Jan 2015 05:44:01 +0100 Subject: [PATCH 3/6] Fixed file creation popup bug --- .../SparkiyClient.Windows/Views/EditPage.xaml | 99 ++++++++++--------- 1 file changed, 50 insertions(+), 49 deletions(-) diff --git a/SparkiyClient/SparkiyClient/SparkiyClient.Windows/Views/EditPage.xaml b/SparkiyClient/SparkiyClient/SparkiyClient.Windows/Views/EditPage.xaml index c99bd32..9ae2da0 100644 --- a/SparkiyClient/SparkiyClient/SparkiyClient.Windows/Views/EditPage.xaml +++ b/SparkiyClient/SparkiyClient/SparkiyClient.Windows/Views/EditPage.xaml @@ -110,7 +110,7 @@ - + @@ -163,27 +163,27 @@ FontFamily="Segoe UI" FontWeight="Light" FontSize="32" Padding="0,0,0,8" Margin="0" /> - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + From 715dc34cc63286840f15a6932a87a41a98c51187 Mon Sep 17 00:00:00 2001 From: Aleksandar Toplek Date: Wed, 7 Jan 2015 07:08:53 +0100 Subject: [PATCH 4/6] Fixed string syntax highlighting --- .../Controls/CodeEditor/Languages/LuaGrammer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SparkiyClient/SparkiyClient/SparkiyClient.Shared/Controls/CodeEditor/Languages/LuaGrammer.cs b/SparkiyClient/SparkiyClient/SparkiyClient.Shared/Controls/CodeEditor/Languages/LuaGrammer.cs index 1d7eb1c..7badc2b 100644 --- a/SparkiyClient/SparkiyClient/SparkiyClient.Shared/Controls/CodeEditor/Languages/LuaGrammer.cs +++ b/SparkiyClient/SparkiyClient/SparkiyClient.Shared/Controls/CodeEditor/Languages/LuaGrammer.cs @@ -31,8 +31,8 @@ public LuaGrammer() new GrammerRule(TokenType.Identifier, new Regex(@"^[a-z_]\w*")), // String Marker - new GrammerRule(TokenType.String, new Regex(@"^\[(=*)\[[\s\S]*?(?:\]\1\]|$)", RegexOptions.IgnoreCase | RegexOptions.Multiline)), - new GrammerRule(TokenType.String, new Regex("^(?:\\\"(?:[^\"\\]|\\[\\s\\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\\s\\S])*(?:\'|$))", RegexOptions.IgnoreCase | RegexOptions.Singleline)), + new GrammerRule(TokenType.String, new Regex(@"^(?:\[(=*)\[[\s\S]*?(?:\]\1\]|$)|[^\r\n]*)[-]*", RegexOptions.IgnoreCase | RegexOptions.Multiline)), + new GrammerRule(TokenType.String, new Regex(@"^([""'])(?:\\\1|.)*?\1", RegexOptions.IgnoreCase | RegexOptions.Singleline)), }; Keywords = new string[] From 7a22d073e19dbe57de4f564fd9ccd99a61c66e51 Mon Sep 17 00:00:00 2001 From: Aleksandar Toplek Date: Wed, 7 Jan 2015 07:33:04 +0100 Subject: [PATCH 5/6] Real fix for string syntax highlighting --- .../Controls/CodeEditor/Languages/LuaGrammer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SparkiyClient/SparkiyClient/SparkiyClient.Shared/Controls/CodeEditor/Languages/LuaGrammer.cs b/SparkiyClient/SparkiyClient/SparkiyClient.Shared/Controls/CodeEditor/Languages/LuaGrammer.cs index 7badc2b..8611ab0 100644 --- a/SparkiyClient/SparkiyClient/SparkiyClient.Shared/Controls/CodeEditor/Languages/LuaGrammer.cs +++ b/SparkiyClient/SparkiyClient/SparkiyClient.Shared/Controls/CodeEditor/Languages/LuaGrammer.cs @@ -31,8 +31,8 @@ public LuaGrammer() new GrammerRule(TokenType.Identifier, new Regex(@"^[a-z_]\w*")), // String Marker - new GrammerRule(TokenType.String, new Regex(@"^(?:\[(=*)\[[\s\S]*?(?:\]\1\]|$)|[^\r\n]*)[-]*", RegexOptions.IgnoreCase | RegexOptions.Multiline)), - new GrammerRule(TokenType.String, new Regex(@"^([""'])(?:\\\1|.)*?\1", RegexOptions.IgnoreCase | RegexOptions.Singleline)), + new GrammerRule(TokenType.String, new Regex(@"^(?:\""(?:[^\""\\]|\\[\s\S])*(?:\""|$)|\'(?:[^\'\\]|\\[\s\S])*(?:\'|$))", RegexOptions.IgnoreCase | RegexOptions.Singleline)), + new GrammerRule(TokenType.String, new Regex(@"^\[(=*)\[[\s\S]*?(?:\]\1\]|$)", RegexOptions.IgnoreCase | RegexOptions.Multiline)), }; Keywords = new string[] From 89a91c8a5ed40e29421d20cae66cdfd5fd0cc684 Mon Sep 17 00:00:00 2001 From: Aleksandar Toplek Date: Wed, 7 Jan 2015 07:38:07 +0100 Subject: [PATCH 6/6] Fixed hit test bug on sidebar shadow --- .../SparkiyClient.Shared/Controls/SideBar/SideBarControl.xaml | 1 + 1 file changed, 1 insertion(+) diff --git a/SparkiyClient/SparkiyClient/SparkiyClient.Shared/Controls/SideBar/SideBarControl.xaml b/SparkiyClient/SparkiyClient/SparkiyClient.Shared/Controls/SideBar/SideBarControl.xaml index d36e300..659d580 100644 --- a/SparkiyClient/SparkiyClient/SparkiyClient.Shared/Controls/SideBar/SideBarControl.xaml +++ b/SparkiyClient/SparkiyClient/SparkiyClient.Shared/Controls/SideBar/SideBarControl.xaml @@ -64,6 +64,7 @@