Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Window Manager Class Question
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Window Manager Class Question
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01353101
Message ID:
01353101
Vues:
72
I have a window manager class. It maintains references to open User and Item forms:

At the top I create an array list:
private static ArrayList oWindows = new ArrayList();
The I have a method to return an instance of a form in the collection:
public void GetOpenForm(FormTypes type, int iRecordKey)
{
	form oRetVal = null;

	foreach(form oForm in oWindows)
	{
		if (oForm.iRecordKey == iRecordKey)
		{
		}
	}
}
Problem is, the references to oForm in the code above are not User or Item forms, so the iRecordkey reference fails to compile. Add to this, the Item and User forms are not based off any single base form.

How do I make oForm "know" about iRecordKey?
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform