-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
915 additions
and
259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace EasyPlot.Contracts.Services; | ||
|
||
public interface ISharedConfigService | ||
{ | ||
string TempDirectory { get; } | ||
|
||
string ResultGpPath { get; } | ||
|
||
string ResultPngPath { get; } | ||
|
||
// gnuplot では \ をパスとして認識しないので / のものを用意しておく | ||
/// <summary> | ||
/// パス区切り文字を / で返します | ||
/// </summary> | ||
string ResultPngPathNotBackSlash { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using EasyPlot.Contracts.Services; | ||
|
||
namespace EasyPlot.Services; | ||
|
||
public class SharedConfigService : ISharedConfigService | ||
{ | ||
public string TempDirectory { get; } | ||
|
||
public string ResultGpPath { get; } | ||
|
||
public string ResultPngPath { get; } | ||
|
||
public string ResultPngPathNotBackSlash { get; } | ||
|
||
public SharedConfigService() | ||
{ | ||
// TODO: GUID に変更するか検討 | ||
TempDirectory = Path.Combine(Path.GetTempPath(), "EasyPlot"); | ||
|
||
ResultGpPath = Path.Combine(TempDirectory, "result.gp"); | ||
ResultPngPath = Path.Combine(TempDirectory, "result.png"); | ||
ResultPngPathNotBackSlash = ResultPngPath.Replace('\\', '/'); | ||
|
||
if (!Directory.Exists(TempDirectory)) | ||
Directory.CreateDirectory(TempDirectory); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using CommunityToolkit.Mvvm.ComponentModel; | ||
using EasyPlot.ViewModels.Wrapper; | ||
|
||
namespace EasyPlot.ViewModels; | ||
|
||
public class GraphWholeSettingsViewModel: ObservableObject | ||
{ | ||
public WholeSettings WholeSettings { get; } | ||
|
||
public GraphWholeSettingsViewModel(MainViewModel mainViewModel) | ||
{ | ||
WholeSettings = mainViewModel.WholeSettings; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace EasyPlot.ViewModels; | ||
|
||
public enum MainTabType | ||
{ | ||
GraphWholeSettings, | ||
|
||
GraphGroup, | ||
|
||
AppSettings, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.