Initialized
This commit is contained in:
commit
2405c7be22
BIN
.vs/TabControlWithDataGridViews.git/v17/.suo
Normal file
BIN
.vs/TabControlWithDataGridViews.git/v17/.suo
Normal file
Binary file not shown.
48
.vs/TabControlWithDataGridViews.git/v17/DocumentLayout.json
Normal file
48
.vs/TabControlWithDataGridViews.git/v17/DocumentLayout.json
Normal file
@ -0,0 +1,48 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{A4B2147B-532C-474C-BFBA-D4AB7E6E820E}|TabControlsWithDataGridViews\\TabControlsWithDataGridViews.csproj|c:\\cad\\git-workrepository\\visualstudio\\_user control\\tabcontrolswithdatagridviews.git\\tabcontrolswithdatagridviews\\usercontrol1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
|
||||
"RelativeMoniker": "D:0:0:{A4B2147B-532C-474C-BFBA-D4AB7E6E820E}|TabControlsWithDataGridViews\\TabControlsWithDataGridViews.csproj|solutionrelative:tabcontrolswithdatagridviews\\usercontrol1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 1,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedHeight": 200,
|
||||
"SelectedChildIndex": 3,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:128:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:129:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{e506b91c-c606-466a-90a9-123d1d1e12b3}"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "UserControl1.cs [Entwurf]",
|
||||
"DocumentMoniker": "C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\TabControlsWithDataGridViews\\UserControl1.cs",
|
||||
"RelativeDocumentMoniker": "TabControlsWithDataGridViews\\UserControl1.cs",
|
||||
"ToolTip": "C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\TabControlsWithDataGridViews\\UserControl1.cs [Entwurf]",
|
||||
"RelativeToolTip": "TabControlsWithDataGridViews\\UserControl1.cs [Entwurf]",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-05-03T08:54:50.218Z",
|
||||
"EditorCaption": " [Entwurf]"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.vs/TabControlsWithDataGridViews.git/v17/.suo
Normal file
BIN
.vs/TabControlsWithDataGridViews.git/v17/.suo
Normal file
Binary file not shown.
119
.vs/TabControlsWithDataGridViews.git/v17/DocumentLayout.json
Normal file
119
.vs/TabControlsWithDataGridViews.git/v17/DocumentLayout.json
Normal file
@ -0,0 +1,119 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{A4B2147B-532C-474C-BFBA-D4AB7E6E820E}|TabControlsWithDataGridViews\\TabControlsWithDataGridViews.csproj|C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\tabcontrolswithdatagridviews\\tabcontrolswithdatagridviews.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{A4B2147B-532C-474C-BFBA-D4AB7E6E820E}|TabControlsWithDataGridViews\\TabControlsWithDataGridViews.csproj|solutionrelative:tabcontrolswithdatagridviews\\tabcontrolswithdatagridviews.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{A4B2147B-532C-474C-BFBA-D4AB7E6E820E}|TabControlsWithDataGridViews\\TabControlsWithDataGridViews.csproj|C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\tabcontrolswithdatagridviews\\tabcontrolswithdatagridviews.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
|
||||
"RelativeMoniker": "D:0:0:{A4B2147B-532C-474C-BFBA-D4AB7E6E820E}|TabControlsWithDataGridViews\\TabControlsWithDataGridViews.csproj|solutionrelative:tabcontrolswithdatagridviews\\tabcontrolswithdatagridviews.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{47DB0405-1331-455C-ACAE-A2C2FF02B162}|HE-Test_Dll\\HE-Test_Dll.csproj|c:\\cad\\git-workrepository\\visualstudio\\_user control\\tabcontrolswithdatagridviews.git\\he-test_dll\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
|
||||
"RelativeMoniker": "D:0:0:{47DB0405-1331-455C-ACAE-A2C2FF02B162}|HE-Test_Dll\\HE-Test_Dll.csproj|solutionrelative:he-test_dll\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{A4B2147B-532C-474C-BFBA-D4AB7E6E820E}|TabControlsWithDataGridViews\\TabControlsWithDataGridViews.csproj|C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\tabcontrolswithdatagridviews\\tabcontrolwithdatagridview.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{A4B2147B-532C-474C-BFBA-D4AB7E6E820E}|TabControlsWithDataGridViews\\TabControlsWithDataGridViews.csproj|solutionrelative:tabcontrolswithdatagridviews\\tabcontrolwithdatagridview.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{47DB0405-1331-455C-ACAE-A2C2FF02B162}|HE-Test_Dll\\HE-Test_Dll.csproj|C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\he-test_dll\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{47DB0405-1331-455C-ACAE-A2C2FF02B162}|HE-Test_Dll\\HE-Test_Dll.csproj|solutionrelative:he-test_dll\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 1,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedHeight": 200,
|
||||
"SelectedChildIndex": 6,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:128:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:129:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{e506b91c-c606-466a-90a9-123d1d1e12b3}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 4,
|
||||
"Title": "Form1.cs",
|
||||
"DocumentMoniker": "C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\HE-Test_Dll\\Form1.cs",
|
||||
"RelativeDocumentMoniker": "HE-Test_Dll\\Form1.cs",
|
||||
"ToolTip": "C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\HE-Test_Dll\\Form1.cs",
|
||||
"RelativeToolTip": "HE-Test_Dll\\Form1.cs",
|
||||
"ViewState": "AQIAAAYAAAAAAAAAAAAAAGgAAABcAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-05-06T10:49:04.025Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 2,
|
||||
"Title": "Form1.cs [Entwurf]",
|
||||
"DocumentMoniker": "C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\HE-Test_Dll\\Form1.cs",
|
||||
"RelativeDocumentMoniker": "HE-Test_Dll\\Form1.cs",
|
||||
"ToolTip": "C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\HE-Test_Dll\\Form1.cs [Entwurf]",
|
||||
"RelativeToolTip": "HE-Test_Dll\\Form1.cs [Entwurf]",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-05-06T10:09:33.322Z",
|
||||
"EditorCaption": " [Entwurf]"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "TabControlsWithDataGridViews.cs",
|
||||
"DocumentMoniker": "C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\TabControlsWithDataGridViews\\TabControlsWithDataGridViews.cs",
|
||||
"RelativeDocumentMoniker": "TabControlsWithDataGridViews\\TabControlsWithDataGridViews.cs",
|
||||
"ToolTip": "C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\TabControlsWithDataGridViews\\TabControlsWithDataGridViews.cs",
|
||||
"RelativeToolTip": "TabControlsWithDataGridViews\\TabControlsWithDataGridViews.cs",
|
||||
"ViewState": "AQIAAG0AAAAAAAAAAAAowIkAAABeAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-05-03T09:00:19.318Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "TabControlsWithDataGridViews.cs [Entwurf]",
|
||||
"DocumentMoniker": "C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\TabControlsWithDataGridViews\\TabControlsWithDataGridViews.cs",
|
||||
"RelativeDocumentMoniker": "TabControlsWithDataGridViews\\TabControlsWithDataGridViews.cs",
|
||||
"ToolTip": "C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\TabControlsWithDataGridViews\\TabControlsWithDataGridViews.cs [Entwurf]",
|
||||
"RelativeToolTip": "TabControlsWithDataGridViews\\TabControlsWithDataGridViews.cs [Entwurf]",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-05-03T09:00:14.305Z",
|
||||
"EditorCaption": " [Entwurf]"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 3,
|
||||
"Title": "TabControlWithDataGridView.cs",
|
||||
"DocumentMoniker": "C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\TabControlsWithDataGridViews\\TabControlWithDataGridView.cs",
|
||||
"RelativeDocumentMoniker": "TabControlsWithDataGridViews\\TabControlWithDataGridView.cs",
|
||||
"ToolTip": "C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\TabControlsWithDataGridViews\\TabControlWithDataGridView.cs",
|
||||
"RelativeToolTip": "TabControlsWithDataGridViews\\TabControlWithDataGridView.cs",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAK8BAABUAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-05-06T11:52:35.939Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
0
Daten/CDs - Kopie/CD 1/01 Song 1_1.txt
Normal file
0
Daten/CDs - Kopie/CD 1/01 Song 1_1.txt
Normal file
0
Daten/CDs - Kopie/CD 2/01 Song 1_2.txt
Normal file
0
Daten/CDs - Kopie/CD 2/01 Song 1_2.txt
Normal file
0
Daten/CDs - Kopie/CD 3/01 Song 1_3.txt
Normal file
0
Daten/CDs - Kopie/CD 3/01 Song 1_3.txt
Normal file
0
Daten/CDs - Kopie/CD 3/02 Song 2_3.txt
Normal file
0
Daten/CDs - Kopie/CD 3/02 Song 2_3.txt
Normal file
0
Daten/CDs - Kopie/CD 3/03 Song 3_3.txt
Normal file
0
Daten/CDs - Kopie/CD 3/03 Song 3_3.txt
Normal file
0
Daten/CDs - Kopie/CD 3/04 Song 4_3.txt
Normal file
0
Daten/CDs - Kopie/CD 3/04 Song 4_3.txt
Normal file
0
Daten/CDs - Kopie/CD 4/01 Song 1_4.txt
Normal file
0
Daten/CDs - Kopie/CD 4/01 Song 1_4.txt
Normal file
0
Daten/CDs/CD 1/01 Song 1_1.txt
Normal file
0
Daten/CDs/CD 1/01 Song 1_1.txt
Normal file
0
Daten/CDs/CD 2/01 Song 1_2.txt
Normal file
0
Daten/CDs/CD 2/01 Song 1_2.txt
Normal file
0
Daten/CDs/CD 3/01 Song 1_3.txt
Normal file
0
Daten/CDs/CD 3/01 Song 1_3.txt
Normal file
0
Daten/CDs/CD 3/02 Song 2_3.txt
Normal file
0
Daten/CDs/CD 3/02 Song 2_3.txt
Normal file
0
Daten/CDs/CD 3/03 Song 3_3.txt
Normal file
0
Daten/CDs/CD 3/03 Song 3_3.txt
Normal file
0
Daten/CDs/CD 3/04 Song 4_3.txt
Normal file
0
Daten/CDs/CD 3/04 Song 4_3.txt
Normal file
0
Daten/CDs/CD 4/01 Song 1_4.txt
Normal file
0
Daten/CDs/CD 4/01 Song 1_4.txt
Normal file
1
HE-Test_Dll/.vs/HE-Test_Dll.csproj.dtbcache.json
Normal file
1
HE-Test_Dll/.vs/HE-Test_Dll.csproj.dtbcache.json
Normal file
@ -0,0 +1 @@
|
||||
{"RootPath":"C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\HE-Test_Dll","ProjectFileName":"HE-Test_Dll.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"Form1.cs"},{"SourceFile":"Form1.Designer.cs"},{"SourceFile":"Program.cs"},{"SourceFile":"Properties\\AssemblyInfo.cs"},{"SourceFile":"Properties\\Resources.Designer.cs"},{"SourceFile":"Properties\\Settings.Designer.cs"},{"SourceFile":"obj\\Debug\\.NETFramework,Version=v4.7.2.AssemblyAttributes.cs"}],"References":[{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\Microsoft.CSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\mscorlib.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.DataSetExtensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Deployment.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Drawing.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Net.Http.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Windows.Forms.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""}],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\HE-Test_Dll\\bin\\Debug\\HE-Test_Dll.exe","OutputItemRelativePath":"HE-Test_Dll.exe"},{"OutputItemFullPath":"C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\HE-Test_Dll\\bin\\Debug\\HE-Test_Dll.pdb","OutputItemRelativePath":"HE-Test_Dll.pdb"}],"CopyToOutputEntries":[]}
|
||||
6
HE-Test_Dll/App.config
Normal file
6
HE-Test_Dll/App.config
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
116
HE-Test_Dll/Form1.Designer.cs
generated
Normal file
116
HE-Test_Dll/Form1.Designer.cs
generated
Normal file
@ -0,0 +1,116 @@
|
||||
namespace HE_Test_Dll
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// Erforderliche Designervariable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Verwendete Ressourcen bereinigen.
|
||||
/// </summary>
|
||||
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Vom Windows Form-Designer generierter Code
|
||||
|
||||
/// <summary>
|
||||
/// Erforderliche Methode für die Designerunterstützung.
|
||||
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.groupBoxProgramInfo = new System.Windows.Forms.GroupBox();
|
||||
this.labelProgramInfo = new System.Windows.Forms.Label();
|
||||
this.groupBoxDLLInfo = new System.Windows.Forms.GroupBox();
|
||||
this.labelDLLInfo = new System.Windows.Forms.Label();
|
||||
this.tabControlsWithDataGridViews = new Eugen.ESystem.Windows.Forms.TabControlsWithDataGridViews();
|
||||
this.groupBoxProgramInfo.SuspendLayout();
|
||||
this.groupBoxDLLInfo.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBoxProgramInfo
|
||||
//
|
||||
this.groupBoxProgramInfo.Controls.Add(this.labelProgramInfo);
|
||||
this.groupBoxProgramInfo.Location = new System.Drawing.Point(12, 472);
|
||||
this.groupBoxProgramInfo.Name = "groupBoxProgramInfo";
|
||||
this.groupBoxProgramInfo.Size = new System.Drawing.Size(385, 66);
|
||||
this.groupBoxProgramInfo.TabIndex = 11;
|
||||
this.groupBoxProgramInfo.TabStop = false;
|
||||
this.groupBoxProgramInfo.Text = "Programm Information";
|
||||
//
|
||||
// labelProgramInfo
|
||||
//
|
||||
this.labelProgramInfo.AutoSize = true;
|
||||
this.labelProgramInfo.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.labelProgramInfo.Location = new System.Drawing.Point(7, 20);
|
||||
this.labelProgramInfo.Name = "labelProgramInfo";
|
||||
this.labelProgramInfo.Size = new System.Drawing.Size(16, 13);
|
||||
this.labelProgramInfo.TabIndex = 0;
|
||||
this.labelProgramInfo.Text = "...";
|
||||
//
|
||||
// groupBoxDLLInfo
|
||||
//
|
||||
this.groupBoxDLLInfo.Controls.Add(this.labelDLLInfo);
|
||||
this.groupBoxDLLInfo.Location = new System.Drawing.Point(403, 472);
|
||||
this.groupBoxDLLInfo.Name = "groupBoxDLLInfo";
|
||||
this.groupBoxDLLInfo.Size = new System.Drawing.Size(385, 66);
|
||||
this.groupBoxDLLInfo.TabIndex = 12;
|
||||
this.groupBoxDLLInfo.TabStop = false;
|
||||
this.groupBoxDLLInfo.Text = "DLL Information";
|
||||
//
|
||||
// labelDLLInfo
|
||||
//
|
||||
this.labelDLLInfo.AutoSize = true;
|
||||
this.labelDLLInfo.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.labelDLLInfo.Location = new System.Drawing.Point(7, 20);
|
||||
this.labelDLLInfo.Name = "labelDLLInfo";
|
||||
this.labelDLLInfo.Size = new System.Drawing.Size(16, 13);
|
||||
this.labelDLLInfo.TabIndex = 0;
|
||||
this.labelDLLInfo.Text = "...";
|
||||
//
|
||||
// tabControlsWithDataGridViews
|
||||
//
|
||||
this.tabControlsWithDataGridViews.Location = new System.Drawing.Point(12, 12);
|
||||
this.tabControlsWithDataGridViews.MinimumSize = new System.Drawing.Size(760, 440);
|
||||
this.tabControlsWithDataGridViews.Name = "tabControlsWithDataGridViews";
|
||||
this.tabControlsWithDataGridViews.Size = new System.Drawing.Size(760, 440);
|
||||
this.tabControlsWithDataGridViews.TabIndex = 13;
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(800, 550);
|
||||
this.Controls.Add(this.tabControlsWithDataGridViews);
|
||||
this.Controls.Add(this.groupBoxProgramInfo);
|
||||
this.Controls.Add(this.groupBoxDLLInfo);
|
||||
this.Name = "Form1";
|
||||
this.Text = "Test_TabControlsWithDataGridViews";
|
||||
this.Load += new System.EventHandler(this.Form1_Load);
|
||||
this.groupBoxProgramInfo.ResumeLayout(false);
|
||||
this.groupBoxProgramInfo.PerformLayout();
|
||||
this.groupBoxDLLInfo.ResumeLayout(false);
|
||||
this.groupBoxDLLInfo.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.GroupBox groupBoxProgramInfo;
|
||||
private System.Windows.Forms.Label labelProgramInfo;
|
||||
private System.Windows.Forms.GroupBox groupBoxDLLInfo;
|
||||
private System.Windows.Forms.Label labelDLLInfo;
|
||||
private Eugen.ESystem.Windows.Forms.TabControlsWithDataGridViews tabControlsWithDataGridViews;
|
||||
private Eugen.ESystem.Windows.Forms.TabControlsWithDataGridViews tabControlsWithDataGridViews1;
|
||||
}
|
||||
}
|
||||
|
||||
140
HE-Test_Dll/Form1.cs
Normal file
140
HE-Test_Dll/Form1.cs
Normal file
@ -0,0 +1,140 @@
|
||||
using Eugen.ESystem.Windows.Forms;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace HE_Test_Dll
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
#region Version und Copyright
|
||||
// Version und Copyright
|
||||
string programName = Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); //Den Programmnamen auslesen
|
||||
string programVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
static object[] attributes = System.Reflection.Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
|
||||
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 = ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
|
||||
//return startYear.Remove(0, startYear.LastIndexOf(" ") + 1);
|
||||
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 String.Concat(((AssemblyCopyrightAttribute)attributes[0]).Copyright, "-", currentYear);
|
||||
return ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace(startYear, String.Concat(startYear, "-", currentYear));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Programm-Info
|
||||
/// <summary>
|
||||
/// Contains the name of the program file
|
||||
/// </summary>
|
||||
public static string ProgramName { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// Contains the version of the program file
|
||||
/// </summary>
|
||||
public static string ProgramVersion { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// Contains the copyright notice
|
||||
/// </summary>
|
||||
public static string Copyright { set; get; }
|
||||
|
||||
private void SetProgramInfo()
|
||||
{
|
||||
//Name, Version und Copyright setzen
|
||||
ProgramName = programName;
|
||||
ProgramVersion = programVersion;
|
||||
Copyright = copyright;
|
||||
}
|
||||
#endregion
|
||||
|
||||
public Form1()
|
||||
{
|
||||
SetProgramInfo();
|
||||
InitializeComponent();
|
||||
|
||||
SetControl(); // Creates the control with the DataGridViews. Must be called here, otherwise the values are set too late.
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
labelProgramInfo.Text = String.Concat(ProgramName, "\r\n", ProgramVersion, "\r\n", Copyright); // Zeigt die Programm-Information an
|
||||
|
||||
labelDLLInfo.Text = String.Concat(TabControlsWithDataGridViews.DllName, "\r\n", TabControlsWithDataGridViews.DllVersion, "\r\n", TabControlsWithDataGridViews.Copyright); // Zeigt die DLL-Information an
|
||||
}
|
||||
|
||||
private void SetControl()
|
||||
{
|
||||
TabControlsWithDataGridViews.TabTitle = "CD "; // Sets the titles of the DataGridView
|
||||
TabControlsWithDataGridViews.Column1Title = "Number"; // Set the title of the first column
|
||||
TabControlsWithDataGridViews.Column2Title = "Title"; // Set the title of the second column
|
||||
TabControlsWithDataGridViews.MoveToButtonTitle = "Move To CD "; // Sets the titles of the Move To buttons
|
||||
|
||||
// Sets the root directory in which the data are located
|
||||
TabControlsWithDataGridViews.DataPath = "C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\Daten\\CDs";
|
||||
|
||||
TabControlsWithDataGridViews.Extension = ".txt"; // Sets the extension of the used files
|
||||
}
|
||||
|
||||
private void buttonShowInfo_Click(object sender, EventArgs e)
|
||||
{
|
||||
//
|
||||
// Diese Zeilen gehört in das Programm kopiert
|
||||
//
|
||||
// Aufruf des Informationsfensters
|
||||
var info = new TabControlsWithDataGridViews();
|
||||
info.Show();
|
||||
//
|
||||
//
|
||||
}
|
||||
}
|
||||
}
|
||||
120
HE-Test_Dll/Form1.resx
Normal file
120
HE-Test_Dll/Form1.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
||||
92
HE-Test_Dll/HE-Test_Dll.csproj
Normal file
92
HE-Test_Dll/HE-Test_Dll.csproj
Normal file
@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{47DB0405-1331-455C-ACAE-A2C2FF02B162}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>HE_Test_Dll</RootNamespace>
|
||||
<AssemblyName>HE-Test_Dll</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>false</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="heconpan">
|
||||
<HintPath>..\..\ControlPanelControl.git\ControlPanelControl\bin\Debug\heconpan.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="hetcwdgv, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\TabControlsWithDataGridViews\bin\Debug\hetcwdgv.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
19
HE-Test_Dll/Program.cs
Normal file
19
HE-Test_Dll/Program.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace HE_Test_Dll
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// Der Haupteinstiegspunkt für die Anwendung.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
}
|
||||
}
|
||||
35
HE-Test_Dll/Properties/AssemblyInfo.cs
Normal file
35
HE-Test_Dll/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,35 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||
// die einer Assembly zugeordnet sind.
|
||||
[assembly: AssemblyTitle("HE_Test_Dll")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("HE_Test_Dll")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2022 by Eugen Höglinger")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
|
||||
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
|
||||
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||
[assembly: Guid("47db0405-1331-455c-acae-a2c2ff02b162")]
|
||||
|
||||
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
//
|
||||
// Hauptversion
|
||||
// Nebenversion
|
||||
// Buildnummer
|
||||
// Revision
|
||||
//
|
||||
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||
// übernehmen, indem Sie "*" eingeben:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
//[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
71
HE-Test_Dll/Properties/Resources.Designer.cs
generated
Normal file
71
HE-Test_Dll/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,71 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
|
||||
namespace Properties
|
||||
{
|
||||
/// <summary>
|
||||
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||
/// </summary>
|
||||
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if (object.ReferenceEquals(resourceMan, null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
117
HE-Test_Dll/Properties/Resources.resx
Normal file
117
HE-Test_Dll/Properties/Resources.resx
Normal file
@ -0,0 +1,117 @@
|
||||
<?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.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: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" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
30
HE-Test_Dll/Properties/Settings.Designer.cs
generated
Normal file
30
HE-Test_Dll/Properties/Settings.Designer.cs
generated
Normal file
@ -0,0 +1,30 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
7
HE-Test_Dll/Properties/Settings.settings
Normal file
7
HE-Test_Dll/Properties/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
BIN
HE-Test_Dll/bin/Debug/HE-Test_Dll.exe
Normal file
BIN
HE-Test_Dll/bin/Debug/HE-Test_Dll.exe
Normal file
Binary file not shown.
6
HE-Test_Dll/bin/Debug/HE-Test_Dll.exe.config
Normal file
6
HE-Test_Dll/bin/Debug/HE-Test_Dll.exe.config
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
BIN
HE-Test_Dll/bin/Debug/HE-Test_Dll.pdb
Normal file
BIN
HE-Test_Dll/bin/Debug/HE-Test_Dll.pdb
Normal file
Binary file not shown.
BIN
HE-Test_Dll/bin/Debug/de/heconpan.resources.dll
Normal file
BIN
HE-Test_Dll/bin/Debug/de/heconpan.resources.dll
Normal file
Binary file not shown.
BIN
HE-Test_Dll/bin/Debug/en/heconpan.resources.dll
Normal file
BIN
HE-Test_Dll/bin/Debug/en/heconpan.resources.dll
Normal file
Binary file not shown.
BIN
HE-Test_Dll/bin/Debug/heconpan.dll
Normal file
BIN
HE-Test_Dll/bin/Debug/heconpan.dll
Normal file
Binary file not shown.
BIN
HE-Test_Dll/bin/Debug/heconpan.pdb
Normal file
BIN
HE-Test_Dll/bin/Debug/heconpan.pdb
Normal file
Binary file not shown.
BIN
HE-Test_Dll/bin/Debug/hetcwdgv.dll
Normal file
BIN
HE-Test_Dll/bin/Debug/hetcwdgv.dll
Normal file
Binary file not shown.
BIN
HE-Test_Dll/bin/Debug/hetcwdgv.pdb
Normal file
BIN
HE-Test_Dll/bin/Debug/hetcwdgv.pdb
Normal file
Binary file not shown.
@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
|
||||
BIN
HE-Test_Dll/obj/Debug/DesignTimeResolveAssemblyReferences.cache
Normal file
BIN
HE-Test_Dll/obj/Debug/DesignTimeResolveAssemblyReferences.cache
Normal file
Binary file not shown.
Binary file not shown.
0
HE-Test_Dll/obj/Debug/HE-Test_.1DB734D7.Up2Date
Normal file
0
HE-Test_Dll/obj/Debug/HE-Test_.1DB734D7.Up2Date
Normal file
BIN
HE-Test_Dll/obj/Debug/HE-Test_Dll.csproj.AssemblyReference.cache
Normal file
BIN
HE-Test_Dll/obj/Debug/HE-Test_Dll.csproj.AssemblyReference.cache
Normal file
Binary file not shown.
@ -0,0 +1 @@
|
||||
4fdad2e37df2d42e4acec494a733142a746bd680feed415b59a167b506ff7127
|
||||
@ -0,0 +1,17 @@
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\HE-Test_Dll\bin\Debug\HE-Test_Dll.exe.config
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\HE-Test_Dll\bin\Debug\HE-Test_Dll.exe
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\HE-Test_Dll\bin\Debug\HE-Test_Dll.pdb
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\HE-Test_Dll\bin\Debug\hetcwdgv.pdb
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\HE-Test_Dll\obj\Debug\HE-Test_Dll.csproj.AssemblyReference.cache
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\HE-Test_Dll\obj\Debug\HE_Test_Dll.Form1.resources
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\HE-Test_Dll\obj\Debug\HE_Test_Dll.Properties.Resources.resources
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\HE-Test_Dll\obj\Debug\HE-Test_Dll.csproj.GenerateResource.cache
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\HE-Test_Dll\obj\Debug\HE-Test_Dll.csproj.CoreCompileInputs.cache
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\HE-Test_Dll\obj\Debug\HE-Test_.1DB734D7.Up2Date
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\HE-Test_Dll\obj\Debug\HE-Test_Dll.exe
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\HE-Test_Dll\obj\Debug\HE-Test_Dll.pdb
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\HE-Test_Dll\bin\Debug\hetcwdgv.dll
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\HE-Test_Dll\bin\Debug\heconpan.dll
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\HE-Test_Dll\bin\Debug\heconpan.pdb
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\HE-Test_Dll\bin\Debug\de\heconpan.resources.dll
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\HE-Test_Dll\bin\Debug\en\heconpan.resources.dll
|
||||
BIN
HE-Test_Dll/obj/Debug/HE-Test_Dll.csproj.GenerateResource.cache
Normal file
BIN
HE-Test_Dll/obj/Debug/HE-Test_Dll.csproj.GenerateResource.cache
Normal file
Binary file not shown.
BIN
HE-Test_Dll/obj/Debug/HE-Test_Dll.exe
Normal file
BIN
HE-Test_Dll/obj/Debug/HE-Test_Dll.exe
Normal file
Binary file not shown.
BIN
HE-Test_Dll/obj/Debug/HE-Test_Dll.pdb
Normal file
BIN
HE-Test_Dll/obj/Debug/HE-Test_Dll.pdb
Normal file
Binary file not shown.
BIN
HE-Test_Dll/obj/Debug/HE_Test_Dll.Form1.resources
Normal file
BIN
HE-Test_Dll/obj/Debug/HE_Test_Dll.Form1.resources
Normal file
Binary file not shown.
BIN
HE-Test_Dll/obj/Debug/HE_Test_Dll.Properties.Resources.resources
Normal file
BIN
HE-Test_Dll/obj/Debug/HE_Test_Dll.Properties.Resources.resources
Normal file
Binary file not shown.
Binary file not shown.
31
TabControlsWithDataGridViews.git.sln
Normal file
31
TabControlsWithDataGridViews.git.sln
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.9.34728.123
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TabControlsWithDataGridViews", "TabControlsWithDataGridViews\TabControlsWithDataGridViews.csproj", "{A4B2147B-532C-474C-BFBA-D4AB7E6E820E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HE-Test_Dll", "HE-Test_Dll\HE-Test_Dll.csproj", "{47DB0405-1331-455C-ACAE-A2C2FF02B162}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A4B2147B-532C-474C-BFBA-D4AB7E6E820E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A4B2147B-532C-474C-BFBA-D4AB7E6E820E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A4B2147B-532C-474C-BFBA-D4AB7E6E820E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A4B2147B-532C-474C-BFBA-D4AB7E6E820E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{47DB0405-1331-455C-ACAE-A2C2FF02B162}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{47DB0405-1331-455C-ACAE-A2C2FF02B162}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{47DB0405-1331-455C-ACAE-A2C2FF02B162}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{47DB0405-1331-455C-ACAE-A2C2FF02B162}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {420D3514-448D-4AF0-A7EB-33D5DB8C5459}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@ -0,0 +1 @@
|
||||
{"RootPath":"C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\TabControlsWithDataGridViews","ProjectFileName":"TabControlsWithDataGridViews.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"Properties\\AppResources.Designer.cs"},{"SourceFile":"Properties\\AppResources_de.Designer.cs"},{"SourceFile":"Properties\\AppResources_en.Designer.cs"},{"SourceFile":"TabControlsWithDataGridViews.cs"},{"SourceFile":"TabControlsWithDataGridViews.Designer.cs"},{"SourceFile":"Properties\\AssemblyInfo.cs"},{"SourceFile":"obj\\Debug\\.NETFramework,Version=v4.7.2.AssemblyAttributes.cs"}],"References":[{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\Microsoft.CSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\mscorlib.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.DataSetExtensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Drawing.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Net.Http.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Windows.Forms.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""}],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\TabControlsWithDataGridViews\\bin\\Debug\\hetcwdgv.dll","OutputItemRelativePath":"hetcwdgv.dll"},{"OutputItemFullPath":"C:\\CAD\\Git-WorkRepository\\VisualStudio\\_USER CONTROL\\TabControlsWithDataGridViews.git\\TabControlsWithDataGridViews\\bin\\Debug\\hetcwdgv.pdb","OutputItemRelativePath":"hetcwdgv.pdb"}],"CopyToOutputEntries":[]}
|
||||
193
TabControlsWithDataGridViews/Move.cs
Normal file
193
TabControlsWithDataGridViews/Move.cs
Normal file
@ -0,0 +1,193 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using static System.Net.WebRequestMethods;
|
||||
|
||||
namespace Eugen.ESystem.Windows.Forms
|
||||
{
|
||||
internal class Move
|
||||
{
|
||||
/// <summary>
|
||||
/// Set the Data directory path
|
||||
/// </summary>
|
||||
public string DataPath { private get; set; } // Data directory
|
||||
|
||||
/// <summary>
|
||||
/// The file extension you are looking for, e.g. .mp3
|
||||
/// </summary>
|
||||
public string Extension { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// Set the used dataGridView Control
|
||||
/// </summary>
|
||||
public DataGridView UsedDataGridView { private get; set; } // The used dataGridView Control
|
||||
|
||||
/// <summary>
|
||||
/// Set the number of the selected dataGridView
|
||||
/// </summary>
|
||||
public int SelectedDataGridViewIndex { private get; set; } // Number of the selected dataGridView
|
||||
|
||||
/// <summary>
|
||||
/// Get the number of the row selected in the DataGridView
|
||||
/// </summary>
|
||||
public int SelectedRow { get; private set; } // The number of the row selected in the DataGridView
|
||||
|
||||
/// <summary>
|
||||
/// Set or get the title of 'TabPage'
|
||||
/// </summary>
|
||||
public string TabTitle { set; get; } // Title of the TabPage
|
||||
|
||||
/// <summary>
|
||||
/// Set or get the current 'TabControl'
|
||||
/// </summary>
|
||||
public TabControl DynamicTabControl { set; get; } // Current tabControl
|
||||
|
||||
/// <summary>
|
||||
/// Set or get the current tab name
|
||||
/// </summary>
|
||||
public string CurrentTabName { get; set; } // Name of the current tabPagel
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether the display needs to be updated or not
|
||||
/// </summary>
|
||||
public bool UpdateDisplay { get; private set; } // Specifies whether the display is updated or not
|
||||
|
||||
public void ToTab(int number)
|
||||
{
|
||||
List<string> folders = new List<string>();
|
||||
string currentFolder = "";
|
||||
string destinationFolder = "";
|
||||
string currentFile = "";
|
||||
string destinationFile = "";
|
||||
string tempFile = "";
|
||||
string rowSelectedValue = "";
|
||||
string fileSelected = "";
|
||||
int selectedFileIndex = 0;
|
||||
|
||||
UpdateDisplay = false;
|
||||
|
||||
// Determine selected row
|
||||
if (UsedDataGridView.SelectedRows.Count > 0)
|
||||
{
|
||||
SelectedRow = UsedDataGridView.SelectedRows[0].Index;
|
||||
}
|
||||
|
||||
if (DynamicTabControl.SelectedIndex != number)
|
||||
{
|
||||
folders = GetFolders(DataPath);
|
||||
|
||||
for (int i = 0; i < folders.Count; i++)
|
||||
{
|
||||
if (i == number)
|
||||
{
|
||||
currentFolder = folders[DynamicTabControl.SelectedIndex];
|
||||
destinationFolder = folders[number];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
rowSelectedValue = UsedDataGridView.Rows[SelectedRow].Cells[1].Value.ToString(); // Value of the selected row
|
||||
|
||||
foreach (string file in Directory.GetFiles(currentFolder))
|
||||
{
|
||||
if (Path.GetFileNameWithoutExtension(file) == rowSelectedValue)
|
||||
{
|
||||
fileSelected = file;
|
||||
selectedFileIndex = Convert.ToInt32(Path.GetFileName(fileSelected).Remove(Path.GetFileName(fileSelected).IndexOf(" ")));
|
||||
currentFile = Path.GetFileName(file);
|
||||
tempFile = "00" + currentFile.Remove(0, currentFile.IndexOf(" "));
|
||||
}
|
||||
}
|
||||
|
||||
// If the file name begins with the line number, rename the line number in the file name to '00' and move the file it the destination folder
|
||||
System.IO.File.Move(fileSelected, destinationFolder + "\\" + tempFile);
|
||||
|
||||
// If the selected file was not the last one, then rename/renumber the files that come after it
|
||||
IsSelFileNotTheLastRenameIt(currentFolder, fileSelected, selectedFileIndex);
|
||||
|
||||
// Only include files with the correct extension in the list to determine the number of files
|
||||
destinationFile = GetDestinationFileList(destinationFolder, tempFile);
|
||||
|
||||
System.IO.File.Move(destinationFolder + "\\" + tempFile, destinationFolder + "\\" + destinationFile);
|
||||
|
||||
UpdateDisplay = true;
|
||||
}
|
||||
}
|
||||
|
||||
#region Private Methodes
|
||||
private List<string> GetFolders(string dataPath)
|
||||
{
|
||||
List<string> folders = Directory.GetDirectories(dataPath).ToList<string>();
|
||||
|
||||
for (int i = 0; i < folders.Count; i++)
|
||||
{
|
||||
if (!folders[i].Remove(0, folders[i].LastIndexOf("\\") + 1).StartsWith(TabTitle))
|
||||
{
|
||||
folders.Remove(folders[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return folders;
|
||||
}
|
||||
|
||||
private void IsSelFileNotTheLastRenameIt(string currentFolder, string fileSelected, int selectedFileIndex)
|
||||
{
|
||||
List<string> files = new List<string>();
|
||||
|
||||
foreach (string file in Directory.GetFiles(currentFolder))
|
||||
{
|
||||
if (Path.GetExtension(file) == Extension)
|
||||
{
|
||||
files.Add(file);
|
||||
}
|
||||
}
|
||||
|
||||
if (files.Count + 1 > Convert.ToInt32(Path.GetFileName(fileSelected).Remove(Path.GetFileName(fileSelected).IndexOf(" "))))
|
||||
{
|
||||
// Rename the files that come after the selected file
|
||||
string fileName = "";
|
||||
|
||||
for (int i = selectedFileIndex - 1; i < files.Count; i++)
|
||||
{
|
||||
fileName = Path.GetFileName(files[i]);
|
||||
|
||||
if (i < 10)
|
||||
{
|
||||
System.IO.File.Move(currentFolder + "\\" + fileName, currentFolder + "\\0" + (i + 1).ToString() + fileName.Remove(0, fileName.IndexOf(" ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
System.IO.File.Move(currentFolder + "\\" + fileName, currentFolder + "\\" + (i + 1).ToString() + fileName.Remove(0, fileName.IndexOf(" ")));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private string GetDestinationFileList(string destinationFolder, string tempFile)
|
||||
{
|
||||
List<string> files = new List<string>();
|
||||
|
||||
foreach (string file in Directory.GetFiles(destinationFolder))
|
||||
{
|
||||
if (Path.GetExtension(file) == Extension)
|
||||
{
|
||||
files.Add(file);
|
||||
}
|
||||
}
|
||||
|
||||
if (files.Count < 10)
|
||||
{
|
||||
return "0" + files.Count + tempFile.Remove(0, tempFile.IndexOf(" "));
|
||||
}
|
||||
else
|
||||
{
|
||||
return files.Count + tempFile.Remove(0, tempFile.IndexOf(" "));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
192
TabControlsWithDataGridViews/MoveRow.cs
Normal file
192
TabControlsWithDataGridViews/MoveRow.cs
Normal file
@ -0,0 +1,192 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Eugen.ESystem.Windows.Forms
|
||||
{
|
||||
internal class MoveRow
|
||||
{
|
||||
/// <summary>
|
||||
/// Set the Data directory path
|
||||
/// </summary>
|
||||
public string DataPath { private get; set; } // Data directory
|
||||
|
||||
/// <summary>
|
||||
/// Set the used dataGridView Control
|
||||
/// </summary>
|
||||
public DataGridView UsedDataGridView { private get; set; } // The used dataGridView Control
|
||||
|
||||
/// <summary>
|
||||
/// Set the number of the selected dataGridView
|
||||
/// </summary>
|
||||
public int SelectedDataGridViewIndex { private get; set; } // Number of the selected dataGridView
|
||||
|
||||
/// <summary>
|
||||
/// Get the number of the row selected in the DataGridView
|
||||
/// </summary>
|
||||
public int SelectedRow { get; private set; } // The number of the row selected in the DataGridView
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether the display needs to be updated or not
|
||||
/// </summary>
|
||||
public bool UpdateDisplay { get; private set; } // Specifies whether the display is updated or not
|
||||
|
||||
/// <summary>
|
||||
/// Moves the selected row up one row
|
||||
/// </summary>
|
||||
public void Up()
|
||||
{
|
||||
UpdateDisplay = false;
|
||||
|
||||
// Determine selected row
|
||||
if (UsedDataGridView.SelectedRows.Count > 0)
|
||||
{
|
||||
SelectedRow = UsedDataGridView.SelectedRows[0].Index;
|
||||
}
|
||||
|
||||
// If the selected row is not the first row, then move it up
|
||||
if (SelectedRow > 0)
|
||||
{
|
||||
string rowSelected = UsedDataGridView.Rows[SelectedRow].Cells[1].Value.ToString(); // Value of the selected row
|
||||
string rowAboutIt = UsedDataGridView.Rows[SelectedRow - 1].Cells[1].Value.ToString(); // Value about of the selected row
|
||||
|
||||
string folderSelected = "";
|
||||
string fileSelected = "";
|
||||
string fileAboutIt = "";
|
||||
|
||||
foreach (string folder in Directory.GetDirectories(DataPath))
|
||||
{
|
||||
if (folder.EndsWith((SelectedDataGridViewIndex + 1).ToString()))
|
||||
{
|
||||
folderSelected = folder;
|
||||
}
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(folderSelected))
|
||||
{
|
||||
foreach (string file in Directory.GetFiles(folderSelected))
|
||||
{
|
||||
if (Path.GetFileNameWithoutExtension(file) == rowSelected)
|
||||
{
|
||||
fileSelected = file;
|
||||
}
|
||||
|
||||
if (Path.GetFileNameWithoutExtension(file) == rowAboutIt)
|
||||
{
|
||||
fileAboutIt = file;
|
||||
}
|
||||
}
|
||||
|
||||
// If the file name begins with the line number, rename the line number in the file name to '00'
|
||||
File.Move(fileSelected, fileSelected.Remove(fileSelected.LastIndexOf("\\") + 1) + "00" + Path.GetFileName(fileSelected).Remove(0, Path.GetFileName(fileSelected).IndexOf(" ")));
|
||||
|
||||
if (SelectedRow + 1 < 10)
|
||||
{
|
||||
File.Move(fileAboutIt, fileAboutIt.Remove(fileAboutIt.LastIndexOf("\\") + 1) + "0" + (SelectedRow + 1).ToString() + Path.GetFileName(fileAboutIt).Remove(0, Path.GetFileName(fileAboutIt).IndexOf(" ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
File.Move(fileAboutIt, fileAboutIt.Remove(fileAboutIt.LastIndexOf("\\") + 1) + (SelectedRow + 1).ToString() + Path.GetFileName(fileAboutIt).Remove(0, Path.GetFileName(fileAboutIt).IndexOf(" ")));
|
||||
}
|
||||
|
||||
if (SelectedRow < 10)
|
||||
{
|
||||
File.Move(fileSelected.Remove(fileSelected.LastIndexOf("\\") + 1) + "00" + Path.GetFileName(fileSelected).Remove(0, Path.GetFileName(fileSelected).IndexOf(" ")), fileSelected.Remove(fileSelected.LastIndexOf("\\") + 1) + "0" + SelectedRow.ToString() + Path.GetFileName(fileSelected).Remove(0, Path.GetFileName(fileSelected).IndexOf(" ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
File.Move(fileSelected.Remove(fileSelected.LastIndexOf("\\") + 1) + "00" + Path.GetFileName(fileSelected).Remove(0, Path.GetFileName(fileSelected).IndexOf(" ")), fileSelected.Remove(fileSelected.LastIndexOf("\\") + 1) + SelectedRow.ToString() + Path.GetFileName(fileSelected).Remove(0, Path.GetFileName(fileSelected).IndexOf(" ")));
|
||||
}
|
||||
|
||||
UpdateDisplay = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Moves the selected row down one row
|
||||
/// </summary>
|
||||
public void Down()
|
||||
{
|
||||
UpdateDisplay = false;
|
||||
|
||||
// Determine selected row
|
||||
if (UsedDataGridView.SelectedRows.Count > 0)
|
||||
{
|
||||
SelectedRow = UsedDataGridView.SelectedRows[0].Index;
|
||||
}
|
||||
|
||||
// If the selected row is not the last row, then move it down
|
||||
int usedRows = 0;
|
||||
|
||||
for (int i = 0; i < UsedDataGridView.Rows.Count; i++)
|
||||
{
|
||||
if (UsedDataGridView.Rows[i].Cells[0].Value == null)
|
||||
{
|
||||
usedRows = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (SelectedRow < usedRows - 1)
|
||||
{
|
||||
string rowSelected = UsedDataGridView.Rows[SelectedRow].Cells[1].Value.ToString(); // Value of the selected row
|
||||
string rowBelow = UsedDataGridView.Rows[SelectedRow + 1].Cells[1].Value.ToString(); // Value about of the selected row
|
||||
|
||||
string folderSelected = "";
|
||||
string fileSelected = "";
|
||||
string fileBelow = "";
|
||||
|
||||
foreach (string folder in Directory.GetDirectories(DataPath))
|
||||
{
|
||||
if (folder.EndsWith((SelectedDataGridViewIndex + 1).ToString()))
|
||||
{
|
||||
folderSelected = folder;
|
||||
}
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(folderSelected))
|
||||
{
|
||||
foreach (string file in Directory.GetFiles(folderSelected))
|
||||
{
|
||||
if (Path.GetFileNameWithoutExtension(file) == rowSelected)
|
||||
{
|
||||
fileSelected = file;
|
||||
}
|
||||
|
||||
if (Path.GetFileNameWithoutExtension(file) == rowBelow)
|
||||
{
|
||||
fileBelow = file;
|
||||
}
|
||||
}
|
||||
|
||||
File.Move(fileSelected, fileSelected.Remove(fileSelected.LastIndexOf("\\") + 1) + "00" + Path.GetFileName(fileSelected).Remove(0, Path.GetFileName(fileSelected).IndexOf(" ")));
|
||||
|
||||
if (SelectedRow - 1 < 10)
|
||||
{
|
||||
File.Move(fileBelow, fileBelow.Remove(fileBelow.LastIndexOf("\\") + 1) + "0" + (SelectedRow + 1).ToString() + Path.GetFileName(fileBelow).Remove(0, Path.GetFileName(fileBelow).IndexOf(" ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
File.Move(fileBelow, fileBelow.Remove(fileBelow.LastIndexOf("\\") + 1) + (SelectedRow + 1).ToString() + Path.GetFileName(fileBelow).Remove(0, Path.GetFileName(fileBelow).IndexOf(" ")));
|
||||
}
|
||||
|
||||
if (SelectedRow < 10)
|
||||
{
|
||||
File.Move(fileSelected.Remove(fileSelected.LastIndexOf("\\") + 1) + "00" + Path.GetFileName(fileSelected).Remove(0, Path.GetFileName(fileSelected).IndexOf(" ")), fileSelected.Remove(fileSelected.LastIndexOf("\\") + 1) + "0" + (SelectedRow + 2).ToString() + Path.GetFileName(fileSelected).Remove(0, Path.GetFileName(fileSelected).IndexOf(" ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
File.Move(fileSelected.Remove(fileSelected.LastIndexOf("\\") + 1) + "00" + Path.GetFileName(fileSelected).Remove(0, Path.GetFileName(fileSelected).IndexOf(" ")), fileSelected.Remove(fileSelected.LastIndexOf("\\") + 1) + (SelectedRow + 2).ToString() + Path.GetFileName(fileSelected).Remove(0, Path.GetFileName(fileSelected).IndexOf(" ")));
|
||||
}
|
||||
|
||||
UpdateDisplay = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
116
TabControlsWithDataGridViews/MoveTab.cs
Normal file
116
TabControlsWithDataGridViews/MoveTab.cs
Normal file
@ -0,0 +1,116 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Eugen.ESystem.Windows.Forms
|
||||
{
|
||||
internal class MoveTab
|
||||
{
|
||||
/// <summary>
|
||||
/// Set the Data directory path
|
||||
/// </summary>
|
||||
public string DataPath { private get; set; } // Data directory
|
||||
|
||||
/// <summary>
|
||||
/// Set or get the title of 'TabPage'
|
||||
/// </summary>
|
||||
public string TabTitle { set; get; } // Title of the TabPage
|
||||
|
||||
/// <summary>
|
||||
/// Set or get the current 'TabControl'
|
||||
/// </summary>
|
||||
public TabControl DynamicTabControl { set; get; } // Current TabControl
|
||||
|
||||
/// <summary>
|
||||
/// Set or get the current tab index
|
||||
/// </summary>
|
||||
public int CurrentTabIndex { get; set; } // Index of the current tabPage
|
||||
|
||||
/// <summary>
|
||||
/// Set or get the current tab name
|
||||
/// </summary>
|
||||
public string CurrentTabName { get; set; } // Name of the current tabPagel
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether the display needs to be updated or not
|
||||
/// </summary>
|
||||
public bool UpdateDisplay { get; private set; } // Specifies whether the display is updated or not
|
||||
|
||||
List<string> folders = new List<string>();
|
||||
string currentFolder = "";
|
||||
string destinationFolder = "";
|
||||
|
||||
public void Left()
|
||||
{
|
||||
UpdateDisplay = false;
|
||||
|
||||
if (CurrentTabIndex > 0)
|
||||
{
|
||||
folders = GetFolders(DataPath);
|
||||
|
||||
for (int i = 0; i < folders.Count; i++)
|
||||
{
|
||||
if (i == CurrentTabIndex)
|
||||
{
|
||||
currentFolder = folders[i];
|
||||
destinationFolder = folders[i - 1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
string tempFolder = currentFolder + "###";
|
||||
Directory.Move(destinationFolder, tempFolder);
|
||||
Directory.Move(currentFolder, destinationFolder);
|
||||
Directory.Move(tempFolder, currentFolder);
|
||||
|
||||
UpdateDisplay = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void Right()
|
||||
{
|
||||
UpdateDisplay = false;
|
||||
|
||||
if (CurrentTabIndex < DynamicTabControl.TabCount)
|
||||
{
|
||||
folders = GetFolders(DataPath);
|
||||
|
||||
for (int i = 0; i < folders.Count; i++)
|
||||
{
|
||||
if (i == CurrentTabIndex)
|
||||
{
|
||||
currentFolder = folders[i];
|
||||
destinationFolder = folders[i + 1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
string tempFolder = currentFolder + "###";
|
||||
Directory.Move(destinationFolder, tempFolder);
|
||||
Directory.Move(currentFolder, destinationFolder);
|
||||
Directory.Move(tempFolder, currentFolder);
|
||||
|
||||
UpdateDisplay = true;
|
||||
}
|
||||
}
|
||||
|
||||
private List<string> GetFolders(string dataPath)
|
||||
{
|
||||
List<string> folders = Directory.GetDirectories(dataPath).ToList<string>();
|
||||
|
||||
for (int i = 0; i < folders.Count; i++)
|
||||
{
|
||||
if (!folders[i].Remove(0, folders[i].LastIndexOf("\\") + 1).StartsWith(TabTitle))
|
||||
{
|
||||
folders.Remove(folders[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return folders;
|
||||
}
|
||||
}
|
||||
}
|
||||
63
TabControlsWithDataGridViews/Properties/AppResources.Designer.cs
generated
Normal file
63
TabControlsWithDataGridViews/Properties/AppResources.Designer.cs
generated
Normal file
@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Eugen.ESystem.Windows.Forms.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||
/// </summary>
|
||||
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class AppResources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal AppResources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Eugen.ESystem.Windows.Forms.Properties.AppResources", typeof(AppResources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
101
TabControlsWithDataGridViews/Properties/AppResources.resx
Normal file
101
TabControlsWithDataGridViews/Properties/AppResources.resx
Normal file
@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
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">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</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.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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
63
TabControlsWithDataGridViews/Properties/AppResources_de.Designer.cs
generated
Normal file
63
TabControlsWithDataGridViews/Properties/AppResources_de.Designer.cs
generated
Normal file
@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Eugen.ESystem.Windows.Forms.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||
/// </summary>
|
||||
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class AppResources_de {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal AppResources_de() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Eugen.ESystem.Windows.Forms.Properties.AppResources_de", typeof(AppResources_de).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
101
TabControlsWithDataGridViews/Properties/AppResources_de.resx
Normal file
101
TabControlsWithDataGridViews/Properties/AppResources_de.resx
Normal file
@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
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">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</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.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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
63
TabControlsWithDataGridViews/Properties/AppResources_en.Designer.cs
generated
Normal file
63
TabControlsWithDataGridViews/Properties/AppResources_en.Designer.cs
generated
Normal file
@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Eugen.ESystem.Windows.Forms.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||
/// </summary>
|
||||
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class AppResources_en {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal AppResources_en() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Eugen.ESystem.Windows.Forms.Properties.AppResources_en", typeof(AppResources_en).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
101
TabControlsWithDataGridViews/Properties/AppResources_en.resx
Normal file
101
TabControlsWithDataGridViews/Properties/AppResources_en.resx
Normal file
@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
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">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</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.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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
35
TabControlsWithDataGridViews/Properties/AssemblyInfo.cs
Normal file
35
TabControlsWithDataGridViews/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,35 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||
// die einer Assembly zugeordnet sind.
|
||||
[assembly: AssemblyTitle("TabControlsWithDataGridViews")]
|
||||
[assembly: AssemblyDescription("Creates and manages a 'TabControl' with 'TabPages' and 'DataGridViews'")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("TabControlWithDataGridViews")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2024 by Eugen Höglinger")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
|
||||
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
|
||||
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||
[assembly: Guid("a4b2147b-532c-474c-bfba-d4ab7e6e820e")]
|
||||
|
||||
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
//
|
||||
// Hauptversion
|
||||
// Nebenversion
|
||||
// Buildnummer
|
||||
// Revision
|
||||
//
|
||||
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||
// indem Sie "*" wie unten gezeigt eingeben:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
620
TabControlsWithDataGridViews/TabControlWithDataGridView.cs
Normal file
620
TabControlsWithDataGridViews/TabControlWithDataGridView.cs
Normal file
@ -0,0 +1,620 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Eugen.ESystem.Windows.Forms
|
||||
{
|
||||
internal class TabControlWithDataGridView
|
||||
{
|
||||
/// <summary>
|
||||
/// Set or get the max. number of tabs
|
||||
/// </summary>
|
||||
public int MaxNoOfTabs { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Set or get the Data directory path
|
||||
/// </summary>
|
||||
public string DataPath { get; set; } // Data directory
|
||||
|
||||
/// <summary>
|
||||
/// The file extension you are looking for, e.g. .mp3
|
||||
/// </summary>
|
||||
public string Extension { set; get; } // File extension
|
||||
|
||||
/// <summary>
|
||||
/// Set or get the 'Tab' name
|
||||
/// </summary>
|
||||
public string TabName { get; set; } // Basic tab name (name without number)
|
||||
|
||||
/// <summary>
|
||||
/// Set or get the current 'TabControl'
|
||||
/// </summary>
|
||||
public TabControl DynamicTabControl { set; get; } // Current TabControl
|
||||
|
||||
/// <summary>
|
||||
/// Set or get the 'TabControl' width
|
||||
/// </summary>
|
||||
public int TabControlWidth { set; get; } // The 'TabControl' width
|
||||
|
||||
/// <summary>
|
||||
/// Set or get the 'TabControl' hight
|
||||
/// </summary>
|
||||
public int TabControlHeight { set; get; } // The 'TabControl' hight
|
||||
|
||||
/// <summary>
|
||||
/// Set or get the 'DataGridView' back color
|
||||
/// </summary>
|
||||
public Color DataGridViewBackColor { set; get; } // The 'DataGridView' back color
|
||||
|
||||
/// <summary>
|
||||
/// Set or get the 'DataGridView' fore color
|
||||
/// </summary>
|
||||
public Color DataGridViewForeColor { set; get; } // The 'DataGridView' fore color
|
||||
|
||||
/// <summary>
|
||||
/// Set or get the 'DataGridView' font
|
||||
/// </summary>
|
||||
public Font DataGridViewFont { set; get; } // The 'DataGridView' font
|
||||
|
||||
/// <summary>
|
||||
/// Set or get the title of 'TabPage'
|
||||
/// </summary>
|
||||
public string TabTitle { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// Set or get the Title of Column 1
|
||||
/// </summary>
|
||||
public string Column1Title { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// Set or get the Title of Column 2
|
||||
/// </summary>
|
||||
public string Column2Title { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// Set or get the title of the move to buttons
|
||||
/// </summary>
|
||||
public string MoveToButtonTitle { set; get; }
|
||||
|
||||
private Control.ControlCollection Controls { get; set; }
|
||||
private List<string[]> DataGridViewValues { get; set; }
|
||||
private List<string[]> PreviousDataGridViewValues { get; set; }
|
||||
private List<string[]> NextDataGridViewValues { get; set; }
|
||||
private TabPage CurrentTabPage { get; set; }
|
||||
private int CurrentTabPageIndex { get; set; }
|
||||
private int SelectedDataGridViewIndex { get; set; }
|
||||
private int SelectedRow { get; set; }
|
||||
private List<List<string[]>> AllFiles { get; set; }
|
||||
|
||||
int maxNumbersOfTabPages = 12;
|
||||
|
||||
#region Public Methodes
|
||||
/// <summary>
|
||||
/// Creates a tab for each directory in the root directory
|
||||
/// </summary>
|
||||
public void CreatesATabForEachDirectory()
|
||||
{
|
||||
for (int i = 0; i < Directory.GetDirectories(DataPath).Length - 1; i++)
|
||||
{
|
||||
AddTabPageWithDataGridViewAndButton(); // Add an additional 'TabPage' with a 'DataGridView'
|
||||
}
|
||||
}
|
||||
|
||||
public void InitialFillingOfTheTables(int setTab)
|
||||
{
|
||||
List<List<string[]>> fileList = ReadFromDirectory(Extension); // Read files from directory
|
||||
|
||||
// Only file with the defined extension are allowed
|
||||
foreach (var item in fileList)
|
||||
{
|
||||
for (int i = 0; i < item.Count; i++)
|
||||
{
|
||||
if (Path.GetExtension(item[i].GetValue(1).ToString()) != Extension)
|
||||
{
|
||||
fileList.Remove(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DataGridView dataGridView = DynamicTabControl.SelectedTab.Controls.OfType<DataGridView>().FirstOrDefault(); // Chang the control to the first dataGridView
|
||||
|
||||
for (int i = 0; i < DynamicTabControl.TabCount; i++)
|
||||
{
|
||||
DynamicTabControl.SelectedIndex = i; //Set the selected 'TabPage' as current 'TabPage'
|
||||
dataGridView = DynamicTabControl.SelectedTab.Controls.OfType<DataGridView>().FirstOrDefault(); // Chang the control to the current dataGridView
|
||||
|
||||
WriteDataGridView(dataGridView, fileList[i]);
|
||||
}
|
||||
|
||||
// Actavate the first 'TabPage'
|
||||
DynamicTabControl.SelectedIndex = setTab; //Set the selected 'TabPage' as current 'TabPage'
|
||||
dataGridView = DynamicTabControl.SelectedTab.Controls.OfType<DataGridView>().FirstOrDefault(); // Chang the control to the current dataGridView
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Moves the selected row up one row
|
||||
/// </summary>
|
||||
public void RowMoveUp()
|
||||
{
|
||||
DataGridView dataGridView = DynamicTabControl.SelectedTab.Controls.OfType<DataGridView>().FirstOrDefault(); // Chang the control to the first dataGridView
|
||||
|
||||
MoveRow mvr = new MoveRow();
|
||||
mvr.DataPath = DataPath;
|
||||
mvr.UsedDataGridView = dataGridView;
|
||||
mvr.SelectedDataGridViewIndex = Convert.ToInt32(dataGridView.Name.Replace("dataGridView", ""));
|
||||
mvr.Up();
|
||||
|
||||
//The display may only be updated, if a row has been moved
|
||||
if (mvr.UpdateDisplay)
|
||||
{
|
||||
// Read the current files of the root folder into the DataGridViews again
|
||||
InitialFillingOfTheTables(DynamicTabControl.SelectedIndex);
|
||||
|
||||
dataGridView.Rows[mvr.SelectedRow - 1].Selected = true; // Select the row moved upwards
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Moves the selected row down one row
|
||||
/// </summary>
|
||||
public void RowMoveDown()
|
||||
{
|
||||
DataGridView dataGridView = DynamicTabControl.SelectedTab.Controls.OfType<DataGridView>().FirstOrDefault(); // Chang the control to the first dataGridView
|
||||
|
||||
MoveRow mvr = new MoveRow();
|
||||
mvr.DataPath = DataPath;
|
||||
mvr.UsedDataGridView = dataGridView;
|
||||
mvr.SelectedDataGridViewIndex = Convert.ToInt32(dataGridView.Name.Replace("dataGridView", ""));
|
||||
mvr.Down();
|
||||
|
||||
// The display may only be updated, if a row has been moved
|
||||
if (mvr.UpdateDisplay)
|
||||
{
|
||||
// Read the current files of the root folder into the DataGridViews again
|
||||
InitialFillingOfTheTables(DynamicTabControl.SelectedIndex);
|
||||
|
||||
dataGridView.Rows[mvr.SelectedRow + 1].Selected = true; // Select the row moved upwards
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new 'TabControl' and set its properties
|
||||
/// </summary>
|
||||
/// <param name="controls">A form control</param>
|
||||
public void CreatingTabControl(Control.ControlCollection controls)
|
||||
{
|
||||
TabControl dynamicTabControl = new TabControl();
|
||||
dynamicTabControl.Name = "DynamicTabControl";
|
||||
dynamicTabControl.Width = TabControlWidth - 25;
|
||||
dynamicTabControl.Height = TabControlHeight;
|
||||
dynamicTabControl.BackColor = DataGridViewBackColor;
|
||||
dynamicTabControl.ForeColor = DataGridViewForeColor;
|
||||
dynamicTabControl.Font = DataGridViewFont;
|
||||
controls.Add(dynamicTabControl); // Add TabControl to Form
|
||||
|
||||
Controls = controls; // Speichert das Control
|
||||
|
||||
DynamicTabControl = dynamicTabControl; // Speichert das aktuelle TabControl
|
||||
|
||||
AddTabPageWithDataGridViewAndButton(); // Add TabPage with DataGridView to TabControl
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add a 'TabPage' with a 'DataGridView'
|
||||
/// </summary>
|
||||
public void AddTabPageWithDataGridViewAndButton()
|
||||
{
|
||||
int numberOfTabs = DynamicTabControl.TabCount;
|
||||
|
||||
if (numberOfTabs < maxNumbersOfTabPages)
|
||||
{
|
||||
AddMoveToButton(Controls, numberOfTabs); // Add Button to UserControl
|
||||
AddTabPage(DynamicTabControl, numberOfTabs); // Add TabPage to TabControl
|
||||
AddDataGridViewTable(Controls, DynamicTabControl, numberOfTabs); // Add a separate DataGridView for each TabPage
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes the last 'TabPage'
|
||||
/// </summary>
|
||||
public void RemoveTabPageAndButton()
|
||||
{
|
||||
// Removes the last 'TabControl' of all
|
||||
|
||||
// There must be at least 2 'TabControl', so that one can be removed
|
||||
if (DynamicTabControl.TabCount > 1)
|
||||
{
|
||||
TabPage tab = DynamicTabControl.TabPages[DynamicTabControl.TabCount - 1];
|
||||
|
||||
// There must be at least 2 'TabControl', so that one can be removed
|
||||
if (DynamicTabControl.TabCount > 1)
|
||||
{
|
||||
// As long as the 'TabControl' (DataGridView) contains data, it cannot be deleted
|
||||
if (IsDataGridViewEmpty(tab.Controls.OfType<DataGridView>().FirstOrDefault()))
|
||||
{
|
||||
DynamicTabControl.TabPages.Remove(tab); // Removes the 'tabPage'
|
||||
|
||||
// Removes the associated button
|
||||
for (int i = 0; i < Controls.Count; i++)
|
||||
{
|
||||
if (Controls[i].Name == "buttonMoveTo" + (DynamicTabControl.TabCount).ToString())
|
||||
{
|
||||
Controls.Remove(Controls[i]);
|
||||
|
||||
// If there is only one tab, hide the first 'MoveTo' button
|
||||
if (Controls[i - 1].Name == "buttonMoveTo0")
|
||||
{
|
||||
Controls[i - 1].Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Controls[i - 1].Visible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Löschen nicht möglich!\n\r\n\rTab kann nicht gelöscht werden,\n\rweil die Tabelle noch Daten enthälten!\n\r");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes the selectet 'TabPage'
|
||||
/// </summary>
|
||||
public void RemoveSelectedTabPageAndButton()
|
||||
{
|
||||
// Removes the selected 'TabControl'
|
||||
|
||||
// There must be at least 2 'TabControl', so that one can be removed
|
||||
if (DynamicTabControl.TabCount > 1)
|
||||
{
|
||||
// As long as the 'TabControl' (DataGridView) contains data, it cannot be deleted
|
||||
if (IsDataGridViewEmpty(DynamicTabControl.SelectedTab.Controls.OfType<DataGridView>().FirstOrDefault()))
|
||||
{
|
||||
DynamicTabControl.TabPages.Remove(DynamicTabControl.SelectedTab);
|
||||
|
||||
// Removes the associated button
|
||||
for (int i = 0; i < Controls.Count; i++)
|
||||
{
|
||||
if (Controls[i].Name == "buttonMoveTo" + (DynamicTabControl.TabCount).ToString())
|
||||
{
|
||||
Controls.Remove(Controls[i]);
|
||||
|
||||
// If there is only one tab, hide the first 'MoveTo' button
|
||||
if (Controls[i - 1].Name == "buttonMoveTo0")
|
||||
{
|
||||
Controls[i - 1].Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Controls[i - 1].Visible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Löschen nicht möglich!\n\r\n\rTab kann nicht gelöscht werden,\n\rweil die Tabelle noch Daten enthälten!\n\r");
|
||||
}
|
||||
|
||||
RenameTabs(DynamicTabControl); // Rename all 'TabControl' so that they are numbered consecutively again
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Moves the selected 'TabPage' to the left and renumber/rename the others
|
||||
/// </summary>
|
||||
public void MoveTabPageToLeft()
|
||||
{
|
||||
MoveTab moveTab = new MoveTab();
|
||||
moveTab.DataPath = DataPath;
|
||||
moveTab.TabTitle = TabTitle;
|
||||
moveTab.CurrentTabIndex = DynamicTabControl.SelectedIndex;
|
||||
moveTab.CurrentTabName = DynamicTabControl.SelectedTab.Name;
|
||||
moveTab.Left();
|
||||
|
||||
//The display may only be updated, if a tabPage has been moved
|
||||
if (moveTab.UpdateDisplay)
|
||||
{
|
||||
// Read the current files of the root folder into the DataGridViews again
|
||||
InitialFillingOfTheTables(DynamicTabControl.SelectedIndex);
|
||||
|
||||
DynamicTabControl.SelectedIndex = DynamicTabControl.SelectedIndex - 1;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Moves the selected 'TabPage' to the right and renumber/rename the others
|
||||
/// </summary>
|
||||
public void MoveTabPageToRight()
|
||||
{
|
||||
MoveTab moveTab = new MoveTab();
|
||||
moveTab.DataPath = DataPath;
|
||||
moveTab.DynamicTabControl = DynamicTabControl;
|
||||
moveTab.TabTitle = TabTitle;
|
||||
moveTab.CurrentTabIndex = DynamicTabControl.SelectedIndex;
|
||||
moveTab.CurrentTabName = DynamicTabControl.SelectedTab.Name;
|
||||
moveTab.Right();
|
||||
|
||||
//The display may only be updated, if a tabPage has been moved
|
||||
if (moveTab.UpdateDisplay)
|
||||
{
|
||||
// Read the current files of the root folder into the DataGridViews again
|
||||
InitialFillingOfTheTables(DynamicTabControl.SelectedIndex);
|
||||
|
||||
DynamicTabControl.SelectedIndex = DynamicTabControl.SelectedIndex + 1;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Private Methodes
|
||||
private List<List<string[]>> ReadFromDirectory(string extension)
|
||||
{
|
||||
// Read all directories from the root directory
|
||||
string[] directories = Directory.GetDirectories(DataPath);
|
||||
|
||||
// Creates a list of all files in all directories
|
||||
List<List<string[]>> allFiles = new List<List<string[]>>();
|
||||
|
||||
for (int i = 0; i < directories.Length; i++)
|
||||
{
|
||||
string[] filesWithPath = Directory.GetFiles(directories[i]); // Read all files from a directory
|
||||
|
||||
//filesInTable.Clear();
|
||||
List<string[]> filesInTable = new List<string[]>(); // Creates a list of all files in all directories
|
||||
|
||||
for (int j = 0; j < filesWithPath.Length; j++)
|
||||
{
|
||||
string[] files = new string[2]; // Files per row
|
||||
files[0] = Path.GetFileName(filesWithPath[j]).Remove(Path.GetFileName(filesWithPath[j]).IndexOf(" "));
|
||||
files[1] = Path.GetFileName(filesWithPath[j]);
|
||||
|
||||
if (Path.GetExtension(filesWithPath[j]) == Extension)
|
||||
{
|
||||
filesInTable.Add(files);
|
||||
}
|
||||
}
|
||||
|
||||
allFiles.Add(filesInTable); // Adds all files of a directory to the list
|
||||
}
|
||||
|
||||
AllFiles = allFiles;
|
||||
|
||||
return allFiles;
|
||||
}
|
||||
|
||||
private void AddTabPage(TabControl dynamicTabControl, int count)
|
||||
{
|
||||
TabPage tabPage = new TabPage();
|
||||
|
||||
tabPage.Name = "tabPage" + count.ToString();
|
||||
|
||||
if (String.IsNullOrEmpty(TabTitle))
|
||||
{
|
||||
tabPage.Text = "Tab " + (count + 1).ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
tabPage.Text = TabTitle + (count + 1).ToString();
|
||||
}
|
||||
|
||||
dynamicTabControl.TabPages.Add(tabPage);
|
||||
}
|
||||
|
||||
private void AddDataGridViewTable(Control.ControlCollection Controls, TabControl dynamicTabControl, int number)
|
||||
{
|
||||
DataGridView dataGridView = new DataGridView();
|
||||
|
||||
Controls.Add(dataGridView);
|
||||
|
||||
dataGridView.ColumnCount = 2;
|
||||
dataGridView.Name = "dataGridView" + number.ToString();
|
||||
dataGridView.Columns[0].Name = Column1Title;
|
||||
dataGridView.Columns[1].Name = Column2Title;
|
||||
dataGridView.Columns[0].Width = 50;
|
||||
dataGridView.Columns[1].Width = TabControlWidth - 126;
|
||||
dataGridView.ScrollBars = ScrollBars.Both;
|
||||
dataGridView.Dock = DockStyle.Fill;
|
||||
dataGridView.Rows.Add();
|
||||
|
||||
dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridView.MultiSelect = false;
|
||||
|
||||
dynamicTabControl.TabPages[number].Controls.Add(dataGridView);
|
||||
}
|
||||
|
||||
private void AddMoveToButton(Control.ControlCollection Controls, int number)
|
||||
{
|
||||
Button moveToButton = new Button();
|
||||
|
||||
if (number < maxNumbersOfTabPages)
|
||||
{
|
||||
moveToButton.Name = "buttonMoveTo" + number.ToString();
|
||||
moveToButton.Location = new System.Drawing.Point(TabControlWidth + 80 - 78 - 25, 10 + 58 + (number + 1) * 29 - 29);
|
||||
moveToButton.Size = new System.Drawing.Size(100, 23);
|
||||
|
||||
if (String.IsNullOrEmpty(MoveToButtonTitle))
|
||||
{
|
||||
moveToButton.Text = "Move to Tab " + (number + 1).ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
moveToButton.Text = MoveToButtonTitle + (number + 1).ToString();
|
||||
}
|
||||
}
|
||||
|
||||
Controls.Add(moveToButton);
|
||||
|
||||
// If there is only one tab, hide the first 'MoveTo' button
|
||||
int numberFirstButton = 0;
|
||||
|
||||
for (int i = 0; i < Controls.Count; i++)
|
||||
{
|
||||
if (Controls[i].Name == "buttonMoveTo0")
|
||||
{
|
||||
numberFirstButton = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (number == 0)
|
||||
{
|
||||
Controls[numberFirstButton].Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Controls[numberFirstButton].Visible = true;
|
||||
}
|
||||
|
||||
// Executed when a 'MoveTo' button is selected
|
||||
moveToButton.Click += (sender, args) =>
|
||||
{
|
||||
MoveTo(number);
|
||||
};
|
||||
}
|
||||
|
||||
private void MoveTo(int number)
|
||||
{
|
||||
if (number != DynamicTabControl.SelectedIndex)
|
||||
{
|
||||
DataGridView dataGridView = DynamicTabControl.SelectedTab.Controls.OfType<DataGridView>().FirstOrDefault(); // Chang the control to the first dataGridView
|
||||
|
||||
Move move = new Move();
|
||||
move.DataPath = DataPath;
|
||||
move.Extension = Extension;
|
||||
move.UsedDataGridView = dataGridView;
|
||||
move.SelectedDataGridViewIndex = SelectedDataGridViewIndex;
|
||||
move.TabTitle = TabTitle;
|
||||
move.DynamicTabControl = DynamicTabControl;
|
||||
move.ToTab(number);
|
||||
|
||||
//The display may only be updated, if a row has been moved
|
||||
if (move.UpdateDisplay)
|
||||
{
|
||||
// Read the current files of the root folder into the DataGridViews again
|
||||
InitialFillingOfTheTables(number);
|
||||
|
||||
dataGridView = DynamicTabControl.SelectedTab.Controls.OfType<DataGridView>().FirstOrDefault(); // Chang the control to the first dataGridView
|
||||
|
||||
dataGridView.Rows[dataGridView.Rows.Count - 2].Selected = true; // Select the row moved upwards
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void RenameTabs(TabControl dynamicTabControl)
|
||||
{
|
||||
// Rename all 'TabControl' so that they are numbered consecutively again
|
||||
for (int i = 0; i < dynamicTabControl.TabCount; i++)
|
||||
{
|
||||
if (String.IsNullOrEmpty(TabTitle))
|
||||
{
|
||||
dynamicTabControl.TabPages[i].Name = "tabPage" + i.ToString();
|
||||
dynamicTabControl.TabPages[i].Text = "Tab " + (i + 1).ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
dynamicTabControl.TabPages[i].Name = "tabPage" + i.ToString();
|
||||
dynamicTabControl.TabPages[i].Text = TabTitle + (i + 1).ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsDataGridViewEmpty(DataGridView dataGridView)
|
||||
{
|
||||
bool isEmpty = true;
|
||||
|
||||
if (dataGridView.Rows.Count == 0)
|
||||
{
|
||||
isEmpty = true; //Wenn es keine Zeilen gibt, dann ist die Tabelle leer
|
||||
}
|
||||
else
|
||||
{
|
||||
//Wenn es Zeilen gibt ...
|
||||
for (int i = 0; i < dataGridView.Rows.Count; i++)
|
||||
{
|
||||
for (int j = 0; j < dataGridView.Columns.Count; j++)
|
||||
{
|
||||
if (dataGridView[j, i].Value != null)
|
||||
{
|
||||
isEmpty = false; //... und die Zelle nicht leer ist, dann ist die Tabelle nicht leer
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return isEmpty;
|
||||
}
|
||||
|
||||
private TabControl DeterminePreviousControl(TabControl dynamicTabControl)
|
||||
{
|
||||
dynamicTabControl.SelectedIndex = dynamicTabControl.SelectedIndex - 1;
|
||||
return dynamicTabControl;
|
||||
}
|
||||
|
||||
private TabControl DetermineNextControl(TabControl dynamicTabControl)
|
||||
{
|
||||
dynamicTabControl.SelectedIndex = dynamicTabControl.SelectedIndex + 1;
|
||||
return dynamicTabControl;
|
||||
}
|
||||
|
||||
private List<string[]> DetermineDataGridViewValues(TabControl dynamicTabControl, DataGridView dataGridView)
|
||||
{
|
||||
string[] rowValues = new string[2];
|
||||
List<string[]> dataGridViewValues = new List<string[]>();
|
||||
|
||||
// Werte der DataGridview einlesen
|
||||
for (int i = 0; i < dataGridView.Rows.Count - 1; i++)
|
||||
{
|
||||
if (dataGridView[0, i].Value == null)
|
||||
{
|
||||
rowValues[0] = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
rowValues[0] = dataGridView[0, i].Value.ToString();
|
||||
}
|
||||
|
||||
if (dataGridView[0, i].Value == null)
|
||||
{
|
||||
rowValues[1] = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
rowValues[1] = dataGridView[1, i].Value.ToString();
|
||||
}
|
||||
|
||||
dataGridViewValues.Add(rowValues);
|
||||
}
|
||||
|
||||
return dataGridViewValues;
|
||||
}
|
||||
|
||||
private void WriteDataGridView(DataGridView dataGridView, List<string[]> dataGridViewValues)
|
||||
{
|
||||
dataGridView.Rows.Clear(); // Delete all existing values
|
||||
|
||||
for (int i = 0; i < dataGridViewValues.Count; i++)
|
||||
{
|
||||
dataGridView.Rows.Add();
|
||||
dataGridView[0, i].Value = dataGridViewValues[i].GetValue(0);
|
||||
dataGridView[1, i].Value = dataGridViewValues[i].GetValue(1).ToString().Remove(dataGridViewValues[i].GetValue(1).ToString().LastIndexOf("."));
|
||||
}
|
||||
|
||||
dataGridView.Refresh();
|
||||
}
|
||||
|
||||
private void RenameFolders(string folder1, string folder2)
|
||||
{
|
||||
Directory.Move(DataPath + "\\" + folder1, DataPath + "\\" + folder1 + "_temp"); // Rename the 'folder1' to a temporary folder, so the name is free
|
||||
Directory.Move(DataPath + "\\" + folder2, DataPath + "\\" + folder1); // Rename 'folder2' in 'folder1'
|
||||
Directory.Move(DataPath + "\\" + folder1 + "_temp", DataPath + "\\" + folder2); // Rename the temporary folder to 'folder2'
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
156
TabControlsWithDataGridViews/TabControlsWithDataGridViews.Designer.cs
generated
Normal file
156
TabControlsWithDataGridViews/TabControlsWithDataGridViews.Designer.cs
generated
Normal file
@ -0,0 +1,156 @@
|
||||
namespace Eugen.ESystem.Windows.Forms
|
||||
{
|
||||
partial class TabControlsWithDataGridViews
|
||||
{
|
||||
/// <summary>
|
||||
/// Erforderliche Designervariable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Verwendete Ressourcen bereinigen.
|
||||
/// </summary>
|
||||
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Vom Komponenten-Designer generierter Code
|
||||
|
||||
/// <summary>
|
||||
/// Erforderliche Methode für die Designerunterstützung.
|
||||
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.buttonAddTab = new System.Windows.Forms.Button();
|
||||
this.buttonRemoveTab = new System.Windows.Forms.Button();
|
||||
this.buttonRemoveSelectedTab = new System.Windows.Forms.Button();
|
||||
this.buttonMoveTabToLeft = new System.Windows.Forms.Button();
|
||||
this.buttonMoveTabToRight = new System.Windows.Forms.Button();
|
||||
this.panelButton = new System.Windows.Forms.Panel();
|
||||
this.buttonMoveUp = new System.Windows.Forms.Button();
|
||||
this.buttonMoveDown = new System.Windows.Forms.Button();
|
||||
this.panelButton.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// buttonAddTab
|
||||
//
|
||||
this.buttonAddTab.Location = new System.Drawing.Point(3, 3);
|
||||
this.buttonAddTab.Name = "buttonAddTab";
|
||||
this.buttonAddTab.Size = new System.Drawing.Size(125, 23);
|
||||
this.buttonAddTab.TabIndex = 0;
|
||||
this.buttonAddTab.Text = "Add Tab";
|
||||
this.buttonAddTab.UseVisualStyleBackColor = true;
|
||||
this.buttonAddTab.Click += new System.EventHandler(this.buttonAddTab_Click);
|
||||
//
|
||||
// buttonRemoveTab
|
||||
//
|
||||
this.buttonRemoveTab.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.buttonRemoveTab.Location = new System.Drawing.Point(134, 3);
|
||||
this.buttonRemoveTab.Name = "buttonRemoveTab";
|
||||
this.buttonRemoveTab.Size = new System.Drawing.Size(125, 23);
|
||||
this.buttonRemoveTab.TabIndex = 1;
|
||||
this.buttonRemoveTab.Text = "Remove Tab";
|
||||
this.buttonRemoveTab.UseVisualStyleBackColor = true;
|
||||
this.buttonRemoveTab.Click += new System.EventHandler(this.buttonRemoveTab_Click);
|
||||
//
|
||||
// buttonRemoveSelectedTab
|
||||
//
|
||||
this.buttonRemoveSelectedTab.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.buttonRemoveSelectedTab.Location = new System.Drawing.Point(265, 3);
|
||||
this.buttonRemoveSelectedTab.Name = "buttonRemoveSelectedTab";
|
||||
this.buttonRemoveSelectedTab.Size = new System.Drawing.Size(125, 23);
|
||||
this.buttonRemoveSelectedTab.TabIndex = 2;
|
||||
this.buttonRemoveSelectedTab.Text = "Remove Selected Tab";
|
||||
this.buttonRemoveSelectedTab.UseVisualStyleBackColor = true;
|
||||
this.buttonRemoveSelectedTab.Click += new System.EventHandler(this.buttonRemoveSelectedTab_Click);
|
||||
//
|
||||
// buttonMoveTabToLeft
|
||||
//
|
||||
this.buttonMoveTabToLeft.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.buttonMoveTabToLeft.Location = new System.Drawing.Point(396, 3);
|
||||
this.buttonMoveTabToLeft.Name = "buttonMoveTabToLeft";
|
||||
this.buttonMoveTabToLeft.Size = new System.Drawing.Size(125, 23);
|
||||
this.buttonMoveTabToLeft.TabIndex = 3;
|
||||
this.buttonMoveTabToLeft.Text = "Move Tab To Left";
|
||||
this.buttonMoveTabToLeft.UseVisualStyleBackColor = true;
|
||||
this.buttonMoveTabToLeft.Click += new System.EventHandler(this.buttonMoveTabToLeft_Click);
|
||||
//
|
||||
// buttonMoveTabToRight
|
||||
//
|
||||
this.buttonMoveTabToRight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonMoveTabToRight.Location = new System.Drawing.Point(527, 3);
|
||||
this.buttonMoveTabToRight.Name = "buttonMoveTabToRight";
|
||||
this.buttonMoveTabToRight.Size = new System.Drawing.Size(125, 23);
|
||||
this.buttonMoveTabToRight.TabIndex = 4;
|
||||
this.buttonMoveTabToRight.Text = "Move Tab To Right";
|
||||
this.buttonMoveTabToRight.UseVisualStyleBackColor = true;
|
||||
this.buttonMoveTabToRight.Click += new System.EventHandler(this.buttonMoveTabToRight_Click);
|
||||
//
|
||||
// panelButton
|
||||
//
|
||||
this.panelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.panelButton.Controls.Add(this.buttonMoveTabToRight);
|
||||
this.panelButton.Controls.Add(this.buttonAddTab);
|
||||
this.panelButton.Controls.Add(this.buttonMoveTabToLeft);
|
||||
this.panelButton.Controls.Add(this.buttonRemoveTab);
|
||||
this.panelButton.Controls.Add(this.buttonRemoveSelectedTab);
|
||||
this.panelButton.Location = new System.Drawing.Point(0, 411);
|
||||
this.panelButton.Name = "panelButton";
|
||||
this.panelButton.Size = new System.Drawing.Size(655, 29);
|
||||
this.panelButton.TabIndex = 5;
|
||||
//
|
||||
// buttonMoveUp
|
||||
//
|
||||
this.buttonMoveUp.Location = new System.Drawing.Point(657, 3);
|
||||
this.buttonMoveUp.Name = "buttonMoveUp";
|
||||
this.buttonMoveUp.Size = new System.Drawing.Size(100, 23);
|
||||
this.buttonMoveUp.TabIndex = 6;
|
||||
this.buttonMoveUp.Text = "Move up";
|
||||
this.buttonMoveUp.UseVisualStyleBackColor = true;
|
||||
this.buttonMoveUp.Click += new System.EventHandler(this.buttonMoveUp_Click);
|
||||
//
|
||||
// buttonMoveDown
|
||||
//
|
||||
this.buttonMoveDown.Location = new System.Drawing.Point(657, 32);
|
||||
this.buttonMoveDown.Name = "buttonMoveDown";
|
||||
this.buttonMoveDown.Size = new System.Drawing.Size(100, 23);
|
||||
this.buttonMoveDown.TabIndex = 7;
|
||||
this.buttonMoveDown.Text = "Move down";
|
||||
this.buttonMoveDown.UseVisualStyleBackColor = true;
|
||||
this.buttonMoveDown.Click += new System.EventHandler(this.buttonMoveDown_Click);
|
||||
//
|
||||
// TabControlsWithDataGridViews
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.buttonMoveDown);
|
||||
this.Controls.Add(this.buttonMoveUp);
|
||||
this.Controls.Add(this.panelButton);
|
||||
this.MinimumSize = new System.Drawing.Size(760, 440);
|
||||
this.Name = "TabControlsWithDataGridViews";
|
||||
this.Size = new System.Drawing.Size(760, 440);
|
||||
this.Load += new System.EventHandler(this.TabControlsWithDataGridViews_Load);
|
||||
this.panelButton.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button buttonAddTab;
|
||||
private System.Windows.Forms.Button buttonRemoveTab;
|
||||
private System.Windows.Forms.Button buttonRemoveSelectedTab;
|
||||
private System.Windows.Forms.Button buttonMoveTabToLeft;
|
||||
private System.Windows.Forms.Button buttonMoveTabToRight;
|
||||
private System.Windows.Forms.Panel panelButton;
|
||||
private System.Windows.Forms.Button buttonMoveUp;
|
||||
private System.Windows.Forms.Button buttonMoveDown;
|
||||
}
|
||||
}
|
||||
241
TabControlsWithDataGridViews/TabControlsWithDataGridViews.cs
Normal file
241
TabControlsWithDataGridViews/TabControlsWithDataGridViews.cs
Normal file
@ -0,0 +1,241 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Eugen.ESystem.Windows.Forms
|
||||
{
|
||||
public partial class TabControlsWithDataGridViews : UserControl
|
||||
{
|
||||
#region Version und Copyright
|
||||
// Key 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, Key und Copyright setzen
|
||||
DllName = dllName;
|
||||
DllVersion = dllVersion;
|
||||
Copyright = copyright;
|
||||
}
|
||||
#endregion
|
||||
public TabControlsWithDataGridViews()
|
||||
{
|
||||
SetDllInfo();
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void TabControlsWithDataGridViews_Load(object sender, EventArgs e)
|
||||
{
|
||||
// Correct TabControlSize
|
||||
if (TabControlWidth < minWidth)
|
||||
{
|
||||
this.Width = minWidth;
|
||||
TabControlWidth = this.Width - 80;
|
||||
}
|
||||
else if (TabControlWidth > maxWidth)
|
||||
{
|
||||
this.Width = maxWidth;
|
||||
TabControlWidth = this.Width - 80;
|
||||
}
|
||||
|
||||
if (TabControlHeight < minHeight)
|
||||
{
|
||||
this.Height = minHeight;
|
||||
TabControlHeight = this.Height - 26;
|
||||
}
|
||||
else if (TabControlHeight > maxHeight)
|
||||
{
|
||||
this.Height = minHeight;
|
||||
TabControlHeight = this.Height - 26;
|
||||
}
|
||||
|
||||
// Set the max. number of tabs
|
||||
tcwdgv.MaxNoOfTabs = maxNoOfTabs;
|
||||
|
||||
// Set the control button location
|
||||
int controlButtonDistance = (panelButton.Width - (controlButtonWidth * 5) - 6) / 4 + controlButtonWidth; // X distance from the origin point of one button to the origin point of the next button
|
||||
buttonRemoveTab.Location = new System.Drawing.Point(controlButtonXDistance + controlButtonDistance, 3);
|
||||
buttonRemoveSelectedTab.Location = new System.Drawing.Point(controlButtonXDistance + 2 * controlButtonDistance, 3);
|
||||
buttonMoveTabToLeft.Location = new System.Drawing.Point(controlButtonXDistance + 2 + 3 * controlButtonDistance, 3);
|
||||
|
||||
tcwdgv.TabControlWidth = TabControlWidth; // The 'TabControl' width
|
||||
tcwdgv.TabControlHeight = TabControlHeight; // The 'TabControl' hight
|
||||
tcwdgv.TabTitle = TabTitle; // The title of a 'tabPage'
|
||||
tcwdgv.Column1Title = Column1Title; // The title of column 1
|
||||
tcwdgv.Column2Title = Column2Title; // The title of column 2
|
||||
tcwdgv.MoveToButtonTitle = MoveToButtonTitle; // The title of the 'Move to' buttons
|
||||
tcwdgv.CreatingTabControl(Controls); // Create a 'TabControl' and a 'TabPage' with a 'DataGridView'
|
||||
|
||||
if (String.IsNullOrEmpty(DataPath))
|
||||
{
|
||||
DataPath = "";
|
||||
}
|
||||
tcwdgv.DataPath = DataPath;
|
||||
|
||||
tcwdgv.Extension = Extension;
|
||||
|
||||
// Reads all files from the root directory and writes them to the tables
|
||||
tcwdgv.CreatesATabForEachDirectory(); // Creates a tab for each directory in the root directory
|
||||
tcwdgv.InitialFillingOfTheTables(0); // Fills the tables with the values
|
||||
}
|
||||
|
||||
TabControlWithDataGridView tcwdgv = new TabControlWithDataGridView();
|
||||
|
||||
int maxNoOfTabs = 12;
|
||||
int minWidth = 760;
|
||||
int maxWidth = 1200;
|
||||
int minHeight = 433;
|
||||
int maxHeight = 800;
|
||||
int controlButtonWidth = 130;
|
||||
int controlButtonXDistance = 3; // X-distance between the origin point of a button and the edge
|
||||
int tabButtonYDistance = 3; // Y-distance between the origin point of a button and the edge
|
||||
int tabButtonDistance = 29; // Y-distance from the origin point of one button to the origin point of the next button
|
||||
|
||||
int TabControlWidth { set; get; }
|
||||
int TabControlHeight { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// Root directory in which the data are located
|
||||
/// </summary>
|
||||
public static string DataPath { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// The file extension you are looking for, e.g. .mp3
|
||||
/// </summary>
|
||||
public static string Extension { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// Set or get the title of 'TabPage'
|
||||
/// </summary>
|
||||
public static string TabTitle { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// Set or get the title of 'DataGridView Column 1'
|
||||
/// </summary>
|
||||
public static string Column1Title { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// Set or get the title of 'DataGridView Column 2'
|
||||
/// </summary>
|
||||
public static string Column2Title { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// Set or get the title of the move to buttons
|
||||
/// </summary>
|
||||
public static string MoveToButtonTitle { set; get; }
|
||||
|
||||
private void buttonAddTab_Click(object sender, EventArgs e)
|
||||
{
|
||||
tcwdgv.AddTabPageWithDataGridViewAndButton(); // Add an additional 'TabPage' with a 'DataGridView'
|
||||
}
|
||||
|
||||
private void buttonRemoveTab_Click(object sender, EventArgs e)
|
||||
{
|
||||
tcwdgv.RemoveTabPageAndButton(); // Removes the last 'TabPage'
|
||||
}
|
||||
|
||||
private void buttonRemoveSelectedTab_Click(object sender, EventArgs e)
|
||||
{
|
||||
tcwdgv.RemoveSelectedTabPageAndButton(); // Removes the selected 'TabPage' and renumber/rename the others
|
||||
}
|
||||
|
||||
private void buttonMoveTabToLeft_Click(object sender, EventArgs e)
|
||||
{
|
||||
tcwdgv.MoveTabPageToLeft(); // Moves the selected 'TabPage' to the left and renumber/rename the others
|
||||
}
|
||||
|
||||
private void buttonMoveTabToRight_Click(object sender, EventArgs e)
|
||||
{
|
||||
tcwdgv.MoveTabPageToRight(); // Moves the selected 'TabPage' to the rigth and renumber/rename the others
|
||||
}
|
||||
|
||||
private void buttonMoveUp_Click(object sender, EventArgs e)
|
||||
{
|
||||
tcwdgv.RowMoveUp();
|
||||
}
|
||||
|
||||
private void buttonMoveDown_Click(object sender, EventArgs e)
|
||||
{
|
||||
tcwdgv.RowMoveDown();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{A4B2147B-532C-474C-BFBA-D4AB7E6E820E}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Eugen.ESystem.Windows.Forms</RootNamespace>
|
||||
<AssemblyName>hetcwdgv</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="MoveRow.cs" />
|
||||
<Compile Include="MoveTab.cs" />
|
||||
<Compile Include="Move.cs" />
|
||||
<Compile Include="Properties\AppResources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>AppResources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AppResources_de.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>AppResources_de.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AppResources_en.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>AppResources_en.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="TabControlsWithDataGridViews.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="TabControlsWithDataGridViews.Designer.cs">
|
||||
<DependentUpon>TabControlsWithDataGridViews.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="TabControlWithDataGridView.cs" />
|
||||
<Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Properties\AppResources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>AppResources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\AppResources_de.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>AppResources_de.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\AppResources_en.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>AppResources_en.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="TabControlsWithDataGridViews.resx">
|
||||
<DependentUpon>TabControlsWithDataGridViews.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
120
TabControlsWithDataGridViews/TabControlsWithDataGridViews.resx
Normal file
120
TabControlsWithDataGridViews/TabControlsWithDataGridViews.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
||||
BIN
TabControlsWithDataGridViews/bin/Debug/hetcwdgv.dll
Normal file
BIN
TabControlsWithDataGridViews/bin/Debug/hetcwdgv.dll
Normal file
Binary file not shown.
BIN
TabControlsWithDataGridViews/bin/Debug/hetcwdgv.pdb
Normal file
BIN
TabControlsWithDataGridViews/bin/Debug/hetcwdgv.pdb
Normal file
Binary file not shown.
@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
362805a9dc970ac2fcfe5e123d4c993f907ae6939b9faf3dc1a0f00343231b22
|
||||
@ -0,0 +1,11 @@
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\TabControlsWithDataGridViews\bin\Debug\hetcwdgv.dll
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\TabControlsWithDataGridViews\bin\Debug\hetcwdgv.pdb
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\TabControlsWithDataGridViews\obj\Debug\TabControlsWithDataGridViews.csproj.AssemblyReference.cache
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\TabControlsWithDataGridViews\obj\Debug\Eugen.ESystem.Windows.Forms.Properties.AppResources.resources
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\TabControlsWithDataGridViews\obj\Debug\Eugen.ESystem.Windows.Forms.Properties.AppResources_de.resources
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\TabControlsWithDataGridViews\obj\Debug\Eugen.ESystem.Windows.Forms.Properties.AppResources_en.resources
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\TabControlsWithDataGridViews\obj\Debug\Eugen.ESystem.Windows.Forms.TabControlsWithDataGridViews.resources
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\TabControlsWithDataGridViews\obj\Debug\TabControlsWithDataGridViews.csproj.GenerateResource.cache
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\TabControlsWithDataGridViews\obj\Debug\TabControlsWithDataGridViews.csproj.CoreCompileInputs.cache
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\TabControlsWithDataGridViews\obj\Debug\hetcwdgv.dll
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_USER CONTROL\TabControlsWithDataGridViews.git\TabControlsWithDataGridViews\obj\Debug\hetcwdgv.pdb
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
TabControlsWithDataGridViews/obj/Debug/hetcwdgv.dll
Normal file
BIN
TabControlsWithDataGridViews/obj/Debug/hetcwdgv.dll
Normal file
Binary file not shown.
BIN
TabControlsWithDataGridViews/obj/Debug/hetcwdgv.pdb
Normal file
BIN
TabControlsWithDataGridViews/obj/Debug/hetcwdgv.pdb
Normal file
Binary file not shown.
9
config
Normal file
9
config
Normal file
@ -0,0 +1,9 @@
|
||||
[core]
|
||||
repositoryformatversion = 0
|
||||
filemode = false
|
||||
bare = true
|
||||
symlinks = false
|
||||
ignorecase = true
|
||||
sharedrepository = 2
|
||||
[receive]
|
||||
denyNonFastforwards = true
|
||||
1
description
Normal file
1
description
Normal file
@ -0,0 +1 @@
|
||||
Unnamed repository; edit this file 'description' to name the repository.
|
||||
15
hooks/applypatch-msg.sample
Normal file
15
hooks/applypatch-msg.sample
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# An example hook script to check the commit log message taken by
|
||||
# applypatch from an e-mail message.
|
||||
#
|
||||
# The hook should exit with non-zero status after issuing an
|
||||
# appropriate message if it wants to stop the commit. The hook is
|
||||
# allowed to edit the commit message file.
|
||||
#
|
||||
# To enable this hook, rename this file to "applypatch-msg".
|
||||
|
||||
. git-sh-setup
|
||||
commitmsg="$(git rev-parse --git-path hooks/commit-msg)"
|
||||
test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"}
|
||||
:
|
||||
24
hooks/commit-msg.sample
Normal file
24
hooks/commit-msg.sample
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# An example hook script to check the commit log message.
|
||||
# Called by "git commit" with one argument, the name of the file
|
||||
# that has the commit message. The hook should exit with non-zero
|
||||
# status after issuing an appropriate message if it wants to stop the
|
||||
# commit. The hook is allowed to edit the commit message file.
|
||||
#
|
||||
# To enable this hook, rename this file to "commit-msg".
|
||||
|
||||
# Uncomment the below to add a Signed-off-by line to the message.
|
||||
# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
|
||||
# hook is more suited to it.
|
||||
#
|
||||
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
|
||||
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
|
||||
|
||||
# This example catches duplicate Signed-off-by lines.
|
||||
|
||||
test "" = "$(grep '^Signed-off-by: ' "$1" |
|
||||
sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
|
||||
echo >&2 Duplicate Signed-off-by lines.
|
||||
exit 1
|
||||
}
|
||||
174
hooks/fsmonitor-watchman.sample
Normal file
174
hooks/fsmonitor-watchman.sample
Normal file
@ -0,0 +1,174 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use IPC::Open2;
|
||||
|
||||
# An example hook script to integrate Watchman
|
||||
# (https://facebook.github.io/watchman/) with git to speed up detecting
|
||||
# new and modified files.
|
||||
#
|
||||
# The hook is passed a version (currently 2) and last update token
|
||||
# formatted as a string and outputs to stdout a new update token and
|
||||
# all files that have been modified since the update token. Paths must
|
||||
# be relative to the root of the working tree and separated by a single NUL.
|
||||
#
|
||||
# To enable this hook, rename this file to "query-watchman" and set
|
||||
# 'git config core.fsmonitor .git/hooks/query-watchman'
|
||||
#
|
||||
my ($version, $last_update_token) = @ARGV;
|
||||
|
||||
# Uncomment for debugging
|
||||
# print STDERR "$0 $version $last_update_token\n";
|
||||
|
||||
# Check the hook interface version
|
||||
if ($version ne 2) {
|
||||
die "Unsupported query-fsmonitor hook version '$version'.\n" .
|
||||
"Falling back to scanning...\n";
|
||||
}
|
||||
|
||||
my $git_work_tree = get_working_dir();
|
||||
|
||||
my $retry = 1;
|
||||
|
||||
my $json_pkg;
|
||||
eval {
|
||||
require JSON::XS;
|
||||
$json_pkg = "JSON::XS";
|
||||
1;
|
||||
} or do {
|
||||
require JSON::PP;
|
||||
$json_pkg = "JSON::PP";
|
||||
};
|
||||
|
||||
launch_watchman();
|
||||
|
||||
sub launch_watchman {
|
||||
my $o = watchman_query();
|
||||
if (is_work_tree_watched($o)) {
|
||||
output_result($o->{clock}, @{$o->{files}});
|
||||
}
|
||||
}
|
||||
|
||||
sub output_result {
|
||||
my ($clockid, @files) = @_;
|
||||
|
||||
# Uncomment for debugging watchman output
|
||||
# open (my $fh, ">", ".git/watchman-output.out");
|
||||
# binmode $fh, ":utf8";
|
||||
# print $fh "$clockid\n@files\n";
|
||||
# close $fh;
|
||||
|
||||
binmode STDOUT, ":utf8";
|
||||
print $clockid;
|
||||
print "\0";
|
||||
local $, = "\0";
|
||||
print @files;
|
||||
}
|
||||
|
||||
sub watchman_clock {
|
||||
my $response = qx/watchman clock "$git_work_tree"/;
|
||||
die "Failed to get clock id on '$git_work_tree'.\n" .
|
||||
"Falling back to scanning...\n" if $? != 0;
|
||||
|
||||
return $json_pkg->new->utf8->decode($response);
|
||||
}
|
||||
|
||||
sub watchman_query {
|
||||
my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty')
|
||||
or die "open2() failed: $!\n" .
|
||||
"Falling back to scanning...\n";
|
||||
|
||||
# In the query expression below we're asking for names of files that
|
||||
# changed since $last_update_token but not from the .git folder.
|
||||
#
|
||||
# To accomplish this, we're using the "since" generator to use the
|
||||
# recency index to select candidate nodes and "fields" to limit the
|
||||
# output to file names only. Then we're using the "expression" term to
|
||||
# further constrain the results.
|
||||
my $last_update_line = "";
|
||||
if (substr($last_update_token, 0, 1) eq "c") {
|
||||
$last_update_token = "\"$last_update_token\"";
|
||||
$last_update_line = qq[\n"since": $last_update_token,];
|
||||
}
|
||||
my $query = <<" END";
|
||||
["query", "$git_work_tree", {$last_update_line
|
||||
"fields": ["name"],
|
||||
"expression": ["not", ["dirname", ".git"]]
|
||||
}]
|
||||
END
|
||||
|
||||
# Uncomment for debugging the watchman query
|
||||
# open (my $fh, ">", ".git/watchman-query.json");
|
||||
# print $fh $query;
|
||||
# close $fh;
|
||||
|
||||
print CHLD_IN $query;
|
||||
close CHLD_IN;
|
||||
my $response = do {local $/; <CHLD_OUT>};
|
||||
|
||||
# Uncomment for debugging the watch response
|
||||
# open ($fh, ">", ".git/watchman-response.json");
|
||||
# print $fh $response;
|
||||
# close $fh;
|
||||
|
||||
die "Watchman: command returned no output.\n" .
|
||||
"Falling back to scanning...\n" if $response eq "";
|
||||
die "Watchman: command returned invalid output: $response\n" .
|
||||
"Falling back to scanning...\n" unless $response =~ /^\{/;
|
||||
|
||||
return $json_pkg->new->utf8->decode($response);
|
||||
}
|
||||
|
||||
sub is_work_tree_watched {
|
||||
my ($output) = @_;
|
||||
my $error = $output->{error};
|
||||
if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) {
|
||||
$retry--;
|
||||
my $response = qx/watchman watch "$git_work_tree"/;
|
||||
die "Failed to make watchman watch '$git_work_tree'.\n" .
|
||||
"Falling back to scanning...\n" if $? != 0;
|
||||
$output = $json_pkg->new->utf8->decode($response);
|
||||
$error = $output->{error};
|
||||
die "Watchman: $error.\n" .
|
||||
"Falling back to scanning...\n" if $error;
|
||||
|
||||
# Uncomment for debugging watchman output
|
||||
# open (my $fh, ">", ".git/watchman-output.out");
|
||||
# close $fh;
|
||||
|
||||
# Watchman will always return all files on the first query so
|
||||
# return the fast "everything is dirty" flag to git and do the
|
||||
# Watchman query just to get it over with now so we won't pay
|
||||
# the cost in git to look up each individual file.
|
||||
my $o = watchman_clock();
|
||||
$error = $output->{error};
|
||||
|
||||
die "Watchman: $error.\n" .
|
||||
"Falling back to scanning...\n" if $error;
|
||||
|
||||
output_result($o->{clock}, ("/"));
|
||||
$last_update_token = $o->{clock};
|
||||
|
||||
eval { launch_watchman() };
|
||||
return 0;
|
||||
}
|
||||
|
||||
die "Watchman: $error.\n" .
|
||||
"Falling back to scanning...\n" if $error;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
sub get_working_dir {
|
||||
my $working_dir;
|
||||
if ($^O =~ 'msys' || $^O =~ 'cygwin') {
|
||||
$working_dir = Win32::GetCwd();
|
||||
$working_dir =~ tr/\\/\//;
|
||||
} else {
|
||||
require Cwd;
|
||||
$working_dir = Cwd::cwd();
|
||||
}
|
||||
|
||||
return $working_dir;
|
||||
}
|
||||
8
hooks/post-update.sample
Normal file
8
hooks/post-update.sample
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# An example hook script to prepare a packed repository for use over
|
||||
# dumb transports.
|
||||
#
|
||||
# To enable this hook, rename this file to "post-update".
|
||||
|
||||
exec git update-server-info
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user