Skip to content
This repository has been archived by the owner on Jun 9, 2018. It is now read-only.

Commit

Permalink
Removed some useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
Swizzy committed May 17, 2015
1 parent bb08d91 commit c79fed4
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 25 deletions.
3 changes: 0 additions & 3 deletions AuroraAssetEditor/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Startup="AppStart">
<Application.Resources>

</Application.Resources>
</Application>
1 change: 0 additions & 1 deletion AuroraAssetEditor/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public partial class App {
Icon.ExtractAssociatedIcon(Path.Combine(Path.GetDirectoryName(Assembly.GetAssembly(typeof(App)).Location), Path.GetFileName(Assembly.GetAssembly(typeof(App)).Location)));

internal static readonly ImageSource WpfIcon = Imaging.CreateBitmapSourceFromHIcon(Icon.Handle, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());
internal static XboxUnity.XboxUnityTitle[] TitleCache;

private void AppStart(object sender, StartupEventArgs e) { new MainWindow(e.Args).Show(); }
}
Expand Down
21 changes: 0 additions & 21 deletions AuroraAssetEditor/Classes/XboxUnity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,9 @@ namespace AuroraAssetEditor.Classes {

internal static class XboxUnity {
private static readonly DataContractJsonSerializer Serializer = new DataContractJsonSerializer(typeof(UnityResponse[]));
private static readonly DataContractJsonSerializer CacheSerializer = new DataContractJsonSerializer(typeof(XboxUnityTitle[]));

private static string GetUnityUrl(string searchTerm) { return string.Format("http://xboxunity.net/api/Covers/{0}", HttpUtility.UrlEncode(searchTerm)); }

public static XboxUnityAsset[] GetUnityCoverInfo(int titleId) {
using(var wc = new WebClient()) {
var stream = wc.OpenRead(GetUnityUrl(titleId.ToString("X8")));
return stream != null ? ((UnityResponse[])Serializer.ReadObject(stream)).Select(t => new XboxUnityAsset(t)).ToArray() : new XboxUnityAsset[0];
}
}

public static XboxUnityAsset[] GetUnityCoverInfo(string searchTerm) {
using(var wc = new WebClient()) {
try {
Expand Down Expand Up @@ -102,18 +94,5 @@ public class XboxUnityAsset {
return string.Format(_unityResponse.Official ? "Official cover for {0} Rating: {1}" : "Cover for {0} Rating: {1}", _unityResponse.Name, _unityResponse.Rating ?? "N/A");
}
}

[DataContract] public class XboxUnityTitle {
public XboxUnityTitle(int titleId, string titleName) {
Title = titleName;
TitleId = titleId.ToString("X08");
}

[DataMember(Name = "titleid")] public string TitleId { get; set; }

[DataMember(Name = "title")] public string Title { get; set; }

public override string ToString() { return string.Format("{0}: {1}", TitleId, Title); }
}
}
}

0 comments on commit c79fed4

Please sign in to comment.