Änderung
- Abfrage eingefügt, die den Button 'DLL-Info' unterdrückt, wenn die EXE und die DLLs in eine EXE gepackt sind. Das verhindert einen Fehler, weil keine DLL gefunden werden.
This commit is contained in:
parent
6a8932b1d4
commit
46c64b0132
@ -26,7 +26,7 @@ Global
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
RESX_NeutralResourcesLanguage = de-DE
|
||||
SolutionGuid = {15165E4A-C2AA-46F2-94D4-379F9DC52145}
|
||||
RESX_NeutralResourcesLanguage = de-DE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
@ -269,6 +269,8 @@ namespace Eugen.ESystem.Windows.Forms
|
||||
private void AboutBox_Load(object sender, EventArgs e)
|
||||
{
|
||||
DllInfoSelected = false;
|
||||
|
||||
Appearance();
|
||||
}
|
||||
|
||||
protected string ProgramName { private set; get; }
|
||||
@ -548,5 +550,23 @@ namespace Eugen.ESystem.Windows.Forms
|
||||
this.MaximumSize = new Size(width, hight);
|
||||
this.MinimumSize = new Size(width, hight);
|
||||
}
|
||||
|
||||
private void Appearance()
|
||||
{
|
||||
//Sind im Startup Verzeichnis keine eigenen DLLs, dann ist die EXE und die DLLs wahrscheinlich gepackt. Den Button 'DLL-Info' ausblenden, weil es sonst zu Fehler kommt
|
||||
bool dllExist = false;
|
||||
|
||||
DirectoryInfo ParentDirectory = new DirectoryInfo(Application.StartupPath);
|
||||
foreach (FileInfo fi in ParentDirectory.GetFiles())
|
||||
{
|
||||
if (fi.Extension.ToLower() == ".dll")
|
||||
{
|
||||
dllExist = true;
|
||||
}
|
||||
}
|
||||
|
||||
buttonDllInfo.Enabled = dllExist;
|
||||
buttonDllInfo.Visible = dllExist;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user