Serialize converters were added

This commit is contained in:
Evgeny Redikultsev
2024-09-08 17:47:46 +05:00
parent 408e9f6999
commit 6e0b7b8070
60 changed files with 1713 additions and 443 deletions

View File

@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace DataAccess.FileDialogs
{
public class FileDialogOpener
{
public void OpenFileAndRead()
{
//// Create an instance of OpenFileDialog
//using OpenFileDialog openFileDialog = new();
//// Set filter options and filter index
//openFileDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*";
//openFileDialog.FilterIndex = 1;
//openFileDialog.Multiselect = false; // Set to true if you want to allow multiple file selection
//openFileDialog.Title = "Select a File";
//// Show the dialog and get result
//if (openFileDialog.ShowDialog() == DialogResult.OK)
//{
// // Get the path of the selected file
// string selectedFilePath = openFileDialog.FileName;
// // Read the content of the file
// try
// {
// string fileContent = File.ReadAllText(selectedFilePath);
// Console.WriteLine($"File Content of '{selectedFilePath}':");
// Console.WriteLine(fileContent);
// }
// catch (IOException ex)
// {
// Console.WriteLine($"An error occurred while reading the file: {ex.Message}");
// }
//}
//else
//{
// Console.WriteLine("File selection was cancelled.");
//}
}
}
}