mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 18:20:39 +08:00
chore: 设置剪切板前先清空
This commit is contained in:
@@ -469,6 +469,7 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
// ReSharper disable once UnusedMember.Global
|
||||
public void ExportToArkplanner()
|
||||
{
|
||||
System.Windows.Forms.Clipboard.Clear();
|
||||
System.Windows.Forms.Clipboard.SetDataObject(ArkPlannerResult);
|
||||
DepotInfo = LocalizationHelper.GetString("CopiedToClipboard");
|
||||
}
|
||||
@@ -480,6 +481,7 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
// ReSharper disable once UnusedMember.Global
|
||||
public void ExportToLolicon()
|
||||
{
|
||||
System.Windows.Forms.Clipboard.Clear();
|
||||
System.Windows.Forms.Clipboard.SetDataObject(LoliconResult);
|
||||
DepotInfo = LocalizationHelper.GetString("CopiedToClipboard");
|
||||
}
|
||||
@@ -724,6 +726,7 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
return;
|
||||
}
|
||||
|
||||
System.Windows.Forms.Clipboard.Clear();
|
||||
System.Windows.Forms.Clipboard.SetDataObject(JsonConvert.SerializeObject(OperBoxHaveList.Concat(OperBoxNotHaveList), Formatting.Indented));
|
||||
OperBoxInfo = LocalizationHelper.GetString("CopiedToClipboard");
|
||||
}
|
||||
|
||||
@@ -166,6 +166,7 @@ namespace MaaWpfGui.Views.UI
|
||||
|
||||
try
|
||||
{
|
||||
System.Windows.Forms.Clipboard.Clear();
|
||||
System.Windows.Forms.Clipboard.SetDataObject(data, true);
|
||||
}
|
||||
catch
|
||||
|
||||
@@ -88,6 +88,7 @@ namespace MaaWpfGui.Views.UserControl.Settings
|
||||
{
|
||||
try
|
||||
{
|
||||
System.Windows.Forms.Clipboard.Clear();
|
||||
System.Windows.Forms.Clipboard.SetDataObject(text, true);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
Reference in New Issue
Block a user