Пример #1
0
 internal static void SetSavedResponse(SEMessageBox msgBox, SEMessageBoxButton response)
 {
     if (msgBox.Name == null)
     {
         return;
     }
     _savedResponses[msgBox.Name] = response;
 }
Пример #2
0
 public static void DeleteMessageBox(string name)
 {
     if (name == null)
     {
         return;
     }
     if (_messageBoxes.Contains(name))
     {
         SEMessageBox msgBox = _messageBoxes[name] as SEMessageBox;
         msgBox.Dispose();
         _messageBoxes.Remove(name);
     }
 }
Пример #3
0
        public static SEMessageBox CreateMessageBox(string name)
        {
            if (name != null && _messageBoxes.ContainsKey(name))
            {
                string err = string.Format("A MessageBox with the name {0} already exists.", name);
                throw new ArgumentException(err, "name");
            }
            SEMessageBox msgBox = new SEMessageBox();

            msgBox.Name = name;
            if (msgBox.Name != null)
            {
                _messageBoxes[name] = msgBox;
            }
            return(msgBox);
        }
Пример #4
0
        internal static SEMessageBoxButton GetSavedResponse(SEMessageBox msgBox)
        {
            string msgBoxName = msgBox.Name;

            if (msgBoxName == null)
            {
                return(null);
            }
            if (_savedResponses.ContainsKey(msgBoxName))
            {
                return(_savedResponses[msgBox.Name] as SEMessageBoxButton);
            }
            else
            {
                return(null);
            }
        }