The blog has moved to a new address. The blog is now located at http://devintelligence.com

Sunday, February 04, 2007

Propertygrid: How to show only specific file extensions?

 

Use Editor Attribute

 

[DisplayName("Resume")]
[Description(
"Resume File Name")]
[Editor(
typeof(DocFileEditor), typeof(UITypeEditor))]
public string ResumeFile
{
get
{
return _ResumeFile;
}
set
{
_ResumeFile
= value;
}
}

 


 


Override InitializeDialog method and provide Filter string that describes allowed file extensions



using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.Design;

namespace WindowsApplication1
{
class DocFileEditor : FileNameEditor
{
///<summary>
///Initializes the open file dialog when it is created.
///</summary>
///
///<param name="openFileDialog">The <see cref="T:System.Windows.Forms.OpenFileDialog">
</see> to use to select a file name. </param>
protected override void InitializeDialog(OpenFileDialog openFileDialog)
{
openFileDialog.CheckFileExists
= false;
openFileDialog.Filter
= "Doc files (*.doc)|*.doc|All files (*.*)|*.*";

}
}
}

Saturday, January 27, 2007

PropertyGrid: How to make specific property read only ?

Use ReadOnly attribute or remove set accessor ...

[ReadOnly(true)]
public int Age
{
get
{
return _Age;
}
set
{
_Age
= value;
}
}


 


source(russian)

PropertyGrid: How to group properties by category?

Use Category attribute .Note that properties without the attribute will be shown uder category named "Misc"

[DisplayName("First Name")]
[Description(
"First Name of the person")]
[Category(
"Personality")]
public string FirstName
{
get
{
return _FirstName;
}
set
{
_FirstName
= value;
}
}


[Category(
"Specific")]
public Color HairColor
{
get
{
return _HairColor;
}
set
{
_HairColor
= value;
}
}

source(russian)

PropertyGrid: How to show description for specific property?

 Use Description attribute

[DisplayName("First Name")]
[Description(
"First Name of the person")]
public string FirstName
{
get
{
return _FirstName;
}
set
{
_FirstName
= value;
}
}


 


source(russian)

PropertyGrid: How to change property name?

To display property name in readable form you can use DisplayName attribute

[DisplayName("First Name")]
public string FirstName
{
get
{
return _FirstName;
}
set
{
_FirstName
= value;
}
}


source(russian)

Wednesday, January 24, 2007

ASP.NET AJAX 1.0

ASP.NET AJAX 1.0 delivers a rich client-side AJAX library that provides cross platform, cross browser support for a core JavaScript type-system, JSON-based network serialization stack, JavaScript component/control model, as well as common client JavaScript helper classes.  ASP.NET AJAX also delivers a rich server-side library that integrates AJAX functionality within ASP.NET, and enables developers to easily AJAX-enable existing ASP.NET 2.0 sites with minimal effort. 

Download ASP.NET AJAX 1.0

Friday, January 12, 2007

MSN Search SDK Beta Version 0.60

The MSN Search SDK provides documentation that describes the core concepts, requirements, development guidelines, and class library for the MSN Search Web Service. The SDK also contains sample code that demonstrates application development techniques using the MSN Search Web Service.

Wednesday, November 08, 2006

ReSharper UnitRun

ReSharper UnitRun is a free add-in for Microsoft Visual Studio 2005 that allows you to automatically run and profile unit tests. This user-friendly tool detects test fixtures of the supported unit testing frameworks and lets you run or profile them right from the code editor or from Visual Studio's Solution Explorer.

A dedicated window is provided to analyze test results, run or rerun any tests, and navigate from a failed test's output directly to the code line that originated the exception. Results are displayed in the Unit Test Tree View, which contains an overview of all tests in the build together with colored icons to indicate the state of each test. From this view you can start running, debugging or profiling tests.

ReSharper UnitRun

 

Download ReSharper UnitRun

 

Technorati tags: , , ,

Tuesday, October 31, 2006

Microsoft Visual Studio 2005 IDE Enhancements

Visual Studio 2005 IDE Enhancements are a set of Visual Studio extensions that are designed to make you more productive. These enhancements are directly integrated into the Visual Studio IDE. Previously, these enhancements were only available via the Visual Studio 2005 SDK. This installation does not require Visual Studio 2005 SDK.


Source Code Outliner : The Source Outliner tool is a Visual Studio extension that provides a tree view of your source code's types and members and lets you quickly navigate to them inside the editor.

Visual C++ Code Snippets:The Visual C++ Code Snippets tool lets you insert snippets in your code by using a pop-up menu that contains programming keywords. VB.NET and C# languages have this functionality in Visual Studio 2005.

Indexed Find : The Indexed Find tool is a Visual Studio extension that uses the Microsoft Indexing Service to provide improved Search capabilities to the integrated development environment (IDE). It sends the results of a search to the Output Window.

Super Diff Utility: The Super Diff Find tool is a Visual Studio extension that compares text files. It uses color coding and graphics to show the difference between the files in deleted text (red), changed text (blue), inserted text (green).

Event Toaster Utility: The Event Toaster tool is a Visual Studio extension that notifies users about specific events within the Visual Studio IDE.

 

Download Microsoft Visual Studio 2005 IDE Enhancements

Thursday, October 05, 2006

Foxit Reader 2.0 is just released.

"Foxit Reader 2.0 is a free PDF document viewer and printer, with incredible small size (only 1.5 M download size), breezing-fast launch speed and amazingly rich feature set. Foxit Reader 2.0 supports Windows 95/98/Me/2000/XP/2003. Its core function is compatible with PDF Standard 1.6."

New Features

  • Interactive form filler: Now you don't have to print out PDF forms first and then manually fill out paper forms. Instead, you can use PC to fill out interactive forms directly, and then print them out, save them, email them or export the form data into FDF file for further processing.
  • Multi-language UI that can be dynamically switched: The user interface of Foxit Reader now can be switched to different languages dynamically, thanks to the generous help from our user community.
  • On-demand download of add-on: With add-ons, the function of Foxit Reader can be extended unlimitedly. Advanced feature modules and seldom-used modules are packed as add-on to be downloaded when needed.
  • Self-upgrade: In the past, when you want to upgrade Foxit Reader, you have to frequently visit Foxit website, check for new release, and then manually download the new version, uninstall the old version and re-install the new version. Now this whole process is simplified and you only need to click on the menu item "Check for update now".
  • Javascript support: Advanced users are able to use Javascript to create complex logic for PDF forms, to validate user input and process data.
  • Improved printing speed: Printing a PDF file with many images on it to a PostScript printer used to be slow. Version 2.0 has been optimized for such printing.
  • Streamlined UI: Version 2.0 comes with a neat UI. Annotation tool buttons are grouped together and no longer being showed on several toolbars.
  •  

    Download Foxit Reader 2.0

    Wednesday, October 04, 2006

    The Most Intelligent Integrated Team Environment - TeamCity

    JetBrains has released their integrated team environment.

    TeamCity provides intelligent, automated running and monitoring of build processes, and facilitates integration of changes for developers working on both .Net and Java platforms.

     

    Top features include:

    • Continuous Integration Support - remotely integrate and test code changes many times a day utilizing NUnit (.NET) or JUnit (Java) testing frameworks. 
    •  Effective Build Management allows running builds using such popular build tools as NAnt, MSBuild, Ant, and Maven, and immediately provides information about build results via the web interface or a special Windows Tray Notifier add-in. When a build fails, any developer can take responsibility for fixing it and quickly notify other team members that the problem is being handled.
    • Innovative "Build Grid" which can utilize multiple computing
      resources anywhere on your network so developers' computers don't get bogged down. Each computer in the build grid can define its own environmental parameters and TeamCity intelligently distributes testing and builds among appropriate machines as resources are available.
    • Web-based Administration - developers and their managers can easily get build and test reports, see the current build status, and configure all the necessary build settings using the rich web interface. Build history and all built artifacts are also accessible.

    [Via LarkWare News]

     

     

    Technorati tags: , , ,

    Monday, October 02, 2006

    Replacing the DHTML Editing Control in Windows Vista and Beyond

    "The DHTML Editing Control will not be included in Windows Vista. Web pages and Windows applications that use the control must be modified to continue to provide a WYSIWYG HTML Editor."

    To read more about this, check out the MSDN article at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnlong/html/htmleditinfuture.asp

     

    Technorati tags: , , ,

    Friday, September 22, 2006

    Web Client Software Factory project Community site

    The Web Client Software Factory is a guidance offering currently under development that will provide comprehensive architecture guidance to help customers build web solutions using the Microsoft platform (ASP.NET, ASP.NET AJAX, Workflow Foundation, etc).

    The factory will include:

    • Scenario documentation (a description of the requirements and technical challenges that the factory will address)
    • Architecture documentation
    • Design patterns
    • How-tos
    • Guidance Packages (Visual Studio 2005 extensions for automating common tasks)
    • Reference Implementations (complete sample applications using the Factory)
    • Training content (Hands-On-Labs, demos, etc)

    Wednesday, September 06, 2006

    Server Side Validation Library by Chad Finsterwald

    This article will introduce you to a server side validation library. The objectives of the library are to:

    1. Provide a uniform and extensible approach for even complex validation scenarios.
    2. Reduce the amount of code required for user input validation.
    3. Create a consistent user experience with both visual and textual feedback regarding specific user input errors.
    4. Centralize page-level user validation so that it is easier to maintain and comprehend.

    [Via help.net]

    Tuesday, September 05, 2006

    XML Notepad 2006

     

    XML Notepad 2006 provides a simple intuitive User Interface for browsing and editing XML documents.

    Features:

    • Tree View synchronized with Node Text View for quick editing of node names and values.
    • Incremental search (Ctrl+I) in both tree and text views, so as you type it navigates to matching nodes.
    • Cut/copy/paste with full namespace support.
    • Drag/drop support for easy manipulation of the tree, even across different instances of XML Notepad and from the file system.
    • Infinite undo/redo for all edit operations.
    • In place popup multi-line editing of large text node values.
    • Configurable fonts and colors via the options dialog.
    • Full find/replace dialog with support for regex and XPath.
    • Good performance on large XML documents, loading a 3mb document in about one second.
    • Instant XML schema validation while you edit with errors and warnings shown in the task list window.
    • Intellisense based on expected elements and attributes and enumerated simple type values.
    • Support for custom editors for date, dateTime and time datatypes and other types like color.
    • Handy nudge tool bar buttons for quick movement of nodes up and down the tree.
    • Inplace HTML viewer for processing xml-stylesheet processing instructions.
    • Built-in XML Diff tool.

    Download XML Notepad 2006

    Tuesday, August 29, 2006

    Clean Sources

    This Application does one thing. It adds an explorer shell menu to folders that when selected will recursively delete the contents of the bin, obj and setup folders. If you have a .NET project that you wish to share with some one, this is useful to remove the unnecessary stuff from the folder before you zip it up and send it off.

    Download Clean Sources

    Monday, August 28, 2006

    Code Formatter Plugin for Windows Live Writer

     

    Features:
    • The ability to format the code 'live'
    • The ability to wrap lines
    • The ability to change the background color
    • The ability to just quickly paste what's in the clipboard as code

     

    Download Code Formatter Plugin

     

    tags: , , ,

    Sunday, August 20, 2006

    Application Updater by Wilco Bauwer

    This new application updater is a new application updater component which is customizable and supports both WebDAV and BITS . BITS allows you to let the application download updates in the background, which means users would practically not notice anything, since BITS will use unused bandwidth.

    Usage:
    Add a reference to Updater.zip and implement the IAgent interface. Your IAgent implementation will be used for getting available updates and such.
    When you've done that, you write your own download implementation in case you don't want to use WebDAV or BITS to download updates.
    The next thing you got to do is initialize a new Updater, add eventhandlers, and that's basically all you got to do.
    If you want to check for updates, you call the Refresh method on the Updater instance, when you've detected an update you call the Download method, and when you're done with updating and want to restart the application, you use the ApplyUpdate method.

     

    Technorati Tags: 
     
     
     
     

    Saturday, August 19, 2006

    Threading in C# - By Joseph Albahari

    Threading in C# An extensive article on multi-threading in C#. This tackles difficult issues such as thread safety, when to use Abort, Wait Handles vs Wait and Pulse, the implications of Apartment Threading in Windows Forms, using Thread Pooling, Synchronization Contexts, Memory Barriers and non-blocking synchronization constructs.

    [Via Roy Osherove's Blog]

    Friday, August 11, 2006

    How can I prevent the SplitContainer from stealing focus?


    The default behavior for the splitter is to take focus once selected. If you want the splitter to be movable without taking focus you can do one of two things:
    Insert the following code in your project, and attach these events to all of the SplitContainers that you don't want stealing focus.


    // Temp variable to store a previously focused control
    private Control focused = null;
    private void splitContainer_MouseDown(object sender, MouseEventArgs e)
    {
    // Get the focused control before the splitter is focused
    focused = getFocused(this.Controls);
    }
    private Control getFocused(Control.ControlCollection controls)
    {
    foreach (Control c in controls)
    {
    if (c.Focused)
    {
    // Return the focused control
    return c;
    }
    else if (c.ContainsFocus)
    {
    // If the focus is contained inside a control's children
    // return the child
    return getFocused(c.Controls);
    }
    }
    // No control on the form has focus
    return null;
    }
    private void splitContainer_MouseUp(object sender, MouseEventArgs e)
    {
    // If a previous control had focus
    if (focused != null)
    {
    // Return focus and clear the temp variable for
    // garbage collection
    focused.Focus();
    focused = null;
    }
    }




    Technorati : , , ,