summaryrefslogtreecommitdiff
path: root/CommandLineWrapper/JsonResults
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-01-13 08:22:09 +0800
committer魏曹先生 <1992414357@qq.com>2026-01-13 08:22:09 +0800
commit5d8b29664c13e6e5c6292d79973980182ece1441 (patch)
treeced2f67c82ce0748dbd0090f0fde6b921329d259 /CommandLineWrapper/JsonResults
parent7d59c15b0efd2aa5a27aef356a265f850a2e7e2f (diff)
Add data loading from wrapper to view modelHEADmain
Diffstat (limited to 'CommandLineWrapper/JsonResults')
-rw-r--r--CommandLineWrapper/JsonResults/Implements/AccountListResult.cs5
-rw-r--r--CommandLineWrapper/JsonResults/Implements/HereResult.cs8
-rw-r--r--CommandLineWrapper/JsonResults/Implements/InfoResult.cs6
-rw-r--r--CommandLineWrapper/JsonResults/Implements/ShareListResult.cs5
-rw-r--r--CommandLineWrapper/JsonResults/Implements/ShareSeeResult.cs7
-rw-r--r--CommandLineWrapper/JsonResults/Implements/SheetAlignTasksResult.cs9
-rw-r--r--CommandLineWrapper/JsonResults/Implements/SheetListResult.cs5
-rw-r--r--CommandLineWrapper/JsonResults/Implements/StatusResult.cs3
-rw-r--r--CommandLineWrapper/JsonResults/JsonResultGetter.cs4
9 files changed, 26 insertions, 26 deletions
diff --git a/CommandLineWrapper/JsonResults/Implements/AccountListResult.cs b/CommandLineWrapper/JsonResults/Implements/AccountListResult.cs
index 600b839..c6242ff 100644
--- a/CommandLineWrapper/JsonResults/Implements/AccountListResult.cs
+++ b/CommandLineWrapper/JsonResults/Implements/AccountListResult.cs
@@ -1,5 +1,4 @@
-using CommandLineWrapper;
-using CommandLineWrapper.JsonResults;
+namespace CommandLineWrapper.JsonResults.Implements;
public class AccountListResultGetter : JsonResultGetter<AccountListResult>
{
@@ -15,4 +14,4 @@ public struct AccountListResult
public struct AccountItem
{
public bool HasPrivateKey { get; set; }
-}
+} \ No newline at end of file
diff --git a/CommandLineWrapper/JsonResults/Implements/HereResult.cs b/CommandLineWrapper/JsonResults/Implements/HereResult.cs
index b3086a1..497d6c2 100644
--- a/CommandLineWrapper/JsonResults/Implements/HereResult.cs
+++ b/CommandLineWrapper/JsonResults/Implements/HereResult.cs
@@ -1,5 +1,4 @@
-using CommandLineWrapper;
-using CommandLineWrapper.JsonResults;
+namespace CommandLineWrapper.JsonResults.Implements;
public class HereResultGetter : JsonResultGetter<HereResult>
{
@@ -8,6 +7,9 @@ public class HereResultGetter : JsonResultGetter<HereResult>
public HereResultGetter(DirectoryInfo currentDirectory)
=> _currentDirectory = currentDirectory;
+ public void ChangeDirectory(DirectoryInfo directory)
+ => _currentDirectory = directory;
+
protected override Task<JVCSCommandInvoker.InvokeResult> ExecCommand(JVCSWorkspace workspace)
=> JVCSCommandInvoker.Invoke(Constants.CommandParameterGenerator.Here(), _currentDirectory.ToString());
}
@@ -27,4 +29,4 @@ public struct HereResultItem
public bool Exist { get; set; }
public bool Modified { get; set; }
public string Holder { get; set; }
-}
+} \ No newline at end of file
diff --git a/CommandLineWrapper/JsonResults/Implements/InfoResult.cs b/CommandLineWrapper/JsonResults/Implements/InfoResult.cs
index ecef724..1a3d11e 100644
--- a/CommandLineWrapper/JsonResults/Implements/InfoResult.cs
+++ b/CommandLineWrapper/JsonResults/Implements/InfoResult.cs
@@ -1,5 +1,4 @@
-using CommandLineWrapper;
-using CommandLineWrapper.JsonResults;
+namespace CommandLineWrapper.JsonResults.Implements;
public class InfoResultGetter : JsonResultGetter<InfoResult>
{
@@ -8,6 +7,9 @@ public class InfoResultGetter : JsonResultGetter<InfoResult>
public InfoResultGetter(string mappingName)
=> _mappingName = mappingName;
+ public void ChangeMappingName(string mappingName)
+ => _mappingName = mappingName;
+
protected override Task<JVCSCommandInvoker.InvokeResult> ExecCommand(JVCSWorkspace workspace)
=> workspace.Info(_mappingName);
}
diff --git a/CommandLineWrapper/JsonResults/Implements/ShareListResult.cs b/CommandLineWrapper/JsonResults/Implements/ShareListResult.cs
index 4736b81..f309f8c 100644
--- a/CommandLineWrapper/JsonResults/Implements/ShareListResult.cs
+++ b/CommandLineWrapper/JsonResults/Implements/ShareListResult.cs
@@ -1,5 +1,4 @@
-using CommandLineWrapper;
-using CommandLineWrapper.JsonResults;
+namespace CommandLineWrapper.JsonResults.Implements;
public class ShareListResultGetter : JsonResultGetter<ShareListResult>
{
@@ -18,4 +17,4 @@ public struct ShareItem
public string Sharer { get; set; }
public string Description { get; set; }
public int FileCount { get; set; }
-}
+} \ No newline at end of file
diff --git a/CommandLineWrapper/JsonResults/Implements/ShareSeeResult.cs b/CommandLineWrapper/JsonResults/Implements/ShareSeeResult.cs
index c965b25..0fc63ee 100644
--- a/CommandLineWrapper/JsonResults/Implements/ShareSeeResult.cs
+++ b/CommandLineWrapper/JsonResults/Implements/ShareSeeResult.cs
@@ -1,7 +1,7 @@
-using CommandLineWrapper;
-using CommandLineWrapper.JsonResults;
using System.Text.Json.Serialization;
+namespace CommandLineWrapper.JsonResults.Implements;
+
public class ShareSeeResultGetter : JsonResultGetter<SeeShareResult>
{
private string _shareId;
@@ -9,6 +9,9 @@ public class ShareSeeResultGetter : JsonResultGetter<SeeShareResult>
public ShareSeeResultGetter(string shareId)
=> _shareId = shareId;
+ public void ChangeShareId(string shareId)
+ => _shareId = shareId;
+
protected override Task<JVCSCommandInvoker.InvokeResult> ExecCommand(JVCSWorkspace workspace)
=> workspace.ShareSee(_shareId);
}
diff --git a/CommandLineWrapper/JsonResults/Implements/SheetAlignTasksResult.cs b/CommandLineWrapper/JsonResults/Implements/SheetAlignTasksResult.cs
index 5539d19..60d07f3 100644
--- a/CommandLineWrapper/JsonResults/Implements/SheetAlignTasksResult.cs
+++ b/CommandLineWrapper/JsonResults/Implements/SheetAlignTasksResult.cs
@@ -1,13 +1,12 @@
-using CommandLineWrapper;
-using CommandLineWrapper.JsonResults;
+namespace CommandLineWrapper.JsonResults.Implements;
-public class SheetAlignTasksResultGetter : JsonResultGetter<AlignJsonResult>
+public class SheetAlignTasksResultGetter : JsonResultGetter<AlignResult>
{
protected override Task<JVCSCommandInvoker.InvokeResult> ExecCommand(JVCSWorkspace workspace)
=> workspace.SheetAlignList();
}
-public struct AlignJsonResult
+public struct AlignResult
{
public Dictionary<string, AlignTaskMapping> AlignTasks { get; set; }
}
@@ -16,4 +15,4 @@ public struct AlignTaskMapping
{
public string LocalMapping { get; set; }
public string RemoteMapping { get; set; }
-}
+} \ No newline at end of file
diff --git a/CommandLineWrapper/JsonResults/Implements/SheetListResult.cs b/CommandLineWrapper/JsonResults/Implements/SheetListResult.cs
index 1fa9f0b..eb1068d 100644
--- a/CommandLineWrapper/JsonResults/Implements/SheetListResult.cs
+++ b/CommandLineWrapper/JsonResults/Implements/SheetListResult.cs
@@ -1,5 +1,4 @@
-using CommandLineWrapper;
-using CommandLineWrapper.JsonResults;
+namespace CommandLineWrapper.JsonResults.Implements;
public class SheetListResultGetter : JsonResultGetter<SheetListResult>
{
@@ -23,4 +22,4 @@ public struct SheetItem
{
public string Name { get; set; }
public string Holder { get; set; }
-}
+} \ No newline at end of file
diff --git a/CommandLineWrapper/JsonResults/Implements/StatusResult.cs b/CommandLineWrapper/JsonResults/Implements/StatusResult.cs
index aba2c25..6b52731 100644
--- a/CommandLineWrapper/JsonResults/Implements/StatusResult.cs
+++ b/CommandLineWrapper/JsonResults/Implements/StatusResult.cs
@@ -1,5 +1,4 @@
-using CommandLineWrapper;
-using CommandLineWrapper.JsonResults;
+namespace CommandLineWrapper.JsonResults.Implements;
public class StatusResultGetter : JsonResultGetter<StatusResult>
{
diff --git a/CommandLineWrapper/JsonResults/JsonResultGetter.cs b/CommandLineWrapper/JsonResults/JsonResultGetter.cs
index e1bf607..2afd10c 100644
--- a/CommandLineWrapper/JsonResults/JsonResultGetter.cs
+++ b/CommandLineWrapper/JsonResults/JsonResultGetter.cs
@@ -1,10 +1,8 @@
-using static JVCSCommandInvoker;
-
namespace CommandLineWrapper.JsonResults
{
public abstract class JsonResultGetter<TJsonFormat>
{
- protected abstract Task<InvokeResult> ExecCommand(JVCSWorkspace workspace);
+ protected abstract Task<JVCSCommandInvoker.InvokeResult> ExecCommand(JVCSWorkspace workspace);
public async Task<TJsonFormat?> Get(JVCSWorkspace workspace)
{