Skip to content

Commit

Permalink
Merge pull request #78 from Sparkiy/development
Browse files Browse the repository at this point in the history
v1.5.0
  • Loading branch information
AleksandarDev committed Feb 4, 2015
2 parents e61156d + 9608c52 commit d897ecb
Show file tree
Hide file tree
Showing 75 changed files with 2,971 additions and 427 deletions.
4 changes: 4 additions & 0 deletions Changelogs/WindowsStore/1.3.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
version: "1.3.0",
releaseDate: "2015.01.19"
}
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Sparkiy
_[Sparkiy/sparkiy-client](https://github.com/Sparkiy/sparkiy-client)_

[![Windows Store](https://ci.appveyor.com/api/projects/status/gvxevc5yih5oodnn/branch/master?svg=true&pendingText=Windows Store: pending...&passingText=Windows Store: OK&failingText=Windows Store: failed)](https://ci.appveyor.com/project/AleksandarDev/sparkiy-client/branch/master)
[![GratiPay Tips](https://img.shields.io/gratipay/sparkiy.svg?style=flat-square)](https://gratipay.com/sparkiy/)
[![Bountysource](https://www.bountysource.com/badge/team?team_id=54298&style=bounties_posted)](https://www.bountysource.com/teams/sparkiy-client/bounties?utm_source=sparkiy-client&utm_medium=shield&utm_campaign=bounties_posted)

Expand All @@ -17,8 +18,6 @@ Sparkiy is fully-featured platform for game and application development. Touch f

## Project status

[![Stories in Ready](https://badge.waffle.io/Sparkiy/sparkiy-client.png?label=ready&title=Tasks Ready)](https://waffle.io/Sparkiy/sparkiy-client)

| | master | beta | development | edge |
| ------------- | ------ | ---- | ----------- | ---- |
| Windows | [![master build status](https://ci.appveyor.com/api/projects/status/gvxevc5yih5oodnn/branch/master?svg=true&pendingText=pending...&passingText=OK&failingText=failed)](https://ci.appveyor.com/project/AleksandarDev/sparkiy-client/branch/master) | [![beta build status](https://ci.appveyor.com/api/projects/status/gvxevc5yih5oodnn/branch/beta?svg=true&pendingText=pending...&passingText=OK&failingText=failed)](https://ci.appveyor.com/project/AleksandarDev/sparkiy-client/branch/beta) | [![development build status](https://ci.appveyor.com/api/projects/status/gvxevc5yih5oodnn/branch/development?svg=true&pendingText=pending...&passingText=OK&failingText=failed)](https://ci.appveyor.com/project/AleksandarDev/sparkiy-client/branch/development) | [![edge build status](https://ci.appveyor.com/api/projects/status/gvxevc5yih5oodnn/branch/edge?svg=true&pendingText=pending...&passingText=OK&failingText=failed)](https://ci.appveyor.com/project/AleksandarDev/sparkiy-client/branch/edge) |
Expand Down
2 changes: 1 addition & 1 deletion SparkiyClient/SharpDX.Toolkit.Game.Direct2D
286 changes: 286 additions & 0 deletions SparkiyClient/SparkiyClient - Copy.sln

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using Windows.ApplicationModel;
using Windows.UI.Xaml;

namespace SparkiyClient.Common.Extensions
{
public static class ApplicationExtensions
{
public static string GetVersion(this Application @this, bool includeRevision = false)
{
var version = Package.Current.Id.Version;
return String.Format("{0}.{1}.{2}{3}",
version.Major,
version.Minor,
version.Build,
includeRevision ? "." + version.Revision : String.Empty);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
<Compile Include="Controls\ICodeEditor.cs" />
<Compile Include="Controls\IMessagesPopup.cs" />
<Compile Include="ExtendedViewModel.cs" />
<Compile Include="Extensions\ApplicationExtensions.cs" />
<Compile Include="Extensions\VisualTreeHelperExtensions.cs" />
<Compile Include="Helpers\DictionaryExtensions.cs" />
<Compile Include="Helpers\StorageFolderExtensions.cs" />
Expand Down
16 changes: 11 additions & 5 deletions SparkiyClient/SparkiyClient.UILogic/Models/ImageAsset.cs
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
using System;
using System.Threading.Tasks;
using Windows.Storage;
using Windows.UI.Xaml.Media.Imaging;
using MetroLog;

namespace SparkiyClient.UILogic.Models
{
public class ImageAsset : AssetWithData<BitmapImage>
public class ImageAsset : AssetWithData<WriteableBitmap>
{
private static readonly ILogger Log = LogManagerFactory.DefaultLogManager.GetLogger<ImageAsset>();

/// <summary>
/// Gets the data asynchronously from given path.
/// </summary>
/// <returns></returns>
#pragma warning disable 1998
public override async Task GetDataAsync()
{
this.Data = new BitmapImage(new Uri(this.Path, UriKind.Absolute));
Log.Debug("Loaded ImageAsset \"{0}\"", this.Name);
if (this.Data != null) return;

var imageFile = await StorageFile.GetFileFromPathAsync(this.Path);
var imageStream = await imageFile.OpenReadAsync();

this.Data = new WriteableBitmap(1, 1);
await this.Data.SetSourceAsync(imageStream);

Log.Debug("Loaded ImageAsset \"{0}\"", this.Name);
}
#pragma warning restore 1998
}
}
36 changes: 36 additions & 0 deletions SparkiyClient/SparkiyClient.UILogic/Models/News/Article.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SparkiyClient.Common;

namespace SparkiyClient.UILogic.Models.News
{
public class Article : ExtendedObservableObject
{
public object Summary
{
get { return this.GetProperty<object>(); }
set { this.SetProperty(value); }
}

public Action Action
{
get { return this.GetProperty<Action>(); }
set { this.SetProperty(value); }
}

public bool IsDismissed
{
get { return this.GetProperty<bool>(); }
set { this.SetProperty(value); }
}

public bool CanDismiss
{
get { return this.GetProperty<bool>(); }
set { this.SetProperty(value); }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<Compile Include="Models\ImageAsset.cs" />
<Compile Include="Models\ImageSources.cs" />
<Compile Include="Models\ImageReference.cs" />
<Compile Include="Models\News\Article.cs" />
<Compile Include="Models\Project.cs" />
<Compile Include="Models\Screenshot.cs" />
<Compile Include="Models\CodeFile.cs" />
Expand All @@ -80,7 +81,6 @@
<Compile Include="Services\StorageService.cs" />
<Compile Include="ViewModels\IViewModelBase.cs" />
<Compile Include="ViewModels\MainPageViewModel.cs" />
<Compile Include="ViewModels\PlaygroundPageViewModel.cs" />
<Compile Include="ViewModels\PlayPageViewModel.cs" />
<Compile Include="ViewModels\ProjectPageViewModel.cs" />
<Compile Include="ViewModels\ProjectViewModel.cs" />
Expand Down
32 changes: 22 additions & 10 deletions SparkiyClient/SparkiyClient.UILogic/ViewModels/MainPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Threading.Tasks;
using Windows.ApplicationModel;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Navigation;
using GalaSoft.MvvmLight.Command;
using GalaSoft.MvvmLight.Views;
using MetroLog;
using SparkiyClient.Common;
using SparkiyClient.Common.Extensions;
using SparkiyClient.UILogic.Models;
using SparkiyClient.UILogic.Services;
using INavigationService = SparkiyClient.UILogic.Services.INavigationService;
Expand All @@ -19,6 +21,8 @@ namespace SparkiyClient.UILogic.ViewModels
[ComVisible(false)]
public interface IMainPageViewModel : IViewModelBase
{
string CurrentVersion { get; }

bool RequiresWorkspaceInitialization { get; }

TimeSpan NextReleaseCountdown { get; }
Expand Down Expand Up @@ -58,17 +62,22 @@ public MainPageViewModel(INavigationService navigationService, IAlertMessageServ

this.InitializeWorkspaceCommand = new RelayCommand(this.InitializeWorkspaceCommandExecuteAsync);
this.ProjectSelectedCommand = new RelayCommand<Project>(this.ProjectSelectedCommandExecute);
this.NewProjectCommand = new RelayCommand(this.NewProjectCommandExecute);
this.NewProjectCommand = new RelayCommand(this.NewProjectCommandExecute, NewProjectCommandCanExecute);

this.NextReleaseCountdown = (new DateTime(2015, 1, 26, 0, 0, 0)) - DateTime.Now;
this.NextReleaseCountdown = (new DateTime(2015, 2, 9, 0, 0, 0)) - DateTime.Now;
this.nextReleaseCountdownTimer = new DispatcherTimer();
this.nextReleaseCountdownTimer.Interval = TimeSpan.FromSeconds(1);
this.nextReleaseCountdownTimer.Tick += NextReleaseCountdownTimerOnTick;
this.nextReleaseCountdownTimer.Start();
this.NextReleaseCountdownTimerOnTick(null, null);
}

public override async void OnNavigatedTo(NavigationEventArgs e)
private bool NewProjectCommandCanExecute()
{
return !this.RequiresWorkspaceInitialization;
}

public override async void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);

Expand Down Expand Up @@ -115,21 +124,22 @@ protected async void InitializeWorkspaceCommandExecuteAsync()
await this.storageService.InitializeStorageAsync();
this.RequiresWorkspaceInitialization = this.storageService.RequiresHardStorageInitialization();
await this.LoadProjectsAsync();
}
this.NewProjectCommand?.RaiseCanExecuteChanged();
}

public bool LoadingData
{
get { return this.GetProperty<bool>(defaultValue: true); }
protected set { this.SetProperty(value); }
}

public bool RequiresWorkspaceInitialization
{
get { return this.GetProperty<bool>(defaultValue: true); }
protected set { this.SetProperty(value); }
}
public bool RequiresWorkspaceInitialization
{
get { return this.GetProperty<bool>(defaultValue: true); }
protected set { this.SetProperty(value); }
}

public TimeSpan NextReleaseCountdown
public TimeSpan NextReleaseCountdown
{
get { return this.GetProperty<TimeSpan>(); }
protected set { this.SetProperty(value); }
Expand All @@ -141,6 +151,8 @@ public bool IsNextReleaseReady
protected set { this.SetProperty(value); }
}

public string CurrentVersion => Application.Current.GetVersion();

public RelayCommand InitializeWorkspaceCommand { get; }

public RelayCommand<Project> ProjectSelectedCommand { get; }
Expand Down

This file was deleted.

Loading

0 comments on commit d897ecb

Please sign in to comment.