Почти готово
This commit is contained in:
parent
e1bce48929
commit
810ef89776
3
.gitignore
vendored
3
.gitignore
vendored
@ -14,6 +14,9 @@
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# dll files
|
||||
*.dll
|
||||
|
||||
# Mono auto generated files
|
||||
mono_crash.*
|
||||
|
||||
|
@ -11,4 +11,8 @@
|
||||
<ProjectReference Include="..\AbstractLawFirmDataModels\AbstractLawFirmDataModels\AbstractLawFirmDataModels.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="copy /Y "$(TargetDir)*.dll" "$(SolutionDir)ImplementationExtensions\*.dll"" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
@ -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<FormDocuments>();
|
||||
form.ShowDialog();
|
||||
|
||||
|
11
LawFirm/LawFirmView/FormMain.designer.cs
generated
11
LawFirm/LawFirmView/FormMain.designer.cs
generated
@ -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;
|
||||
}
|
||||
}
|
@ -19,11 +19,6 @@ namespace LawFirmView
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
private static ServiceProvider? _serviceProvider;
|
||||
public static ServiceProvider? ServiceProvider => _serviceProvider;
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
@ -31,36 +26,27 @@ namespace LawFirmView
|
||||
// see https://aka.ms/applicationconfiguration.
|
||||
ApplicationConfiguration.Initialize();
|
||||
InitDependency();
|
||||
|
||||
try
|
||||
{
|
||||
var mailSender = DependencyManager.Instance.Resolve<AbstractMailWorker>();
|
||||
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<ILogger>();
|
||||
var logger = DependencyManager.Instance.Resolve<ILogger>();
|
||||
logger?.LogError(ex, "Error");
|
||||
}
|
||||
|
||||
Application.Run(DependencyManager.Instance.Resolve<FormMain>());
|
||||
}
|
||||
private static void InitDependency()
|
||||
|
Loading…
Reference in New Issue
Block a user