|
@@ -6,9 +6,20 @@ using System;
|
|
|
using System.Data;
|
|
|
using System.Diagnostics;
|
|
|
using System.Runtime.Intrinsics.Arm;
|
|
|
+using Avalonia.Threading;
|
|
|
+using System.Runtime.InteropServices;
|
|
|
+using System.Threading.Tasks;
|
|
|
+using Tmds.DBus.Protocol;
|
|
|
+using System.IO;
|
|
|
|
|
|
namespace AvaloniaApplication1
|
|
|
{
|
|
|
+ struct DateB
|
|
|
+ {
|
|
|
+ int dayB;
|
|
|
+ int monthB;
|
|
|
+ int yearB;
|
|
|
+ }
|
|
|
public partial class MainWindow : Window
|
|
|
{
|
|
|
public MainWindow()
|
|
@@ -194,5 +205,33 @@ namespace AvaloniaApplication1
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ [Obsolete]
|
|
|
+ public async void File(object source, RoutedEventArgs args)
|
|
|
+ {
|
|
|
+ string path;
|
|
|
+ OpenFileDialog OFD = new OpenFileDialog();
|
|
|
+ OFD.AllowMultiple = false;
|
|
|
+ OFD.Filters.Add(new FileDialogFilter() { Name = "CSV ôàéëû", Extensions = { "csv" } });
|
|
|
+ var result = await OFD.ShowAsync(this);
|
|
|
+ if (result != null)
|
|
|
+ {
|
|
|
+ path = result[0];
|
|
|
+ using(StreamReader sr = new StreamReader(path))
|
|
|
+ {
|
|
|
+ int k = 0;
|
|
|
+ string line = sr.ReadLine();
|
|
|
+ while (line != null)
|
|
|
+ {
|
|
|
+ if (string.IsNullOrWhiteSpace(line))
|
|
|
+ {
|
|
|
+ k++;
|
|
|
+ }
|
|
|
+ line = sr.ReadLine();
|
|
|
+ }
|
|
|
+ Por.Text = k.ToString();
|
|
|
+ };
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|