Initialized

- Grafisches Control mit drei Spalten
This commit is contained in:
Eugen Höglinger 2023-10-03 13:14:15 +02:00
parent a0793ca251
commit 0b93815d7c
88 changed files with 921 additions and 799 deletions

Binary file not shown.

View File

@ -79,8 +79,6 @@
//
// tripleValueControl
//
this.tripleValueControl.AlwaysEncrypted = false;
this.tripleValueControl.CheckBoxEncryptValueText = "Encrypt";
this.tripleValueControl.Group = null;
this.tripleValueControl.GroupName = "Group";
this.tripleValueControl.InitialDirectory = "C:\\";

View File

@ -123,7 +123,7 @@ namespace HE_Test_Dll
{
tripleValueControl.Password = "Test";
tripleValueControl.InitialDirectory = @"C:\Temp\Test";
tripleValueControl.XMLfileName = @"H:\Programmieren\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControl.git\Daten\Test1.xml";
tripleValueControl.XMLfileName = @"C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\Daten\Test1.xml";
tripleValueControl.ValueControlName = "My XML Control";
tripleValueControl.Topic = "NX-Portal";
tripleValueControl.GroupName = "MyGroup";
@ -133,6 +133,7 @@ namespace HE_Test_Dll
tripleValueControl.TableAttributeName = "MyAttribut";
//tripleValueControl.AlwaysEncrypted = true; //Alle Werte werden immer Verschlüsselt
tripleValueControl.SetDialogWidth(600); //Der Dialog kann zwischen 316 und 800 breit sein
tripleValueControl.DialogHeight = 300; //Der Dialog kann zwischen 227 und 600 hoch sein
tripleValueControl.SetBasicValues(); //Die übergebenen Werte anzeigen
}
}

View File

@ -40,8 +40,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\_DLL\Cryption.git\Cryption\bin\Debug\hecryption.dll</HintPath>
</Reference>
<Reference Include="hetvalcon">
<HintPath>..\TripleValueControl\bin\Debug\hetvalcon.dll</HintPath>
<Reference Include="hetvalcon, Version=1.0.8530.17203, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\TripleValueControlGrafic\bin\Debug\hetvalcon.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
178f3282048897df4f44926fc00c9598dba1fd38

View File

@ -0,0 +1,21 @@
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\HE-Test_Dll\bin\Debug\HE-Test_Dll.exe.config
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\HE-Test_Dll\bin\Debug\HE-Test_Dll.exe
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\HE-Test_Dll\bin\Debug\HE-Test_Dll.pdb
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\HE-Test_Dll\bin\Debug\hecryption.dll
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\HE-Test_Dll\bin\Debug\hetvalcon.dll
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\HE-Test_Dll\bin\Debug\heconpan.dll
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\HE-Test_Dll\bin\Debug\hecryption.pdb
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\HE-Test_Dll\bin\Debug\hetvalcon.pdb
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\HE-Test_Dll\bin\Debug\heconpan.pdb
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\HE-Test_Dll\bin\Debug\de\hetvalcon.resources.dll
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\HE-Test_Dll\bin\Debug\en\hetvalcon.resources.dll
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\HE-Test_Dll\bin\Debug\de\heconpan.resources.dll
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\HE-Test_Dll\bin\Debug\en\heconpan.resources.dll
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\HE-Test_Dll\obj\Debug\HE-Test_TripleValueControlGrafic.csproj.AssemblyReference.cache
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\HE-Test_Dll\obj\Debug\HE_Test_Dll.Form1.resources
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\HE-Test_Dll\obj\Debug\HE_Test_Dll1.Properties.Resources.resources
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\HE-Test_Dll\obj\Debug\HE-Test_TripleValueControlGrafic.csproj.GenerateResource.cache
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\HE-Test_Dll\obj\Debug\HE-Test_TripleValueControlGrafic.csproj.CoreCompileInputs.cache
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\HE-Test_Dll\obj\Debug\HE-Test_TripleValueControlGrafic.csproj.CopyComplete
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\HE-Test_Dll\obj\Debug\HE-Test_Dll.exe
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\HE-Test_Dll\obj\Debug\HE-Test_Dll.pdb

View File

@ -1,513 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using System.Reflection;
using AppRes = Eugen.ESystem.Windows.Forms.Properties.AppResources;
using System.Xml.Linq;
namespace Eugen.ESystem.Windows.Forms
{
public partial class TripleValueControl : UserControl
{
#region Version und Copyright
// Keys und Copyright
static string dllName = Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); //Den Programmnamen auslesen
static string dllVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
static object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
static string copyright = GenerateCopyright();
string icon = Application.StartupPath + "\\Info.bmp";
//Assembly Datum und Zeit
static DateTime value = AssemblyDateTime();
string date = value.ToShortDateString();
string time = value.ToLongTimeString();
private static DateTime AssemblyDateTime()
{
var version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
var buildDateTime = new DateTime(2000, 1, 1).Add(new TimeSpan(TimeSpan.TicksPerDay * version.Build + TimeSpan.TicksPerSecond * 2 * version.Revision));
//Tage seit dem 1. Januar 2000 und Sekunden seit Mitternacht, (multiplizier mit 2 ergibt das Original)
return buildDateTime;
}
private static string CurrentYear()
{
DateTime dtn = DateTime.Now;
return dtn.Year.ToString();
}
private static string StartYear()
{
string startYear = "";
if (((AssemblyCopyrightAttribute)attributes[0]).Copyright.Contains("Copyright © "))
{
startYear = ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace("Copyright © ", "");
while (startYear.StartsWith(" "))
{
startYear = startYear.Remove(0, 1);
}
startYear = startYear.Remove(startYear.IndexOf(" "));
return startYear;
}
else
{
DateTime dtn = DateTime.Now;
return dtn.Year.ToString();
}
}
private static string GenerateCopyright()
{
string startYear = StartYear();
string currentYear = CurrentYear();
if (startYear == currentYear)
{
return ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
}
else
{
return ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace(startYear, String.Concat(startYear, "-", currentYear));
}
}
#endregion
#region DLL-Info
/// <summary>
/// Contains the name of the dll file.
/// </summary>
public static string DllName { private set; get; }
/// <summary>
/// Contains the version of the dll file.
/// </summary>
public static string DllVersion { private set; get; }
/// <summary>
/// Contains the copyright notice.
/// </summary>
public static string Copyright { private set; get; }
/// <summary>
/// Contains the name-, version- and copyright-information of the dll file.
/// </summary>
public static string[] DllInfo { private set; get; }
private static void SetDllInfo()
{
//Name, Keys und Copyright setzen
DllName = dllName;
DllVersion = dllVersion;
Copyright = copyright;
}
#endregion
static TripleValueControl()
{
SetDllInfo(); //Name, Keys und Copyright der DLL setzen
}
/// <summary>
/// Creates a control with which the values in an XML file can be edited
/// </summary>
public TripleValueControl()
{
InitializeComponent();
InitialDirectory = @"C:\";
Topic = "Topic";
StandardValue = 0;
}
#region Public values
/// <summary>
/// The password used for encryption. An empty value disables the Encrypt values switch
/// </summary>
public string Password
{
get { return password; }
set
{
password = value;
checkBoxEncryptValues.Enabled = !String.IsNullOrEmpty(Password);
}
}
/// <summary>
/// Defines or read the initial directory
/// </summary>
public string InitialDirectory { set; get; }
/// <summary>
/// XML file name. Must be specified mandatory
/// </summary>
public string XMLfileName { set; get; }
/// <summary>
/// Adjusts the labeling of the values control. An empty value forces the default labeling
/// </summary>
public string ValueControlName
{
get { return groupBoxValueControl.Text; }
set
{
groupBoxValueControl.Text = value;
groupBoxValueControl.Refresh();
}
}
/// <summary>
/// Defines the Topic. An empty value forces the default labeling
/// </summary>
public string Topic { set; get; }
/// <summary>
/// Adjusts the labeling of the group designation. An empty value forces the default labeling
/// </summary>
public string GroupName
{
get { return labelGroup.Text; }
set { labelGroup.Text = value; }
}
/// <summary>
/// Adjusts the name of the group attribute used in the XML file. Required by the Load function
/// </summary>
public string Group { set; get; }
/// <summary>
/// Adjusts the name of the key attribute used in the XML file. Required by the Load function
/// </summary>
public string Key { set; get; }
/// <summary>
/// Adjusts the labeling of the table header designation for the key. An empty value forces the default labeling
/// </summary>
public string TableKeyName
{
get { return dataGridViewValues.Columns[0].HeaderText; }
set { dataGridViewValues.Columns[0].HeaderText = value; }
}
/// <summary>
/// Adjusts the labeling of the table header designation for the value. An empty value forces the default labeling
/// </summary>
public string TableValueName
{
get { return dataGridViewValues.Columns[1].HeaderText; }
set { dataGridViewValues.Columns[1].HeaderText = value; }
}
/// <summary>
/// Adjusts the labeling of the table header designation for the attribut. An empty value forces the default labeling
/// </summary>
public string TableAttributeName
{
get { return dataGridViewValues.Columns[2].HeaderText; }
set { dataGridViewValues.Columns[2].HeaderText = value; }
}
/// <summary>
/// Adjusts the labeling of the encrypt value checkBox. An empty value forces the default labeling
/// </summary>
public string CheckBoxEncryptValueText
{
get { return checkBoxEncryptValues.Text; }
set
{
checkBoxEncryptValues.Text = value;
checkBoxEncryptValues.Enabled = !String.IsNullOrEmpty(Password);
}
}
/// <summary>
/// Controls whether values are always encrypted. An empty value forces the default value (false)
/// </summary>
public bool AlwaysEncrypted
{
get { return alwaysEncrypted; }
set
{
alwaysEncrypted = value;
checkBoxEncryptValues.Enabled = !alwaysEncrypted;
checkBoxEncryptValues.Checked = alwaysEncrypted;
}
}
#endregion
#region Private values
private string password;
private bool alwaysEncrypted = false;
private int selectedRow = 0;
private int rowIndexColored = 0;
private int StandardValue { get; set; }
#endregion
private void textBoxGroup_TextChanged(object sender, EventArgs e)
{
Group = textBoxGroup.Text;
buttonSave.Enabled = (!String.IsNullOrEmpty(textBoxGroup.Text));
}
private void buttonUp_Click(object sender, EventArgs e)
{
if (dataGridViewValues.SelectedCells.Count > 0)
{
int index = dataGridViewValues.SelectedCells[0].OwningRow.Index;
if (index > 0)
{
int col = dataGridViewValues.SelectedCells[0].OwningColumn.Index;
DataGridViewRowCollection rows = dataGridViewValues.Rows;
DataGridViewRow row = rows[index];
rows.Remove(row);
rows.Insert(index - 1, row);
dataGridViewValues.ClearSelection();
dataGridViewValues.Rows[index - 1].Cells[col].Selected = true;
}
}
}
private void buttonDown_Click(object sender, EventArgs e)
{
if (dataGridViewValues.SelectedCells.Count > 0)
{
int index = dataGridViewValues.SelectedCells[0].OwningRow.Index;
if (index < dataGridViewValues.Rows.Count - 2)
{
int col = dataGridViewValues.SelectedCells[0].OwningColumn.Index;
DataGridViewRowCollection rows = dataGridViewValues.Rows;
DataGridViewRow row = rows[index];
rows.Remove(row);
rows.Insert(index + 1, row);
dataGridViewValues.ClearSelection();
dataGridViewValues.Rows[index + 1].Cells[col].Selected = true;
}
}
}
private void buttonLoad_Click(object sender, EventArgs e)
{
if (String.IsNullOrEmpty(XMLfileName))
{
openFileDialog.Title = AppRes.dlgOpenTitle;
openFileDialog.InitialDirectory = InitialDirectory;
openFileDialog.FileName = "";
openFileDialog.Filter = AppRes.dlgFilter; //"xml files (*.xml)|*.xml|All files (*.*)|*.*"
openFileDialog.FilterIndex = 1;
openFileDialog.RestoreDirectory = true;
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
XMLfileName = openFileDialog.FileName;
LoadXML();
}
}
else
{
if (File.Exists(XMLfileName))
{
LoadXML();
}
else
{
MessageBox.Show(AppRes.msgBoxTxt001, AppRes.msgBoxCapt001, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}
}
private void buttonSave_Click(object sender, EventArgs e)
{
if (String.IsNullOrEmpty(XMLfileName))
{
saveFileDialog.Title = AppRes.dlgSaveTitle;
saveFileDialog.InitialDirectory = InitialDirectory;
saveFileDialog.Filter = AppRes.dlgFilter; //"xml files (*.xml)|*.xml|All files (*.*)|*.*"
saveFileDialog.FilterIndex = 1;
saveFileDialog.RestoreDirectory = true;
if (saveFileDialog.ShowDialog() == DialogResult.OK)
{
SaveXML();
}
}
else
{
SaveXML();
}
}
private void dataGridViewValues_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Delete)
{
selectedRow = dataGridViewValues.SelectedCells[0].RowIndex + 1; //Wenn die Zeile gelöscht wird, dann die Zeilennummer merken
}
}
private void dataGridViewValues_RowsRemoved(object sender, DataGridViewRowsRemovedEventArgs e)
{
//Wenn die gelöschte Zeile den Standardwert enthielt, dann die WErte zurücksetzten, weil es keinen Standardwert mehr gibt
if (selectedRow == rowIndexColored)
{
StandardValue = 0; //Es gibt keine ausgewählte Standardzeile
rowIndexColored = 0; //Es gibt keine umgefärbte Zeile
}
}
public void SetBasicValues()
{
if (!String.IsNullOrEmpty(Group))
{
textBoxGroup.Text = Group;
}
}
private void LoadXML()
{
checkBoxEncryptValues.Checked = false;
var loadXML = new LoadXML();
loadXML.FileName = XMLfileName;
loadXML.Load();
string[] values = new string[loadXML.Values.Length];
values = loadXML.Values;
string[] attributes = new string[loadXML.Attributes.Length];
attributes = loadXML.Attributes;
if (!String.IsNullOrEmpty(Group))
{
loadXML.Group = Group;
}
for (int i = 0; i < values.Length; i++)
{
if (values[i].StartsWith("$$$$"))
{
values[i] = Decrypt(values[i], Password);
checkBoxEncryptValues.Checked = true; //Wenn ein verschlüsseltes Element gefunden wurde, dann setzen
}
if (attributes[i].StartsWith("$$$$"))
{
attributes[i] = Decrypt(attributes[i], Password);
checkBoxEncryptValues.Checked = true; //Wenn ein verschlüsseltes Element gefunden wurde, dann setzen
}
dataGridViewValues.Rows.Add(loadXML.Keys[i], values[i], attributes[i]);
}
dataGridViewValues.Refresh();
textBoxGroup.Text = loadXML.Group; //Gruppe setzen
}
private void SaveXML()
{
if (!Directory.Exists(Path.GetDirectoryName(XMLfileName)))
{
Directory.CreateDirectory(Path.GetDirectoryName(XMLfileName)); //Wenn das Verzeichnis nicht existiert, dann erzeugen
}
int dgvLength = dataGridViewValues.RowCount - 1;
string[] keys = new string[dgvLength];
string value = "";
string[] values = new string[dgvLength];
string attribute = "";
string[] attributes = new string[dgvLength];
for (int i = 0; i < dgvLength; i++)
{
if (checkBoxEncryptValues.Checked)
{
value = Encrypt(dataGridViewValues[1, i].Value.ToString(), Password); //Verschlüsselt
if (dataGridViewValues[2, i].Value == null)
{
attribute = Encrypt("", Password); //Verschlüsselt
}
else
{
attribute = Encrypt(dataGridViewValues[2, i].Value.ToString(), Password); //Verschlüsselt
}
}
else
{
value = dataGridViewValues[1, i].Value.ToString(); //Unverschlüsselt
if (dataGridViewValues[2, i].Value == null)
{
attribute = "";
}
else
{
attribute = dataGridViewValues[2, i].Value.ToString(); //Unverschlüsselt
}
}
keys[i] = dataGridViewValues[0, i].Value.ToString(); ;
values[i] = value;
attributes[i] = attribute;
}
//Speichern
var saveXML = new SaveXML();
saveXML.FileName = XMLfileName;
saveXML.Topic = "NX-Portal"; //z.B. "NX-Portal"
saveXML.Group = textBoxGroup.Text; //z.B. "Tools"
saveXML.Keys = keys; //z.B. "CleanUp"
saveXML.Values = values; //z.B. "M:\ug\Tools\CleanUp\CleanUp.exe"
saveXML.Attributes = attributes; //z.B. "-h"
saveXML.Save();
}
private string Encrypt(string clearText, string password)
{
var crypt = new Cryption();
return String.Concat("$$$$", crypt.EncryptString(clearText, password));
}
private string Decrypt(string encryptedText, string password)
{
var crypt = new Cryption();
return crypt.DecryptString(encryptedText.Replace("$$$$", ""), password);
}
public void SetDialogWidth(int width)
{
if (width >= this.MinimumSize.Width && width <= this.MaximumSize.Width)
{
this.Width = width;
int dif = width - 316;
if (dif > 0)
{
dataGridViewValues.Columns[0].Width += dif / 2;
}
}
}
private void buttonAddSeparator_Click(object sender, EventArgs e)
{
int currentRow = dataGridViewValues.CurrentCell.RowIndex; //Selektierte Reihe
dataGridViewValues.Rows.Insert(currentRow, "-");
}
}
}

View File

@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32901.215
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TripleValueControl", "TripleValueControl\TripleValueControl.csproj", "{65C7F0F6-B8CA-4C1D-9C68-ED98FC2D31A1}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TripleValueControlGrafic", "TripleValueControlGrafic\TripleValueControlGrafic.csproj", "{65C7F0F6-B8CA-4C1D-9C68-ED98FC2D31A1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HE-TripleValueControl", "HE-Test_Dll\HE-Test_TripleValueControl.csproj", "{2B71D20F-009D-4089-8C69-98DCCFADF932}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HE-TripleValueControlGrafic", "HE-Test_Dll\HE-Test_TripleValueControlGrafic.csproj", "{2B71D20F-009D-4089-8C69-98DCCFADF932}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

Before

Width:  |  Height:  |  Size: 471 B

After

Width:  |  Height:  |  Size: 471 B

View File

Before

Width:  |  Height:  |  Size: 467 B

After

Width:  |  Height:  |  Size: 467 B

View File

@ -30,68 +30,53 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TripleValueControl));
this.groupBoxValueControl = new System.Windows.Forms.GroupBox();
this.panel1 = new System.Windows.Forms.Panel();
this.checkBoxEncryptValues = new System.Windows.Forms.CheckBox();
this.buttonDown = new System.Windows.Forms.Button();
this.buttonUp = new System.Windows.Forms.Button();
this.controlPanelControl = new Eugen.ESystem.Windows.Forms.ControlPanelControl();
this.buttonSave = new System.Windows.Forms.Button();
this.buttonLoad = new System.Windows.Forms.Button();
this.dataGridViewValues = new System.Windows.Forms.DataGridView();
this.textBoxGroup = new System.Windows.Forms.TextBox();
this.labelGroup = new System.Windows.Forms.Label();
this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
this.ColumnName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnValue = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnAttribut = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.buttonAddSeparator = new System.Windows.Forms.Button();
this.ColumnValue = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.groupBoxValueControl.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewValues)).BeginInit();
this.SuspendLayout();
//
// groupBoxValueControl
//
resources.ApplyResources(this.groupBoxValueControl, "groupBoxValueControl");
this.groupBoxValueControl.Controls.Add(this.panel1);
this.groupBoxValueControl.Controls.Add(this.buttonDown);
this.groupBoxValueControl.Controls.Add(this.buttonUp);
this.groupBoxValueControl.Controls.Add(this.controlPanelControl);
this.groupBoxValueControl.Controls.Add(this.buttonSave);
this.groupBoxValueControl.Controls.Add(this.buttonLoad);
this.groupBoxValueControl.Controls.Add(this.dataGridViewValues);
this.groupBoxValueControl.Controls.Add(this.textBoxGroup);
this.groupBoxValueControl.Controls.Add(this.labelGroup);
this.groupBoxValueControl.Name = "groupBoxValueControl";
this.groupBoxValueControl.TabStop = false;
//
// panel1
// controlPanelControl
//
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Controls.Add(this.buttonAddSeparator);
this.panel1.Controls.Add(this.checkBoxEncryptValues);
this.panel1.Name = "panel1";
//
// checkBoxEncryptValues
//
resources.ApplyResources(this.checkBoxEncryptValues, "checkBoxEncryptValues");
this.checkBoxEncryptValues.Name = "checkBoxEncryptValues";
this.checkBoxEncryptValues.UseVisualStyleBackColor = true;
//
// buttonDown
//
resources.ApplyResources(this.buttonDown, "buttonDown");
this.buttonDown.BackgroundImage = global::Eugen.ESystem.Windows.Forms.Properties.Resources.Pfeil_unten;
this.buttonDown.Name = "buttonDown";
this.buttonDown.UseVisualStyleBackColor = true;
this.buttonDown.Click += new System.EventHandler(this.buttonDown_Click);
//
// buttonUp
//
resources.ApplyResources(this.buttonUp, "buttonUp");
this.buttonUp.BackgroundImage = global::Eugen.ESystem.Windows.Forms.Properties.Resources.Pfeil_oben;
this.buttonUp.Name = "buttonUp";
this.buttonUp.UseVisualStyleBackColor = true;
this.buttonUp.Click += new System.EventHandler(this.buttonUp_Click);
resources.ApplyResources(this.controlPanelControl, "controlPanelControl");
this.controlPanelControl.ButtonAddSeparatorAvailability = Eugen.ESystem.Windows.Forms.Availability.Enabled;
this.controlPanelControl.ButtonAddSeparatorUseIcon = Eugen.ESystem.Windows.Forms.Figure.NotUsed;
this.controlPanelControl.ButtonAddSeparatorVisibility = Eugen.ESystem.Windows.Forms.Visibility.Visible;
this.controlPanelControl.ButtonDownAvailability = Eugen.ESystem.Windows.Forms.Availability.Enabled;
this.controlPanelControl.ButtonDownUseIcon = Eugen.ESystem.Windows.Forms.Figure.NotUsed;
this.controlPanelControl.ButtonDownVisibility = Eugen.ESystem.Windows.Forms.Visibility.Visible;
this.controlPanelControl.ButtonUpAvailability = Eugen.ESystem.Windows.Forms.Availability.Enabled;
this.controlPanelControl.ButtonUpUseIcon = Eugen.ESystem.Windows.Forms.Figure.NotUsed;
this.controlPanelControl.ButtonUpVisibility = Eugen.ESystem.Windows.Forms.Visibility.Visible;
this.controlPanelControl.CheckBoxDefaultAvailability = Eugen.ESystem.Windows.Forms.Availability.Enabled;
this.controlPanelControl.CheckBoxDefaultStatusSelected = false;
this.controlPanelControl.CheckBoxDefaultUseIcon = Eugen.ESystem.Windows.Forms.Figure.NotUsed;
this.controlPanelControl.CheckBoxDefaultVisibility = Eugen.ESystem.Windows.Forms.Visibility.Visible;
this.controlPanelControl.CheckBoxEncryptAvailability = Eugen.ESystem.Windows.Forms.Availability.Enabled;
this.controlPanelControl.CheckBoxEncryptStatusSelected = false;
this.controlPanelControl.CheckBoxEncryptUseIcon = Eugen.ESystem.Windows.Forms.Figure.NotUsed;
this.controlPanelControl.CheckBoxEncryptVisibility = Eugen.ESystem.Windows.Forms.Visibility.Visible;
this.controlPanelControl.Name = "controlPanelControl";
this.controlPanelControl.SizeX = 90;
this.controlPanelControl.SizeY = 127;
//
// buttonSave
//
@ -100,13 +85,6 @@
this.buttonSave.UseVisualStyleBackColor = true;
this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click);
//
// buttonLoad
//
resources.ApplyResources(this.buttonLoad, "buttonLoad");
this.buttonLoad.Name = "buttonLoad";
this.buttonLoad.UseVisualStyleBackColor = true;
this.buttonLoad.Click += new System.EventHandler(this.buttonLoad_Click);
//
// dataGridViewValues
//
resources.ApplyResources(this.dataGridViewValues, "dataGridViewValues");
@ -124,22 +102,17 @@
resources.ApplyResources(this.textBoxGroup, "textBoxGroup");
this.textBoxGroup.Name = "textBoxGroup";
this.textBoxGroup.TextChanged += new System.EventHandler(this.textBoxGroup_TextChanged);
this.textBoxGroup.Leave += new System.EventHandler(this.textBoxGroup_Leave);
//
// labelGroup
//
resources.ApplyResources(this.labelGroup, "labelGroup");
this.labelGroup.Name = "labelGroup";
//
// openFileDialog
// ColumnAttribut
//
this.openFileDialog.FileName = "openFileDialog";
resources.ApplyResources(this.openFileDialog, "openFileDialog");
//
// ColumnName
//
resources.ApplyResources(this.ColumnName, "ColumnName");
this.ColumnName.Name = "ColumnName";
this.ColumnName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Programmatic;
resources.ApplyResources(this.ColumnAttribut, "ColumnAttribut");
this.ColumnAttribut.Name = "ColumnAttribut";
//
// ColumnValue
//
@ -147,17 +120,11 @@
resources.ApplyResources(this.ColumnValue, "ColumnValue");
this.ColumnValue.Name = "ColumnValue";
//
// ColumnAttribut
// ColumnName
//
resources.ApplyResources(this.ColumnAttribut, "ColumnAttribut");
this.ColumnAttribut.Name = "ColumnAttribut";
//
// buttonAddSeparator
//
resources.ApplyResources(this.buttonAddSeparator, "buttonAddSeparator");
this.buttonAddSeparator.Name = "buttonAddSeparator";
this.buttonAddSeparator.UseVisualStyleBackColor = true;
this.buttonAddSeparator.Click += new System.EventHandler(this.buttonAddSeparator_Click);
resources.ApplyResources(this.ColumnName, "ColumnName");
this.ColumnName.Name = "ColumnName";
this.ColumnName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Programmatic;
//
// TripleValueControl
//
@ -167,8 +134,6 @@
this.Name = "TripleValueControl";
this.groupBoxValueControl.ResumeLayout(false);
this.groupBoxValueControl.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewValues)).EndInit();
this.ResumeLayout(false);
@ -178,19 +143,13 @@
private System.Windows.Forms.GroupBox groupBoxValueControl;
private System.Windows.Forms.Button buttonSave;
private System.Windows.Forms.Button buttonLoad;
private System.Windows.Forms.CheckBox checkBoxEncryptValues;
private System.Windows.Forms.DataGridView dataGridViewValues;
private System.Windows.Forms.TextBox textBoxGroup;
private System.Windows.Forms.Label labelGroup;
private System.Windows.Forms.Button buttonDown;
private System.Windows.Forms.Button buttonUp;
private System.Windows.Forms.OpenFileDialog openFileDialog;
private System.Windows.Forms.SaveFileDialog saveFileDialog;
private System.Windows.Forms.Panel panel1;
private ControlPanelControl controlPanelControl;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnName;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnValue;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnAttribut;
private System.Windows.Forms.Button buttonAddSeparator;
}
}

View File

@ -0,0 +1,788 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using System.Reflection;
using AppRes = Eugen.ESystem.Windows.Forms.Properties.AppResources;
using System.Xml.Linq;
namespace Eugen.ESystem.Windows.Forms
{
public partial class TripleValueControl : UserControl
{
#region Version und Copyright
// Keys und Copyright
static string dllName = Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); //Den Programmnamen auslesen
static string dllVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
static object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
static string copyright = GenerateCopyright();
string icon = Application.StartupPath + "\\Info.bmp";
//Assembly Datum und Zeit
static DateTime value = AssemblyDateTime();
string date = value.ToShortDateString();
string time = value.ToLongTimeString();
private static DateTime AssemblyDateTime()
{
var version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
var buildDateTime = new DateTime(2000, 1, 1).Add(new TimeSpan(TimeSpan.TicksPerDay * version.Build + TimeSpan.TicksPerSecond * 2 * version.Revision));
//Tage seit dem 1. Januar 2000 und Sekunden seit Mitternacht, (multiplizier mit 2 ergibt das Original)
return buildDateTime;
}
private static string CurrentYear()
{
DateTime dtn = DateTime.Now;
return dtn.Year.ToString();
}
private static string StartYear()
{
string startYear = "";
if (((AssemblyCopyrightAttribute)attributes[0]).Copyright.Contains("Copyright © "))
{
startYear = ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace("Copyright © ", "");
while (startYear.StartsWith(" "))
{
startYear = startYear.Remove(0, 1);
}
startYear = startYear.Remove(startYear.IndexOf(" "));
return startYear;
}
else
{
DateTime dtn = DateTime.Now;
return dtn.Year.ToString();
}
}
private static string GenerateCopyright()
{
string startYear = StartYear();
string currentYear = CurrentYear();
if (startYear == currentYear)
{
return ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
}
else
{
return ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace(startYear, String.Concat(startYear, "-", currentYear));
}
}
#endregion
#region DLL-Info
/// <summary>
/// Contains the name of the dll file.
/// </summary>
public static string DllName { private set; get; }
/// <summary>
/// Contains the version of the dll file.
/// </summary>
public static string DllVersion { private set; get; }
/// <summary>
/// Contains the copyright notice.
/// </summary>
public static string Copyright { private set; get; }
/// <summary>
/// Contains the name-, version- and copyright-information of the dll file.
/// </summary>
public static string[] DllInfo { private set; get; }
private static void SetDllInfo()
{
//Name, Keys und Copyright setzen
DllName = dllName;
DllVersion = dllVersion;
Copyright = copyright;
}
#endregion
//Prüft ob der Initialisierungsprozess läuft.
//Nach der Initialisierung wird der Wert auf 'true' gesetzt.
bool initialized = false;
static TripleValueControl()
{
SetDllInfo(); //Name, Keys und Copyright der DLL setzen
}
/// <summary>
/// Creates a control with which the values in an XML file can be edited
/// </summary>
public TripleValueControl()
{
InitializeComponent();
//Ereignisse abbonieren
controlPanelControl.ButtonUpClick += DoMoveUp;
controlPanelControl.ButtonDownClick += DoMoveDown;
controlPanelControl.ButtonAddSeparatorClick += DoAddSeperator;
controlPanelControl.CheckboxEncryptCheck += DoEncrypt;
controlPanelControl.CheckboxDefaultCheck += DoDefault;
//Das Aussehen des Controlls setzen
InitializeUserControl();
initialized = true; //Initialisierungsroutine wurde durchlaufen
InitialDirectory = @"C:\";
Topic = "Topic";
StandardValue = 0;
}
#region Public values
/// <summary>
/// The password used for encryption. An empty value disables the Encrypt values switch
/// </summary>
public string Password
{
get { return password; }
set
{
password = value;
controlPanelControl.CheckBoxEncryptStatusSelected = !String.IsNullOrEmpty(Password);
}
}
/// <summary>
/// Defines or read the initial directory
/// </summary>
public string InitialDirectory { set; get; }
/// <summary>
/// XML file name. Must be specified mandatory
/// </summary>
public string XMLfileName { set; get; }
/// <summary>
/// Adjusts the labeling of the values control. An empty value forces the default labeling
/// </summary>
public string ValueControlName
{
get { return groupBoxValueControl.Text; }
set
{
groupBoxValueControl.Text = value;
groupBoxValueControl.Refresh();
}
}
/// <summary>
/// Defines the Topic. An empty value forces the default labeling
/// </summary>
public string Topic { set; get; }
/// <summary>
/// Adjusts the labeling of the group designation. An empty value forces the default labeling
/// </summary>
public string GroupName
{
get { return labelGroup.Text; }
set { labelGroup.Text = value; }
}
/// <summary>
/// Adjusts the name of the group attribute used in the XML file. Required by the Load function
/// </summary>
public string Group { set; get; }
/// <summary>
/// Adjusts the name of the key attribute used in the XML file. Required by the Load function
/// </summary>
public string Key { set; get; }
/// <summary>
/// Adjusts the labeling of the table header designation for the key. An empty value forces the default labeling
/// </summary>
public string TableKeyName
{
get { return dataGridViewValues.Columns[0].HeaderText; }
set { dataGridViewValues.Columns[0].HeaderText = value; }
}
/// <summary>
/// Adjusts the labeling of the table header designation for the value. An empty value forces the default labeling
/// </summary>
public string TableValueName
{
get { return dataGridViewValues.Columns[1].HeaderText; }
set { dataGridViewValues.Columns[1].HeaderText = value; }
}
/// <summary>
/// Adjusts the labeling of the table header designation for the attribut. An empty value forces the default labeling
/// </summary>
public string TableAttributeName
{
get { return dataGridViewValues.Columns[2].HeaderText; }
set { dataGridViewValues.Columns[2].HeaderText = value; }
}
/// <summary>
/// Adjusts the width of the control. An empty value forces the default value
/// </summary>
public int DialogWidth { set; get; }
/// <summary>
/// Adjusts the height of the control. An empty value forces the default value
/// </summary>
public int DialogHeight { set; get; }
/// <summary>
/// Adjusts the width of the name column of the table. An empty value forces the default value
/// </summary>
public int TableKeyNameWidth { set; get; }
#endregion
#region Private values
private string password;
private bool alwaysEncrypted = false;
private bool standardValueSet = false;
private int selectedRow = 0;
private int rowIndexColored = 0;
private bool onlyRefresh = false;
private int StandardValue { get; set; }
#endregion
private void InitializeUserControl()
{
//Erzeugt das erste Erscheinungsbild des Controlls
controlPanelControl.ButtonUpAvailability = Availability.Enabled; //Button Up ist aktiviert
controlPanelControl.ButtonUpVisibility = Visibility.Visible; //Button Up ist Sichtbar
controlPanelControl.ButtonUpUseIcon = Figure.Used; //Für Button Up wird ein Bild anstelle des Textes verwendet
controlPanelControl.ButtonDownAvailability = Availability.Enabled; //Button Down ist aktiviert
controlPanelControl.ButtonDownVisibility = Visibility.Visible; //Button Down ist Sichtbar
controlPanelControl.ButtonDownUseIcon = Figure.Used; //Für Button Down wird ein Bild anstelle des Textes verwendet
controlPanelControl.ButtonAddSeparatorAvailability = Availability.Disabled; //Button Separator ist deaktiviert
controlPanelControl.ButtonAddSeparatorVisibility = Visibility.Invisible; //Button Separator ist nicht Sichtbar
controlPanelControl.ButtonAddSeparatorUseIcon = Figure.Used; //Für Button Separator wird ein Bild anstelle des Textes verwendet
controlPanelControl.CheckBoxEncryptAvailability = Availability.Disabled; //CheckBox Encrypt ist deaktiviert
controlPanelControl.CheckBoxEncryptVisibility = Visibility.Visible; //CheckBox Encrypt ist Sichtbar
controlPanelControl.CheckBoxEncryptUseIcon = Figure.Used; //Für CheckBox Encrypt wird ein Bild anstelle des Textes verwendet
controlPanelControl.CheckBoxEncryptStatusSelected = (bool)false; //Die CheckBox Encrypt ist nicht ausgewählt
controlPanelControl.CheckBoxDefaultAvailability = Availability.Disabled; //CheckBox Default ist deaktiviert
controlPanelControl.CheckBoxDefaultVisibility = Visibility.Invisible; //CheckBox Default ist Sichtbar
controlPanelControl.CheckBoxDefaultUseIcon = Figure.Used; //Für CheckBox Default wird ein Bild anstelle des Textes verwendet
controlPanelControl.CheckBoxDefaultStatusSelected = (bool)false; //Die CheckBox Default ist nicht ausgewählt
controlPanelControl.SizeX = 90; //Größe des Controlls in X-Richtung
controlPanelControl.SizeY = 127; //Größe des Controlls in Y-Richtung
controlPanelControl.SetVisibility(); //Setzt die getroffenen Einstellungen
}
private void textBoxGroup_TextChanged(object sender, EventArgs e)
{
Group = textBoxGroup.Text;
buttonSave.Enabled = (!String.IsNullOrEmpty(textBoxGroup.Text));
}
private void textBoxGroup_Leave(object sender, EventArgs e)
{
if (!String.IsNullOrEmpty(textBoxGroup.Text))
{
if (File.Exists(XMLfileName))
{
LoadXML();
controlPanelControl.CheckBoxEncryptAvailability = Availability.Enabled;
controlPanelControl.CheckBoxDefaultAvailability = Availability.Enabled;
controlPanelControl.SetVisibility();
}
else
{
MessageBox.Show(AppRes.msgBoxTxt001, AppRes.msgBoxCapt001, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}
}
private void buttonSave_Click(object sender, EventArgs e)
{
if (String.IsNullOrEmpty(XMLfileName))
{
saveFileDialog.Title = AppRes.dlgSaveTitle;
saveFileDialog.InitialDirectory = InitialDirectory;
saveFileDialog.Filter = AppRes.dlgFilter; //"xml files (*.xml)|*.xml|All files (*.*)|*.*"
saveFileDialog.FilterIndex = 1;
saveFileDialog.RestoreDirectory = true;
if (saveFileDialog.ShowDialog() == DialogResult.OK)
{
SaveXML();
}
}
else
{
SaveXML();
}
}
private void dataGridViewValues_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
{
if (dataGridViewValues.Rows.Count != 0)
{
controlPanelControl.CheckBoxDefaultAvailability = Availability.Enabled; //Standardwert freischalten, sobald es einen Wert gibt
}
}
private void dataGridViewValues_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Delete)
{
selectedRow = dataGridViewValues.SelectedCells[0].RowIndex + 1; //Wenn die Zeile gelöscht wird, dann die Zeilennummer merken
}
}
private void dataGridViewValues_RowsRemoved(object sender, DataGridViewRowsRemovedEventArgs e)
{
//Wenn die gelöschte Zeile den Standardwert enthielt, dann die WErte zurücksetzten, weil es keinen Standardwert mehr gibt
if (selectedRow == rowIndexColored)
{
StandardValue = 0; //Es gibt keine ausgewählte Standardzeile
rowIndexColored = 0; //Es gibt keine umgefärbte Zeile
}
}
private void dataGridViewValues_RowEnter(object sender, DataGridViewCellEventArgs e)
{
try
{
if (StandardValue == dataGridViewValues.SelectedCells[0].RowIndex + 1)
{
//Die vorher ausgewählte Zeile abwählen
controlPanelControl.CheckBoxDefaultStatusSelected = false; //Wenn die ausgewählte Zeile keinen Standardwert enthält, dann die CheckBox abwählen
dataGridViewValues.Rows[rowIndexColored + 1].DefaultCellStyle.ForeColor = Color.Empty;
//Die ausgewählte Zeile anwählen
controlPanelControl.CheckBoxDefaultStatusSelected = true; //Wenn die ausgewählte Zeile den Standardwert enthält, dann die CheckBox anwählen
controlPanelControl.SetVisibility();
dataGridViewValues.Rows[dataGridViewValues.SelectedCells[0].RowIndex].DefaultCellStyle.ForeColor = Color.LightSeaGreen;
onlyRefresh = true; //Das Aussehen soll nur aktualisiert werden
}
else
{
controlPanelControl.CheckBoxDefaultStatusSelected = false; //Wenn die ausgewählte Zeile keinen Standardwert enthält, dann die CheckBox abwählen
controlPanelControl.SetVisibility();
onlyRefresh = false; //Das Aussehen soll aktualisiert und der Standard neu gesewtzt werden
}
}
catch
{
//Nur die falsche Reihe ausgewählt, z.B. die Kopfzeile oder die erste Zeile wurde gelöscht
StandardValue = 0; //Wenn die erste Zeile der Standardwert war und gelöscht wurde, dann den Wert auf 0 setzen
controlPanelControl.CheckBoxDefaultStatusSelected = false; //Wenn die ausgewählte Zeile keinen Standardwert enthält, dann die CheckBox abwählen
controlPanelControl.SetVisibility();
}
}
public void SetBasicValues()
{
if (!String.IsNullOrEmpty(Group))
{
textBoxGroup.Text = Group;
}
}
private void SetDefault()
{
try
{
if (StandardValue == dataGridViewValues.SelectedCells[0].RowIndex + 1)
{
controlPanelControl.CheckBoxDefaultStatusSelected = true; //Wenn die ausgewählte Zeile den Standardwert enthält, dann die CheckBox anwählen
controlPanelControl.SetVisibility();
dataGridViewValues.Rows[dataGridViewValues.SelectedCells[0].RowIndex].DefaultCellStyle.ForeColor = Color.LightSeaGreen;
}
else
{
controlPanelControl.CheckBoxDefaultStatusSelected = false; //Wenn die ausgewählte Zeile keinen Standardwert enthält, dann die CheckBox abwählen
controlPanelControl.SetVisibility();
dataGridViewValues.Rows[rowIndexColored + 1].DefaultCellStyle.ForeColor = Color.Empty;
}
}
catch (Exception)
{
//Nur die falsche Reihe ausgewählt, z.B. die Kopfzeile
}
}
private void SetDialogAppearance()
{
if (DialogWidth != 0)
{
SetDialogWidth(DialogWidth);
}
if (DialogHeight != 0)
{
SetDialogHeight(DialogHeight);
}
if (TableKeyNameWidth != 0)
{
SetTableKeyNameWidth(TableKeyNameWidth);
}
}
private void LoadXML()
{
//controlPanelControl.CheckBoxEncryptStatusSelected = false;
//var loadXML = new LoadXML();
//loadXML.FileName = XMLfileName;
//loadXML.Load();
//string[] values = new string[loadXML.Values.Length];
//values = loadXML.Values;
//string[] attributes = new string[loadXML.Attributes.Length];
//attributes = loadXML.Attributes;
//if (!String.IsNullOrEmpty(Group))
//{
// loadXML.Group = Group;
//}
//for (int i = 0; i < values.Length; i++)
//{
// if (values[i].StartsWith("$$$$"))
// {
// values[i] = Decrypt(values[i], Password);
// controlPanelControl.CheckBoxEncryptStatusSelected = true; //Wenn ein verschlüsseltes Element gefunden wurde, dann setzen
// }
// if (attributes[i].StartsWith("$$$$"))
// {
// attributes[i] = Decrypt(attributes[i], Password);
// controlPanelControl.CheckBoxEncryptStatusSelected = true; //Wenn ein verschlüsseltes Element gefunden wurde, dann setzen
// }
// dataGridViewValues.Rows.Add(loadXML.Keys[i], values[i], attributes[i]);
//}
//dataGridViewValues.Refresh();
//textBoxGroup.Text = loadXML.Group; //Gruppe setzen
controlPanelControl.CheckBoxEncryptStatusSelected = false;
var loadXML = new LoadXML();
loadXML.FileName = XMLfileName;
loadXML.Load();
string[] values = new string[loadXML.Values.Length];
values = loadXML.Values;
string[] attributes = new string[loadXML.Attributes.Length];
attributes = loadXML.Attributes;
if (!String.IsNullOrEmpty(Group))
{
loadXML.Group = Group;
}
for (int i = 0; i < values.Length; i++)
{
if (values[i].StartsWith("$$$$"))
{
values[i] = Decrypt(values[i], Password);
controlPanelControl.CheckBoxEncryptStatusSelected = true; //Wenn ein verschlüsseltes Element gefunden wurde, dann setzen
}
if (attributes[i].StartsWith("$$$$"))
{
attributes[i] = Decrypt(attributes[i], Password);
controlPanelControl.CheckBoxEncryptStatusSelected = true; //Wenn ein verschlüsseltes Element gefunden wurde, dann setzen
}
dataGridViewValues.Rows.Add(loadXML.Keys[i], values[i], attributes[i]);
}
dataGridViewValues.Refresh();
textBoxGroup.Text = loadXML.Group; //Gruppe setzen
}
private void SaveXML()
{
if (!Directory.Exists(Path.GetDirectoryName(XMLfileName)))
{
Directory.CreateDirectory(Path.GetDirectoryName(XMLfileName)); //Wenn das Verzeichnis nicht existiert, dann erzeugen
}
int dgvLength = dataGridViewValues.RowCount - 1;
string[] keys = new string[dgvLength];
string value = "";
string[] values = new string[dgvLength];
string attribute = "";
string[] attributes = new string[dgvLength];
for (int i = 0; i < dgvLength; i++)
{
if (controlPanelControl.CheckBoxEncryptStatusSelected)
{
value = Encrypt(dataGridViewValues[1, i].Value.ToString(), Password); //Verschlüsselt
if (dataGridViewValues[2, i].Value == null)
{
attribute = Encrypt("", Password); //Verschlüsselt
}
else
{
attribute = Encrypt(dataGridViewValues[2, i].Value.ToString(), Password); //Verschlüsselt
}
}
else
{
value = dataGridViewValues[1, i].Value.ToString(); //Unverschlüsselt
if (dataGridViewValues[2, i].Value == null)
{
attribute = "";
}
else
{
attribute = dataGridViewValues[2, i].Value.ToString(); //Unverschlüsselt
}
}
keys[i] = dataGridViewValues[0, i].Value.ToString(); ;
values[i] = value;
attributes[i] = attribute;
}
//Speichern
var saveXML = new SaveXML();
saveXML.FileName = XMLfileName;
saveXML.Topic = "NX-Portal"; //z.B. "NX-Portal"
saveXML.Group = textBoxGroup.Text; //z.B. "Tools"
saveXML.Keys = keys; //z.B. "CleanUp"
saveXML.Values = values; //z.B. "M:\ug\Tools\CleanUp\CleanUp.exe"
saveXML.Attributes = attributes; //z.B. "-h"
saveXML.Save();
}
private string Encrypt(string clearText, string password)
{
var crypt = new Cryption();
return String.Concat("$$$$", crypt.EncryptString(clearText, password));
}
private string Decrypt(string encryptedText, string password)
{
var crypt = new Cryption();
return crypt.DecryptString(encryptedText.Replace("$$$$", ""), password);
}
public void SetDialogWidth(int width)
{
if (width >= this.MinimumSize.Width && width <= this.MaximumSize.Width)
{
this.Width = width;
int dif = width - 316;
if (dif > 0)
{
dataGridViewValues.Columns[0].Width += dif / 2;
}
}
}
private void SetDialogHeight(int height)
{
if (height >= this.MinimumSize.Height && height <= this.MaximumSize.Height)
{
this.Height = height;
}
}
private void SetTableKeyNameWidth(int width)
{
if (width >= ColumnName.MinimumWidth && width <= (this.Width - 151 - ColumnValue.MinimumWidth))
{
ColumnName.Width = width;
}
}
LoadXML loadXML = new LoadXML();
/// <summary>
/// Gets the values stored in the XML file
/// </summary>
/// <returns>An string array</returns>
public string[] GetValues()
{
controlPanelControl.CheckBoxEncryptStatusSelected = false;
//var loadXML = new LoadXML();
loadXML.FileName = XMLfileName;
loadXML.Topic = Topic;
//loadXML.Key = Key;
loadXML.Group = Group;
loadXML.Load();
if (loadXML.Values == null)
{
return null;
}
else
{
string[] values = new string[loadXML.Values.Length];
values = loadXML.Values;
for (int i = 0; i < values.Length; i++)
{
if (values[i] != null)
{
if (values[i].StartsWith("$$$$"))
{
values[i] = Decrypt(values[i], Password);
}
}
}
return values;
}
}
#region Ereignisse
//Die Ereignisse werden nach betätigen eines Elementes aufgerufen
private void DoMoveUp(object source, EventArgs e)
{
//Weil sich die Zustände der Elemente während der Initialisierung ändern,
//wird die Ausführung der folgenden Aktionen unterdrückt
if (initialized)
{
if (dataGridViewValues.SelectedCells.Count > 0)
{
int index = dataGridViewValues.SelectedCells[0].OwningRow.Index;
if (index > 0)
{
int col = dataGridViewValues.SelectedCells[0].OwningColumn.Index;
DataGridViewRowCollection rows = dataGridViewValues.Rows;
DataGridViewRow row = rows[index];
rows.Remove(row);
rows.Insert(index - 1, row);
dataGridViewValues.ClearSelection();
dataGridViewValues.Rows[index - 1].Cells[col].Selected = true;
}
}
}
}
private void DoMoveDown(object source, EventArgs e)
{
//Weil sich die Zustände der Elemente während der Initialisierung ändern,
//wird die Ausführung der folgenden Aktionen unterdrückt
if (initialized)
{
if (dataGridViewValues.SelectedCells.Count > 0)
{
int index = dataGridViewValues.SelectedCells[0].OwningRow.Index;
if (index < dataGridViewValues.Rows.Count - 2)
{
int col = dataGridViewValues.SelectedCells[0].OwningColumn.Index;
DataGridViewRowCollection rows = dataGridViewValues.Rows;
DataGridViewRow row = rows[index];
rows.Remove(row);
rows.Insert(index + 1, row);
dataGridViewValues.ClearSelection();
dataGridViewValues.Rows[index + 1].Cells[col].Selected = true;
}
}
}
}
private void DoAddSeperator(object source, EventArgs e)
{
//Weil sich die Zustände der Elemente während der Initialisierung ändern,
//wird die Ausführung der folgenden Aktionen unterdrückt
if (initialized)
{
//Hat in diesem Programm keine Funktion
}
}
private void DoEncrypt(object source, EventArgs e)
{
//Weil sich die Zustände der Elemente während der Initialisierung ändern,
//wird die Ausführung der folgenden Aktionen unterdrückt
if (initialized)
{
if (controlPanelControl.CheckBoxEncryptStatusSelected == false)
{
controlPanelControl.CheckBoxEncryptStatusSelected = true;
}
else
{
controlPanelControl.CheckBoxEncryptStatusSelected = false;
}
}
}
private void DoDefault(object source, EventArgs e)
{
//Weil sich die Zustände der Elemente während der Initialisierung ändern, wird die Ausführung der folgenden Aktionen unterdrückt
//Nach der Initialisierung wird Alles durchlaufen
if (initialized)
{
if (onlyRefresh)
{
try
{
//Wenn nur die Zeile ausgewählt wurde, dann nur die Sichtbarkeit aktualisieren
if (StandardValue == dataGridViewValues.SelectedCells[0].RowIndex + 1)
{
controlPanelControl.CheckBoxDefaultStatusSelected = true; //Wenn die ausgewählte Zeile den Standardwert enthält, dann die CheckBox anwählen
controlPanelControl.SetVisibility();
}
else
{
controlPanelControl.CheckBoxDefaultStatusSelected = false; //Wenn die ausgewählte Zeile nicht den Standardwert enthält, dann die CheckBox abwählen
controlPanelControl.SetVisibility();
}
onlyRefresh = false;
}
catch (Exception)
{
//Nichts tun, wird ausgelöst, weil es die Zeile nicht mehr gibt
}
}
else
{
//Wenn die CheckBox ausgewählt wurde, dann die ursprünliche Standardzeile zurückfärben, die aktuelle Zeil selektiern und umfärben, sowie 'StandardValue' setzen
//Nur ausführen wenn es schon eine Standardzeile gibt
if (rowIndexColored != 0)
{
dataGridViewValues.Rows[rowIndexColored - 1].DefaultCellStyle.ForeColor = Color.Empty; //Die ursprünglich ausgewählte Standardzeile zurückfärben
StandardValue = dataGridViewValues.SelectedCells[0].RowIndex + 1; //Zeile die als Standard ausgewählt wurde
dataGridViewValues.Rows[dataGridViewValues.SelectedCells[0].RowIndex].DefaultCellStyle.ForeColor = Color.LightSeaGreen;
controlPanelControl.CheckBoxDefaultStatusSelected = true; //Wenn die ausgewählte Zeile den Standardwert enthält, dann die CheckBox anwählen
controlPanelControl.SetVisibility();
rowIndexColored = dataGridViewValues.SelectedCells[0].RowIndex + 1; //Die Zeile merken die umgefärbt wurde
}
}
}
}
#endregion
}
}

View File

@ -124,158 +124,37 @@
<data name="groupBoxValueControl.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
</data>
<data name="panel1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
<data name="buttonAddSeparator.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="buttonAddSeparator.Enabled" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="buttonAddSeparator.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
<data name="controlPanelControl.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Right</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="buttonAddSeparator.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 3</value>
<data name="controlPanelControl.Location" type="System.Drawing.Point, System.Drawing">
<value>310, 94</value>
</data>
<data name="buttonAddSeparator.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 38</value>
<data name="controlPanelControl.MaximumSize" type="System.Drawing.Size, System.Drawing">
<value>120, 170</value>
</data>
<data name="buttonAddSeparator.TabIndex" type="System.Int32, mscorlib">
<value>12</value>
<data name="controlPanelControl.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>90, 127</value>
</data>
<data name="buttonAddSeparator.Text" xml:space="preserve">
<value>Add
Separator</value>
<data name="controlPanelControl.Size" type="System.Drawing.Size, System.Drawing">
<value>90, 127</value>
</data>
<data name="&gt;&gt;buttonAddSeparator.Name" xml:space="preserve">
<value>buttonAddSeparator</value>
</data>
<data name="&gt;&gt;buttonAddSeparator.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;buttonAddSeparator.Parent" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;buttonAddSeparator.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="checkBoxEncryptValues.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="checkBoxEncryptValues.Enabled" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="checkBoxEncryptValues.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="checkBoxEncryptValues.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 47</value>
</data>
<data name="checkBoxEncryptValues.Size" type="System.Drawing.Size, System.Drawing">
<value>62, 17</value>
</data>
<data name="checkBoxEncryptValues.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="checkBoxEncryptValues.Text" xml:space="preserve">
<value>Encrypt</value>
</data>
<data name="&gt;&gt;checkBoxEncryptValues.Name" xml:space="preserve">
<value>checkBoxEncryptValues</value>
</data>
<data name="&gt;&gt;checkBoxEncryptValues.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;checkBoxEncryptValues.Parent" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;checkBoxEncryptValues.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>325, 125</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 67</value>
</data>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="&gt;&gt;panel1.Name" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel1.Parent" xml:space="preserve">
<value>groupBoxValueControl</value>
</data>
<data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="buttonDown.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
<data name="buttonDown.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="buttonDown.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="buttonDown.Location" type="System.Drawing.Point, System.Drawing">
<value>325, 198</value>
</data>
<data name="buttonDown.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="buttonDown.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="&gt;&gt;buttonDown.Name" xml:space="preserve">
<value>buttonDown</value>
</data>
<data name="&gt;&gt;buttonDown.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;buttonDown.Parent" xml:space="preserve">
<value>groupBoxValueControl</value>
</data>
<data name="&gt;&gt;buttonDown.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="buttonUp.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
<data name="buttonUp.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="buttonUp.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="buttonUp.Location" type="System.Drawing.Point, System.Drawing">
<value>325, 96</value>
</data>
<data name="buttonUp.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="buttonUp.TabIndex" type="System.Int32, mscorlib">
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="controlPanelControl.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
</data>
<data name="&gt;&gt;buttonUp.Name" xml:space="preserve">
<value>buttonUp</value>
<data name="&gt;&gt;controlPanelControl.Name" xml:space="preserve">
<value>controlPanelControl</value>
</data>
<data name="&gt;&gt;buttonUp.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<data name="&gt;&gt;controlPanelControl.Type" xml:space="preserve">
<value>Eugen.ESystem.Windows.Forms.ControlPanelControl, heconpan, Version=1.0.8644.16319, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;buttonUp.Parent" xml:space="preserve">
<data name="&gt;&gt;controlPanelControl.Parent" xml:space="preserve">
<value>groupBoxValueControl</value>
</data>
<data name="&gt;&gt;buttonUp.ZOrder" xml:space="preserve">
<value>2</value>
<data name="&gt;&gt;controlPanelControl.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="buttonSave.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
@ -287,10 +166,10 @@ Separator</value>
<value>NoControl</value>
</data>
<data name="buttonSave.Location" type="System.Drawing.Point, System.Drawing">
<value>325, 43</value>
<value>310, 17</value>
</data>
<data name="buttonSave.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
<value>90, 23</value>
</data>
<data name="buttonSave.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
@ -308,37 +187,7 @@ Separator</value>
<value>groupBoxValueControl</value>
</data>
<data name="&gt;&gt;buttonSave.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="buttonLoad.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
<data name="buttonLoad.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="buttonLoad.Location" type="System.Drawing.Point, System.Drawing">
<value>325, 17</value>
</data>
<data name="buttonLoad.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="buttonLoad.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="buttonLoad.Text" xml:space="preserve">
<value>Load</value>
</data>
<data name="&gt;&gt;buttonLoad.Name" xml:space="preserve">
<value>buttonLoad</value>
</data>
<data name="&gt;&gt;buttonLoad.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;buttonLoad.Parent" xml:space="preserve">
<value>groupBoxValueControl</value>
</data>
<data name="&gt;&gt;buttonLoad.ZOrder" xml:space="preserve">
<value>4</value>
<value>1</value>
</data>
<data name="dataGridViewValues.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
@ -350,10 +199,10 @@ Separator</value>
<value>Variable Name</value>
</data>
<data name="ColumnName.MinimumWidth" type="System.Int32, mscorlib">
<value>90</value>
<value>85</value>
</data>
<data name="ColumnName.Width" type="System.Int32, mscorlib">
<value>90</value>
<value>85</value>
</data>
<metadata name="ColumnValue.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
@ -362,7 +211,7 @@ Separator</value>
<value>Variable Value</value>
</data>
<data name="ColumnValue.MinimumWidth" type="System.Int32, mscorlib">
<value>90</value>
<value>85</value>
</data>
<metadata name="ColumnAttribut.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
@ -371,16 +220,16 @@ Separator</value>
<value>Variable Attribut</value>
</data>
<data name="ColumnAttribut.MinimumWidth" type="System.Int32, mscorlib">
<value>90</value>
<value>85</value>
</data>
<data name="ColumnAttribut.Width" type="System.Int32, mscorlib">
<value>90</value>
<value>85</value>
</data>
<data name="dataGridViewValues.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 45</value>
</data>
<data name="dataGridViewValues.Size" type="System.Drawing.Size, System.Drawing">
<value>313, 176</value>
<value>298, 176</value>
</data>
<data name="dataGridViewValues.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
@ -395,7 +244,7 @@ Separator</value>
<value>groupBoxValueControl</value>
</data>
<data name="&gt;&gt;dataGridViewValues.ZOrder" xml:space="preserve">
<value>5</value>
<value>2</value>
</data>
<data name="textBoxGroup.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
@ -404,7 +253,7 @@ Separator</value>
<value>109, 19</value>
</data>
<data name="textBoxGroup.Size" type="System.Drawing.Size, System.Drawing">
<value>210, 20</value>
<value>195, 20</value>
</data>
<data name="textBoxGroup.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
@ -419,7 +268,7 @@ Separator</value>
<value>groupBoxValueControl</value>
</data>
<data name="&gt;&gt;textBoxGroup.ZOrder" xml:space="preserve">
<value>6</value>
<value>3</value>
</data>
<data name="labelGroup.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -449,7 +298,7 @@ Separator</value>
<value>groupBoxValueControl</value>
</data>
<data name="&gt;&gt;labelGroup.ZOrder" xml:space="preserve">
<value>7</value>
<value>4</value>
</data>
<data name="groupBoxValueControl.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
@ -478,14 +327,8 @@ Separator</value>
<data name="&gt;&gt;groupBoxValueControl.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="openFileDialog.Title" xml:space="preserve">
<value>Load XML file</value>
</data>
<metadata name="saveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>150, 17</value>
<value>13, 19</value>
</metadata>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
@ -494,7 +337,7 @@ Separator</value>
<value>6, 13</value>
</data>
<data name="$this.MaximumSize" type="System.Drawing.Size, System.Drawing">
<value>800, 227</value>
<value>800, 600</value>
</data>
<data name="$this.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>316, 227</value>
@ -502,22 +345,16 @@ Separator</value>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>406, 227</value>
</data>
<data name="&gt;&gt;openFileDialog.Name" xml:space="preserve">
<value>openFileDialog</value>
</data>
<data name="&gt;&gt;openFileDialog.Type" xml:space="preserve">
<value>System.Windows.Forms.OpenFileDialog, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;saveFileDialog.Name" xml:space="preserve">
<value>saveFileDialog</value>
</data>
<data name="&gt;&gt;saveFileDialog.Type" xml:space="preserve">
<value>System.Windows.Forms.SaveFileDialog, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnName.Name" xml:space="preserve">
<value>ColumnName</value>
<data name="&gt;&gt;ColumnAttribut.Name" xml:space="preserve">
<value>ColumnAttribut</value>
</data>
<data name="&gt;&gt;ColumnName.Type" xml:space="preserve">
<data name="&gt;&gt;ColumnAttribut.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnValue.Name" xml:space="preserve">
@ -526,10 +363,10 @@ Separator</value>
<data name="&gt;&gt;ColumnValue.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnAttribut.Name" xml:space="preserve">
<value>ColumnAttribut</value>
<data name="&gt;&gt;ColumnName.Name" xml:space="preserve">
<value>ColumnName</value>
</data>
<data name="&gt;&gt;ColumnAttribut.Type" xml:space="preserve">
<data name="&gt;&gt;ColumnName.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">

View File

@ -33,6 +33,9 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="heconpan">
<HintPath>..\..\ControlPanelControl.git\ControlPanelControl\bin\Debug\heconpan.dll</HintPath>
</Reference>
<Reference Include="hecryption">
<HintPath>..\..\..\_DLL\Cryption.git\Cryption\bin\Debug\hecryption.dll</HintPath>
</Reference>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
9f6f761eb5faeead837adc5382d097ed01858d5e

View File

@ -0,0 +1,25 @@
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\bin\Debug\hetvalcon.dll
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\bin\Debug\hetvalcon.pdb
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\bin\Debug\en\hetvalcon.resources.dll
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\bin\Debug\de\hetvalcon.resources.dll
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\bin\Debug\heconpan.dll
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\bin\Debug\hecryption.dll
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\bin\Debug\heconpan.pdb
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\bin\Debug\hecryption.pdb
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\bin\Debug\de\heconpan.resources.dll
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\bin\Debug\en\heconpan.resources.dll
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\obj\Debug\TripleValueControlGrafic.csproj.AssemblyReference.cache
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\obj\Debug\Eugen.ESystem.Windows.Forms.Properties.AppResources.resources
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\obj\Debug\Eugen.ESystem.Windows.Forms.Properties.Resources.resources
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\obj\Debug\Eugen.ESystem.Windows.Forms.TripleValueControl.resources
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\obj\Debug\Eugen.ESystem.Windows.Forms.TripleValueControl.en.resources
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\obj\Debug\Eugen.ESystem.Windows.Forms.Properties.AppResources.de.resources
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\obj\Debug\Eugen.ESystem.Windows.Forms.Properties.AppResources.en.resources
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\obj\Debug\Eugen.ESystem.Windows.Forms.TripleValueControl.de.resources
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\obj\Debug\TripleValueControlGrafic.csproj.GenerateResource.cache
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\obj\Debug\TripleValueControlGrafic.csproj.CoreCompileInputs.cache
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\obj\Debug\en\hetvalcon.resources.dll
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\obj\Debug\de\hetvalcon.resources.dll
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\obj\Debug\TripleValueControlGrafic.csproj.CopyComplete
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\obj\Debug\hetvalcon.dll
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TripleValueControlGrafic.git\TripleValueControlGrafic\obj\Debug\hetvalcon.pdb

Binary file not shown.

Binary file not shown.