diff --git a/src/ExcelHelper/Views/Components/AiMessageControll.xaml.cs b/src/ExcelHelper/Views/Components/AiMessageControll.xaml.cs index d2199d9..d6d1a75 100644 --- a/src/ExcelHelper/Views/Components/AiMessageControll.xaml.cs +++ b/src/ExcelHelper/Views/Components/AiMessageControll.xaml.cs @@ -130,55 +130,5 @@ namespace ExcelHelper.Views.Components return FindParent(parentObject); } } - } - - // 聊天消息类 - public class ChatMessage : INotifyPropertyChanged - { - private string _content; - public string Content - { - get - { - return _content; - } - set - { - _content = value; - OnPropertyChanged(nameof(Content)); - } - } - private bool _isUser; - public bool IsUser - { - get - { - return _isUser; - } - set - { - _isUser = value; - OnPropertyChanged(nameof(IsUser)); - } - } - private DateTime _timestamp = DateTime.Now; - public DateTime Timestamp - { - get - { - return _timestamp; - } - set - { - _timestamp = value; - OnPropertyChanged(nameof(Timestamp)); - } - } - public event PropertyChangedEventHandler PropertyChanged; - - public void OnPropertyChanged(string propertyName) - { - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); - } - } + } } diff --git a/src/ExcelHelper/Views/Components/ChatMessage.cs b/src/ExcelHelper/Views/Components/ChatMessage.cs new file mode 100644 index 0000000..dfa4b2c --- /dev/null +++ b/src/ExcelHelper/Views/Components/ChatMessage.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ExcelHelper.Views.Components +{ + // 聊天消息类 + public class ChatMessage : INotifyPropertyChanged + { + private string _content; + public string Content + { + get + { + return _content; + } + set + { + _content = value; + OnPropertyChanged(nameof(Content)); + } + } + private bool _isUser; + public bool IsUser + { + get + { + return _isUser; + } + set + { + _isUser = value; + OnPropertyChanged(nameof(IsUser)); + } + } + private DateTime _timestamp = DateTime.Now; + public DateTime Timestamp + { + get + { + return _timestamp; + } + set + { + _timestamp = value; + OnPropertyChanged(nameof(Timestamp)); + } + } + public event PropertyChangedEventHandler PropertyChanged; + + public void OnPropertyChanged(string propertyName) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + } + } +}