Archive for the ‘Uncategorized’ Category

Common XML Documentation Tags

Thursday, July 9th, 2009

Below is a list, with descriptions, of the most commonly used XML Documentation Tags.

<summary> / <remarks>
The <summary> tag is used to describe a type or a member. The <remarks> tag is used to add supplemental information to a type or member description.

/// <summary>Type or member description.</summary>
/// <remarks>Supplemental Information.</remarks>

<param>
The <param> tag is used for documenting the method parameter. The <param> tag is always used with the name attribute.

/// <summary>…</summary>
/// <param name=”arg1″>
Describe arg1 parameter.</param>
/// <param name=”arg2″>
Describe arg2 parameter.</param>
public void XmlDocumentationMethod(string arg1, int arg2) { … } 

<returns>
The <returns> tag is used for describing the return value from a method.

/// <summary>…</summary>
/// <returns>
Return value description.</returns>
public int XmlDocumentationMethod ( ) { … }

<see>
The <see> tag is used for adding links to your documentation. It can only be used inside other tags. Also, it has to be used with one of two attributes, href or cref. Href attribute is used for specifying the external hyperlinks. This is actually any link that a browser can recognize, including links to .doc and .pdf documents. Cref attribute is used for specifying an internal hyperlink. Internal hyperlink is linking to any item in the installed MSDN library on your local machine.

You can also use the langword attribute for documenting the language words such as true, false, null, etc.

/// <summary>
///
Various links inside text:
/// <see cref=”System.Exception”/>
/// <see href=”http://www.microsoft.com”/>
/// <see langword=”true”/>
/// </summary>
public void XmlDocumentationMethod ( )  { … }

<exception>
The <exception> tag is used in describing the exceptions that might be thrown by a member.

/// <summary>…</summary>
/// <exception cref=”SerializationException”/>
public void XmlDocumentationMethod ( )
{
            throw new SerializationException ( ) ;
}

 <c> / <code> / <example>
The <c> tag describes the in-line code. The <code> tage describes the code block. The <example> tag introduces the example section.

/// <summary>...</summary>
/// <example>
///
You have to clear the data before you can
/// execute the <c>Helper.Load()</c> to load data.
/// <code>
/// Helper.Clear();
/// Helper.Load();
/// </code>
/// </example>

public void Load() { … }

<list>
The <list> tag is used for formatting the text into a list. The List tag has to be used with the type attribute. The type attribute can be bullet (bulleted list), number (numbered list), or table.

/// <summary>...</summary>
/// <remarks>
///
Bulleted List:
/// <list type="bullet">
/// <item>
item 1</item>
/// <item>
item 2</item>
/// </list>
///
Numbered List:
/// <list type="number">
/// <item>
item 1</item>
/// <item>
item 2</item>
/// </list>
///
Table List:
/// <list type="table">
/// <listheader>
///     <term>
item</term>
///     <description>
description</description>
/// </listheader>
/// <item>
///     <term>
item 1</term>
///     <description>
description</description>
/// </item>
/// <item>
///     <term>
item 2</term>
///     <description>
description</description>
/// </item>
/// </list>
/// </remarks>
public void XmlDocumentationMetho ( )  { ... }

Visual Studio XML Documentation: Introduction

Monday, June 29th, 2009

Writing code documentation has always been a time consuming process. Additionally, reflecting code changes in the already finished documentation proved to be even more time consuming.

Since the beginning of time, code documentation existed only inside the code itself in the form of the in-line comments. However, modern programming languages introduced syntax for the in-line code comments (XML documentation syntax) and brought the capability of generating the external humanly-readable code documentation from these comments.

Visual Studio has a fully integrated support for the XML documentation. In order to use it inside your .NET project you need to enable it on the Build tab of the Properties page of the project.

Build XML Documentation

Once you build the project with the XML documentation option enabled, a list of warnings will be populated with the additional warnings informing you about the missing XML comments.

XML Error List

You can remove these warnings by simply adding the XML comments to each of the publicly visible types from the list. To add XML comment to the publicly visible type, simply type /// on top of it. Visual Studio will automatically generate the required XML comment syntax and all that is left for you to do is to describe it.

XML Comment Syntax

XML documentation supports a wide range of the XML tags used for formatting. I will describe these tags in detail in the second part of this post.

Resource Information from Microsoft Dynamics GP

Thursday, June 25th, 2009

Resource Information is one of the Standard mode features of the Support Debugging Tool.

By selecting Resource Information from the Options button drop list on the main window of the Support Debugging Tool, you can open the Resource Information window.

You can use the Resource Information window to show technical, display, and physical names and resource IDs for any form, window, field, table, table group or report resource in any dictionary currently installed in the Microsoft Dynamics GP application.

If you know any information about a resource, you can enter it into the appropriate field and the rest of the fields will be populated with the details for that resource.

For example, entering a window’s display name will identify the window’s technical name and resource ID; or entering a table’s physical name as it appears in SQL Server will identify the table’s dictionary,
technical and display names as well as the resource ID.

This window can be useful when working with table and column names in SQL Server, because it will quickly convert the physical names used in SQL back to the technical names used in Modifier, Report Writer and Dexterity.

Visual Studio 2010 and .NET Framework 4 Beta 1

Friday, May 22nd, 2009

Visual Studio 2010 Beta 1 is here!

Team Suite edition is available for download and can be obtained from Visual Studio 2010 Beta 1.

Also you can install new .NET Framework 4 Beta 1.

You can check out the new things this version has brought on Zander’s blog.

There are also walkthroughs available on MSDN so check them out too.

If you need a help installing VS2010 you can use this video guideline from Channel9.

Happy coding ;)

WPF Routed Events

Tuesday, May 19th, 2009

Windows Presentation Foundation (WPF) has brought, among other new and interesting things, a concept of routed events. So, what is so special about them?

Earlier, if you wanted to handle some sort of event, you needed to explicitly register for that event. When the event is raised, your handler is invoked. WPF uses a different approach.

All elements in WPF are organized in element trees (logical and visual). When a routed event is raised, it can travel up (so called bubbling) or down (tunneling) the visual and logical tree invoking handlers along the elements tree.

When a bubbling event is raised, the handler at the element source is invoked and the event is forwarded to its successive parents, all the way to the root of the element tree. Because of this, you handle an event on an element further up the element hierarchy from the source element. An example for a bubbling event would be the KeyDown event.

Tunneling events travel down the element tree. Event handlers at the element tree root are raised and the event is then forwarded to successive child elements until it reaches the source element. This allows upstream elements to intercept the event and handle it before the event reaches the source element. By convention they are named with the prefix Preview (e.g. PreviewKeyDown).

Direct event handling is also supported. This means that only explicitly registered event handlers will be invoked when the event is raised. The event does not travel up or down the element tree. This is the same as Windows Forms event-handling mechanism.

Input events are usually a pair of events, both the bubbling event and the tunneling event. For example, the KeyDown event and the PreviewKeyDown event are raised after a single user input action. First, the tunneling event is raised and travels its route. After that, the bubbling event is raised and travels its route. This allows listeners with handlers for the tunneling event to mark the routed event handled and thus stops the input bubbling events handler from invoking.

private void OnPreviewKeyDown(object sender, RoutedEventArgs e)

{

e.Handled = true;

}

But, there is a way to overcome this. What happens in background is that the event is routed anyway, just because of the Handled property set to true, handlers are not invoked. However, you can explicitly hook up event handlers with additional argument which states that handler will be invoked even if the event is marked as handled.

Elem.AddHandler(KeyDownEvent, new RoutedEventHandler(OnKeyDown), true);

How Fast Can You Do It? A Rapid Dynamics GP Cofiguration Wins a Garmin!

Thursday, May 14th, 2009

Here’s a contest from the Merit Matters Blog:

The Rapid Configuration Tool for Microsoft Dynamics GP quickly configures core application setup data to meet specific business needs. By using one of thirteen available industry templates, or a customized configuration template created in Microsoft Office Excel 2007, a new Microsoft Dynamics GP company can be configured easily within the intuitive user interface. Settings and data such as the chart of accounts, fiscal years, payment terms, shipping methods, taxes, core financial and distribution module setup, and more can be quickly set up using this tool.

This demo video takes a look at how fast the Rapid Configuration Tool can be used to configure a new Microsoft Dynamics GP company. Branislav Stojanovic, Senior Quality Analyst at Merit Solutions, shows us how to do it in 3 minutes. How fast can you do it?

Please continue reading at their blog for contest guidelines. Also, view a Case Study of a Rapid Dynamics GP Configuration – Mobile Life Ventures Goes Live with Dynamics GP in Two Weeks.

Merit Solutions Featured on Channel 9 Website

Monday, May 4th, 2009

John O’Donnell, Microsoft Dynamics ISV Architect Evangelist, recently stopped by the Merit Solutions office to discuss our Microsoft Dynamics AX 2009 Snap In – the Vendors Journal.

In this video, John talks with Merit Solutions team members Bill Burke and Nenad Simeunovic and learned about our Microsoft Dynamics AX 2009 Snap In / Integration capabilities.

Product Demonstration starts at time index – 8:10.

View the video on Channel 9:
A Look at Snap-Ins for Microsoft Dynamics AX 2009 by Merit Solutions

Using Fields and Properties in Word 2007 Documents

Friday, May 1st, 2009

Microsoft Word provides an extensive list of properties available for user. However, every now and then there is a need for a special property, especially when fields are used. Or so I thought.
Actually, fields aren’t used that often as one who uses them could expect. Although almost everyone has at one point in time used fields (Total number of pages, current page – these are actually fields), most of the users aren’t aware of this.

How to insert a field in a document:

In order to insert a field in a document, follow these steps:

  1. Position the cursor at the place in document where you want to insert the field
  2. Go to Insert > Quick Parts > Fields
  3. Select from the list of available fields (left pane) and select one of their properties

Microsoft Office Word Fields

That’s it. This way you can insert Author property, Create Date, Date Saved, etc.

How to create a new property and use it as a fields.

However, I found on a couple of occasions that I cannot find the property I need. For example, I needed something like Customer, Project, Technology… things that simply weren’t there. What I did – I create custom properties and used them as fields. Here is how:

  1. Click Microsoft Office Button > Prepare > Properties
  2. Document Properties menu and window are displayed. From Document Properties menu, select Advanced Properties
  3. Click on Custom tab
  4. In the Name field, type the name of your custom property (Customer in this example)
  5. Select Text from the Type drop down list
  6. Type in Customer’s name in the Value field
  7. Click Add
    1. Microsoft Office Word Customer Field
      Note: If you later want to edit this property, Add button will change to Modify when you select the property from the list of properties and change the value. It will not be available until you change it.
  8. Now position the cursor at the place in document where you want to insert the field
  9. Go to Insert > Quick Parts > Fields
  10. Select from the list of available fields (left pane) DocProperty
  11. Locate Customer property in the right pane and select it. Click OK.

Microsoft Office Word Customer Field Codes

That’s it.

Note: Although Word automatically updates fields, it seems that custom properties have to be updated manually. In order to do this, just right click on the field and select Update Field
Keywords: Word 2007 Property fields custom tips tricks

Search for Microsoft Dynamics with Power

Wednesday, April 15th, 2009

Most of the people who use Google search think of the Advanced Search option when they want to perform some more controllable searches. However, Advanced Search only offers a bit of Google’s search capabilities. Below are a few basic tips to extend the search knowledge of an average user.

  • +Term. When you search for often used words, like how, where, or the, they will be ignored. But if you want to have them in your search string you have to put a ‘+’ right on their left, e.g. “+how +to ax 2009 demo”
  • -Term. Use this when you want to exclude pages with certain words. That is most useful when you search for someone who has the same name as a celebrity, e.g. “Chuck Norris -actor -karate -facts -sport -video -youtube.com”. (Of course, in this case, this doesn’t work because no one else can have the name Chuck Norris)
  • ‘*’. Replaces one or more words, e.g.  ” “AX * Snap In”
  • Advanced Operators. The form for using advanced operators is operator:searching_term. There are many different operators and I will describe few.
    • Operator ‘site’. This limits the search results onto a certain web site or a group of web sites on the same domain, e.g. “AX site:meritsolutions.com
    • Operator ‘filetype’. This is useful when you are looking for a certain filetype in your results. Note: Don’t put a dot in front of the extension. Another good example is “AX 2009 filetype:pdf
    • Operator ‘link’. With this operator, you provide the url and you will get all pages which have links toward it. Let’s see the incoming links for the Merit Solutions’ homepage with the query “link:http://www.meritsolutions.com -site:www.meritsolutions.com
    • Operator ‘intitle’. This Operator filters the results to only those who have the search term in the title, e.g. “intitle:AX.2009. site:www.meritsolutions.com
    • Operator ‘inurl’. This Operator filters the results to those who have the search term in the url. Let’s try to find the download page of Vendors Journal AX Snap-In on meritsolutions.com, e.g. “AX Snap In site:www.meritsolutions.com inurl:download

Of course there are many more tips out there – and I invite you to share your Dynamics search tips below.

Utilizing Outlook 2007 for Schedules and Customizing Views

Wednesday, February 25th, 2009

In order to have a better overview of what the other colleagues are working on, Merit Solutions uses Outlook 2007 All Day Appointment entries to keep track of this. Each colleague enters a project name as an appointment subject, preceded by the priority of that project. For example, “1. Writing blog about Outlook 2007″.

However, I have noticed that occasionally the synchronization of our calendars may take a significant amount of time – which can result with a look at inaccurate information. I found out that keeping the calendars I’m interested in checked for viewing loads them much quicker – probably because it synchronizes with Exchange upon start.

Furthermore, if we customize the view, it seems to be even quicker. Here’s how:

  1. Open Calendar, View > Current View > Define Views
  2. Click New
  3. Name it Schedule, and select Day/Week/Month type and All Calendar folders; click OK
  4. Click Filter button
  5. Click Advanced tab
  6. Click Field button and under All Appointment fields, select All day events, condition equals, Value Yes
  7. Click Add to List and OK
  8. Click OK
  9. Click Apply View
  10. From People’s Calendars, select those you’d like to see
  11. Click on the arrow pointing to left in order to overlap the calendars (this is not necessary, although I use it all the time; you can still view the calendars side by side)

That’s it. It will load and display only all day events.