From 26f711f60d79fe1fcddf12b85e0cb2af54a3a379 Mon Sep 17 00:00:00 2001 From: Stedd Date: Tue, 26 Oct 2021 20:25:59 +0200 Subject: [PATCH] Added wallet DB code --- DB_Classes.cs | 86 ++++++++++++++++++++++++++++++++++++++++++++++-- MainWindow.xaml | 2 +- wallet.db | Bin 16384 -> 24576 bytes 3 files changed, 85 insertions(+), 3 deletions(-) diff --git a/DB_Classes.cs b/DB_Classes.cs index 1721396..7229171 100644 --- a/DB_Classes.cs +++ b/DB_Classes.cs @@ -6,7 +6,9 @@ namespace CryptoCalc { public class Transaction { + #region Constructors public Transaction() { } + public Transaction(string _currency, float _amount, string _type, string _feeCurrency, float _feeAmount) { Year = DateTime.Now.Year; @@ -25,6 +27,10 @@ namespace CryptoCalc Comment = ""; } + #endregion + + #region Publics + public int Index { get; set; } public int Year { get; set; } public int Month { get; set; } @@ -41,13 +47,16 @@ namespace CryptoCalc public string Service { get; set; } public string Comment { get; set; } - //Functions + #endregion + #region Functions public string FullInfo => $"{ Index.ToString() } { DateTimeString } { Currency } { Amount } { TransactionType }"; + #endregion } public class RawData { - public RawData(){} + #region Contructors + public RawData() { } public RawData(string _currency, float _amount, string _type) { Date_Year = DateTime.Now.Year; @@ -64,6 +73,10 @@ namespace CryptoCalc Comment = ""; } + #endregion + + #region Publics + public int Index { get; set; } public int Date_Year { get; set; } public int Date_Month { get; set; } @@ -77,8 +90,77 @@ namespace CryptoCalc public string TransactionType { get; set; } public string Service { get; set; } public string Comment { get; set; } + + #endregion + + #region Functions public string FullInfo => $"{ Index.ToString() } { DateTimeString } { CryptoCurrency } { Amount } { TransactionType }"; + #endregion + + } + + public class Wallet + { + #region Constructors + public Wallet() + { + //wCreationYear = 0; + //wCreationMonth = 0; + //wCreationDay = 0; + //wLastActivityYear = 0; + //wLastActivityMonth = 0; + //wLastActivityDay = 0; + //wLastActivityHour = 0; + //wLastActivityMinute = 0; + //wLastActivitySecond = 0; + //wPlatform = ""; + //wName = ""; + //wCurrency = ""; + //wBalance = 0f; + //wDefaultWallet = ""; + //wNotes = ""; + } + + public Wallet(int _year, int _month, int _day, string _platform, string _name, string _currency, float _balance, int _default, string _note) + { + wCreationYear = _year; + wCreationMonth = _month; + wCreationDay = _day; + wPlatform = _platform; + wName = _name; + wCurrency = _currency; + wBalance = _balance; + wDefaultWallet = _default; + wNotes = _note; + } + + #endregion + + #region Publics + + public int Index { get; set; } + public int wCreationYear { get; set; } + public int wCreationMonth { get; set; } + public int wCreationDay { get; set; } + public int wLastActivityYear { get; set; } + public int wLastActivityMonth { get; set; } + public int wLastActivityDay { get; set; } + public int wLastActivityHour { get; set; } + public int wLastActivityMinute { get; set; } + public int wLastActivitySecond { get; set; } + public string wPlatform { get; set; } + public string wName { get; set; } + public string wCurrency { get; set; } + public float wBalance { get; set; } + public int wDefaultWallet { get; set; } + public string wNotes { get; set; } + + #endregion + #region Functions + //public string FullInfo => $"{ Index.ToString() } { DateTimeString } { Currency } { Amount } { TransactionType }"; + + #endregion } } } diff --git a/MainWindow.xaml b/MainWindow.xaml index 84ff7c7..e62de18 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -17,7 +17,7 @@