Ido Samuelson

Notes, thoughts and exceptions

<December 2008>
SuMoTuWeThFrSa
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910


Navigation

Blogs I read

Articles

My WorkSpaces

Subscriptions

News

Only 10 kind of people in the world. Those who understand binary and those who don't.

Post Categories

Article Categories



General (RSS)

General
Composite UI Application Block - Community Technical Preview

The Composite UI Application Block is designed to help you build these complex, enterprise ready Windows Forms—based solutions. It provides a proven architecture and implementation that helps you to build applications using the common patterns found in line-of-business front end applications.

Benefits

Building an application using the Composite UI Application Block provides the following benefits:

  • Increased solution quality and consistency for architecture teams by providing a structured, prescriptive environment that fosters reusability and predictability to build user interfaces.
  • Increased productivity and faster ramp-up time for large development teams, by hiding complexity and allowing them to focus on the business related components instead of on the underlying infrastructure and complex aspects of user interface development, such as threading and asynchronous processing.
  • Consolidation of operational efforts for operations teams by standardizing services that result in consistent configuration management and instrumentation implementations across a suite of applications.

This Community Technical Preview of the Composite UI Application Block can be downloaded from the Community Site. Important updates to this component until its final release will be made available on this site.

 

posted Wednesday, July 06, 2005 11:28 AM by snick

Enterprise Library June 2005 now available!

Enterprise Library June 2005 now available!

The June 2005 release is a minor update to the original January release. It incorporates the patches and extensions previously released to the community, and also includes miscellaneous minor bug fixes. Although this release is still designed for .NET Framework 1.1, it is now possible to use this with .NET Framework 2.0 beta 2 - see the included Readme file for details.

 

 

posted Saturday, July 02, 2005 6:14 PM by snick

Register HotKey fix

I wrote a HotKey component a few month ago and some reported me a bug that suspend, shutdown or restart did not work while the Hotkey was in use.

This bug was fixed and I updated the code on the original post: http://dotnetjunkies.com/WebLog/principal/archive/2005/04/21/69872.aspx

I was trying to find a way to register a hotkey without the use of the form's handle and the code that was on that post was one of those tries...

posted Tuesday, June 21, 2005 11:05 AM by snick

Data Mapping Application Block

"The Data Mapper is a layer of software that separates the in-memory objects from the database. Its responsibility is to transfer data between the two ends to isolate them from each other. With Data Mapper the in-memory objects needn’t know even that there’s a database present; they need no SQL interface code, and certainly no knowledge of the database schema." (Fowler, Martin, Patterns of Enterprise Application Architecture, p. 165) Data Mappers equate to what is known as Data Access Logic Components (DALCs). This application block is intended to make it easier for producers of business DALCs to create common functionality that relates to managing "entities" with CRUD functions. The DataMapper also promotes the use of stored procedures as a best practice to abstract data access from the underlying data schema and increase performance. Finally, the DataMapper allows capabilities like the use of transactions, command timeouts, and caching properties to be added, removed, and modified through configuration when needed. For example, to add transactions or caching to a DALC, no code will need to be modified -- only configuration settings.”

Find out more here

posted Tuesday, June 14, 2005 7:58 AM by snick

Looking for a new host...

For the last couple of weeks I recieved a huge amount of spam from this blog.

I am now looking for a new (better and spam proof) place to host my blog.

If you are familier with a decent host please contact me.

Ido

posted Wednesday, June 08, 2005 11:07 AM by snick

MSN Messenger personal messages

Since MSN Messenger 7.0 released many people started to use the personal message to put a state about their feelings, life and “hints” they want to give to a specific person on their contact list.

I think the “personal” message is a very good way for a non formal communication. If you are a sensitive person with emotional intelegent abilities I am sure you know what I mean...

Here are some of the personal messages I have on my list...

  • “There ain't no such thing as free lunch.” - R. A. Henlein
  • I love deadlines, I like the whooshing sound they make as they fly by.
  • Professionals built the Titanic, amateurs built the Ark of Noah.
  • Ignorance is bliss.
  • Still haven't seen Ep3...
  • Mortgage is all you <don't> need
  • Don't kill the messenger!

as for my own:

“It is wonderful to be in on the creation of something, see it used, and then walk away and smile at it.” – Lady Bird Johnson

 

Life could be so beautiful if you just stop for a look :-)

posted Sunday, May 22, 2005 10:38 AM by snick

RegisterHotKey Implementation

Dan Amiga who is a great co-worker and a very tallent person showed me a very cool shortcuts application (C++) he wrote. I was so amazed about how easy it is to access any applications with few key strokes that I went home and wrote my own implementation for the same applciation, in C# of course.

The #1 thing I did was to implement this Component which fires a HotKeyPressed event when a desired windows HotKey was pressed.

Here is the implementation :

UPDATE: There was a mistake with the intptr Handle. Notice that now you need to supply the Form.Handle to this component. Suspend, Shutdown and Restart will work properly now...

public class HotKey : Component , IMessageFilter

   {

      public event EventHandler HotKeyPressed;

      private const int id = 100;

      #region Native win32 API

      private const int WM_HOTKEY = 0x0312;

      [DllImport("user32.dll", SetLastError = true)]

      private static extern bool RegisterHotKey(IntPtr hWnd, int id, KeyModifiers fsModifiers, Keys vk);

      [DllImport("user32.dll", SetLastError = true)]

      private static extern bool UnregisterHotKey(IntPtr hWnd, int id);

      [Flags()]

      public enum KeyModifiers

      {

         None = 0,

         Alt = 1,

         Control = 2,

         Shift = 4,

         Windows = 8

      }

      #endregion

      public event EventHandler KeyChanged;

      public event EventHandler KeyModifierChanged;

      private IntPtr handle;

      public IntPtr Handle

      {

         get { return handle; }

         set { handle = value; }

      }

      private Keys key;

      private KeyModifiers keyModifier;

      private bool isKeyRegisterd;

      public HotKey()

      {

         Application.AddMessageFilter(this);

      }

      ~HotKey()

      {

         Application.RemoveMessageFilter(this);

         UnregisterHotKey(handle, id);

      }

      private void RegisterHotKey()

      {

         if (key == Keys.None)

            return;

         if (isKeyRegisterd)

            isKeyRegisterd = !(UnregisterHotKey(handle, id));

         isKeyRegisterd = RegisterHotKey(handle, id, keyModifier, key);

         if (!isKeyRegisterd)

            throw new ApplicationException("Hotkey allready in use");

      }

      [Bindable(true), Category("HotKey")]

      public Keys Key

      {

         get { return key; }

         set

         {

            if (key != value)

            {

               key = value;

               OnKeyChanged(new EventArgs());

            }

         }

      }

      [Bindable(true), Category("HotKey")]

      public KeyModifiers KeyModifier

      {

         get { return keyModifier; }

         set

         {

            if (keyModifier != value)

            {

               keyModifier = value;

               OnKeyModifierChanged(new EventArgs());

            }

         }

      }

      public bool PreFilterMessage(ref Message m)

      {

         switch (m.Msg)

         {

            case WM_HOTKEY:

               OnHotKeyPressed(new EventArgs());

               return true;

         }

         return false;

      }

      private void OnHotKeyPressed(EventArgs e)

      {

         if (HotKeyPressed != null)

         HotKeyPressed(this, e);

      }

      private void OnKeyChanged(EventArgs e)

      {

         RegisterHotKey();

         if (KeyChanged != null)

            KeyChanged(this, e);

      }

      private void OnKeyModifierChanged(EventArgs e)

      {

         RegisterHotKey();

         if (KeyModifierChanged != null)

            KeyModifierChanged(this, e);

      }

}

posted Thursday, April 21, 2005 9:56 PM by