diff --git a/WinUINotes.Grpc/Protos/FileTransfer.proto b/WinUINotes.Grpc/Protos/FileTransfer.proto
new file mode 100644
index 0000000..ba7d95e
--- /dev/null
+++ b/WinUINotes.Grpc/Protos/FileTransfer.proto
@@ -0,0 +1,54 @@
+syntax = "proto3";
+
+option csharp_namespace = "WinUINotes.Grpc";
+
+package filetransfer;
+
+service FileTransfer {
+ rpc InitUpload (InitUploadRequest) returns (InitUploadResponse);
+ rpc UploadChunk (stream UploadChunkRequest) returns (UploadChunkResponse);
+ rpc CompleteUpload (CompleteUploadRequest) returns (CompleteUploadResponse);
+ rpc CheckUploadStatus (CheckUploadStatusRequest) returns (CheckUploadStatusResponse);
+}
+
+message InitUploadRequest {
+ string file_name = 1;
+ int64 file_size = 2;
+ string file_hash = 3;
+}
+
+message InitUploadResponse {
+ string session_id = 1;
+ int64 uploaded_bytes = 2;
+}
+
+message UploadChunkRequest {
+ string session_id = 1;
+ bytes chunk_data = 2;
+ int64 offset = 3;
+}
+
+message UploadChunkResponse {
+ int64 uploaded_bytes = 1;
+}
+
+message CompleteUploadRequest {
+ string session_id = 1;
+ string file_hash = 2;
+}
+
+message CompleteUploadResponse {
+ bool success = 1;
+ string message = 2;
+}
+
+message CheckUploadStatusRequest {
+ string file_name = 1;
+ string file_hash = 2;
+}
+
+message CheckUploadStatusResponse {
+ string session_id = 1;
+ int64 uploaded_bytes = 2;
+ bool exists = 3;
+}
\ No newline at end of file
diff --git a/WinUINotes.Grpc/Protos/greet.proto b/WinUINotes.Grpc/Protos/greet.proto
index 4ae009f..1589d63 100644
--- a/WinUINotes.Grpc/Protos/greet.proto
+++ b/WinUINotes.Grpc/Protos/greet.proto
@@ -1,6 +1,6 @@
syntax = "proto3";
-option csharp_namespace = "WinUINotes";
+option csharp_namespace = "WinUINotes.Grpc";
package greet;
diff --git a/WinUINotes.Grpc/Protos/my_diary.proto b/WinUINotes.Grpc/Protos/my_diary.proto
index a2c9919..12deff5 100644
--- a/WinUINotes.Grpc/Protos/my_diary.proto
+++ b/WinUINotes.Grpc/Protos/my_diary.proto
@@ -1,6 +1,6 @@
syntax = "proto3";
-option csharp_namespace = "ZR.Admin.Grpc";
+option csharp_namespace = "WinUINotes.Grpc";
package my.diary;
diff --git a/WinUINotes.Grpc/WinUINotes.Grpc.csproj b/WinUINotes.Grpc/WinUINotes.Grpc.csproj
index 793582c..a7be502 100644
--- a/WinUINotes.Grpc/WinUINotes.Grpc.csproj
+++ b/WinUINotes.Grpc/WinUINotes.Grpc.csproj
@@ -20,5 +20,6 @@
+
\ No newline at end of file
diff --git a/WinUINotes/AboutPage.xaml b/WinUINotes/AboutPage.xaml
new file mode 100644
index 0000000..1daed03
--- /dev/null
+++ b/WinUINotes/AboutPage.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
diff --git a/WinUINotes/AboutPage.xaml.cs b/WinUINotes/AboutPage.xaml.cs
new file mode 100644
index 0000000..8ecd2e1
--- /dev/null
+++ b/WinUINotes/AboutPage.xaml.cs
@@ -0,0 +1,31 @@
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Controls.Primitives;
+using Microsoft.UI.Xaml.Data;
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.UI.Xaml.Navigation;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace WinUINotes
+{
+ ///
+ /// An empty page that can be used on its own or navigated to within a Frame.
+ ///
+ public sealed partial class AboutPage : Page
+ {
+ public AboutPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/WinUINotes/App.xaml.cs b/WinUINotes/App.xaml.cs
index ed69ee4..a859194 100644
--- a/WinUINotes/App.xaml.cs
+++ b/WinUINotes/App.xaml.cs
@@ -26,7 +26,9 @@ namespace WinUINotes
///
public partial class App : Application
{
- private Window? _window;
+ private static Window? _window;
+
+ public static Window m_window => _window;
///
/// Initializes the singleton application object. This is the first line of authored code
diff --git a/WinUINotes/Common/FileHelper.cs b/WinUINotes/Common/FileHelper.cs
new file mode 100644
index 0000000..317a087
--- /dev/null
+++ b/WinUINotes/Common/FileHelper.cs
@@ -0,0 +1,73 @@
+using System;
+using System.IO;
+using System.Security.Cryptography;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace WinUINotes.Common
+{
+ public static class FileHelper
+ {
+ // 最佳缓冲区大小经过测试得出(根据硬件调整)
+ private const int OptimalBufferSize = 1 * 1024 * 1024; // 1MB缓冲区
+ public static string CalculateFileHash(string filePath)
+ {
+ using (var md5 = MD5.Create())
+ using (var stream = File.OpenRead(filePath))
+ {
+ var hash = md5.ComputeHash(stream);
+ return BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant();
+ }
+ }
+
+ //public static async Task CalculateFileHashAsync(string filePath)
+ //{
+ // using (var md5 = MD5.Create())
+ // using (var stream = File.OpenRead(filePath))
+ // {
+ // var hash = await md5.ComputeHashAsync(stream);
+ // return BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant();
+ // }
+ //}
+ public static async Task CalculateFileHashAsync(string filePath, int bufferSize = 81920 /* 默认缓冲区大小 */, CancellationToken cancellationToken = default)
+ {
+ using (var md5 = MD5.Create())
+ {
+ // 使用带有异步选项和优化缓冲区大小的FileStream
+ using (var stream = new FileStream(
+ filePath,
+ FileMode.Open,
+ FileAccess.Read,
+ FileShare.Read,
+ bufferSize: bufferSize,
+ options: FileOptions.SequentialScan | FileOptions.Asynchronous))
+ {
+ var hash = await md5.ComputeHashAsync(stream, cancellationToken)
+ .ConfigureAwait(false);
+ return BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant();
+ }
+ }
+ }
+
+ // 快速文件标识(前1MB哈希 + 文件大小)
+ public static async Task GetQuickFileIdentity(string filePath)
+ {
+ const int sampleSize = 1 * 1024 * 1024; // 1MB
+ var fileInfo = new FileInfo(filePath);
+ long fileSize = fileInfo.Length;
+
+ using (var fs = new FileStream(filePath, FileMode.Open, FileAccess.Read))
+ {
+ byte[] buffer = new byte[Math.Min(sampleSize, fileSize)];
+ int bytesRead = await fs.ReadAsync(buffer, 0, buffer.Length);
+
+ using (var sha = SHA256.Create())
+ {
+ byte[] hashBytes = sha.ComputeHash(buffer);
+ return $"{fileSize}-{BitConverter.ToString(hashBytes).Replace("-", "")}";
+ }
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/WinUINotes/FileUploadPage.xaml b/WinUINotes/FileUploadPage.xaml
new file mode 100644
index 0000000..80f9851
--- /dev/null
+++ b/WinUINotes/FileUploadPage.xaml
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/WinUINotes/FileUploadPage.xaml.cs b/WinUINotes/FileUploadPage.xaml.cs
new file mode 100644
index 0000000..e3ff7aa
--- /dev/null
+++ b/WinUINotes/FileUploadPage.xaml.cs
@@ -0,0 +1,347 @@
+using Grpc.Core;
+using Grpc.Net.Client;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Controls.Primitives;
+using Microsoft.UI.Xaml.Data;
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.UI.Xaml.Navigation;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using System.Threading;
+using System.Threading.Channels;
+using System.Threading.Tasks;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+using Windows.Media.Protection.PlayReady;
+using Windows.Storage;
+using Windows.Storage.Pickers;
+using WinRT.Interop;
+using WinUINotes.Common;
+using WinUINotes.Grpc;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace WinUINotes
+{
+ ///
+ /// An empty page that can be used on its own or navigated to within a Frame.
+ ///
+ public sealed partial class FileUploadPage : Page
+ {
+ private GrpcChannel _channel;
+ private FileTransfer.FileTransferClient _client;
+ private CancellationTokenSource _cancellationTokenSource;
+
+ public FileUploadPage()
+ {
+ InitializeComponent();
+ InitializeGrpcClient();
+ }
+
+ private async void InitializeGrpcClient()
+ {
+ try
+ {
+ // ע: Ӧʹøȫͨ
+ _channel = GrpcChannel.ForAddress("http://localhost:5065");
+ _client = new FileTransfer.FileTransferClient(_channel);
+ }
+ catch (Exception ex)
+ {
+ //var errorDialog = new ContentDialog
+ //{
+ // Title = "Error",
+ // Content = $"ʼgRPCͻʧ: {ex.Message}",
+ // CloseButtonText = "ȷ", // Equivalent to MessageBoxButtons.OK
+ // // For XamlRoot, assume 'this' refers to your current Window or Page
+ // XamlRoot = this.Content.XamlRoot
+ //};
+
+ //await errorDialog.ShowAsync();
+ await ShowErrorDialog($"ʼgRPCͻʧ: {ex.Message}", "Error");
+ }
+ }
+
+ private async void BtnBrowse_OnClick(object sender, RoutedEventArgs e)
+ {
+ //disable the button to avoid double-clicking
+ var senderButton = sender as Button;
+ senderButton.IsEnabled = false;
+
+
+ var picker = new FileOpenPicker();
+
+ // IMPORTANT: For desktop WinUI 3 apps, you must associate the picker with the window.
+ // Get the current window's HWND (handle). 'this' should refer to your MainWindow or Page.
+ var hwnd = WindowNative.GetWindowHandle(App.m_window);
+ InitializeWithWindow.Initialize(picker, hwnd);
+
+ // Set properties similar to OpenFileDialog
+ picker.ViewMode = PickerViewMode.Thumbnail; // Or List, Details
+ //picker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary; // Or Desktop, PicturesLibrary, etc.
+
+ // Add file type filters. For all files, use "*"
+ picker.FileTypeFilter.Add("*");
+ // Example for specific types:
+ // picker.FileTypeFilter.Add(".txt");
+ // picker.FileTypeFilter.Add(".docx");
+
+ // Since Multiselect = false in original, use PickSingleFileAsync()
+ StorageFile file = await picker.PickSingleFileAsync();
+
+ if (file != null)
+ {
+ // 'file' is a StorageFile object, not just a path string.
+ txtFilePath.Text = file.Path;
+
+ // Get file size using StorageFile's properties (more UWP/WinUI friendly)
+ var properties = await file.GetBasicPropertiesAsync();
+ lblFileSize.Text = $"С: {FormatFileSize(properties.Size)}"; // Assuming FormatFileSize can handle ulong
+
+ // Reset progress display
+ progressBar.Value = 0;
+ lblProgress.Text = ""; // Or "ļѡ"
+ lblPercentage.Text = "0%";
+
+ // Store the selected file if you need to use it later for upload
+ // e.g., _selectedFile = file; (where _selectedFile is a StorageFile field)
+ btnUpload.IsEnabled = true; // Enable the upload button if you have one
+ lblProgress.Text = "ļѡ";
+ }
+ else
+ {
+ // User canceled the file selection
+ txtFilePath.Text = string.Empty;
+ lblFileSize.Text = "С: -";
+ btnUpload.IsEnabled = false; // Disable upload if no file is selected
+ lblProgress.Text = "δѡļ";
+ progressBar.Value = 0;
+ lblPercentage.Text = "0%";
+ }
+
+ senderButton.IsEnabled = true;
+ }
+
+ private async void BtnUpload_OnClick(object sender, RoutedEventArgs e)
+ {
+ if (string.IsNullOrEmpty(txtFilePath.Text) || !File.Exists(txtFilePath.Text))
+ {
+ await ShowErrorDialog("ѡһЧļ.", "Error");
+ return;
+ }
+
+ var filePath = txtFilePath.Text;
+ var fileInfo = new FileInfo(filePath);
+
+ if (fileInfo.Length > 100L * 1024 * 1024 * 1024) // 100GB
+ {
+ await ShowErrorDialog("ļСΪ100GB.", "Error");
+ return;
+ }
+
+ // UIؼ
+ SetUploadControls(false);
+
+ _cancellationTokenSource = new CancellationTokenSource();
+
+ try
+ {
+ await UploadFileWithResume(filePath, _cancellationTokenSource.Token);
+ await ShowInfoDialog("ļϴɹ!", "Success");
+ }
+ catch (OperationCanceledException)
+ {
+ await ShowInfoDialog("ϴȡ.", "Info");
+ }
+ catch (RpcException rpcEx) when (rpcEx.StatusCode == StatusCode.Unavailable)
+ {
+ await ShowErrorDialog("Ч,.", "Error");
+ }
+ catch (Exception ex)
+ {
+ await ShowErrorDialog($"ϴʧ: {ex.Message}", "Error");
+ }
+ finally
+ {
+ // UIؼ
+ SetUploadControls(true);
+ }
+ }
+
+ private void SetUploadControls(bool enable)
+ {
+ btnBrowse.IsEnabled = enable;
+ btnUpload.IsEnabled = enable;
+ btnPause.IsEnabled = !enable;
+ btnCancel.IsEnabled = !enable;
+ }
+
+ private async Task UploadFileWithResume(string filePath, CancellationToken cancellationToken)
+ {
+ var fileInfo = new FileInfo(filePath);
+ var fileHash = await FileHelper.GetQuickFileIdentity(filePath);
+ const int chunkSize = 10 * 1024 * 1024; // 1MB chunk size
+
+ // Ƿϴ¼
+ var statusResponse = await _client.CheckUploadStatusAsync(new CheckUploadStatusRequest
+ {
+ FileName = fileInfo.Name,
+ FileHash = fileHash
+ });
+
+ string sessionId;
+ ulong uploadedBytes = 0;
+
+ if (statusResponse.Exists && statusResponse.UploadedBytes > 0)
+ {
+ // ָϴ
+ sessionId = statusResponse.SessionId;
+ uploadedBytes = (ulong)statusResponse.UploadedBytes;
+ }
+ else
+ {
+ // ʼϴ
+ var initResponse = await _client.InitUploadAsync(new InitUploadRequest
+ {
+ FileName = fileInfo.Name,
+ FileSize = fileInfo.Length,
+ FileHash = fileHash
+ });
+ sessionId = initResponse.SessionId;
+ uploadedBytes = (ulong)initResponse.UploadedBytes;
+ }
+
+ // UIʾʼ
+ UpdateProgress(uploadedBytes, (ulong)fileInfo.Length);
+
+ // ļȡ
+ using (var fileStream = File.OpenRead(filePath))
+ {
+ fileStream.Seek((long)uploadedBytes, SeekOrigin.Begin);
+
+ var call = _client.UploadChunk();
+ var remainingBytes = fileInfo.Length - (long)uploadedBytes;
+
+ while (remainingBytes > 0 && !cancellationToken.IsCancellationRequested)
+ {
+ var currentChunkSize = (int)Math.Min(chunkSize, remainingBytes);
+ var buffer = new byte[currentChunkSize];
+ var bytesRead = await fileStream.ReadAsync(buffer, 0, currentChunkSize, cancellationToken);
+
+ if (bytesRead == 0) break;
+
+ await call.RequestStream.WriteAsync(new UploadChunkRequest
+ {
+ SessionId = sessionId,
+ ChunkData = Google.Protobuf.ByteString.CopyFrom(buffer),
+ Offset = (long)uploadedBytes
+ });
+
+ uploadedBytes += (ulong)bytesRead;
+ remainingBytes -= bytesRead;
+
+ // UI
+ UpdateProgress(uploadedBytes, (ulong)fileInfo.Length);
+ }
+
+ await call.RequestStream.CompleteAsync();
+ var response = await call.ResponseAsync;
+ }
+
+ if (!cancellationToken.IsCancellationRequested)
+ {
+ // ϴ
+ var completeResponse = await _client.CompleteUploadAsync(new CompleteUploadRequest
+ {
+ SessionId = sessionId,
+ FileHash = fileHash
+ });
+
+ if (!completeResponse.Success)
+ {
+ throw new Exception(completeResponse.Message);
+ }
+ }
+ }
+
+ private void UpdateProgress(ulong uploadedBytes, ulong totalBytes)
+ {
+ if (!this.DispatcherQueue.HasThreadAccess) // Check if the current thread has UI access
+ {
+ this.DispatcherQueue.TryEnqueue(() => UpdateProgress(uploadedBytes, totalBytes));
+ return;
+ }
+
+ progressBar.Value = (int)((double)uploadedBytes / totalBytes * 100);
+ lblProgress.Text = $"{FormatFileSize(uploadedBytes)} / {FormatFileSize(totalBytes)}";
+ lblPercentage.Text = $"{progressBar.Value}%";
+ }
+
+ private static string FormatFileSize(ulong bytes)
+ {
+ string[] sizes = ["B", "KB", "MB", "GB", "TB"];
+ var order = 0;
+ double len = bytes;
+
+ while (len >= 1024 && order < sizes.Length - 1)
+ {
+ order++;
+ len /= 1024;
+ }
+
+ return $"{len:0.##} {sizes[order]}";
+ }
+
+ private void BtnPause_OnClick(object sender, RoutedEventArgs e)
+ {
+ _cancellationTokenSource?.Cancel();
+ btnPause.IsEnabled = false;
+ btnUpload.IsEnabled = true;
+ }
+
+ private void BtnCancel_OnClick(object sender, RoutedEventArgs e)
+ {
+ _cancellationTokenSource?.Cancel();
+ btnCancel.IsEnabled = false;
+ btnPause.IsEnabled = false;
+ btnUpload.IsEnabled = true;
+
+ // ýʾ
+ progressBar.Value = 0;
+ lblProgress.Text = "";
+ lblPercentage.Text = "0%";
+ }
+
+ // Helper method for showing info dialogs
+ private async Task ShowInfoDialog(string content, string title)
+ {
+ var dialog = new ContentDialog
+ {
+ Title = title,
+ Content = content,
+ CloseButtonText = "ȷ",
+ XamlRoot = this.Content.XamlRoot
+ };
+ await dialog.ShowAsync();
+ }
+
+ // Helper method for showing error dialogs
+ private async Task ShowErrorDialog(string content, string title)
+ {
+ var dialog = new ContentDialog
+ {
+ Title = title,
+ Content = content,
+ CloseButtonText = "ȷ",
+ XamlRoot = this.Content.XamlRoot
+ };
+ await dialog.ShowAsync();
+ }
+ }
+}
diff --git a/WinUINotes/HomePage.xaml b/WinUINotes/HomePage.xaml
new file mode 100644
index 0000000..71aaf5f
--- /dev/null
+++ b/WinUINotes/HomePage.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
diff --git a/WinUINotes/HomePage.xaml.cs b/WinUINotes/HomePage.xaml.cs
new file mode 100644
index 0000000..bd19823
--- /dev/null
+++ b/WinUINotes/HomePage.xaml.cs
@@ -0,0 +1,31 @@
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Controls.Primitives;
+using Microsoft.UI.Xaml.Data;
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.UI.Xaml.Navigation;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace WinUINotes
+{
+ ///
+ /// An empty page that can be used on its own or navigated to within a Frame.
+ ///
+ public sealed partial class HomePage : Page
+ {
+ public HomePage()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/WinUINotes/MainWindow.xaml b/WinUINotes/MainWindow.xaml
index 2e55fea..cdf7acd 100644
--- a/WinUINotes/MainWindow.xaml
+++ b/WinUINotes/MainWindow.xaml
@@ -14,7 +14,25 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/WinUINotes/MainWindow.xaml.cs b/WinUINotes/MainWindow.xaml.cs
index ca80218..f52d973 100644
--- a/WinUINotes/MainWindow.xaml.cs
+++ b/WinUINotes/MainWindow.xaml.cs
@@ -27,5 +27,34 @@ namespace WinUINotes
{
InitializeComponent();
}
+
+ private void NavigationViewControl_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
+ {
+ if (args.IsSettingsSelected)
+ {
+ ContentFrame.Navigate(typeof(SettingsPage));
+ }
+ else if (args.SelectedItem is NavigationViewItem selectedItem)
+ {
+ string tag = selectedItem.Tag?.ToString();
+
+ switch (tag)
+ {
+ case "HomePage":
+ ContentFrame.Navigate(typeof(HomePage));
+ break;
+ case "NotePage":
+ ContentFrame.Navigate(typeof(NotePage));
+ break;
+ case "AboutPage":
+ ContentFrame.Navigate(typeof(AboutPage));
+ break;
+ case "FileUploadPage":
+ ContentFrame.Navigate(typeof(FileUploadPage));
+ break;
+ // Ӹ case
+ }
+ }
+ }
}
}
diff --git a/WinUINotes/Model/Note.cs b/WinUINotes/Model/Note.cs
new file mode 100644
index 0000000..82d7055
--- /dev/null
+++ b/WinUINotes/Model/Note.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WinUINotes.Model
+{
+ public class Note
+ {
+ public string Content { get; set; }
+
+ public long UserId { get; set; }
+
+ public DateTime CreateTime { get; set; }
+ }
+}
diff --git a/WinUINotes/NotePage.xaml.cs b/WinUINotes/NotePage.xaml.cs
index 412dc90..57a20df 100644
--- a/WinUINotes/NotePage.xaml.cs
+++ b/WinUINotes/NotePage.xaml.cs
@@ -4,7 +4,7 @@ using Microsoft.UI.Xaml.Controls;
using System;
using Windows.Storage;
using Google.Protobuf.WellKnownTypes;
-using ZR.Admin.Grpc;
+using WinUINotes.Grpc;
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.
diff --git a/WinUINotes/Properties/launchSettings.json b/WinUINotes/Properties/launchSettings.json
index b14d4cf..f73ff23 100644
--- a/WinUINotes/Properties/launchSettings.json
+++ b/WinUINotes/Properties/launchSettings.json
@@ -1,10 +1,15 @@
{
"profiles": {
"WinUINotes (Package)": {
- "commandName": "MsixPackage"
+ "commandName": "MsixPackage",
+ "nativeDebugging": false
},
"WinUINotes (Unpackaged)": {
"commandName": "Project"
+ },
+ "WSL": {
+ "commandName": "WSL2",
+ "distributionName": ""
}
}
}
\ No newline at end of file
diff --git a/WinUINotes/SettingsPage.xaml b/WinUINotes/SettingsPage.xaml
new file mode 100644
index 0000000..7ca65ae
--- /dev/null
+++ b/WinUINotes/SettingsPage.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
diff --git a/WinUINotes/SettingsPage.xaml.cs b/WinUINotes/SettingsPage.xaml.cs
new file mode 100644
index 0000000..8752e0f
--- /dev/null
+++ b/WinUINotes/SettingsPage.xaml.cs
@@ -0,0 +1,31 @@
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Controls.Primitives;
+using Microsoft.UI.Xaml.Data;
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.UI.Xaml.Navigation;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace WinUINotes
+{
+ ///
+ /// An empty page that can be used on its own or navigated to within a Frame.
+ ///
+ public sealed partial class SettingsPage : Page
+ {
+ public SettingsPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/WinUINotes/WinUINotes.csproj b/WinUINotes/WinUINotes.csproj
index 93adb92..117f374 100644
--- a/WinUINotes/WinUINotes.csproj
+++ b/WinUINotes/WinUINotes.csproj
@@ -13,7 +13,10 @@
enable
+
+
+
@@ -45,6 +48,26 @@
+
+
+ MSBuild:Compile
+
+
+
+
+ MSBuild:Compile
+
+
+
+
+ MSBuild:Compile
+
+
+
+
+ MSBuild:Compile
+
+
MSBuild:Compile
diff --git a/WinUINotes/WinUINotes.csproj.user b/WinUINotes/WinUINotes.csproj.user
index 4c7d231..b886a59 100644
--- a/WinUINotes/WinUINotes.csproj.user
+++ b/WinUINotes/WinUINotes.csproj.user
@@ -1,10 +1,27 @@
-
+
+ ProjectDebugger
+
+
+ WinUINotes (Package)
+
+
+ Designer
+
Designer
+
+ Designer
+
+
+ Designer
+
+
+ Designer
+
Designer