diff --git a/.gitignore b/.gitignore
index ca1c7a3..d62d4cb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,6 +14,9 @@
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
+# dll files
+*.dll
+
# Mono auto generated files
mono_crash.*
diff --git a/LawFirm/AbstractLawFirmFileImpliment/AbstractLawFirmFileImplement.csproj b/LawFirm/AbstractLawFirmFileImpliment/AbstractLawFirmFileImplement.csproj
index f54052f..56a4927 100644
--- a/LawFirm/AbstractLawFirmFileImpliment/AbstractLawFirmFileImplement.csproj
+++ b/LawFirm/AbstractLawFirmFileImpliment/AbstractLawFirmFileImplement.csproj
@@ -11,4 +11,8 @@
+
+
+
+
diff --git a/LawFirm/LawFirmView/FormMain.cs b/LawFirm/LawFirmView/FormMain.cs
index 6ea4978..3b5aa85 100644
--- a/LawFirm/LawFirmView/FormMain.cs
+++ b/LawFirm/LawFirmView/FormMain.cs
@@ -52,7 +52,6 @@ namespace LawFirmView
private void пакетыДокументовToolStripMenuItem_Click(object sender, EventArgs e)
{
- var service = Program.ServiceProvider?.GetService(typeof(FormDocuments));
var form = DependencyManager.Instance.Resolve();
form.ShowDialog();
diff --git a/LawFirm/LawFirmView/FormMain.designer.cs b/LawFirm/LawFirmView/FormMain.designer.cs
index d545a86..a8daaf0 100644
--- a/LawFirm/LawFirmView/FormMain.designer.cs
+++ b/LawFirm/LawFirmView/FormMain.designer.cs
@@ -46,6 +46,7 @@
buttonOrderReady = new Button();
buttonIssuedOrder = new Button();
buttonRef = new Button();
+ создатьБекапToolStripMenuItem = new ToolStripMenuItem();
menuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
SuspendLayout();
@@ -53,7 +54,7 @@
// menuStrip1
//
menuStrip1.ImageScalingSize = new Size(20, 20);
- menuStrip1.Items.AddRange(new ToolStripItem[] { toolStripMenuItemCatalogs, отчётыToolStripMenuItem, ЗапускРаботToolStripMenuItem, почтаToolStripMenuItem });
+ menuStrip1.Items.AddRange(new ToolStripItem[] { toolStripMenuItemCatalogs, отчётыToolStripMenuItem, ЗапускРаботToolStripMenuItem, почтаToolStripMenuItem, создатьБекапToolStripMenuItem });
menuStrip1.Location = new Point(0, 0);
menuStrip1.Name = "menuStrip1";
menuStrip1.Padding = new Padding(7, 3, 0, 3);
@@ -205,6 +206,13 @@
buttonRef.UseVisualStyleBackColor = true;
buttonRef.Click += buttonRef_Click;
//
+ // создатьБекапToolStripMenuItem
+ //
+ создатьБекапToolStripMenuItem.Name = "создатьБекапToolStripMenuItem";
+ создатьБекапToolStripMenuItem.Size = new Size(123, 24);
+ создатьБекапToolStripMenuItem.Text = "Создать бекап";
+ создатьБекапToolStripMenuItem.Click += создатьБэкапToolStripMenuItem_Click;
+ //
// FormMain
//
AutoScaleDimensions = new SizeF(8F, 20F);
@@ -249,5 +257,6 @@
private ToolStripMenuItem ЗапускРаботToolStripMenuItem;
private ToolStripMenuItem исполнителиToolStripMenuItem;
private ToolStripMenuItem почтаToolStripMenuItem;
+ private ToolStripMenuItem создатьБекапToolStripMenuItem;
}
}
\ No newline at end of file
diff --git a/LawFirm/LawFirmView/Program.cs b/LawFirm/LawFirmView/Program.cs
index 4ede973..f6f6c9b 100644
--- a/LawFirm/LawFirmView/Program.cs
+++ b/LawFirm/LawFirmView/Program.cs
@@ -17,50 +17,36 @@ using AbstractLawFirmContracts.BindingModels;
namespace LawFirmView
{
- internal static class Program
- {
- private static ServiceProvider? _serviceProvider;
- public static ServiceProvider? ServiceProvider => _serviceProvider;
- ///
- /// The main entry point for the application.
- ///
- [STAThread]
- static void Main()
- {
- // To customize application configuration such as set high DPI settings or default font,
- // see https://aka.ms/applicationconfiguration.
- ApplicationConfiguration.Initialize();
+ internal static class Program
+ {
+ [STAThread]
+ static void Main()
+ {
+ // To customize application configuration such as set high DPI settings or default font,
+ // see https://aka.ms/applicationconfiguration.
+ ApplicationConfiguration.Initialize();
InitDependency();
+
try
{
var mailSender = DependencyManager.Instance.Resolve();
mailSender?.MailConfig(new MailConfigBindingModel
{
- MailLogin =
- System.Configuration.ConfigurationManager.AppSettings["MailLogin"] ??
- string.Empty,
- MailPassword =
- System.Configuration.ConfigurationManager.AppSettings["MailPassword"] ??
- string.Empty,
- SmtpClientHost =
- System.Configuration.ConfigurationManager.AppSettings["SmtpClientHost"] ??
- string.Empty,
- SmtpClientPort =
- Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["SmtpClientPort"]),
- PopHost =
- System.Configuration.ConfigurationManager.AppSettings["PopHost"] ?? string.Empty,
- PopPort =
- Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["PopPort"])
+ MailLogin = System.Configuration.ConfigurationManager.AppSettings["MailLogin"] ?? string.Empty,
+ MailPassword = System.Configuration.ConfigurationManager.AppSettings["MailPassword"] ?? string.Empty,
+ SmtpClientHost = System.Configuration.ConfigurationManager.AppSettings["SmtpClientHost"] ?? string.Empty,
+ SmtpClientPort = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["SmtpClientPort"]),
+ PopHost = System.Configuration.ConfigurationManager.AppSettings["PopHost"] ?? string.Empty,
+ PopPort = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["PopPort"])
});
- var timer = new System.Threading.Timer(new
- TimerCallback(MailCheck!), null, 0, 100000);
+
+ var timer = new System.Threading.Timer(new TimerCallback(MailCheck!), null, 0, 100000);
}
catch (Exception ex)
{
- var logger = _serviceProvider.GetService();
+ var logger = DependencyManager.Instance.Resolve();
logger?.LogError(ex, "Error");
}
-
Application.Run(DependencyManager.Instance.Resolve());
}
private static void InitDependency()