Example #1
0
 private void CheckPreRequisites(InformationFlags flags)
 {
     informationFlags |= flags;
     if (informationFlags.HasFlag(InformationFlags.All))
     {
         btnStart.IsEnabled = true;
     }
 }
Example #2
0
        /// <summary>
        /// Shows balloon tooltip.
        /// </summary>
        /// <param name="aTitle">Title for tip.</param>
        /// <param name="aText">Text of tip.</param>
        /// <param name="aType">Type of icon.</param>
        /// <param name="aTimeoutInMilliSeconds">Time to show.</param>
        public void ShowBalloon(string aTitle, string aText, InformationFlags aType, int aTimeoutInMilliSeconds)
        {
            if (aTimeoutInMilliSeconds < 0)
            {
                return;
            }
            NotifyIconData data = new NotifyIconData();

            data.Size            = ((uint)(Marshal.SizeOf(data)));
            data.CallbackMessage = this.msgTarget.UserMessage;
            data.WndHandle       = this.msgTarget.Handle;
            data.ID               = this.ID;
            data.IconHandle       = this.Icon.Handle;
            data.Flags           |= Flags.Info | Flags.Icon | Flags.Message;
            data.TimeoutOrVersion = ((uint)(aTimeoutInMilliSeconds));
            data.Tip              = "Balloon";
            data.InfoTitle        = aTitle;
            data.Info             = aText;
            data.InfoFlags        = aType;
            Shell_NotifyIcon(Commands.Modify, ref data);
        }