From 54fc3320e7d64d7903b4d091fe0d5c15df01fd78 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Sun, 26 Dec 2021 18:22:32 +0300 Subject: Move to /src --- src/Forms/Dialog.cs | 46 ++++++++++++++ src/Forms/SettingsForm.Designer.cs | 46 ++++++++++++++ src/Forms/SettingsForm.cs | 21 +++++++ src/Forms/SettingsForm.resx | 120 +++++++++++++++++++++++++++++++++++++ 4 files changed, 233 insertions(+) create mode 100644 src/Forms/Dialog.cs create mode 100644 src/Forms/SettingsForm.Designer.cs create mode 100644 src/Forms/SettingsForm.cs create mode 100644 src/Forms/SettingsForm.resx (limited to 'src/Forms') diff --git a/src/Forms/Dialog.cs b/src/Forms/Dialog.cs new file mode 100644 index 0000000..170cc81 --- /dev/null +++ b/src/Forms/Dialog.cs @@ -0,0 +1,46 @@ +using System.Collections.Generic; +using System.Windows.Forms; + +namespace RehauSku.Forms +{ + static class Dialog + { + public static string GetFilePath() + { + string filePath = string.Empty; + + using (OpenFileDialog dialog = new OpenFileDialog()) + { + dialog.Filter = "Файлы Excel (*.xls;*.xlsx;*.xlsm)|*.xls;*.xlsx;*.xlsm"; + + if (dialog.ShowDialog() == DialogResult.OK) + { + filePath = dialog.FileName; + } + } + + return filePath; + } + + public static string[] GetMultiplyFiles() + { + List fileNames = new List(); + + using (OpenFileDialog dialog = new OpenFileDialog()) + { + dialog.Filter = "Файлы Excel (*.xls;*.xlsx;*.xlsm)|*.xls;*.xlsx;*.xlsm"; + dialog.Multiselect = true; + + if (dialog.ShowDialog() == DialogResult.OK) + { + foreach (string file in dialog.FileNames) + { + fileNames.Add(file); + } + } + } + + return fileNames.ToArray(); + } + } +} diff --git a/src/Forms/SettingsForm.Designer.cs b/src/Forms/SettingsForm.Designer.cs new file mode 100644 index 0000000..669406e --- /dev/null +++ b/src/Forms/SettingsForm.Designer.cs @@ -0,0 +1,46 @@ +namespace RehauSku.Forms +{ + partial class SettingsForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.SuspendLayout(); + // + // SettingsForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Name = "SettingsForm"; + this.Text = "SettingsForm"; + this.ResumeLayout(false); + + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Forms/SettingsForm.cs b/src/Forms/SettingsForm.cs new file mode 100644 index 0000000..4dffadb --- /dev/null +++ b/src/Forms/SettingsForm.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace RehauSku.Forms +{ + public partial class SettingsForm : Form + { + public SettingsForm() + { + InitializeComponent(); + } + + } +} diff --git a/src/Forms/SettingsForm.resx b/src/Forms/SettingsForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/src/Forms/SettingsForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file -- cgit v1.2.3