Friday, March 30, 2012

Quick name 11 Microsoft products... That's easy with the "Microsoft Product Portfolio v2.6" Zoom.it

Kurt Shintaku's Blog - DOWNLOAD: Microsoft Product Portfolio v2.6

"We’ve just released v2.6 of two customer-ready documents known as our Product Portfolio One-pager.

The one-page shows all of Microsoft products in a single scalable view. I have them available in .PDF as well as a Visio document for managed customers of mine that are interested.

The documents are viewable from ZOOM.IT, leveraging Microsoft Deep Zoom technology. Enjoy!

" [GD: Post Leached in full]

image

SNAGHTML613da09

SNAGHTML615e2df

Now that's a serious stack of products, services and features... And I thought using Zoom.It pretty cool.

If you can't make the data, then fake the data... Faker.Net

Awkward Coder - faking data in WP7 and other .Net platforms

I needed to fake some data for a WP7 app yesterday and I was about to write a couple of classes when I thought why not check out what's available out there already...

There were already a couple of NuGet packages out there but I wanted to try out my forking skills on GitHub :) I had a quick conversation with Ben Smith about faker-cs and producing a NuGet package.

Introducing Faker.Net on NuGet, with support for .Net 3.5 SP1, .Net 4.0, Silverlight & WP7.

Faker.Net support loads of different ways to fake data - addresses, names, phones numbers and more:

image

image

..."

I can see where this could really come in handy... And probably so much better than using my pet's, family's, etc, names. ;)

ALL CAPS in VS11 raising your blood pressure? Calm is your answer... As in the VSCalm Extension

Visual Studio add-ins, extensions and tools - VSCalm extension for Visual Studio 11 Beta

"VSCalm extension by Jeremy Iverson restores standard tool window titles format in VS 11 Beta IDE. It changes the ALL CAPS letters to normal title case and removes :::colon-like::: gripper bars:

...

image

To modify titles you need to execute this command each time you start Visual Studio. I think it will be more convenient to apply title modifications automatically on Visual Studio startup without any additional commands.

..."

Visual Studio Gallery - VSCalm

An extension for Visual Studio 11 Beta to make the ::: TOOL WINDOW TITLES :::::: look a bit more calm.

Features

  • Change the capital letters to normal title case
  • Remove the colon-like gripper bars

image

..."

While not a perfect solution, since you have to execute it every time you launch VS11, if the All CAPS are making you mental, then it's better than nothing. Oh and he's released the source too... :)

(via The Morning Brew - The Morning Brew #1076)

Missing Macros in VS11 getting you down? John Robbins shows us how to use NuGet and PowerShell as an replacement

John Robbins' Blog - Using NuGet PowerShell to Replace Missing Macros in Dev 11

"When I first heard that macros were being dropped from Dev 11 I was gobsmacked. (I just love that world!) While the macro story up to Visual Studio 2010 wasn’t great because we couldn’t write macros in our .NET language of choice, I expected the situation would start getting better and was saddened when the fix was to remove the easy customizability all together.

People at Microsoft said that the code behind macros was too brittle to update and their telemetry said macros are feature no one was using. My theory is the reason people skipped macros are because you had to do it in a different language. (VB people: I’m not criticizing VB but most of the developers who would write macros are C#/C++ developers). By dropping macros, the argument was that there was still a valid way to extend the development environment with .VSX files. That’s great but like I really want to install an SDK, write a VSX and have Dev 11 debugging Dev 11 just to enumerate my projects and add a new define to debug build configurations.

Readers of this blog know I’ve written many macros (examples here) that make debugging in particular easier. I use my macros on a daily basis so was not looking forward to porting them to an extension and all the junk that entails. As I was navigating the file system using the now built in NuGet Package Manager Console window, why not use PowerShell as the macro language? While this works, I’ll still be pestering Microsoft a lot during the Dev 12 development cycle for a real macro system that lets me program in any .NET language.

To use PowerShell as the macro language, you need access to the Visual Studio automation model. In macros and extensions the root of life is the DTE interface. A quick look at the variables defined in the Package Manager Console shows a $dte variable so once you have that, you’ve got everything! That’s nice when things are easy.

My goal was to port all my macros over to PowerShell and you can see the results of my porting efforts at the bottom of this blog entry. For the most part, it was simply a matter of porting VB to PowerShell, which wasn’t too onerous if you know PowerShell. The main drawback I encountered is that to debug any functions you write you have to use the old PowerShell 1.0 way of debugging with Set-PSDebug and all the fun of command line debugging. It’s a bit painful, but it does work.

...

image..."

I don't know if I knew that macro's have been killing in VS11 and l if I did, I forgot. So seeing John's mention of them being nuked was a pretty big surprise to me. That said, I can't remember when the last time I used one, so I guess I'm one of those use cases Microsoft is using as justification...

I thought this mix of VS, NuGet and PowerShell pretty awesome and a great example of bending a program to our will.

Thursday, March 29, 2012

Original POP (Prince of Persia) Apple II Source Found

Prince of Persia Source Code — Found!

"...

The carton arrived yesterday. My jaw dropped when I saw what was inside.

No, I don’t mean the stacks of Spanish Drosoft versions of POP and Karateka (though those are cool too, especially if you have an Amstrad computer with a cassette player). I mean those three little plastic 3.5″ disk boxes nestled among them… which appear to contain the ORIGINAL APPLE II SOURCE CODE OF PRINCE OF PERSIA that I’ve been searching for, off and on, for the past ten years, pestering everyone from Doug Carlston to Danny Gorlin and everyone who ever worked at Broderbund, and finally gave up hope of ever finding.

I KNEW it wasn’t like me to throw stuff out!

image

..."

How funny is that... Make me want to dig though some of my old boxes. I know I have that D&D 2nd Edition TRS80 game I was working on around somewhere... :)

(via joystiq - Jordan Mechner finds original Prince of Persia source code)

Just shut it down... shut it all down! Okay, well maybe just PInvoke your way to Remote Machine Shutdown/Restart with this code sample

Microsoft Developer Network - Samples - Shut down a computer using .NET (CSShutdownComputer)

"The application demonstrates how to shut down a computer using .net.

Introduction

The application demonstrates how to shut down a computer using .net. I’ve pinvoked the native API’s to get this going. Following are the API’s implemented…

1. ExitWindowsEx

2. InitiateShutdown

3. InitiateSystemShutdownEx

4. AbortSystemShutdown

Running the Sample

I’ve provided links which points towards the documentation in the application itself. Select any of the four radios to activate corresponding API. Fill in the options as per the documentation. Also note that I haven’t provided much validation since I would like the user to invoke the API as would like to, no restrictions. Read the documentation carefully.

Also note that remote shutdown will only work if the remote computer has remote shutdown enabled. Usesecpol.msc to enable this feature for the remote computer.

InitiateShutdown and InitiateSystemShutdownEx will end up showing a message box before shutting down the computer. Once the timeout expires the system automatically shutdowns. If you want to prevent this shutdown invoke “AbortSystemShutdown”.

This is how the application looks like…

image001

SNAGHTML87eb2b..."

I've been using these PInvoke calls for a number of years now, but I still learned some things from this sample. More importantly I really like the WinForm sample driver, with the Documentation and PInvoke information links. That's a really great touch...

 

Related Past Post XRef:
Daddy, tell me a story of how VB, WP7, Azure and my photos can be combined in the cloud to create a video story...
All-In-One Code Framework Sample Browser v4 (aka Metro version) now Visual Studio Extension'd (Don't leave your Visual Studio without it...)
The All-In-One Code Framework Browser v4 goes major Metro
All-In-One Code Framework is now on MSDN Code Gallery, has a new sample browser and is cooler than ever
All-In-One Code Framework, your one stop shop for Windows code samples, examples and guidelines
All-In-One Knowledge Base Articles (aka another way to see all the coolness that’s in the All-In-One sample code base)
Three languages, tons of technologies, continual additions, all source: The Microsoft All-In-One Code Framework (think “An Official Boat Load of Code Samples!”) (Added bonus “How can I on earth write a managed shell extension” with .Net 4 sample)

Zooming into a "Best .Net Dev Tools" list on Zoomzum

Zoomzum - 8 Best Microsoft .Net Development Tools

Its our pleasure to share best resources/tools for developers and designe for every technologies as HTML5, jQuery, Javascript, PHP, etc. Every programming technologies/techniques provides the number of tools that helps developers and designers a lot in. Today we are going to presents the best development tools for .Net developers. These are the development tools that helps developers for their next project. Most of them are freeware and open source tools.

.Net framework is a software framework that runs primarily on Microsoft windows. The .NET Framework’s Base Class Library provides user interface, data access, database connectivity, cryptography, web application development, numeric algorithms, and network communications.(Wiki)

A few days ago, we had provided some best javascript tools for testing and validation, Wireframe and Mockup tools for designers, 3D tools for designers and many more. I have been searching the best Microsoft .Net development tools and finally i got the 8 tools for developers.

I hope developers would love to use these tools and share their thought in our comment section below. We thankful to our readers for appreciate ZoomZum’ s compilations and share their views. Thanks

image..."

What I liked was that this list didn't have to much of the usual stuff, instead some projects that might not get too much press... That said, there are some you'd expect, like Nuget, Sharp Develop, but there's also some that might be new to you, like STORM.

(via The Morning Brew - The Morning Brew #1075)

Wednesday, March 28, 2012

Lucian says that "Every day is a good day to be a VB (but with VB11 it's even better!)"

Lucian's VBlog - Talk: What's new in VB11 (VS11 Beta)

"This talk details some of what's new in VB11. (Just some: there were too many improvements to cover them all in just one talk).

Win8 support
VBCore (=> new platform support for VB on Phone, XNA, MicroFramework, Kinect, Surface...)
Async
CallerMemberInfo
Iterators
View Call Hierarchy
Namespace Global
AnyCpu32bitPreferred allows EnC on x64 machines
Better codespit and pretty-listing
Better performance
Better error-reporting for lambdas, and no more 102-error-limit for vbc/msbuild
Fixed language corners in ForEach, ReturnArrayLiterals, OptionalParameterOverloads, GenericOverloadResolution

  • I gave this talk at DevConnections2012 in Vegas on 2012.93.26
    • (I'm in the process of uploading the video).
    • Download source_code.zip [82k, requires VS11]
    • Download script.docx [29k]
    • Download slides.pptx [3.4mb]
    • [GD: Click through for the download links... I didn't want to leach his traffic...]

..."

I dig hearing Lucian talk... While I missed this conference, with what he's shared it's almost as good as being there (well not really, no video, but still, you get the idea) (Wow, ask you shall... Here's the video, Lucian Wischik: What's New in VB11). What I really appreciate is that besides the source and the PptX, he also provided his talking script. That's not something you see that often and adds an additional level of depth to his sharing...

image

SNAGHTML433c3a62

Building your first HTML Metro Style app with the Style Smooth Streaming Player walk through

Cenk Dingiloglu's Blog - How to build your first HTML5 Metro Style Smooth Streaming Player

"In this post I'll cover how to build a basic HTML5 Metro Style Smooth Streaming Player using the IIS Smooth Streaming Client SDK Beta for Metro Style Apps. This basic application enables the HTML5 <Video> tag with Smooth Streaming in Metro style apps. For rich applications and general player development, I strongly encourage you to use the Microsoft Media Platform Player Framework. You can get more information about the Player Framework here.

Later, I will cover "How to build a basic XAML Smooth Streaming Metro Style Player" in a separate post.

Prerequisites

  • Windows 8 Consumer Preview (32-bit or 64-bit) OS. You can get from here.
  • You should have either Visual Studio 11 Express Beta for Windows 8 or Visual Studio 11 Beta installed on Windows 8. You can get more information on this here.
  • Install the "Microsoft IIS Smooth Streaming Client SDK Beta 1 for Windows 8 Metro Style Apps" from here.
  • Basic JavaScript knowledge is required.

Note: This post is based on pre-release (Beta) builds of software and components; therefore, some features might not be available or supported for some devices and subject to change without notification.

Create the JavaScript Windows Metro Style Project

...

image..."

Seemed like a great companion post to my previous one announcing the release of this player...

 

Related Past Post XRef:
That's smoooootttthhhh... The Smooth Streaming Client SDK Beta and Player Framework Beta for Windows 8 Metro

Generating Xlsx's on the Server? You're using OpenXML, right? With help from the PowerTools for OpenXML?

OpenXML Developer - Quick Generation of Spreadsheet Data and Cell Styles

"This example looks at a couple of OpenXML spreadsheet topics. I have been working with the cell styles a lot lately and this is a first example showing how to add some of the named styles to a spreadsheet cell. I plan to include even more style options in my next example and blog post. Also, after I posted my example for generating a pivot table, some very helpful people mentioned that it was quite slow with large amounts of data. This example also shows an alternative method of generating large amounts of data in a worksheet.

The example code can be found at PowerTools for OpenXML on Codeplex. Look for the 2.2.3 release of the PowerTools Core.

The screen-cast is divided into two parts. The first half introduces the example and shows how to use the methods in the PowerTools Core library. The second half shows the details of how the XML is generated. If you are only interested in using the code as is, then you can skip the second part.

image

PowerTools for Open XML - PowerTools for OpenXML 2.2 (Note you want 2.2.3...)

image

Here's a snap of all you need to create a XlsX.  If you've ever used OpenXML, you'll know just how much time this can save you (and how much more sense this makes). OpenXML is great, but it's NOT the kind of Office API you're used too. This kind of library makes it that much easier to use...

SNAGHTML42fa277c

No Excel, no Office, all Net.

image

 

Related Past Post XRef:
Reusing the PowerShell PowerTools for Open XML in your C# or VB.Net world
PowerShell, OpenXML, WMI and the PowerTools for OpenXML = Doc generation for our inner geek
Because it’s a PowerShell kind of day… PowerTools for Open XML V1.1 Released
OpenXML PowerTools updated – Cell your Excel via PowerShell

A WinPhone Dev Dude's Dive Into PhoneGap

 Windows Phone DZone - Pieter De Rycke - A Windows Phone Developer's Take on PhoneGap

"For a very long time I have avoided learning HTML and ASP.Net and stayed away of applications using it. I didn’t want to end up with messy code and hacks to support multiple browsers (read: Internet Explorer 6.0). But as HTML5 and CSS3 are gaining more momentum, I have changed my mind and I have started learning HTML, CSS and JavaScript. Even if these technologies have their annoyances, they are the way to develop cross platform software applications.

Recently there was a lot of buzz around PhoneGap. This a software framework that allows wrapping HTML5 applications into native applications for various mobile platforms (including iPhone, Android and Windows Phone). The idea of developing a mobile application for multiple platforms with a single code base is very tempting.

During the article I have still used the old name PhoneGap, but the framework has recently been open-sourced and renamed into Cordova (http://incubator.apache.org/projects/callback.html). Adobe will continue to offer a commercial version using the PhoneGap branding (http://phonegap.com/).

During the past days, I have developed a simple Todo Application using the following technologies:

  • PhoneGap to wrap in into a native application.
  • JQuery Mobile for the UI.
  • HTML5 local storage to store the user data.


The applications consists of 6 screens and runs completely local; it does not require internet access to function. Theoretical it should be able to run on iPhone, Android and Windows Phone, but I was only able to test on a real Windows Phone device and on the desktop versions of Firefox, Safari and Chrome. So although it was not tested on multiple devices, I don’t expect a lot of issues when running it on IOS or Android.

..."

I've been thinking about PhoneGap/Cordova and thought this post had an interesting view.

One of these days I'm going to get a smart phone (No, I don't yet... I'm still on a semi-smart and have been waiting for a good WP7 Verizon phone... and waiting... and waiting... and... now I'll probably wait for a WP8 phone, assuming Verizon sells one... I'm almost about ready to jump carriers.. sigh) and so have been watching the mobile dev space. While I'll very likely jump to WP7/8, there's Android's in the house and I've been thinking about playing with some cloud based AFTF's (App's For The Family) and so would like something cross platform'ish and PhoneGap/Cordova seems like a good place to look at first...

Tuesday, March 27, 2012

Community Driven Read-Only AdventureWorks2012 now available on SQL Azure

SSIS Junkie - AdventureWorks2012 now available for all on SQL Azure

"AdventureWorks on Azure - Provided by the SQL Server community, for the SQL Server community!

Three days ago I tweeted this:

Idea. MSFT could host read-only copies of all the [AdventureWorks] DBs up on #sqlazure for the SQL community to use. RT if agree #sqlfamily

— Jamie Thomson (@jamiet) March 24, 2012

Evidently I wasn't the only one that thought this was a good idea because as you can see from the screenshot that tweet has, so far, been retweeted more than fifty times. Clearly there is a desire to see the AdventureWorks databases made available for the community to noodle around on so I am pleased to announce that as of today you can do just that - [AdventureWorks2012] now resides on SQL Azure and is available for anyone, absolutely anyone, to connect to and use* for their own means.

*By use I mean "issue some SELECT statements". You don't have permission to issue INSERTs, UPDATEs, DELETEs or EXECUTEs I'm afraid - if you want to do that then you can get the bits and host it yourself.

This database is free for you to use but SQL Azure is of course not free so before I give you the credentials please lend me your ears eyes for a short while longer. AdventureWorks on Azure is being provided for the SQL Server community to use and so I am hoping that that same community will rally around to support this effort by making a voluntary donation to support the upkeep which, going on current pricing, is going to be $119.88 per year. If you would like to contribute to keep AdventureWorks on Azure up and running for that full year please donate via PayPal to adventureworksazure@hotmail.co.uk:

...

Any amount, no matter how small, will help. If those 50+ people that retweeted me beforehand all contributed $2 then that would just about be enough to keep this up for a year. If the community contributes more that we need then there are a number of additional things that could be done:

  • Host additional databases (Northwind anyone??)
  • Host in more datacentres (this first one is in Western Europe)
  • Make a charitable donation

That last one, a charitable donation, is something I would really like to do. The SQL Community have proved before that they can make a significant contribution to charitable orgnisations through purchasing the SQL Server MVP Deep Dives book and I harbour hopes that AdventureWorks on Azure can continue in that vein. So please, if you think AdventureWorks on Azure is something that is worth supporting please make a contribution.

OK, with the prickly subject of begging for cash out of the way let me share the details that you need to connect to [AdventureWorks2012] on SQL Azure:

...

image..."

The fact that this is "just a guy" stepping up to do this is pretty awesome.

And it works great too. Here's a snap of me connecting to it via SSMS.

image

If you connect remember to say hello (via the SQLFamily... See Jamie's post for details).

And if you are going to use this in any real way shape or form, remember to tip Jamie. This is coming out of his pocket...

More MS12-020 (aka RDP issue) exploit tools are hitting the wild... (Here's one written with VB6 that BSOD's an unpatched systems)

F-Secure - A Tool Exploiting MS12-020 Vulnerabilities

Since the public release of Microsoft's MS12-020 bulletin, there have been plenty of attempts to exploit vulnerabilities in the Remote Desktop Protocol (RDP). Last week, we received a related sample, which turned out to be a tool called "RDPKill by: Mark DePalma" that was designed to kill targeted RDP service.

The tool was written with Visual Basic 6.0, and has a simple user interface. We tested it on machines running on Windows XP 32-bit and Windows 7 64-bit.

...

image..."

IT guys and gals, you have applied this patch, right? Let's see how many servers and critical resources are in your server rooms and data centers that you RDP into? Like all of them? (I mean who actually walks up to servers anymore...?) So as this vulnerabilities gets weaponized and gets into your network (and it will), what's the potential impact? Ready to patch yet? Come on, if a VB6 sample app can BSOD your RDP enabled systems [No jokes about VB6 please... I know you want to.. but please... lol ]

 

Related Past Post XRef:
RDPCheck.com - Quick check to see if your system is vulnerable to the recently patched RDP issue

[Humor] Doesn't everyone have one of these?

winextra - Brilliant Or WTH?!?

image

... except my bottle is bigger... LOL  :P

Have some thoughts about Visual Studio 11? The VS Team has got a feedback survey for you...

MSDN UK Team blog - Announcement: Visual Studio 11 Beta Survey–tell us what you think!

"Got something to say about Visual Studio 11 Beta? Make sure you complete the survey to get your voice heard. As well as your comments on performance, reliability, and quality, the Visual Studio team want to know your opinions on areas such as setup and project/solution compatibility. Your input will help continue to improve Visual Studio so it’s worth taking the time to complete.

..."

Not to be blunt, but don't whine if you don't provide feedback when asked. Don't like the new look in VS11? Then here's a chance for you to give them your feedback about that... I did. I whined about the All Cap's toolbar window titles. I know seems like a little thing but hey it bugs me... and now since I've provided them the feedback I can officially whine about it... :P

"An Omega Geek’s Guide to Learning PowerShell"

endjin blog - An Omega Geek’s Guide to Learning PowerShell

In the last 12 months we’ve been doing quite a lot of Application Lifecycle Management (ALM) projects helping teams setup Continuous Delivery processes. One of the tenets of Continuous Delivery is “Automate Everything” – which has been a core part of my “work smarter, not harder” ethic for a number of years. The technology that we’ve been using to do this work is one of the hidden gems of the Microsoft Platform – PowerShell. It amazed me that a technology that is over 6 years old still doesn’t seem to have mass adoption within the Microsoft Development Community. While the Alpha Geeks are frothing at the mouth over new tech such as Node / HTML 5 / WinRT, I really hope that more Omega Geeks will do themselves a great favour and start to learn PowerShell.

I’ve spent more of the last year working inside PowerGUI than Visual Studio and I’ve tried hard to take a few of our customers on the learning journey too. I’m very pleased that after doing a quick brown bag session about PowerShell and knocking up a sample framework that one of the DevOps folks took it and ran with it – automating the provisioning of their internal development, test and production environments – from a series of thick word documents that took over 2 man days to work through (and were also horrifically prone to human error) to a series of PowerShell scripts that could automatically provision an environment within a couple of hours.

Thankfully there are a myriad of resources to help you learn PowerShell here are a select that I’ve found very useful:

Free Guides

Books

Blogs & People

Web Casts

Writing testable scripts

Tooling

image..."

I just liked that blog post title. Well and the content too... :P

LightSwitching to StackOverflow's OData data

Alessandro Del Sole's Blog - LightSwitch: reading threads from StackOverflow with OData

"As you might know, one of the most important new features in the next version of Visual Studio LightSwitch, currently in beta, is the support for OData.

You can read some post from Beth Massi about this topic, today I'm just showing a different usage.

OData is an open protocol based on WCF Data Services and allows managing data sets through services. If you visit the Ecosystem page of the OData portal, you can find a list of public services from 3rd party producers, including the well-known StackOverflow web site, which offers a very popular forum platform.

Imagine you want to read your favorite threads from StackOverflow inside a LightSwitch application. After creating the project, the first thing you want to do is connecting to an external data source such as OData:

...

SNAGHTML3df7ab41

image

That's got me thinking I really need to take another look at the latest version of LightSwitch...

Monday, March 26, 2012

Think you have some ADS in your NTFS? You do, Alternate Data Streams (ADS). Here's some ADS information you might not have seen before...

Hexacorn Ltd - Good Alternate Data Streams (ADS)

"While ADS is not widely supported/used by many apps (maybe with the exception of malware :) ), it can be still used for some interesting purposes. In this short article, I describe a few legitimate uses of ADS by Windows that I know of.

If you know some others or if you spot any mistake, please let me know. Thanks.

This post is loosely based on the Microsoft list, but it contains some more details and looks at these streams from a ‘forensic angle’.

SNAGHTML38699d9e

image..."

 

Related Past Post XRef:
ADSdotNET – Access NTFS Alternate Data Streams from your managed languages without P/Invoke
Accessing NTFS Alternate Data Streams with C#
HijackThis gets all open. Download the VB6 (yes, VB6) code now...

"...known as the Matrix..." The C# Evolution Matrix that is...

The Microsoft MVP Award Program Blog - An Introduction to New Features in C# 5.0

1. C# Evolution Matrix

Microsoft just published a new version of C# : 5.0 beta with CLR version 4.5 (Visual Studio 11 beta). In order to get a big picture of the whole evolution of C# language, I summarized all the key features into a C# Evolution Matrix for your reference as below diagram shows:

image

2. Async Feature

Two new key words are used for Async feature: async modifier and await operator. Method marked with async modifier is called async method. This new feature will help us a lot in async programming.

For example, in the programming of Winform, the UI thread will be blocked while we use HttpWebRequest synchronously request any resource in the Internet. From the perspective of user experience, we cannot interact with the form before the request is done.

...

3. Caller Information

Caller Information can help us in tracing, debugging and creating diagnose tools. It will help us to avoid duplicate codes which are generally invoked in many methods for same purpose, such as logging and tracing.

We could get the below information of caller method :

..."

I just wanted to blog about this so I could use the Matrix reference.

Just kidding... :P

Actually really like the simple yet effective way this matrix communicated the evolution of C# over time. The code samples where good too of course. :)

Working Workflow into your app's. Workflow Studio, a source available example of rehosting the Workflow Designer

Microsoft Developer Network - Samples - Workflow Studio

"...

Rehosting the WF designer in an application outside of Visual Studio is nothing new and since WF4, nothing particularly difficult. In fact the WF product team has gone out of its way to make rehosting the designer as easy an experience as possible and they’ve done a great job. The WCF and WF Samples for .NET Framework 4 provides code samples for rehosting the designer with its corresponding toolbox and properties grid. The samples also cover handling validation errors, executing workflows and providing some level of debugging through workflow tracking – most of what you need to write your own rehosted designer.

But to get a useable app you’re going to have to write some boiler plate code to stitch all these concepts together. You’ll need code to open, save and execute workflows. You’ll need to manage window layout, display workflow output and handle runtime exceptions. And wouldn't it be nice to support working with multiple workflows at the same time all in a windowing environment that supports docking and pinning?

Enter Workflow Studio – a simple, generic application that allows you to design and execute multiple XAML based workflows in a windowed environment akin with Visual Studio. Use it to design and test your workflows in environments where Visual Studio is not the right tool. You can even use it as a simple hosting environment. I’ve developed Workflow Studio as an application you can use out of the box, or you can use it as the basis for your own specialised implementation.

..."

MCS UK Solution Development Team - Workflow Foundation (WF4) – Rehosting The Workflow Designer

"...

Features

The following image shows the Workflow Studio environment:

untitled

Here’s a rundown of its features and where appropriate I've provided references to sample code should you want to understand more about the implementation detail.

  1. Develop XAML Based Workflows And Workflow Services
    Use the fully fledged WF designer to develop XAML based workflows and workflow services just as you would in Visual Studio. Interaction between the toolbox and properties box is just as in Visual Studio. For workflow services, add any WCF configuration to the Workflow Studio app config file. The solution comes with a test workflow service and client with appropriate configuration in the app config file as an example. Look at the Designer Rehosting example in WCF and WF Samples for .NET Framework 4 that demonstrates the basis for this implementation. Also, Pro WF Windows Workflow in .NET 4 by Bruce Bukovics has a great chapter on designer rehosting. Should you wish to execute other XAML based child workflows from a workflow then you can use the ExecuteXamlWorkflow custom activity I described in my previous post.
  2. Work On More Than One Workflow At The Same Time
    Workflow Studio allows you to develop multiple workflows in a single application.
  3. Toolbox Support For All Standard WF Activities
    All standard WF 4.0 activities are supported.
  4. Add Custom Activities To The Toolbox
    To add custom activities to the toolbox, copy the custom activity DLL to the bin folder of Workflow Studio, select the "Add Reference …" option and locate the DLL file. The custom activity will then become available in the toolbox. If your workflow references custom activities then these will be automatically loaded and added to the toolbox when the workflow is loaded providing the referenced DLL has been previously copied to the bin folder. The section on designer rehosting in Pro WF Windows Workflow in .NET 4 by Bruce Bukovics, providing the details of toolbox manipulation that I used as basis for Workflow Studio.
  5. Execute Workflows Concurrently
    You can execute one or more workflows or workflow services concurrently by either selecting "Start Debugging" or "Start Without Debugging" from the debug menu. Running workflows can be stopped by selecting "Abort" from the same menu. Each workflow has its own independent output window where WriteLine activity or exception stack trace output is written. You can also capture output through a trace source and associate a listener to log the output. We're using standard .NET diagnostics here, so it's totally flexible.
  6. Show Workflow Validation Errors
    Any validation errors detected by the designer are displayed in the error window along with error code and severity. Each workflow has its own independent window.
  7. Debug Workflows
    This isn't fully fledged Visual Studio debugging - it's workflow tracking. You'll see the currently executing activity highlighted in the designer so you'll be able to visually track the execution path of your workflow in real time. As each activity executes the activity name, id, state and workflow instance id are written to the workflow's debug window. Clicking on a row in the debug window will focus the designer on the corresponding activity. Similar to workflow output, the debug window output is also captured through a trace source so that output can be logged. Check out Visual Workflow Tracking in WCF and WF Samples for .NET Framework 4 which demonstrates how to implement visual tracking in the designer.
  8. Visual Studio Like Window Docking And Pinning
    One of the key features of Workflow Studio is to offer full window docking and pinning functionality that you find in Visual Studio. This functionality is provided by the AvalonDock open source WPF docking framework. This is a great framework but took some jumping through hoops to get working. I started out wanting to make this a pure MVVM application but soon discovered this wasn't easy, if at all possible. Apparently this is addressed with the up and coming 2.0 release along with other improvements. Note that you'll need to download and install AvalonDock independently of Workflow Studio since I don't redistribute it here - don't worry this is simple. Unfortunately there's no NuGet package available as yet so please follow instructions below.

...

Installing AvalonDock

As previously mentioned, AvalonDock is not distributed with Workflow Studio so you need to download and install it first. This version of Workflow Studio has been developed with version 1.3.3571 of AvalonDock so please ensure you install this version. The steps are simple:

  1. Download AvalonDock version 1.3.3571 from http://avalondock.codeplex.com/releases/48794/download/131885
  2. Run the installer. This will GAC the AvalonDock assembly.
  3. Build the solution. You should not need to modify any references.

..."

If you've ever wondered at embedding the WorkFlow Designer into your app's (for example, like you see in TFS 2010 Team Build, etc) this is a project you should check out. This is not a binary project, you get the entire source to this. That's cool. Once I installed AvalonDock as mentioned above, the code just compiled and worked, no issues or problems

imageSNAGHTML3854dd3c[4]

The Hello World Example (which you can run and debug right there in the Studio, now that's awesome).

SNAGHTML385b5aa5

Simply put, if you're thinking about Windows Workflow you should check this project out...

C# API for your brain... Jim Galasyn's Emotiv Engine Client Library on CodePlex

Jim Galasyn's Learning Curve - Emotiv Engine Client Library is posted at CodePlex

"I finally got my act together and posted the code for my EmoEngineClientLibrary, which is a C# wrapper around the DotNetEmotivSDK.dll assembly that ships with the Emotiv SDK.

You may recall this code library from such blog posts as:

untitled

With this API, you can collect realtime neurodata from the EPOC headset in a managed application. The API simplifies databinding by exposing EmoEngine methods as CLR properties. Also, it provides a PropertyChanged event that notifies your code when new neurodata and other signals arrive. You also get a lightweight WPF visualization library that renders neurodata in realtime.

CodePlex - Emotiv Engine Client

Project Description
Provides an event-driven .NET framework wrapper around the managed Emotiv EPOC neuroheadset API.

Requirements

  • Emotiv EPOC neuroheadset Research Edition SDK: Available from Emotiv, list price $750.00.
  • Visual Studio 2010: Available from Microsoft.
  • Windows 7 or higher: Widely available, e.g., Microsoft Store.
Documentation
Reasonably complete documentation (EmoEngineClientLibrary Documentation) is built in the project by using Sandcastle. A brief overview is provided in the Documentation tab.

This doesn't do you any good unless you've got an Emotiv EPOC neuroheadset laying around (well, doesn't everyone? :P ) but I still thought this uber-cool. Talk about the next stage of NUI... :)

 

Related Past Post XRef:
It's as if it can read your mind...

Want to know more about VB.Net/C#? Like maybe the full language specification? Check your hard drive, you might already have them...

I found this tip via Salvo Davide Rapisarda - C# and VB.NET language specification and after checking my computer, had a pwop (open palm smacking forehead) moment. I can't believe I've had these all this time and didn't know about it. Man, everyday I learn just a little I know...

Now I've got allot of extra stuff installed, all the high-end editions, every SDK, feature, framework, etc. etc. etc. installed so your mileage may vary, but based on the time stamps it looks like I've had these since I installed VS2010 (and in checking two other systems, they also have these doc's)...

So if you're looking for some lite reading and want to know the real language details and specifications, check your HD...

imageimage

SNAGHTML3836add2SNAGHTML383c7bda

 

Related Past Post XRef:
602 Pages of pure and complete VB’ness, the Visual Basic Language Specification 10.0
XAML Language Specification (as in the in the full XAML, WPF and Silverlight XAML Specs)