Example #1
0
        void msg()
        {
            MessageBoxResult result = MessageBox.Show("Đăng ký thành công.\nQuay lại đăng nhập?", "", MessageBoxButton.YesNo, MessageBoxImage.Information);

            if (result == MessageBoxResult.Yes)
            {
                ButtonClose.Command.Execute(null);
            }
        }
 private void ButtonCustomMessage_OnClick(object sender, RoutedEventArgs e)
 {
     MessageBox.Show(new MessageBoxInfo
     {
         Message      = Properties.Langs.Lang.GrowlAsk,
         Caption      = Properties.Langs.Lang.Title,
         Button       = MessageBoxButton.YesNo,
         IconBrushKey = ResourceToken.AccentBrush,
         IconKey      = ResourceToken.AskGeometry,
         StyleKey     = "MessageBoxCustom"
     });
 }
 public void Divide(double left, double right)
 {
     Thread.Sleep(600);
     if (CanDivide(left, right) == true)
     {
         Result = left / right;
     }
     else
     {
         MessageBox.Show("Divider cannot be zero.", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning);
     }
 }
Example #4
0
 private void ButtonCustomMessage_OnClick(object sender, System.Windows.RoutedEventArgs e)
 {
     MessageBox.Show(new MessageBoxInfo
     {
         Message      = "A new version has been detected! Do you want to updata?",
         Caption      = "Title",
         Button       = MessageBoxButton.YesNo,
         IconBrushKey = ResourceToken.AccentBrush,
         IconKey      = ResourceToken.AskGeometry,
         StyleKey     = "MessageBoxCustom"
     });
 }
Example #5
0
        private void Test_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            // Message = "Test", Caption = "Url", Button = MessageBoxButton.YesNo, IconBrushKey = ResourceToken.AccentBrush, IconKey = ResourceToken.InfoGeometry, StyleKey = "MessageBoxCustom"

            MessageBox.Show(new MessageBoxInfo
            {
                Message      = "show this",
                Caption      = "Title",
                Button       = MessageBoxButton.YesNo,
                IconBrushKey = ResourceToken.AccentBrush,
                IconKey      = ResourceToken.AskGeometry,
                StyleKey     = "MessageBoxCustom"
            });
        }
Example #6
0
        public void SetDesktopWallpaper(string file_name, bool update_registry)
        {
            try
            {
                // If we should update the registry,
                // set the appropriate flags.
                uint flags = 0;
                if (update_registry)
                {
                    flags = SPIF_UPDATEINIFILE | SPIF_SENDWININICHANGE;
                }

                // Set the desktop background to this file.
                if (!SystemParametersInfo(SPI_SETDESKWALLPAPER,
                                          0, file_name, flags))
                {
                    MessageBox.Show("SystemParametersInfo failed.", "Error");
                }
            }
            catch (Exception)
            {
                MessageBox.Show("Error displaying picture ", "Error");
            }
        }
 private void ButtonMessage_OnClick(object sender, RoutedEventArgs e)
 {
     MessageBox.Show(Properties.Langs.Lang.GrowlAsk, Properties.Langs.Lang.Title, MessageBoxButton.YesNo, MessageBoxImage.Question);
 }
Example #8
0
 private void ButtonMessage_OnClick(object sender, System.Windows.RoutedEventArgs e)
 {
     MessageBox.Show("A new version has been detected! Do you want to updata?", "Title", MessageBoxButton.YesNo, MessageBoxImage.Question);
 }