Showing posts with label Compact Framework. Show all posts
Showing posts with label Compact Framework. Show all posts

Friday, December 19, 2008

Exaustion...

So... i just delivered my assignment... i lost 3 weeks to nothing i guess... is just like a huge amount of code that does a lot of stuff in background, but it does little to be shown to user, so my guess is that i'll have a negative grade or something - teachers usually only look to the interface - go figure... Oh! And teacher requested us to do an webpage to show the work we have done... yeah... he can go to a certain place i know if he thinks we have time to do it.... Well, even if teacher allow to proceed the development in case of negative grade i won't do it, cos i simple have no time: i have to finish another work 'till 10th january (this includes a report and quite some code) and to study to finals (2 classes), not to forget my thesis (that is barelly started), so.... i'll just forget the pratical side of this class, and just study for the finals and do the other work. Yeah.. while unlikely, i'm angry and exausted both physically and mentally... so sorry if my english is not the best .... and sorry for rant about this ... but is better than yell it out loud.... That's all.... i'll just take some - very long - vacations over .NET and C#... now ... i only look to VHDL, C and javascript - they are like my puppies x3, VHDL to have stuff done in hardware, C to do just the stuff i like for most of the stuff, and JS to prototype algorithms or just mess around with browsers... >__>'' good old times.... Damn! I can't even draw now... my tablet is dead and i don't think i'll get a new one so soon.... *sigh* sorry again for the rant... bare with me while i yell at my problems ...

Wednesday, December 17, 2008

Working with .NET again

If you want a little piano for your Windows Mobile PDA you can get it here (copy-paste to install - works on WM2003 and later), it was made as a test for my sound control class, enjoy ;p Sorry for the 'bad' piano tones (it looks more like a guitar) but i didn't have time to mess with audacity and get a nice tone ... Well ... nothing else to report for now.... *goes back to work* PS: Well... today is my birthday... tsh ... i'm getting too old...

Sunday, December 7, 2008

DataSet.WriteXml

Let's talk about .NET Framework (Compact Framework to be more specific) .... again... After spent several hours trying to put my XML file control class to work properly i finnally had some success. When i saw the methods WriteXml and ReadXml for DataSet object i said to myself: "Zeca take a note here... this is pretty usefull!"... only for after a few minutes of coding bash to find out that it didn't quite work like i wanted... things is quite simple to be explained, at least the problem, i check if file exists (Sistem.IO.File.Exists(filepath) - or similar), if not, create a new one with default data on it, then return the data, if file exists, use ReadXML on DataSet and get the data... well ... this works pretty well, ok, now i loaded data into some forms (a settings form) then modify some and exit the form to main menu, when i exit i store the changes on DataSet, and do a WriteXml at the end, simple right? Well it works .... until you do the drill a second time.... it reads correctly, it calls WriteXml at exit, it seems to save the changes .... but it doesn't! Now my solution: Don't use the same DataSet! Create a new one, and yes i tried commitChanges methods before trying this solution... in the end this was the only thing that work. I don't know why this happens, anyway it could be a file open mode problem - when reading the information the file is openned in read mode, and later when writing on it, DataSet.WriteXML uses the same file handler to do the job... failing silently... If anyone had the same problem or know what i was/am doing wrong please fell free to comment it out. Thanks in advance. PS: I really start to hate ALL object oriented languages - not all object-able languages

Saturday, December 6, 2008

.NET Compact Framework experiences

Today i made my first custom control for .NET Compact Framework, nothing too fancy and mostly was copy-paste from msdn website. Well, it does the job and is compatible with Visual Studio interactive designer (that was the tricky part actually). A few days ago i made some experiences with sound on managed code, i found out an awsome class for playing .wav files, the API is just amazingly simple. System.Media.SoundPlay is it's name, you can find all info about it on msdn library, it allows syncronous or assyncronous playback of .wav files, but please remember that .wav files must be encoded in PCM and that big .wav files means huge resources being allocated, so don't just put that 10min studio quality audio pcm file and expect the handheld to be all fine, but is quite useful for little sound effects. Adding to that i adapted a class i found on the internet to manage XML files in such a way that can make them behave as small databases for persistency on the device.