Thursday, November 1, 2012

File downloading and handling in Windows 8 Store Apps C# (RT)

With every new Microsoft platform comes a slightly different way to handle downloading and streaming files and Windows 8 is no exception.

I had to do a bit of research to figure out how to download and break open files so I thought I'd share my findings.


Downloading files to the local Storage:

//the location of the file to download
string myURL = "http://www.somesite.com/filetoget.txt";

HttpClient client = new HttpClient { MaxResponseContentBufferSize = 100000 };

byte[] myData = await client.GetByteArrayAsync(myURL);

var localFolder = Windows.Storage.ApplicationData.Current.localFolder;

Storage file = await localFolder.CreateFileAsync("myfile.txt");

await FileIO.WriteBytesAsync(file, myData);



Reading a text from Local Storage:

var localFolder = Windows.Storage.ApplicationData.Current.LocalFolder;

StorageFile file = await localFolder.GetFileAsync("myfile.txt");

string contents = await FileIO.ReadTextAsync(file);



Feel free to place questions in the comments

Cheers!

More Info:
http://msdn.microsoft.com/en-us/library/windows/apps/xaml/Hh758325(v=win.10).aspx

Thursday, August 30, 2012

Quick Tips for Re-installing Windows

This isn't a guide as much as bit of useful information if/when you need to fix your Windows 7 installation.

First - if you can't find your Microsoft product key(s), ProduKey is great product for extracting the keys from your system.  This should work for most Microsoft products: http://www.nirsoft.net/utils/product_cd_key_viewer.html

Second - if you can't find your Windows DVD and you need to burn a new one, here's a mostly legal list of downloads:
http://www.mydigitallife.info/download-windows-7-iso-official-32-bit-and-64-bit-direct-download-links/

The last thing I'll mention, you can do an "upgrade" install overtop of any Windows 7 version with the same version.  This will "freshen" Windows while leaving all of your programs installed and documents in place.

I'd still recommend a backup before starting anything.

Tuesday, June 26, 2012

MonoDevelop 3.0 log files filing hard rive in OSX Lion

I've hit this issue a couple of times recently so I thought I'd share what I've discovered.

I've been using MonoTouch on my Mac Mini running OSX Lion (10.7.4) and I've ran out of disk space on my primary harddrive twice.

After a little research it appears that MonoDevelop is writing massive corrupted log files.  I haven't figured out how to stop the problem but the quick fix to free up your disk space is to:

Open Finder
Go to (your harddrive\Users\(your username)\Library\Logs
Delete the MonoDevelop-3.0 folder.  You may also want to delete log files for previous versions of MonoDevelop - this can all be done safely.

This morning I had two files over 25gig wasting space.


If I find a solution to stop the log files being created I'll update this post.  Strangely this is only happening on one of our three primary developement machines so it might be related to another issue.

Tuesday, June 19, 2012

iPhone/iPad Calc Pro manual now available through iBooks

Just a quick note for Calc Pro users, you can now download the updated manual free of charge on your  iPad.

If you find it useful please take a minute and give it a rating as well.

Additionally, if you're looking for a PDF version, you can send an e-mail to support@panoramicsoft.com to get a download link.

http://itunes.apple.com/us/book/how-to-use-calc-pro/id522783170?mt=11

iOS (iPhone/iPad) icon sizes and names explained

So each device type/size combination should have 2 icons:
the Application icon
the Spotlight/Settings icon


Additionally you should have an iTunesArtwork File but its not required.  Technically the only "required" icon is the Application icon.

Original iPhone/3/3s/iPod Touch icon sizes and names:
Icon.png (57x57)
Icon-Small.png (29x29)

For Retina icons for the iPhones & iPods we double the resolution in both directions and add "@2x" to the name
Icon@2x.png(114x114)
Icon-Small@2x.png (58x58)

For the iPad 1 & 2 we need the same icons but they have different naming requirements
Icon-72.png (72x72)
Icon-Small-50.png (50x50)

And again, for the new retina iPad we need to make "@2x" versions so
Icon-72@2x.png (144x144)
Icon-Small-50@2x.png (100x100)


So, for a complete universal app that supports all screen sizes you want to create:
Icon-Small.png (29x29)
Icon-Small-50.png (50x50)
Icon.png (57x57)
Icon-Small@2x.png (58x58)
Icon-72.png (72x72)
Icon-Small-50@2x.png (100x100)
Icon@2x.png (114x114)
Icon-72@2x.png (144x144)


Additionally you'll probably want to make the iTunes Artwork icons
iTunesArtwork.png (512x512)
iTunesArtwork@2x.png (1024x1024)







Saturday, May 26, 2012

Mono for Android Installation problems on Windows 7 with VS 2011 Beta installed

I just recently decided to experiment with Mono for Android (www.xamarin.com).  I had no problems installing it on my Mac Mini running Lion but I had no luck with my Windows 7 laptop.

The installation would appear to complete successfully, and I would see the SDK from within MonoDevelop but as soon as I'd try to create a project I would get the pop-up stating "Mono For Android is not Installed."

Additionally, every time I ran the Mono for Android installer it would tell me it wasn't install (but all other prereqs installed correctly).

After several re-installs I noticed devenv.exe for Visual Studio 2011 Beta was constantly running. 

So I'll cut to the end, I needed to fully uninstall Visual Studio 2011 Beta, uninstall Mono for Android, and then re-install.

Now everything works great.

For reference I'm running Windows 7 Professional 64, I have Visual Studio 2010 Ultimate installed (thank you Bizspark) and I installed Mono for Android 4.2.2.

Happy coding!

Wednesday, April 18, 2012

Panoramic Calc Pro Manual for iPhone & iPad


The manual for the iOS version of Panoramic Calc Pro has been updated and is available on the Panoramic Software website. You can get the pdf version here: http://www.panoramicsoft.com/iphone/calcpro/CalcPro.php
The manual is current as of version 3.6.6. If you're using the Windows Phone 7 version this document should be about 90% accurate.