Righthand Dataset Debugger Visualizer updated to 1.0.6

by Miha Markič 11. January 2012 13:29

Here is the list of what’s have been added/changed in 1.0.6.:

  • better handling of a single DataTable - now, when table is part of a dataset, it loads entire dataset and jumps to the selected table. Note that when committing changes in this scenario, only changes in selected DataTable will be committed.
  • minor bug fixes

Go, grab v1.0.6 from dedicated page and visit forums as well.

Tags:

.net | VS 2008 | VS 2010 | Visualizer

Slides from my .NET Micro Framework and Netduino (using also XBee Pro and C328R camera) talk at Študent je car

by Miha Markič 8. December 2011 18:26

Today I’ve presented .NET Micro Framework to the students of Nova Gorica. I demonstrated running the C# code on Netduino by taking photos (on demand from client) using C328R camera, sending the JPG bytes over the wireless PAN provided by the two XBee Pros and showing the image within the WPF application running on the desktop. It was my first semi-hardware talk and it went fairly well I assume.

Attached are Power Point slides (in Slovene) and the demo code.

Note about demo: The client code requires PostSharp (if you compile it) for creating and implementing INotifyPropertyChanged. If you don’t have PostSharp then remove the references to it and NotifyPropertyChangedAttribute class. Then implement it manually for MainViewModel class.

mf.rar (13.00 mb)

Tags: ,

.net | Hardware | Microcontroller | Slovenia

Slides (Slovene) from my “compiler as a service” talk at Bleeding Edge 2011

by Miha Markič 2. October 2011 11:32

I have to say that I really liked this year’s Bleeding Edge event. It happens rarely that all the pieces fit together: weather was excellent, location was beautiful, I enjoyed my trip (part by train, part by bicycle), attendees were just great and my presentation was a nice interactive (with attendees) one – just as I like. I gave a ton of swag and shown how to enhance your development experience with extending/using CodeRush DXCore, PostSharp or just by using CSharpCompiler.

Hopefully the attendees did like the presentation as well.

Download the few slides below and see you at the next Bleeding Edge!

Prevajalnik kot storitev.ppt (586.50 kb)

Tags: , ,

.net | CodeRush | DevExpress | DXCore | DXCore plugin | Presentation | Slovenia

My “compiler as a service” talk at Bleeding Edge 2011

by Miha Markič 28. September 2011 15:40

Microsoft is working on compiler as a service codenamed Roslyn for Visual Studio 11 which is supposed to come sometime next year, I assume towards the end of the 2012. Not much is known and Roslyn might be less feature rich as one might expect. Microsoft announced at Build conference that they’ll release some Roslyn CTP bits in a few weeks time.

The good news is that you can already use compiler as a service today through tools such as CodeRush(commercial)/CodeRush Xpress(free), PostSharp(commerical) and custom coding. Even if some tools are commercial, they provide a tremendous value.

Anyway, after a sabbatical year, I’ll talk again at the Bleeding Edge. In fact I’ll be talking about how to leverage these tools and use compiler as a service for improving both design time coding and your applications in general.

But most importantly, I'll be giving a lot of swag away :-)

See you at Bleeding Edge - do stop by and say hi.

Tags: , ,

.net | CodeRush | DevExpress | DXCore | DXCore plugin | Presentation | Slovenia

Added some features to Righthand Dataset Debugger Visualizer

by Miha Markič 13. September 2011 18:50

Here is the list of what’s have been added in 1.0.5.:

  • Tables tree width is persisted
  • added "show original values" feature (through button in a toolbar). When enabled it will show the cell original value in parentheses. Disabled by default.
  • Error and Changed columns are narrower and fixed width to conserve space

Go, grab v1.0.5 from dedicated page and visit forums as well.

Tags:

.net | VS 2008 | VS 2010 | Visualizer

Fixed Save As menu item in Righthand Dataset Debugger Visualizer

by Miha Markič 1. September 2011 14:30

The Save As menu item should now work as expected. Go, grab v1.0.4 from dedicated page.

Tags:

.net | VS 2008 | VS 2010 | Visualizer

DevExpress’ FlowLayoutControl and MVVM

by Miha Markič 30. August 2011 11:45

FlowLayoutControl unfortunately doesn’t support items binding. You can’t just provide a source and hope FlowLayoutControl will populate the content. But fear not, there is nothing attached properties can’t solve.

I’ve created an attached property ItemsSource that does all that for you. Here is its declaration:

public static readonly DependencyProperty ItemsSourceProperty = DependencyProperty.RegisterAttached("ItemsSource", typeof(IEnumerable), typeof(FlowLayoutExtensions), 
            new UIPropertyMetadata(null, new PropertyChangedCallback(OnItemsSourceChanged)));

It accepts an IEnumerable as an input.

And here is the relevant code when ItemsSource changes:

private static void OnItemsSourceChanged(DependencyObject o, IEnumerable oldValue, IEnumerable newValue)
{    
    FlowLayoutControl layout = o as FlowLayoutControl;
    if (layout != null)
    {

        NotifyCollectionChangedEventHandler collectionChanged = delegate(object s, NotifyCollectionChangedEventArgs e)
        {
            switch (e.Action)
            {
                case NotifyCollectionChangedAction.Add:
                    AddItems(layout, e.NewItems);
                    break;
                case NotifyCollectionChangedAction.Remove:
                    RemoveItems(layout, e.OldItems);
                    break;
            }
        };

        // remove event implementation
        if (oldValue != null)
        {
            INotifyCollectionChanged oldIncc = oldValue as INotifyCollectionChanged;
            if (oldIncc != null)
                oldIncc.CollectionChanged -= collectionChanged;
        }
        layout.Children.Clear();

        if (newValue != null)
        {
            AddItems(layout, newValue);
            INotifyCollectionChanged incc = newValue as INotifyCollectionChanged;
            if (incc != null)
            {
                incc.CollectionChanged += collectionChanged;
            }
        }
    }
}

First it defines a delegate that gets called upon collection changes (when source is INotifyCollectionChanged) then it unsubscribes from CollectionChanged if it has previously subscribed. And finally it populates FlowLayoutControl with items and optionally subscribes to CollectionChanged event (when source supports it). Note that ObservableCollection<T> implements INotifyCollectionChanged.

Here is the code that adds or removes items:

private static void AddItems(FlowLayoutControl layout, IEnumerable source)
{
    foreach (object item in source)
    {
        GroupBox box = new GroupBox { DataContext = item };
        layout.Children.Add(box);
    }
}

private static void RemoveItems(FlowLayoutControl layout, IEnumerable source)
{
    foreach (object item in source)
    {
        GroupBox match = (from gb in layout.Children.OfType<GroupBox>()
                          where gb.DataContext == item
                          select gb).FirstOrDefault();
        if (match != null)
            layout.Children.Remove(match);
    }
}

Add items adds an GroupBox instance for each new item and sets its DataContext to the item. While RemoveItems searches for a matching GroupBox (based on DataContext match) instance and removes it from the FlowLayoutControl's Children collection.

A bit of XAML is required as well. I control the GroupBox appearance through a Style, like this:

<Style TargetType="dxlc:GroupBox">
    <Setter Property="MaximizeElementVisibility" Value="Visible"/>
    <Setter Property="MinimizeElementVisibility" Value="Visible"/>
    <Setter Property="Width" Value="150"/>
    <Setter Property="Header" Value="{Binding Caption}" />
    <Setter Property="Content" Value="{Binding}" />
</Style>

Note the binding of the Content property (remember, I am assigning current item as DataContext). And here is the FlowLayoutControl instance declaration:

<dxlc:FlowLayoutControl loc:FlowLayoutExtensions.ItemsSource="{Binding}" />

There you go, a MVVM friendly approach.

Note that this is not a fully featured code but it is a good starting point.

31.8.2011 - correct demo files

20.9.2011 - ufff, again uploaded really proper demo

FlowLayoutExtensionsDemo.zip (9.99 kb)

Tags: , ,

.net | DevExpress

Added toggle time option to Dataset Debugger Visualizer datetime columns

by Miha Markič 23. August 2011 13:30

In version 1.0.3. I’ve added a popup item that toggles between showing time part of the date. Visualizer also inspects the DataTable at initialization and decides whether to show time part or not (if there is at least a DateTime with time value then it shows, otherwise not).

Navigate to dedicated page and find the download links there.

Tags:

.net | VS 2008 | VS 2010 | Visualizer

Two Windows 8 feature requests

by Miha Markič 19. August 2011 14:43

Microsoft started blogging about Windows 8 (there is twitter account @BuildWindows8 as well) and I started thinking what I’d like to see in Windows 8. I can think of two features right now, out of my head:

  1. Make .net first class development tool. You might say that it is, but in reality it isn’t. Not all APIs are accessible through .net. Just look at (abandoned) Windows® API Code Pack for Microsoft® .NET Framework. Furthermore it is ridden with bugs. There are other APIs requiring black magic to use them from .net. Why are we, .net developers, supposed to mess with that?
  2. Give us a chance to store non-OS essential files on a separate drive. Starting with hibernation file which is as large as your RAM is. More or less. If that is 12GB it means you’ll have to give up 12GB of OS disk space. You might say who cares, 12GB is nothing with current disk prices. Sure, if you don’t look at obscene prices of non-mainstream disks (i.e. SSD) where 12GB matters. A lot. Then there are temporary files, user related documents, etc. A lot of stuff I’d be happy to offload to a cheaper and larger disk. Some of these can be redirected already, but mostly in obscure ways.

That much for now. What do you think?

Tags: ,

Windows | .net

Righthand's utilities for managing Intel Rapid Storage Technology drivers are live

by Miha Markič 9. July 2011 18:08

I’ve started developing a set of utilities for managing Intel Rapid Storage Technology drivers (aka Intel’s integrated RAID drivers). Even though Intel provides a GUI there is a huge gap to fill, starting with a command line utility, which should be most appreciated by those running Hyper-V 2008 R2).

Here is a dedicated page to the tools.

Tags: , , ,

.net 3.5 | .net | Virtualization | Tools

Miha Markic

About me
Righthand
 
Microsoft MVP
 
Developer Express' DXSquad
INETA Country Leader for Slovenia
INETA Country Leader for Slovenia

Slovene Developer Users Group Lead
Friends of Red-Gate
LLBLGenPro Partner

Miha currently works as a free lance consultant and software developer specialized in .net area.
He graduated in Computer and information science at the University of Ljubljana, Slovenia. He has accumulated experience in various programming languages such as Java, Visual Basic 3-6 (MCP), Visual C++, Delphi, C# and VB.Net through years.
He has experience in practically all (technical) stages of project development, including planning, framework development, user interface, business processes, as well as testing and documenting. He has worked on big and small projects in Slovenia and abroad (e.g. participated in completing level 3 IS for the Nucor steel plant, Hertford, USA).
Currently he enjoys programming in .net environment using C#. Since 2000 he has been active in Developer Express' DX Squad and has been ECDL trainer and tester. He also gives lectures on conferences and other events in Slovenia.

Month List

Tag cloud

Most comments

Paulius Paulius
1 comments
us United States
Meh Meh
1 comments
us United States
bart dm bart dm
1 comments
nl Netherlands

RecentComments

Comment RSS