Please click this logo to help me get on their beta program:

Xobni outlook add-in for your inbox








31/1/2006

Scrolling an InkCollector

Filed under: General, Programming, .NET, Tablet PC — Oliver Sturm @ 7:24 pm - 2 years, 6 months ago

As I mentioned elsewhere, I’m working on a DXCore plugin to enable (Tablet PC) ink drawing on the Visual Studio editor surface. A problem I stumbled upon in this regard was the scrolling functionality. Generally this is really easy to implement, using a transformation with the ink renderer. So I had this method:

void UpdateScrollPosition(TextView textView) {
  Point p = new Point(textView.ColumnWidth * textView.HorizontalScrollPosition,
    textView.LineHeight * textView.VerticalScrollPosition);
	
  collector.Renderer.PixelToInkSpace(textView.Graphics, ref p);
  Matrix matrix = new Matrix();
  matrix.Translate(-p.X, -p.Y);
	
  collector.Renderer.SetViewTransform(matrix);
}

After wondering for a while why this didn’t work, I put in some logging and found that the value passed in as -p.Y was actually growing for every call into that method, regardless how I was dragging the vertical scrollbar. The explanation was simple in the end, as these explanations tend to be: the PixelToInkSpace method takes any current transformations into account, so that any calculation is relative to an origin set earlier - in the last update, in fact. So the solution was to use an offset for the calculation and everything started working:

void UpdateScrollPosition(TextView textView) {
  Point p = new Point(textView.ColumnWidth * textView.HorizontalScrollPosition,
    textView.LineHeight * textView.VerticalScrollPosition);
  Point origin = new Point(0, 0);
	
  collector.Renderer.PixelToInkSpace(textView.Graphics, ref p);
  collector.Renderer.PixelToInkSpace(textView.Graphics, ref origin);
  p.Offset(-origin.X, -origin.Y);
  Matrix matrix = new Matrix();
  matrix.Translate(-p.X, -p.Y);
	
  collector.Renderer.SetViewTransform(matrix);
}

Be careful when installing VS add-ins in localized Windows versions

Filed under: General, Programming, .NET, VSIP — Oliver Sturm @ 5:43 pm - 2 years, 6 months ago

When installing add-ins for Visual Studio, a number of different paths can be used. One of them is C:\Documents and Settings\All Users\Application Data\Microsoft\MSEnvShared\Addins - in a default installation of a US English Windows. Obviously a proper installer would use Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) to make sure the path is correct for the current system and for the current language. For example, for a German system the result would be C:\Dokumente und Einstellungen\Alle Benutzer\Anwendungsdaten\Microsoft\MSEnvShared\Addins.

Now, the funny thing is that a part of the path is stored by Visual Studio verbatim. To be precise, VS stores the path as %ALLUSERSPROFILE%\Application Data\Microsoft\MSEnvShared\Addins, as you can see in VS using Tools/Options/Add-in/Macros Security.

Obviously they forgot that the Application Data part wouldn’t be called that in a localized version of Windows. So if you want to install your add-in into that path, you should make sure you fiddle around with it to create a mixed-language version, which fits the template used in the VS settings.

30/1/2006

Are you a button guy?

Filed under: General — Oliver Sturm @ 7:14 pm - 2 years, 6 months ago

Apparently I am, and I wasn’t aware of that until recently. This is not about methods of closing your fly.

Up until two months ago, I was a satisfied user of a Sony RM-AV3000 remote control, which I had been using for a few years. At the time, the Sony had been a replacement for a much older model from Yamaha and it worked flawlessly for a few years. Then suddenly, it started doing funny things - the most important such thing being that the remote would go into programming mode every time I was trying to do something useful like switching on my TV amp.

So I was looking around for a better replacement. Obviously I found the Philips models, but although I’m not opposed to spending a bit more money on these things than most people I know, the price tags seemed a bit steep to me. Then I saw the Logitech Harmony 885 on some web site, and Scott had a review of it, so I got that one and thought it would be great - but not so.

I think it’s mainly a matter of personal taste (and I want to sell the thing on Ebay :-) ), but there were a lot of things I personally didn’t like at all. They implemented this system that allows to program the remote via the browser - you connect to their special website, configure everything related to the remote, a special package is prepared by the server and downloaded with a special extension. This in turn runs a program on the client side (most of the client side stuff is written in Java) and programs the remote (attached to the PC with a USB cable) with the data from the server. All very nice… but please, which advantage is that supposed to have over a "proper" client application? The disadvantages, on the other hand, seem pretty clear - it’s often slow to navigate from one page to the other, the user interface, albeit very professionally done, is just not the same thing as a Windows application, and the whole scheme just takes a lot of time to do a few roundtrips when testing specific aspects of the programming. To their credit, the technical side of things is really well implemented, and I’m sure it’s possible to get just about every remote in the world replaced with the help of the wizards on the web site.

One other thing I didn’t immediately like too much is just what Scott found so perfect - the remote works on the basis of so-called activities. If you want to watch TV, you hit a button labeled "Watch TV" and the remote makes sure that all your devices are in the right states to enable you to do that. The important difference to other remotes, which use macros for a similar purpose, is that the remote stores the states of the devices, so it actually knows exactly what needs to be done to reach the current goal. At least that’s the theory… I was pretty unhappy with it, somehow my mind apparently doesn’t work that way. And then there’s the wife, of course… with her own remote control, and that definitely screws up the activities system for good.

Now, the final thing I really didn’t like at all were the buttons on that thing. They are tiny, they are wobbly and they go click click when you press them. They are in all kinds of funny places, like right on the edges of the remote and I found it completely impossible to hit them without looking. Oh well.

Now, the positive thing is that this got me looking again and I found another remote I liked a lot from the description. This time it was the Universal Remote Control MX-850 - a really fantastic device. It’s also got a display, but without the fancy colours. And it’s got buttons, lots of them. Really good buttons that are fun to press, even in the dark :-) Now I’ve had that thing for two weeks or so and it’s really great - a much better alternative to these Logitech toys, if you ask me. And now I know I’m a button guy…

What am I doing all the time?

Filed under: General, Programming, .NET, XPO, Developer Express — Oliver Sturm @ 6:03 pm - 2 years, 6 months ago

Well, if I’m wondering about that every now and then, I’m sure some of the more loyal readers of my blog must be wondering the same thing, given the sparse nature of blog updates in recent months. The answer is, since I’ve started working for Developer Express, I’ve been doing that many different things that it’s just hard to keep track of them, and I haven’t found myself with the free time needed to continually update my blog. But I see that this is a Bad Thing™ and I’ll try to do something about it.

So what have I done? Let’s see:

  • I’ve worked on concepts, testing, samples and documentation of eXpressApp Framework, which was made available as a CTP on January 12th. Since then we’ve been getting great feedback from our subscribers (who have access to the CTP) and I’ve spent a lot of time investigating issues, exchanging posts with customers and coordinating things with our development teams. Obviously development has continued since we released the CTP version, so even more plans to be made…
  • Since the beta of XPO 2 came out, I’ve spent a lot of time with customers testing this product, and also with internal discussions about the final feature set, some article writing, sample explaining, …. As with eXpressApp Framework, feedback has been great and we’ll be able to make the final product a lot better even than the beta was. Just recently I wrote a DXCore plugin to support XPO 2 in the final release… I hope that feature will actually make it. And no, I’m not telling what it is :-)
    Obviously XPO 2 is an important base of eXpressApp Framework, so we need to be careful to coordinate things between these two projects.
  • XtraCharts and the XtraLayout control have also been released into their beta phases and I’ve done some testing on these releases. Specifically XtraLayout is another important component in the Windows Forms part of eXpressApp Framework.
  • I created a DXCore plugin that can store my Window/Tool Window configuration in VS and restore it later - very nice to work with multiple window configurations. For example, on my multi-monitor setup I typically use VS stretched over two of the three screens. But when I just want to edit some XML, I like to have the window on only one screen and get rid of most of the tool windows I normally use.
    I offered making this plugin available in the DXCore plugins newsgroup, but as I got only one reply to that post, I haven’t taken the time yet to actually do this. Drop me a mail if you want to vote for having this plugin available as a download :-)
  • I’m currently working on a DXCore plugin that will let me ink on my VS editor with my Tablet PC.
  • I’m currently working on an article about DXCore for German dot.net magazin. Not sure when that will be published.
  • DevWeek 2006 is here in London Feb 20-24. Looks like I’m going to be there - if you’re around, feel free to drop by the Developer Express booth for a chat.
  • As far as I know, I’m going to do a talk about CodeRush and Refactor! at the March 14 meeting of The Developers Group in Hammersmith. Their official agenda for that day is not yet up, that’s why I’m saying "as far as I know" :-) Should be interesting though - the talk will not be too long and it will provide an overview over functionality offered by these two great products.
  • Several other things I can’t currently tell about ;-)

12/1/2006

.NET Rocks! goes TV

Filed under: General, .NET, Developer Express — Oliver Sturm @ 7:25 pm - 2 years, 6 months ago

Carl Franklin’s show .NET Rocks! now has a TV show - and Developer Express is a sponsor of the first episode. Go watch it!

Developer Express publishes first CTP of eXpressApp Framework

Filed under: General, Programming, .NET, Developer Express — Oliver Sturm @ 3:09 pm - 2 years, 6 months ago

I’m not going to say too much about it, that would only be misinterpreted as advertising - read the public information yourself here.


I think this is going to be a fantastic product to create business applications (and probably others) with. Only if you’re not (yet?) a Developer Express .NET subscriber, you’re out of luck for now… 

3/1/2006

Gooe^Hwy, or what?

Filed under: General — Oliver Sturm @ 10:25 am - 2 years, 7 months ago

Sarah just pointed me at a new service called Goowy, which is an online desktop including support for email, calendaring, RSS reading and many other things - all implemented in Flash, to run in the browser or as a stand-alone application. Have a look, it’s free!

2/1/2006

Happy new year, everybody!

Filed under: General — Oliver Sturm @ 11:14 am - 2 years, 7 months ago

I hope you’ve all had a nice holiday season (or you’re still at it). One more day of peace for me and then it’s back to work - we have the XPO 2 beta out to subscribers (initial migration instructions here) and I’m going to post a lot more informational stuff about that, plus there’s another product in the pipeline… lots to do, as always :-) I hope I’ll find the time to do a bit more blog posting than I have done the past weeks, but I guess we’ll see how it goes.

Powered by WordPress
© Copyright 2005-2008 Oliver Sturm