ik heb procedure die redelijk lang duurt. Ik wil eerst in text box schrijven dat het even duurt en dat men geduld moet hebben, voordat ik de resultaten erin gooi. Helaas schrijft hij het "wacht ff" bericht niet en schrijft ie alleen de resultaten.
Enig idee hoe ik kan forcen dat "geefResultaat.Text = "Please wait, this search takes a few minutes, depending on the amount of data and number of files the user has on his home drive";" uitgevoerd word?
private void getUserHUsageInformationToolStripMenuItem_Click(object sender, EventArgs e)
{
geefResultaat.Text = "Please wait, this search takes a few minutes, depending on the amount of data and number of files the user has on his home drive";
doShit();
}
void doShit()
{
string userID;
string hddAmountAllowed = "";
string hddAmountUsed = "";
string hddFreeSpace = "";
int maxAmount;
int usedAmount;
int freeAmount;
userID = invoerDoos.Text;
maxAmount = zoekMaxAmount(userID);
if (maxAmount == 0)
{
hddAmountAllowed = "Amount Allowed: 2048MB";
maxAmount = 2048;
}
if (maxAmount == 1)
{
hddAmountAllowed = "Amount Allowed: 4096MB";
maxAmount = 4096;
}
if (maxAmount == 2)
{
hddAmountAllowed = "Amount Allowed: 8192MB";
maxAmount = 8192;
}
usedAmount = zoekAmountUsed(userID);
hddAmountUsed = "Amount Used: " + usedAmount.ToString() + "MB";
freeAmount = maxAmount - usedAmount;
hddFreeSpace = "Free Space: " + freeAmount.ToString() + "MB";
geefResultaat.Text = hddAmountAllowed + Environment.NewLine + hddAmountUsed + Environment.NewLine + hddFreeSpace;
}
Enig idee hoe ik kan forcen dat "geefResultaat.Text = "Please wait, this search takes a few minutes, depending on the amount of data and number of files the user has on his home drive";" uitgevoerd word?
private void getUserHUsageInformationToolStripMenuItem_Click(object sender, EventArgs e)
{
geefResultaat.Text = "Please wait, this search takes a few minutes, depending on the amount of data and number of files the user has on his home drive";
doShit();
}
void doShit()
{
string userID;
string hddAmountAllowed = "";
string hddAmountUsed = "";
string hddFreeSpace = "";
int maxAmount;
int usedAmount;
int freeAmount;
userID = invoerDoos.Text;
maxAmount = zoekMaxAmount(userID);
if (maxAmount == 0)
{
hddAmountAllowed = "Amount Allowed: 2048MB";
maxAmount = 2048;
}
if (maxAmount == 1)
{
hddAmountAllowed = "Amount Allowed: 4096MB";
maxAmount = 4096;
}
if (maxAmount == 2)
{
hddAmountAllowed = "Amount Allowed: 8192MB";
maxAmount = 8192;
}
usedAmount = zoekAmountUsed(userID);
hddAmountUsed = "Amount Used: " + usedAmount.ToString() + "MB";
freeAmount = maxAmount - usedAmount;
hddFreeSpace = "Free Space: " + freeAmount.ToString() + "MB";
geefResultaat.Text = hddAmountAllowed + Environment.NewLine + hddAmountUsed + Environment.NewLine + hddFreeSpace;
}