/// <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."); } }