Microsoft All-In-One Code Framework is updated on 2010-05-31.
Download address: http://1code.codeplex.com/releases/view/46212#DownloadId=124539
If it’s the first time that you hear about Microsoft All-In-One Code Framework, please read the introduction on our homepage http://1code.codeplex.com/, and this Port25 article http://port25.technet.com/archive/2010/01/18/the-all-in-one-code-framework.aspx.
In this release, we also provided language-specific solutions files of each technology (e.g. All-In-One Office Samples (C#).sln, All-In-One Office Samples (VB.NET).sln, etc).
Azure New Samples
It's a common scenario that we want to use paging for table storage. However, due to current limitation of Table storage it only supports continuation token that can help us implement a simple previous/next paging. This sample demonstrates how to implement previous/next paging in a MVC application.
ASP.NET New Samples
The project illustrates how to customize a html extension method for paging.In this project we will define a class named Pager<T> to initialize some basic properties for paging, such as the total pages, how many records will be displayed in a page and so on. Then a html helper method would be defined in the next CustomizePager class to output page number.
Silverlight 4 New Samples
CSSL4COMInterop and VBSL4COMInterop demonstrate one of the Silverlight4 new features: COM interoperation. The sample application utilize AutomationFactory class to export data to notepad or MS Word applications and print.
Windows 7 New Sample
This sample demonstrates how to use Windows 7 multi-touch to create a simple but modern image viewer. You can use your fingers to translate (pan), scale (zoom), rotate, and skew the image. The image is rendered using modern Windows 7 technologies such as Direct2D and WIC.
If you don't have a touch screen, the sample still allows you to perform very simple interactions with the image by clicking the ribbon commands using your mouse. In order to keep the code file simple, the sample does not implement complex mouse interactivity as you can find in programs such as Expression Design.
This sample demonstrates how to use WPF 4's multi-touch events to manipulate a 3D scene. It renders an earth. You can use your fingers to rotate the earth in any directions (not only along the latitudes and the longitudes). You can also use the standard scale (zoom) gesture to scale the earth. If you happen to touch a circle that represents a Windows Azure data center, a notification message will be displayed on the window.
If you don't have a touch screen, you can use the mouse to simulate the behavior. In the sample code, you will discover that to implement multi-touch is actually simpler than to implement mouse events, thanks to the manipulation framework provided by WPF.
WPF New Samples
The sample demonstrates navigation usages in a WPF application.
Data Platform New Samples
The CSEFLazyLoading and VBEFLazyLoading examples illustrate how to work with the lazy loading feature which is newly implemented EF4. They also show how to use the eager loading and explicit loading which are already implemented in EF1 and make a comparison among the three ways that are generally used to load related entities in EF.
.NET CLR 4 Samples CppHostCLR, CSClassLibrary, CSNET2ClassLibrary
.NET 4 CLR has a new feature named in-process side-by-side, which enables multiple CLRs running in one process. The CppHostCLR sample demonstrates how to use the CLR 4 Hosting API in native C++ to load both CLR2 and CLR 4, and invoke a .NET 2.0 assembly CSNET2ClassLibrary.
Windows Forms Samples CSWinFormTreeViewTraversal, VBWinFormTreeViewTraversal
This example demonstrates how to perform TreeView nodes travel and find a special node. Sometimes, we find it necessary to list all nodes of a TreeView or find a node whose text is what we want. The sample contains an arithmetic which can do the job in non-recursion way. For the detail information, please read the FindNode method code logic. CSWinFormDesignerCodeDom, VBWinFormDesignerCodeDom
This sample demonstrates how to add your own customized generate code for control.
In this example, if we don't customize the code, system will generate following code for MyList property
this.myComponent1.MyList = ((System.Collections.Generic.List<string>)(resources.GetObject("myComponent1.MyList")));
But now we want the code with following format
this.myComponent1.MyList.Add("string5"); this.myComponent1.MyList.Add("string4"); this.myComponent1.MyList.Add("string3"); this.myComponent1.MyList.Add("string2"); this.myComponent1.MyList.Add("string1");
We create CodeDomSerializer’s inherit class MyCodeGenerator to do the task. Please read the CodeGenerator.cs/CodeGenerator.vb for the detail information. Windows Service Samples
This sample demonstrates how to interact with user from a Windows Service. Windows Vista introduced the ‘Session 0 isolation’ feature, which makes it impossible for a Windows Service to interact with users directly. If your service has to interact with users, please use one of the following two solutions:
1. Show a dialog in user session by calling the WTSSendMessage function2. Call CreateProcessAsUser to create a new process in the user session. The process inter-process communicate with the Windows service process.
CppInteractiveWindowsService demonstrates both solutions.
If you have any feedback for this release, please send it to firstname.lastname@example.org. Any suggestions will be appreciated.