コード例 #1
0
 /// <summary>
 /// Show 'toast' window to notify new version is available
 /// </summary>
 /// <param name="updates">Appcast updates</param>
 /// <param name="applicationIcon">Icon to use in window</param>
 /// <param name="clickHandler">handler for click</param>
 public virtual void ShowToast(NetSparkleAppCastItem[] updates, Icon applicationIcon, Action<NetSparkleAppCastItem[]> clickHandler)
 {
     var toast = new ToastNotifier
         {
             Image =
                 {
                     Image = applicationIcon != null ? applicationIcon.ToBitmap() : Resources.software_update_available1
                 }
         };
     toast.ToastClicked += (sender, args) => clickHandler(updates); // TODO: this is leak
     toast.Show(Resources.DefaultNetSparkleUIFactory_ToastMessage, Resources.DefaultNetSparkleUIFactory_ToastCallToAction, 5);
 }
コード例 #2
0
        /// <summary>
        /// Show 'toast' window to notify new version is available
        /// </summary>
        /// <param name="updates">Appcast updates</param>
        /// <param name="applicationIcon">Icon to use in window</param>
        /// <param name="clickHandler">handler for click</param>
        public virtual void ShowToast(AppCastItem[] updates, Icon applicationIcon, Action <AppCastItem[]> clickHandler)
        {
            var toast = new ToastNotifier
            {
                Image =
                {
                    Image = applicationIcon != null ? applicationIcon.ToBitmap() : Resources.software_update_available1
                }
            };

            toast.ToastClicked += (sender, args) => clickHandler(updates); // TODO: this is leak
            toast.Show(Resources.DefaultUIFactory_ToastMessage, Resources.DefaultUIFactory_ToastCallToAction, 5);
        }
コード例 #3
0
        /// <summary>
        /// Show 'toast' window to notify new version is available
        /// </summary>
        /// <param name="updates">Appcast updates</param>
        /// <param name="applicationIcon">Icon to use in window</param>
        /// <param name="clickHandler">handler for click</param>
        public virtual void ShowToast(NetSparkleAppCastItem[] updates, Icon applicationIcon, Action <NetSparkleAppCastItem[]> clickHandler)
        {
            var toast = new ToastNotifier
            {
                Image =
                {
                    Image = applicationIcon.ToBitmap()
                }
            };

            toast.ToastClicked += (sender, args) => clickHandler(updates); // TODO: this is leak
            toast.Show(Resources.DefaultNetSparkleUIFactory_ToastMessage, Resources.DefaultNetSparkleUIFactory_ToastCallToAction, 5);
        }
コード例 #4
0
 /// <summary>
 /// Show 'toast' window to notify new version is available
 /// </summary>
 /// <param name="item">Appcast item</param>
 /// <param name="applicationIcon">Icon to use in window</param>
 /// <param name="clickHandler">handler for click</param>
 public virtual void ShowToast(NetSparkleAppCastItem item, Icon applicationIcon, EventHandler clickHandler)
 {
     var toast = new ToastNotifier
         {
             Tag = item,
             Image =
                 {
                     Image = applicationIcon.ToBitmap()
                 }
         };
     toast.ToastClicked += clickHandler;
     toast.Show(Resources.DefaultNetSparkleUIFactory_ToastMessage, Resources.DefaultNetSparkleUIFactory_ToastCallToAction, 5);
 }
コード例 #5
0
        /// <summary>
        /// Show 'toast' window to notify new version is available
        /// </summary>
        /// <param name="item">Appcast item</param>
        /// <param name="applicationIcon">Icon to use in window</param>
        /// <param name="clickHandler">handler for click</param>
        public virtual void ShowToast(NetSparkleAppCastItem item, Icon applicationIcon, EventHandler clickHandler)
        {
            var toast = new ToastNotifier
            {
                Tag   = item,
                Image =
                {
                    Image = applicationIcon.ToBitmap()
                }
            };

            toast.ToastClicked += clickHandler;
            toast.Show(Resources.DefaultNetSparkleUIFactory_ToastMessage, Resources.DefaultNetSparkleUIFactory_ToastCallToAction, 5);
        }