Beispiel #1
0
        public static MessageBoxResult ShowChoiceBox(string title, string message)
        {
            if (AppLib.ChoiceWindow == null)
            {
                AppLib.CreateChoiceBox();
            }

            AppLib.ChoiceWindow.Title       = title;
            AppLib.ChoiceWindow.MessageText = message;

            // надписи на кнопках Да/Нет согласно выбранному языку
            string sYes = AppLib.GetLangTextFromAppProp("dialogBoxYesText");
            string sNo  = AppLib.GetLangTextFromAppProp("dialogBoxNoText");

            AppLib.ChoiceWindow.ButtonsText = string.Format(";;{0};{1}", sYes, sNo);

            MessageBoxResult retVal = AppLib.ChoiceWindow.ShowDialog();

            return(retVal);
        }