Exemplo n.º 1
0
 /// <summary>
 /// Initializes the instance.
 /// </summary>
 public static void Initialize(TrayWindow window)
 {
     if (Instance == null)
     {
         IdleIcon = new Icon(ResourceHelper.GetResourceStream(ResourceHelper.TrayIconIdle),
                             new System.Drawing.Size(new System.Drawing.Point(16, 16)));
         AlertIcon = new Icon(ResourceHelper.GetResourceStream(ResourceHelper.TrayIconAlert),
                              new System.Drawing.Size(new System.Drawing.Point(16, 16)));
         Instance = new TrayBusiness(window);
     }
     else
     {
         throw new InvalidOperationException(
                   "The instance is already loaded.");
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes the instance.
 /// </summary>
 public static void Initialize(TrayWindow window)
 {
     if (Instance == null)
     {
         IdleIcon = new Icon(ResourceHelper.GetResourceStream(ResourceHelper.TrayIconIdle),
             new System.Drawing.Size(new System.Drawing.Point(16, 16)));
         AlertIcon = new Icon(ResourceHelper.GetResourceStream(ResourceHelper.TrayIconAlert),
             new System.Drawing.Size(new System.Drawing.Point(16, 16)));
         Instance = new TrayBusiness(window);
     }
     else
     {
         throw new InvalidOperationException(
             "The instance is already loaded.");
     }
 }