| Chris Skardon 的个人资料Chris Skardon日志列表 | 帮助 |
|
|
2007年5月 WinForm Panels and the Designer - GRRRRRI've inherited some user interface (UI) code created by another developer a while ago, and it's a pretty standard affair - you know the sort - functional. It doesn't look pretty, but it does what it says on the tin and well, that's all it needs to do. Anyhews, one of the 'core' features of the UI is how a 'set' of controls (nicely wrapped in a panel) are displayed based on the selection of a drop-down box. Now, one of the inherent troubles with this design is the way these panels are displayed - one behind the other. This makes for interesting times when using the WinForms Designer. Specifically what I had done was move one of the panels (we'll call 'A') to see the panel behind it (sticking with convention this shall be 'B'). After doing the editing I needed to, I dragged the panel A back over the B, ensuring the positioning was dead centre - easy to do with the VS2005 designer. So, time to start the form, ahh. Panel A is visible, B is invisible, no matter what the combobox says. Curiously, it doesn't show anything at all, just a blank panel. This isn't good - I didn't really want to have to undo all my changes. Needless to say - a long drawn out procedure of checking my code, running through the debugger began. Yes, the panel was having it's visibility changed:
but, stepping through the debugger, the actual value wasn't changing... Why not??!!? Ok, has my code made it gone wrong? - lets try seperating the panels, and putting them next to each other -> start debugging -> works fine... hmmm, ok retry dragging B back into position. Debug. @#$%!! Not there again. What's going on??! Then suddenly it hits. It is me, when I've been dragging the panels, I've been dragging panel B not over panel A, but into panel A. Panel B was actually inside Panel A. Whooops. I guess because the size of the two panels was exactly the same I couldn't see the fact that B was inside A. The solution - ensure that neither was in the other, then set the Location property of both to be the same, rather than drag it. Nuts. 2007年5月 Orcas ExperiencesI've been tinkering with Visual Studio 2007 - "Orcas" now for a couple of weeks, a little bit here, a little bit there, when I have a spare moment at work - to keep up with new technologies etc. I have to say, I'm impressed, the IDE is as per normal, excellent, and the new features of C# (LINQ, Extension methods etc) are integrated nicely. I've been basing my tinkering on Eric White's - Composition using Functional Programming Techniques in C# 3.0 tutorial, which has been excellent, and a great way to get into LINQ. LINQ has been my main focus whilst experimenting, as it seems (to me at least) to be one of the biggest things in C# 3.0, and if I'm right about it, it will prove to be useful from a work perspective pretty much as soon as we get the RTM build of VS 2007 - we do a lot of querying of XML data, and anything to make that more intuitive would be great. I'm also greatly interested in getting my hands dirty with WCF, again we do a lot of communicating in the system I'm working on, predominantly using Remoting, but also MSMQ based. It would be nice if we could remove a lot of the code we have which currently sets up the tranmission protocols, channels etc. 2007年5月 .NET 3.5 Installation IssuesRecently I've downloaded the 'Orcas' Beta 1 release of Visual Studio, so I can play around with .NET 3.5 and the new Visual Studio. I chose to install this on a VPC, good practice and all! So I setup a Vista Enterprise VPC, from scratch, got it all setup, added it to my companies domain and then set about installing Orcas. Then I ran into trouble, I kept on getting an error when attempting to install:
I searched through many a google result, many a 'Live search' result, but to no avail, I found lots of people who had, had different problems installing, but no-one had mentioned my problem... The question really was; Which service wasn't running? Obviously this would have been easier if the error message had actually mentioned this! I found a lot of people saying that they needed to install the vista updates from the Orcas CD, so I tried to do this, but again got the 'Service cannot be started' message. WHAT SERVICE!!!! Right, ok, these are 'updates' to vista, so the liklihood is that it's in the Windows Update, so I can at least give that a go... Start -> Windows Update, Error! This isn't good - have I damaged Vista in some way??? Best hope not... Fortunately this time I got an error code - ( though admittedly I've forgotten it here :( ) - however the help on Vista found the error code perfectly, and stated that the Windows Update service was stopped. Ok, restart it then - Services -> Windows Update Service -> Disabled... Disabled? Marvellous, then it suddenly clicks into place, presumably this is the service that .NET 3.5 and Orcas have been complaining about, and the service is disabled as a policy of the company. Right, so remove the VPC from the domain, and stick it into a workgroup, reboot, Windows Update - YAY - we're back in business. Now running the Orcas setup it appears to be running, and yes, literally as I just typed this the 3.5 framework has been installed, so fingers crossed the rest will work just fine. 2007年5月 DotNetRocksI've known about DotNetRocks (a podcast 'radio' for .NET developers) for a couple of years now, but I always thought - naaaa, that would just be too geeky and dull! Then this weekend just past, I was flying up to Edinburgh (Scotland) and wanted something non-music to listen to on the old mp3 player, so decided to download a recent DNR show featuring a guy called Jeff Atwood (author of a great blog called Coding Horror which I read pretty much daily), and now I'm a convert! I keep a small collection of the shows on the mp3 player, and listen to them on the trains back and forth to work. It's hard to describe what they're like without listening yourself, but in a nutshell, I'd say it was two .NET gurus - Richard Campbell and Carl Franklin, who clearly know what they're talking about, and this makes the interviews much better, as they ask the questions you might not have thought to ask about, and the interview, general commentry is good, clear and at times funny :) I think if you're a .NET developer you should give DNR a go and see how it goes - worst case, you get 20 minutes in - think this isn't for me and stop the show, or you never know - you might just fire up your browser and download the next show, and then the next and ne.... 2007年5月 Support / Software Engineer?I've only worked in 2 companies in my long history of employment as an IT professional, the first was as a support engineer for a large oil company in Aberdeen (Scotland), and my current - a software engineer for a small finance company. In both companies there has been a development team, and an infrastructure team, with the former developing things, and the latter supporting all manner of things - exchange servers down to printers and other prehipherals, but in the smaller firm, the lines are far more blurred. I spend quite a bit of my time helping others, looking at printers etc (maybe in part to my previous experience), generally because if there isn't a support engineer to hand, then people quite naturally ask me, or another member of the development team, (As a side note, someone once did actually ask one of my colleagues to plug in a Lamp for him, she did it, probably due to being too shocked that someone would actually ask for that to be done.) The blurryness is quite good, and I think all devs would benefit from a bit of support engineering. Quite often we can do things (accidently), or need things set up that we really should be able to do ourselves. Other benefits include actually being able to know the other side of the development process, the much overlooked hardware side. 2007年5月 Fully Vista'd up nowI've finally taken the plunge at work, after having my XP machine die 2-3 times a week I took the executive decision to wipe the machine and start from scratch. Luckily this machine is pretty well specced, and easily matched the requirements for Vista. Installation was a piece of the proverbial really - well, easy enough anyways, for some reason this machine doesn't have a DVD drive, which isn't particularly helpful when my MSDN subscription is DVD only - So after a bit of a hunt, I managed to get the ISO CD images from one of the DVD's on another pc, burned them and was good to go. I chose the enterprise edition - basically because we have a volume user license here, and that's spiffy. I'm actually not sure what the enterprise edition actually has, I presume that it's equivalent to the Business edition, I'll have to check that out some point... I've been using Vista at home for the past 5 months now (Ultimate and Home Premium) and I've been pretty impressed with it, sure I kinda suspect that there is nothing that amazing under the covers, but it functions fine and as it doesn't cost anything (from an MSDN point of view, I dunno if I would pay for it as an O/S unless I had a pretty hot machine to run it on). From a working on Vista perspective, there don't appear to be any drawbacks, at least none that I've noticed. I suspect there are things in Visual Studio that i'm unable to do, but as I haven't come across those things yet, so I think it's going to be ok from my perspective. SQL 2005 Management went on alright, as long as the SP2 was applied, and everything else I use (Office 2007 etc) were basically built for it! Not the most interesting of posts I fear :p |
|
|