Interaction logic for CopyPersonalityWindow.xaml
Inheritance: System.Windows.Window, INotifyPropertyChanged
示例#1
0
        private void copyPersonalityClicked(object sender, RoutedEventArgs e)
        {
            CopyPersonalityWindow window = new CopyPersonalityWindow(Personality);

            if (window.ShowDialog() == true)
            {
                string      PersonalityName        = window.PersonalityName == null ? null : window.PersonalityName.Trim();
                string      PersonalityDescription = window.PersonalityDescription == null ? null : window.PersonalityDescription.Trim();
                Personality newPersonality         = Personality.Copy(PersonalityName, PersonalityDescription);
                Personalities.Add(newPersonality);
                Personality = newPersonality;
            }
        }
 private void copyPersonalityClicked(object sender, RoutedEventArgs e)
 {
     EDDI.Instance.SpeechResponderModalWait = true;
     CopyPersonalityWindow window = new CopyPersonalityWindow(Personality);
     if (window.ShowDialog() == true)
     {
         string PersonalityName = window.PersonalityName?.Trim();
         string PersonalityDescription = window.PersonalityDescription?.Trim();
         Personality newPersonality = Personality.Copy(PersonalityName, PersonalityDescription);
         Personalities.Add(newPersonality);
         Personality = newPersonality;
     }
     EDDI.Instance.SpeechResponderModalWait = false;
 }
 private void copyPersonalityClicked(object sender, RoutedEventArgs e)
 {
     CopyPersonalityWindow window = new CopyPersonalityWindow(Personality);
     if (window.ShowDialog() == true)
     {
         string PersonalityName = window.PersonalityName == null ? null : window.PersonalityName.Trim();
         string PersonalityDescription = window.PersonalityDescription == null ? null : window.PersonalityDescription.Trim();
         Personality newPersonality = Personality.Copy(PersonalityName, PersonalityDescription);
         Personalities.Add(newPersonality);
         Personality = newPersonality;
     }
 }