-
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.
Refactor using ViewModel and add today check box
- Loading branch information
Showing
6 changed files
with
406 additions
and
119 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
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,33 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace MemoGenerator.Model | ||
{ | ||
#nullable enable | ||
|
||
class BusinessInfo | ||
{ | ||
internal BusinessInfo(string name, string? memoText) | ||
{ | ||
this.name = name; | ||
this.memoText = memoText; | ||
} | ||
|
||
string name; | ||
internal string? memoText; | ||
|
||
internal static List<BusinessInfo> defaults() | ||
{ | ||
return new List<BusinessInfo>(new BusinessInfo[] { | ||
new BusinessInfo("미지정", null), | ||
new BusinessInfo("일이삼사", null), | ||
new BusinessInfo("대미기프트", "대미"), | ||
}); | ||
} | ||
} | ||
|
||
#nullable disable | ||
} |
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,24 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace MemoGenerator.Model | ||
{ | ||
class GlobalSettings | ||
{ | ||
private static readonly Lazy<GlobalSettings> lazyInstance = new Lazy<GlobalSettings>(() => new GlobalSettings()); | ||
|
||
public static GlobalSettings Instance | ||
{ | ||
get => lazyInstance.Value; | ||
} | ||
|
||
private GlobalSettings() { | ||
businessInfos = BusinessInfo.defaults(); | ||
} | ||
|
||
internal List<BusinessInfo> businessInfos; | ||
} | ||
} |
Oops, something went wrong.