예제 #1
0
        public bool Confirm(string question)
        {
            ConfirmationWindow confirmationWindow = new ConfirmationWindow(question, string.Format("{0},{1}", Resources.Yes, Resources.No), "White");

            confirmationWindow.ShowDialog();
            return(confirmationWindow.Tag.ToString() == Resources.Yes);
        }
예제 #2
0
        public string AskQuestion(string question, string buttons, string backgroundColor)
        {
            ConfirmationWindow confirmationWindow = new ConfirmationWindow(question, buttons, backgroundColor)
            {
                Owner = Application.Current.MainWindow
            };
            ConfirmationWindow confirmationWindow1 = confirmationWindow;

            if (LocalSettings.WindowScale > 0)
            {
                ScaleTransform layoutTransform = confirmationWindow1.LayoutTransform as ScaleTransform;
                if (layoutTransform != null)
                {
                    layoutTransform.ScaleX = LocalSettings.WindowScale;
                    layoutTransform.ScaleY = LocalSettings.WindowScale;
                }
            }
            confirmationWindow1.ShowDialog();
            return(confirmationWindow1.Tag.ToString());
        }