Пример #1
0
        /// <summary>
        /// Shows the notify window.
        /// </summary>
        private void ShowNoty()
        {
            if (this.InvokeRequired)
            {
                DelegateShowNotify inv = new DelegateShowNotify(this.ShowNoty);
                this.Invoke(inv, new object [] { });
            }
            else
            {
                not.Hide();
                not.SetBackgroundBitmap(Resource.skin3, Color.FromArgb(255, 0, 255));
                not.SetCloseBitmap(Resource.close, Color.FromArgb(255, 0, 255), new Point(280, 57));
                not.TitleRectangle        = new Rectangle(150, 57, 125, 28);
                not.ContentRectangle      = new Rectangle(75, 92, 215, 55);
                not.TitleClick           += new EventHandler(TitleClick);
                not.ContentClick         += new EventHandler(ContentClick);
                not.CloseClick           += new EventHandler(CloseClick);
                not.CloseClickable        = true;
                not.TitleClickable        = false;
                not.ContentClickable      = false;
                not.KeepVisibleOnMousOver = true;
                not.ReShowOnMouseOver     = true;

                string result = Common.VersionCheck();
                if (!string.IsNullOrEmpty(result))
                {
                    string current = Config.GetStringValueFromConfigByKey(@"SharedCacheVersionNumber");
                    if (current.Equals(result))
                    {
                        not.Show("Version Check", "Latest version is used: " + result, 250, 15000, 500);
                    }
                    else
                    {
                        not.Show("Version Check", "New version is available: " + result, 250, 15000, 500);
                    }
                }

                //COM.IndexusStatistic stat = COM.Provider.Cache.IndexusDistributionCache.SharedCache.GetStats();

                //if (stat != null)
                //{
                //  not.Show("Shared Cache Status", stat.ToNotify(), 250, 30000, 500);
                //}
                //else
                //{
                //  not.Show("Info", "No Data Available - check if service is running", 500, 3000, 500);
                //}
            }
        }
Пример #2
0
 /// <summary>
 /// Shows the notify window.
 /// </summary>
 private void ShowNoty()
 {
     if (this.InvokeRequired)
     {
         DelegateShowNotify inv = new DelegateShowNotify(this.ShowNoty);
         this.Invoke(inv, new object [] { });
     }
     else
     {
         not.Hide();
         not.SetBackgroundBitmap(Resource.skin3, Color.FromArgb(255, 0, 255));
         not.SetCloseBitmap(Resource.close, Color.FromArgb(255, 0, 255), new Point(280, 57));
         not.TitleRectangle        = new Rectangle(150, 57, 125, 28);
         not.ContentRectangle      = new Rectangle(75, 92, 215, 55);
         not.TitleClick           += new EventHandler(TitleClick);
         not.ContentClick         += new EventHandler(ContentClick);
         not.CloseClick           += new EventHandler(CloseClick);
         not.CloseClickable        = true;
         not.TitleClickable        = false;
         not.ContentClickable      = false;
         not.KeepVisibleOnMousOver = true;
         not.ReShowOnMouseOver     = true;
     }
 }
Пример #3
0
		/// <summary>
		/// Shows the notify window.
		/// </summary>
		private void ShowNoty()
		{
			if (this.InvokeRequired)
			{
				DelegateShowNotify inv = new DelegateShowNotify(this.ShowNoty);
				this.Invoke(inv, new object [] { } );
			}
			else
			{
				not.Hide();
				not.SetBackgroundBitmap(Resource.skin3, Color.FromArgb(255, 0, 255));
				not.SetCloseBitmap(Resource.close, Color.FromArgb(255, 0, 255), new Point(280, 57));
				not.TitleRectangle = new Rectangle(150, 57, 125, 28);
				not.ContentRectangle = new Rectangle(75, 92, 215, 55);
				not.TitleClick += new EventHandler(TitleClick);
				not.ContentClick += new EventHandler(ContentClick);
				not.CloseClick += new EventHandler(CloseClick);
				not.CloseClickable = true;
				not.TitleClickable = false;
				not.ContentClickable = false;
				not.KeepVisibleOnMousOver = true;
				not.ReShowOnMouseOver = true;

				string result = Common.VersionCheck();
				if (!string.IsNullOrEmpty(result))
				{
					string current = Config.GetStringValueFromConfigByKey(@"SharedCacheVersionNumber");
					if(current.Equals(result))
						not.Show("Version Check", "Latest version is used: " + result, 250, 15000, 500);					
					else
						not.Show("Version Check", "New version is available: " + result, 250, 15000, 500);
				}

				//COM.IndexusStatistic stat = COM.Provider.Cache.IndexusDistributionCache.SharedCache.GetStats();

				//if (stat != null)
				//{
				//  not.Show("Shared Cache Status", stat.ToNotify(), 250, 30000, 500);
				//}
				//else
				//{
				//  not.Show("Info", "No Data Available - check if service is running", 500, 3000, 500);
				//}
			}			
		}