Ahoj mám problém s tímto řádkem: DirectoryInfo^ directoryInfo = gcnew DirectoryInfo (stringDirectory);
kdy se mi program zkompiluje a můžu ho zpustist. Ale kdykoliv se má použít tato část programu, mi to pošle varovnou zprávu a program nefunguje tak, jak by měl.
private: System::Void textBoxDirectoryPlugins_TextChanged(System::Object^ sender, System::EventArgs^ e) {
for (int i = 0; i < checkedPlugins->Items->Count; ++i)
{
checkedPlugins->Items->RemoveAt(i);
}
String^ stringDirectory = directoryOfPlugins->ToString ();
DirectoryInfo^ directoryInfo = gcnew DirectoryInfo (stringDirectory);
array<System::IO::FileInfo^>^ arrayMasters = directoryInfo->GetFiles ("*.esm");
array<System::IO::FileInfo^>^ arrayPlugins = directoryInfo->GetFiles ("*.esp");
for (int i = 0; i < arrayMasters->Length; ++i)
{
checkedPlugins->Items->Add(arrayMasters[i]->Name);
}
for (int i = 0; i < arrayPlugins->Length; ++i)
{
checkedPlugins->Items->Add(arrayPlugins[i]->Name);