Bozza gestione conf e setup parametri
This commit is contained in:
@@ -52,6 +52,7 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="ELMAH_Error.cs" />
|
||||
<Compile Include="ElmahModel.cs" />
|
||||
<Compile Include="eSetup.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="sysdiagram.cs" />
|
||||
<Compile Include="v_dimensDistinct.cs" />
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AppData
|
||||
{
|
||||
public class eSetup
|
||||
{
|
||||
/// <summary>
|
||||
/// NOme della configurazione
|
||||
/// </summary>
|
||||
public string name { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Conn string di base
|
||||
/// </summary>
|
||||
public string connString { get; set; } = "";
|
||||
/// <summary>
|
||||
/// URL di base x recupero ELMAH da sito
|
||||
/// </summary>
|
||||
public string baseUrl { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Path di base delle applicazioni
|
||||
/// </summary>
|
||||
public string appBasePath { get; set; } = "";
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
Generated
+227
@@ -0,0 +1,227 @@
|
||||
namespace ELMA
|
||||
{
|
||||
partial class ConfigMan
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.txtServerName = new System.Windows.Forms.TextBox();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.txtPasswd = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.txtUser = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
|
||||
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
|
||||
this.btnLoad = new System.Windows.Forms.Button();
|
||||
this.btnSave = new System.Windows.Forms.Button();
|
||||
this.txtBaseUrl = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.checkBox1 = new System.Windows.Forms.CheckBox();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(8, 22);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(56, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Name / IP";
|
||||
//
|
||||
// txtServerName
|
||||
//
|
||||
this.txtServerName.Location = new System.Drawing.Point(70, 19);
|
||||
this.txtServerName.Name = "txtServerName";
|
||||
this.txtServerName.Size = new System.Drawing.Size(204, 20);
|
||||
this.txtServerName.TabIndex = 1;
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.checkBox1);
|
||||
this.groupBox1.Controls.Add(this.txtPasswd);
|
||||
this.groupBox1.Controls.Add(this.label3);
|
||||
this.groupBox1.Controls.Add(this.txtUser);
|
||||
this.groupBox1.Controls.Add(this.label2);
|
||||
this.groupBox1.Controls.Add(this.txtServerName);
|
||||
this.groupBox1.Controls.Add(this.label1);
|
||||
this.groupBox1.Location = new System.Drawing.Point(12, 41);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(775, 55);
|
||||
this.groupBox1.TabIndex = 2;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "SQL Server";
|
||||
//
|
||||
// txtPasswd
|
||||
//
|
||||
this.txtPasswd.Location = new System.Drawing.Point(633, 19);
|
||||
this.txtPasswd.Name = "txtPasswd";
|
||||
this.txtPasswd.Size = new System.Drawing.Size(136, 20);
|
||||
this.txtPasswd.TabIndex = 5;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(583, 22);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(44, 13);
|
||||
this.label3.TabIndex = 4;
|
||||
this.label3.Text = "Passwd";
|
||||
//
|
||||
// txtUser
|
||||
//
|
||||
this.txtUser.Location = new System.Drawing.Point(425, 19);
|
||||
this.txtUser.Name = "txtUser";
|
||||
this.txtUser.Size = new System.Drawing.Size(136, 20);
|
||||
this.txtUser.TabIndex = 3;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(390, 22);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(29, 13);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "User";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label4.Location = new System.Drawing.Point(13, 13);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(116, 22);
|
||||
this.label4.TabIndex = 3;
|
||||
this.label4.Text = "Active Config";
|
||||
//
|
||||
// openFileDialog1
|
||||
//
|
||||
this.openFileDialog1.FileName = "openFileDialog1";
|
||||
//
|
||||
// btnLoad
|
||||
//
|
||||
this.btnLoad.Location = new System.Drawing.Point(9, 176);
|
||||
this.btnLoad.Name = "btnLoad";
|
||||
this.btnLoad.Size = new System.Drawing.Size(117, 23);
|
||||
this.btnLoad.TabIndex = 4;
|
||||
this.btnLoad.Text = "Load Config";
|
||||
this.btnLoad.UseVisualStyleBackColor = true;
|
||||
this.btnLoad.Click += new System.EventHandler(this.btnLoad_Click);
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
this.btnSave.Location = new System.Drawing.Point(132, 176);
|
||||
this.btnSave.Name = "btnSave";
|
||||
this.btnSave.Size = new System.Drawing.Size(117, 23);
|
||||
this.btnSave.TabIndex = 5;
|
||||
this.btnSave.Text = "Save Config";
|
||||
this.btnSave.UseVisualStyleBackColor = true;
|
||||
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
|
||||
//
|
||||
// txtBaseUrl
|
||||
//
|
||||
this.txtBaseUrl.Location = new System.Drawing.Point(70, 33);
|
||||
this.txtBaseUrl.Name = "txtBaseUrl";
|
||||
this.txtBaseUrl.Size = new System.Drawing.Size(439, 20);
|
||||
this.txtBaseUrl.TabIndex = 21;
|
||||
this.txtBaseUrl.Text = "https://localhost:44388";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(8, 33);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(56, 13);
|
||||
this.label5.TabIndex = 20;
|
||||
this.label5.Text = "Base URL";
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Controls.Add(this.txtBaseUrl);
|
||||
this.groupBox2.Controls.Add(this.label5);
|
||||
this.groupBox2.Location = new System.Drawing.Point(11, 102);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(776, 68);
|
||||
this.groupBox2.TabIndex = 22;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "IIS Server";
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
this.checkBox1.AutoSize = true;
|
||||
this.checkBox1.Location = new System.Drawing.Point(281, 20);
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.Size = new System.Drawing.Size(73, 17);
|
||||
this.checkBox1.TabIndex = 6;
|
||||
this.checkBox1.Text = "integ auth";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ConfigMan
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(800, 245);
|
||||
this.Controls.Add(this.groupBox2);
|
||||
this.Controls.Add(this.btnSave);
|
||||
this.Controls.Add(this.btnLoad);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Name = "ConfigMan";
|
||||
this.Text = "ConfigMan";
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox2.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox txtServerName;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.TextBox txtPasswd;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox txtUser;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.OpenFileDialog openFileDialog1;
|
||||
private System.Windows.Forms.SaveFileDialog saveFileDialog1;
|
||||
private System.Windows.Forms.Button btnLoad;
|
||||
private System.Windows.Forms.Button btnSave;
|
||||
private System.Windows.Forms.TextBox txtBaseUrl;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.CheckBox checkBox1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
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 ELMA
|
||||
{
|
||||
public partial class ConfigMan : Form
|
||||
{
|
||||
public ConfigMan()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void btnLoad_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>157, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -39,6 +39,9 @@
|
||||
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Core" />
|
||||
@@ -53,6 +56,12 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ConfigMan.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ConfigMan.Designer.cs">
|
||||
<DependentUpon>ConfigMan.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MainForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -67,6 +76,9 @@
|
||||
<Compile Include="WBrowser.Designer.cs">
|
||||
<DependentUpon>WBrowser.cs</DependentUpon>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="ConfigMan.resx">
|
||||
<DependentUpon>ConfigMan.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="MainForm.resx">
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -82,6 +94,9 @@
|
||||
<EmbeddedResource Include="WBrowser.resx">
|
||||
<DependentUpon>WBrowser.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<None Include="CONF\.placeholder">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\DataSources\AppData.ELMAH_Error.datasource" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
|
||||
Generated
+95
-87
@@ -31,6 +31,7 @@
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
|
||||
this.ErrorsDGV = new System.Windows.Forms.DataGridView();
|
||||
this.bsErrors = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.lblApp = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.lblVers = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
@@ -43,7 +44,6 @@
|
||||
this.chkHost = new System.Windows.Forms.CheckBox();
|
||||
this.chkType = new System.Windows.Forms.CheckBox();
|
||||
this.chkApp = new System.Windows.Forms.CheckBox();
|
||||
this.btnDelete = new System.Windows.Forms.Button();
|
||||
this.listUsers = new System.Windows.Forms.ListBox();
|
||||
this.listType = new System.Windows.Forms.ListBox();
|
||||
this.listStatus = new System.Windows.Forms.ListBox();
|
||||
@@ -51,21 +51,22 @@
|
||||
this.listApp = new System.Windows.Forms.ListBox();
|
||||
this.timerUI = new System.Windows.Forms.Timer(this.components);
|
||||
this.timerMain = new System.Windows.Forms.Timer(this.components);
|
||||
this.errorIdDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.applicationDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.txtBaseUrl = new System.Windows.Forms.TextBox();
|
||||
this.sequenceDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.timeUtcDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.hostDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.applicationDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.errorIdDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.typeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.sourceDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.messageDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.userDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.statusCodeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.timeUtcDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.sequenceDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.bsErrors = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.messageDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
((System.ComponentModel.ISupportInitialize)(this.ErrorsDGV)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bsErrors)).BeginInit();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.gboxFiltri.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bsErrors)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// ErrorsDGV
|
||||
@@ -79,26 +80,30 @@
|
||||
this.ErrorsDGV.AutoGenerateColumns = false;
|
||||
this.ErrorsDGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.ErrorsDGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.errorIdDataGridViewTextBoxColumn,
|
||||
this.applicationDataGridViewTextBoxColumn,
|
||||
this.sequenceDataGridViewTextBoxColumn,
|
||||
this.timeUtcDataGridViewTextBoxColumn,
|
||||
this.hostDataGridViewTextBoxColumn,
|
||||
this.applicationDataGridViewTextBoxColumn,
|
||||
this.errorIdDataGridViewTextBoxColumn,
|
||||
this.typeDataGridViewTextBoxColumn,
|
||||
this.sourceDataGridViewTextBoxColumn,
|
||||
this.messageDataGridViewTextBoxColumn,
|
||||
this.userDataGridViewTextBoxColumn,
|
||||
this.statusCodeDataGridViewTextBoxColumn,
|
||||
this.timeUtcDataGridViewTextBoxColumn,
|
||||
this.sequenceDataGridViewTextBoxColumn});
|
||||
this.messageDataGridViewTextBoxColumn});
|
||||
this.ErrorsDGV.DataSource = this.bsErrors;
|
||||
this.ErrorsDGV.Location = new System.Drawing.Point(12, 119);
|
||||
this.ErrorsDGV.Name = "ErrorsDGV";
|
||||
this.ErrorsDGV.ReadOnly = true;
|
||||
this.ErrorsDGV.RowHeadersWidth = 51;
|
||||
this.ErrorsDGV.Size = new System.Drawing.Size(917, 486);
|
||||
this.ErrorsDGV.Size = new System.Drawing.Size(1048, 486);
|
||||
this.ErrorsDGV.TabIndex = 0;
|
||||
this.ErrorsDGV.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.ErrorsDGV_CellDoubleClick);
|
||||
this.ErrorsDGV.DoubleClick += new System.EventHandler(this.ErrorsDGV_DoubleClick);
|
||||
//
|
||||
// bsErrors
|
||||
//
|
||||
this.bsErrors.DataSource = typeof(AppData.ELMAH_Error);
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||
@@ -109,7 +114,7 @@
|
||||
this.tsslNumRec});
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 608);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.Size = new System.Drawing.Size(941, 22);
|
||||
this.statusStrip1.Size = new System.Drawing.Size(1072, 22);
|
||||
this.statusStrip1.TabIndex = 1;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
@@ -140,13 +145,14 @@
|
||||
//
|
||||
this.gboxFiltri.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.gboxFiltri.Controls.Add(this.txtBaseUrl);
|
||||
this.gboxFiltri.Controls.Add(this.label1);
|
||||
this.gboxFiltri.Controls.Add(this.btnDeleteSel);
|
||||
this.gboxFiltri.Controls.Add(this.chkUsers);
|
||||
this.gboxFiltri.Controls.Add(this.chkStatus);
|
||||
this.gboxFiltri.Controls.Add(this.chkHost);
|
||||
this.gboxFiltri.Controls.Add(this.chkType);
|
||||
this.gboxFiltri.Controls.Add(this.chkApp);
|
||||
this.gboxFiltri.Controls.Add(this.btnDelete);
|
||||
this.gboxFiltri.Controls.Add(this.listUsers);
|
||||
this.gboxFiltri.Controls.Add(this.listType);
|
||||
this.gboxFiltri.Controls.Add(this.listStatus);
|
||||
@@ -156,17 +162,17 @@
|
||||
this.gboxFiltri.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.gboxFiltri.Name = "gboxFiltri";
|
||||
this.gboxFiltri.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.gboxFiltri.Size = new System.Drawing.Size(917, 104);
|
||||
this.gboxFiltri.Size = new System.Drawing.Size(1048, 104);
|
||||
this.gboxFiltri.TabIndex = 2;
|
||||
this.gboxFiltri.TabStop = false;
|
||||
this.gboxFiltri.Text = "Filtri";
|
||||
//
|
||||
// btnDeleteSel
|
||||
//
|
||||
this.btnDeleteSel.Location = new System.Drawing.Point(703, 31);
|
||||
this.btnDeleteSel.Location = new System.Drawing.Point(690, 31);
|
||||
this.btnDeleteSel.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnDeleteSel.Name = "btnDeleteSel";
|
||||
this.btnDeleteSel.Size = new System.Drawing.Size(98, 55);
|
||||
this.btnDeleteSel.Size = new System.Drawing.Size(111, 64);
|
||||
this.btnDeleteSel.TabIndex = 17;
|
||||
this.btnDeleteSel.Text = "DELETE SELECTED";
|
||||
this.btnDeleteSel.UseVisualStyleBackColor = true;
|
||||
@@ -227,18 +233,6 @@
|
||||
this.chkApp.UseVisualStyleBackColor = true;
|
||||
this.chkApp.CheckedChanged += new System.EventHandler(this.chkApp_CheckedChanged);
|
||||
//
|
||||
// btnDelete
|
||||
//
|
||||
this.btnDelete.Location = new System.Drawing.Point(814, 31);
|
||||
this.btnDelete.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnDelete.Name = "btnDelete";
|
||||
this.btnDelete.Size = new System.Drawing.Size(98, 55);
|
||||
this.btnDelete.TabIndex = 11;
|
||||
this.btnDelete.Text = "DELETE FILTERED";
|
||||
this.btnDelete.UseVisualStyleBackColor = true;
|
||||
this.btnDelete.Visible = false;
|
||||
this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
|
||||
//
|
||||
// listUsers
|
||||
//
|
||||
this.listUsers.Font = new System.Drawing.Font("Arial Narrow", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
@@ -309,14 +303,49 @@
|
||||
this.timerMain.Interval = 10000;
|
||||
this.timerMain.Tick += new System.EventHandler(this.timerMain_Tick);
|
||||
//
|
||||
// errorIdDataGridViewTextBoxColumn
|
||||
// label1
|
||||
//
|
||||
this.errorIdDataGridViewTextBoxColumn.DataPropertyName = "ErrorId";
|
||||
this.errorIdDataGridViewTextBoxColumn.HeaderText = "ErrorId";
|
||||
this.errorIdDataGridViewTextBoxColumn.MinimumWidth = 6;
|
||||
this.errorIdDataGridViewTextBoxColumn.Name = "errorIdDataGridViewTextBoxColumn";
|
||||
this.errorIdDataGridViewTextBoxColumn.ReadOnly = true;
|
||||
this.errorIdDataGridViewTextBoxColumn.Width = 125;
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(807, 14);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(56, 13);
|
||||
this.label1.TabIndex = 18;
|
||||
this.label1.Text = "Base URL";
|
||||
//
|
||||
// txtBaseUrl
|
||||
//
|
||||
this.txtBaseUrl.Location = new System.Drawing.Point(810, 31);
|
||||
this.txtBaseUrl.Name = "txtBaseUrl";
|
||||
this.txtBaseUrl.Size = new System.Drawing.Size(233, 20);
|
||||
this.txtBaseUrl.TabIndex = 19;
|
||||
this.txtBaseUrl.Text = "https://localhost:44388";
|
||||
//
|
||||
// sequenceDataGridViewTextBoxColumn
|
||||
//
|
||||
this.sequenceDataGridViewTextBoxColumn.DataPropertyName = "Sequence";
|
||||
this.sequenceDataGridViewTextBoxColumn.HeaderText = "Sequence";
|
||||
this.sequenceDataGridViewTextBoxColumn.MinimumWidth = 6;
|
||||
this.sequenceDataGridViewTextBoxColumn.Name = "sequenceDataGridViewTextBoxColumn";
|
||||
this.sequenceDataGridViewTextBoxColumn.ReadOnly = true;
|
||||
this.sequenceDataGridViewTextBoxColumn.Width = 125;
|
||||
//
|
||||
// timeUtcDataGridViewTextBoxColumn
|
||||
//
|
||||
this.timeUtcDataGridViewTextBoxColumn.DataPropertyName = "TimeUtc";
|
||||
this.timeUtcDataGridViewTextBoxColumn.HeaderText = "TimeUtc";
|
||||
this.timeUtcDataGridViewTextBoxColumn.MinimumWidth = 6;
|
||||
this.timeUtcDataGridViewTextBoxColumn.Name = "timeUtcDataGridViewTextBoxColumn";
|
||||
this.timeUtcDataGridViewTextBoxColumn.ReadOnly = true;
|
||||
this.timeUtcDataGridViewTextBoxColumn.Width = 125;
|
||||
//
|
||||
// hostDataGridViewTextBoxColumn
|
||||
//
|
||||
this.hostDataGridViewTextBoxColumn.DataPropertyName = "Host";
|
||||
this.hostDataGridViewTextBoxColumn.HeaderText = "Host";
|
||||
this.hostDataGridViewTextBoxColumn.MinimumWidth = 6;
|
||||
this.hostDataGridViewTextBoxColumn.Name = "hostDataGridViewTextBoxColumn";
|
||||
this.hostDataGridViewTextBoxColumn.ReadOnly = true;
|
||||
this.hostDataGridViewTextBoxColumn.Width = 125;
|
||||
//
|
||||
// applicationDataGridViewTextBoxColumn
|
||||
//
|
||||
@@ -327,14 +356,14 @@
|
||||
this.applicationDataGridViewTextBoxColumn.ReadOnly = true;
|
||||
this.applicationDataGridViewTextBoxColumn.Width = 125;
|
||||
//
|
||||
// hostDataGridViewTextBoxColumn
|
||||
// errorIdDataGridViewTextBoxColumn
|
||||
//
|
||||
this.hostDataGridViewTextBoxColumn.DataPropertyName = "Host";
|
||||
this.hostDataGridViewTextBoxColumn.HeaderText = "Host";
|
||||
this.hostDataGridViewTextBoxColumn.MinimumWidth = 6;
|
||||
this.hostDataGridViewTextBoxColumn.Name = "hostDataGridViewTextBoxColumn";
|
||||
this.hostDataGridViewTextBoxColumn.ReadOnly = true;
|
||||
this.hostDataGridViewTextBoxColumn.Width = 125;
|
||||
this.errorIdDataGridViewTextBoxColumn.DataPropertyName = "ErrorId";
|
||||
this.errorIdDataGridViewTextBoxColumn.HeaderText = "ErrorId";
|
||||
this.errorIdDataGridViewTextBoxColumn.MinimumWidth = 6;
|
||||
this.errorIdDataGridViewTextBoxColumn.Name = "errorIdDataGridViewTextBoxColumn";
|
||||
this.errorIdDataGridViewTextBoxColumn.ReadOnly = true;
|
||||
this.errorIdDataGridViewTextBoxColumn.Width = 125;
|
||||
//
|
||||
// typeDataGridViewTextBoxColumn
|
||||
//
|
||||
@@ -354,15 +383,6 @@
|
||||
this.sourceDataGridViewTextBoxColumn.ReadOnly = true;
|
||||
this.sourceDataGridViewTextBoxColumn.Width = 125;
|
||||
//
|
||||
// messageDataGridViewTextBoxColumn
|
||||
//
|
||||
this.messageDataGridViewTextBoxColumn.DataPropertyName = "Message";
|
||||
this.messageDataGridViewTextBoxColumn.HeaderText = "Message";
|
||||
this.messageDataGridViewTextBoxColumn.MinimumWidth = 6;
|
||||
this.messageDataGridViewTextBoxColumn.Name = "messageDataGridViewTextBoxColumn";
|
||||
this.messageDataGridViewTextBoxColumn.ReadOnly = true;
|
||||
this.messageDataGridViewTextBoxColumn.Width = 125;
|
||||
//
|
||||
// userDataGridViewTextBoxColumn
|
||||
//
|
||||
this.userDataGridViewTextBoxColumn.DataPropertyName = "User";
|
||||
@@ -381,33 +401,20 @@
|
||||
this.statusCodeDataGridViewTextBoxColumn.ReadOnly = true;
|
||||
this.statusCodeDataGridViewTextBoxColumn.Width = 125;
|
||||
//
|
||||
// timeUtcDataGridViewTextBoxColumn
|
||||
// messageDataGridViewTextBoxColumn
|
||||
//
|
||||
this.timeUtcDataGridViewTextBoxColumn.DataPropertyName = "TimeUtc";
|
||||
this.timeUtcDataGridViewTextBoxColumn.HeaderText = "TimeUtc";
|
||||
this.timeUtcDataGridViewTextBoxColumn.MinimumWidth = 6;
|
||||
this.timeUtcDataGridViewTextBoxColumn.Name = "timeUtcDataGridViewTextBoxColumn";
|
||||
this.timeUtcDataGridViewTextBoxColumn.ReadOnly = true;
|
||||
this.timeUtcDataGridViewTextBoxColumn.Width = 125;
|
||||
//
|
||||
// sequenceDataGridViewTextBoxColumn
|
||||
//
|
||||
this.sequenceDataGridViewTextBoxColumn.DataPropertyName = "Sequence";
|
||||
this.sequenceDataGridViewTextBoxColumn.HeaderText = "Sequence";
|
||||
this.sequenceDataGridViewTextBoxColumn.MinimumWidth = 6;
|
||||
this.sequenceDataGridViewTextBoxColumn.Name = "sequenceDataGridViewTextBoxColumn";
|
||||
this.sequenceDataGridViewTextBoxColumn.ReadOnly = true;
|
||||
this.sequenceDataGridViewTextBoxColumn.Width = 125;
|
||||
//
|
||||
// bsErrors
|
||||
//
|
||||
this.bsErrors.DataSource = typeof(AppData.ELMAH_Error);
|
||||
this.messageDataGridViewTextBoxColumn.DataPropertyName = "Message";
|
||||
this.messageDataGridViewTextBoxColumn.HeaderText = "Message";
|
||||
this.messageDataGridViewTextBoxColumn.MinimumWidth = 6;
|
||||
this.messageDataGridViewTextBoxColumn.Name = "messageDataGridViewTextBoxColumn";
|
||||
this.messageDataGridViewTextBoxColumn.ReadOnly = true;
|
||||
this.messageDataGridViewTextBoxColumn.Width = 125;
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(941, 630);
|
||||
this.ClientSize = new System.Drawing.Size(1072, 630);
|
||||
this.Controls.Add(this.gboxFiltri);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Controls.Add(this.ErrorsDGV);
|
||||
@@ -416,11 +423,11 @@
|
||||
this.Text = "Steamware Elma Log Monitor and Analysis";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
|
||||
((System.ComponentModel.ISupportInitialize)(this.ErrorsDGV)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bsErrors)).EndInit();
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.PerformLayout();
|
||||
this.gboxFiltri.ResumeLayout(false);
|
||||
this.gboxFiltri.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bsErrors)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@@ -430,16 +437,6 @@
|
||||
|
||||
private System.Windows.Forms.DataGridView ErrorsDGV;
|
||||
private System.Windows.Forms.BindingSource bsErrors;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn errorIdDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn applicationDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn hostDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn typeDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn sourceDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn messageDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn userDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn statusCodeDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn timeUtcDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn sequenceDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn allXmlDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn tagsDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.StatusStrip statusStrip1;
|
||||
@@ -452,7 +449,6 @@
|
||||
private System.Windows.Forms.ListBox listHost;
|
||||
private System.Windows.Forms.ListBox listUsers;
|
||||
private System.Windows.Forms.ListBox listType;
|
||||
private System.Windows.Forms.Button btnDelete;
|
||||
private System.Windows.Forms.CheckBox chkType;
|
||||
private System.Windows.Forms.CheckBox chkApp;
|
||||
private System.Windows.Forms.CheckBox chkStatus;
|
||||
@@ -462,6 +458,18 @@
|
||||
private System.Windows.Forms.Timer timerUI;
|
||||
private System.Windows.Forms.Timer timerMain;
|
||||
private System.Windows.Forms.Button btnDeleteSel;
|
||||
private System.Windows.Forms.TextBox txtBaseUrl;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn sequenceDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn timeUtcDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn hostDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn applicationDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn errorIdDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn typeDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn sourceDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn userDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn statusCodeDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn messageDataGridViewTextBoxColumn;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+82
-30
@@ -4,20 +4,71 @@ using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.Entity;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using AppData;
|
||||
using Newtonsoft;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace ELMA
|
||||
{
|
||||
public partial class MainForm : Form
|
||||
{
|
||||
|
||||
#region setup
|
||||
ElmahModel model = new ElmahModel();
|
||||
|
||||
/// <summary>
|
||||
/// Oggetto conf setup
|
||||
/// </summary>
|
||||
protected eSetup stdSetup;
|
||||
|
||||
/// <summary>
|
||||
/// Setup file std
|
||||
/// </summary>
|
||||
protected string setupFile = "setup.json";
|
||||
/// <summary>
|
||||
/// Setup configurazione da std file
|
||||
/// </summary>
|
||||
private void setupConfig()
|
||||
{
|
||||
eSetup stdSetup = new eSetup();
|
||||
// cerco il file json di config
|
||||
string basePath = Directory.GetCurrentDirectory();
|
||||
//string basePath = System.Reflection.Assembly.GetExecutingAssembly().Location;
|
||||
string filePath = $"{basePath}\\CONF\\{setupFile}";
|
||||
if (File.Exists(filePath))
|
||||
{
|
||||
try
|
||||
{
|
||||
stdSetup = JsonConvert.DeserializeObject<eSetup>(File.ReadAllText(filePath));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
if(string.IsNullOrEmpty(stdSetup.name))
|
||||
{
|
||||
// se non lo trovo creo setu...
|
||||
stdSetup = new eSetup()
|
||||
{
|
||||
name = "standard",
|
||||
connString = "data source=SQL2016DEV;initial catalog=Elmah;persist security info=True;user id=sa;password=keyhammer16;MultipleActiveResultSets=True;App=EntityFramework",
|
||||
appBasePath = "/LM/W3SVC/1/ROOT",
|
||||
baseUrl = "https://localhost:44388"
|
||||
};
|
||||
// .. e lo salvo...
|
||||
string rawData = JsonConvert.SerializeObject(stdSetup,Formatting.Indented);
|
||||
File.WriteAllText(filePath, rawData);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region area init & close
|
||||
|
||||
public MainForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -40,10 +91,12 @@ namespace ELMA
|
||||
|
||||
private void myInit()
|
||||
{
|
||||
setupConfig();
|
||||
setupFilterData();
|
||||
doUpdate();
|
||||
}
|
||||
|
||||
|
||||
private void timerUI_Tick(object sender, EventArgs e)
|
||||
{
|
||||
progBar.Increment(1);
|
||||
@@ -155,6 +208,10 @@ namespace ELMA
|
||||
{
|
||||
List<ELMAH_Error> subset = getFiltData();
|
||||
this.bsErrors.DataSource = subset;
|
||||
for (int i = 0; i < ErrorsDGV.Columns.Count - 1; i++)
|
||||
{
|
||||
ErrorsDGV.Columns[i].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||
}
|
||||
tsslNumRec.Text = $"{subset.Count} rec";
|
||||
}
|
||||
|
||||
@@ -236,12 +293,7 @@ namespace ELMA
|
||||
// salvo
|
||||
model.SaveChanges();
|
||||
// aggiorno!!
|
||||
//resetFilter();
|
||||
//setupFilterData();
|
||||
doUpdate();
|
||||
//checkFilterVisibility();
|
||||
//ErrorsDGV.Invalidate();
|
||||
//ErrorsDGV.Refresh();
|
||||
}
|
||||
|
||||
private void resetFilter()
|
||||
@@ -287,26 +339,6 @@ namespace ELMA
|
||||
doUpdate();
|
||||
}
|
||||
|
||||
private void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
string message = "Sicuro di voler eliminar ei record visualizzati?";
|
||||
string title = "BULK Delete";
|
||||
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
|
||||
DialogResult result = MessageBox.Show(message, title, buttons, MessageBoxIcon.Warning);
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
deleteRecordFiltered();
|
||||
}
|
||||
else
|
||||
{
|
||||
// nulla
|
||||
}
|
||||
|
||||
// aggiorno
|
||||
updateSelection();
|
||||
}
|
||||
|
||||
|
||||
private void chkApp_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
doUpdate();
|
||||
@@ -346,28 +378,48 @@ namespace ELMA
|
||||
{
|
||||
deleteSelRows();
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// Calcola path applicazione partendo da bassePath
|
||||
/// </summary>
|
||||
/// <param name="application"></param>
|
||||
/// <returns></returns>
|
||||
protected string getAppPath(string application)
|
||||
{
|
||||
return application.Replace(stdSetup.appBasePath, "");
|
||||
}
|
||||
|
||||
private void ErrorsDGV_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
// recupero valore...
|
||||
Guid ErrorId;
|
||||
string appPath = "";
|
||||
string pageUrl = "";
|
||||
// SOLO SE selezionato in dgv...
|
||||
if (ErrorsDGV.SelectedRows.Count > 0)
|
||||
{
|
||||
|
||||
foreach (DataGridViewRow riga in ErrorsDGV.SelectedRows)
|
||||
{
|
||||
// chiudo!
|
||||
// recupero dati
|
||||
ErrorId = ((ELMAH_Error)riga.DataBoundItem).ErrorId;
|
||||
appPath = getAppPath(((ELMAH_Error)riga.DataBoundItem).Application);
|
||||
// SE appPAth !="" accodo...
|
||||
if (!string.IsNullOrEmpty(appPath))
|
||||
{
|
||||
pageUrl = $"{stdSetup.baseUrl}/{appPath}/elmah.axd/detail?id={ErrorId}";
|
||||
}
|
||||
else
|
||||
{
|
||||
pageUrl = $"{stdSetup.baseUrl}/elmah.axd/detail?id={ErrorId}";
|
||||
}
|
||||
// mostro form
|
||||
var newBrowser = new WBrowser();
|
||||
newBrowser.pageUrl = $"https://localhost:44388/elmah.axd/detail?id={ErrorId}";
|
||||
newBrowser.pageUrl = pageUrl;
|
||||
newBrowser.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="EntityFramework" version="6.2.0" targetFramework="net462" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net462" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user