diff --git a/CryptoCalc.csproj b/CryptoCalc.csproj
index 407932c..44bc49b 100644
--- a/CryptoCalc.csproj
+++ b/CryptoCalc.csproj
@@ -6,4 +6,8 @@
true
+
+
+
+
diff --git a/MainWindow.xaml b/MainWindow.xaml
index 49ac95b..5a0c684 100644
--- a/MainWindow.xaml
+++ b/MainWindow.xaml
@@ -7,6 +7,7 @@
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
+
diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs
index 278f7a7..d089454 100644
--- a/MainWindow.xaml.cs
+++ b/MainWindow.xaml.cs
@@ -12,6 +12,9 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
+using System.Diagnostics;
+using System.IO;
+using System.Text.Json;
namespace CryptoCalc
{
@@ -20,10 +23,41 @@ namespace CryptoCalc
///
public partial class MainWindow : Window
{
+ private readonly Random rand = new();
+
public MainWindow()
{
InitializeComponent();
- //asdf
+
+ }
+
+ private void saveButton_Click(object sender, RoutedEventArgs e)
+ {
+ Debug.WriteLine("asdf");
+
+
+ var weatherForecast = new WeatherForecast
+ {
+ Date = DateTime.Parse("2019-08-01"),
+ TemperatureCelsius = rand.Next(0,100),
+ Summary = "Hot"
+
+ };
+
+ string fileName = "asdf.json";
+ string jsonString = JsonSerializer.Serialize(weatherForecast);
+ File.AppendAllText(fileName, jsonString);
+
+ Debug.WriteLine(File.ReadAllText(fileName));
}
}
+
+
+ public class WeatherForecast
+ {
+ public DateTimeOffset Date { get; set; }
+ public int TemperatureCelsius { get; set; }
+ public string Summary { get; set; }
+ }
+
}