2
I have an interface in Visual C#. In this interface I have a Class called T50 that contains all the variables I need.
I have already implemented a button that saves the object created by the T50 class. I can save and read this object (Using serialize).
Only when I re-read a saved object I need to fill in the part of the interface that the user had already filled in.
Within my T50 class there is a function to do this.
private void button_t50_carregar_Click(object sender, EventArgs e)
{
// Código de ler o dado
// Usa uma função para preencher os dados
T50_Data.PreencheInterface(T50_Data);
}
But within this function I need to access all the controls of my Form to adjust them(Button, Textbox, Datagridviwe....).
I know how to receive them individually, for example
public void PreencheInterface (T50 T50Data, TextBox text)
{
}
There’s a way I can pass them all at once?
You’re using
WPF
orWindows Forms
?– MeuChapeu
I am using Windows Forms. But my knowledge is not very advanced.
– Antonio Rafael da Silva Filho