コード例 #1
0
        public MessageUser(string title, string mesage, string description, MessageBtns buttons)
        {
            InitializeComponent();

            TrayLocation         = trayLocation;
            TrayTitle            = title;
            TrayMesage           = mesage;
            TrayImageDescription = description;
            Choosebtns(buttons);
            ShowDialog();
        }
コード例 #2
0
        public MessageUser(string title, string mesage, string description, MessageLocation trayLocation,
                           MessageBtns buttons, int timeToClose, eAlertAnimation alertAnimation, Image trayImage)
        {
            InitializeComponent();

            AlertAnimation       = alertAnimation;
            TrayLocation         = trayLocation;
            TrayTitle            = title;
            TrayMesage           = mesage;
            TrayImageDescription = description;
            TrayImage            = trayImage;
            Choosebtns(buttons);
            AutoCloseTimeOut = timeToClose;
        }
コード例 #3
0
        void Choosebtns(MessageBtns buttons)
        {
            switch (buttons)
            {
            case MessageBtns.Cancel:
                pnlButtons.Show();
                bnCancel.Show();
                break;

            case MessageBtns.Ok:
                pnlButtons.Show();
                bnOk.Show();
                break;

            case MessageBtns.OKCancel:
                pnlButtons.Show();
                bnCancel.Show();
                bnOk.Show();
                break;
            }
        }