12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using PDF_Master.Helper;
- using Prism.Commands;
- using Prism.Mvvm;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Windows.Forms;
- namespace PDF_Master.ViewModels.HomePanel.ChatGPTAI
- {
- public class ChatGPTAIRewritingContentViewModel : BindableBase
- {
- private string inputText;
- public string InputText
- {
- get { return inputText; }
- set
- {
- SetProperty(ref inputText, value);
- }
- }
- private string rewriteText;
- public string RewriteText
- {
- get { return rewriteText; }
- set
- {
- SetProperty(ref rewriteText, value);
- }
- }
- public DelegateCommand CopyCommand { get; set; }
- public DelegateCommand RewriteCommand { get; set; }
- public ChatGPTAIRewritingContentViewModel()
- {
- CopyCommand = new DelegateCommand(copy);
- RewriteCommand = new DelegateCommand(rewrite);
- }
- public void copy()
- {
- try
- {
- Clipboard.SetText(RewriteText);
- }
- catch { }
- }
- public async void rewrite() {
- RewriteText= await ChatGTPAIHelper.Rewrite(InputText);
- }
- }
- }
|