本文整理汇总了C#中System.Windows.Forms.Form.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# Form.Equals方法的具体用法?C# Form.Equals怎么用?C# Form.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.Form
的用法示例。
在下文中一共展示了Form.Equals方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: verificaTela
public void verificaTela(Form form)
{
formAux4 = form;
if (formAux4.Equals(telaFuncionario.getInstancia()))
{
this.btnDadosPessoais.BackgroundImage = global::GuiWindowsForms.Properties.Resources.func_dados_71x62;
this.btnDadosPessoais.Enabled = false;
lblDados_Menu.Visible = true;
lblDados_Menu.ForeColor = System.Drawing.Color.Yellow;
this.btnDadosProfissionais.BackgroundImage = global::GuiWindowsForms.Properties.Resources.func_profissional_64x71_disabled;
this.btnDadosProfissionais.Enabled = true;
lblProfissionais_menu.Visible = false;
lblProfissionais_menu.ForeColor = System.Drawing.Color.White;
}
else if (formAux4.Equals(telaFuncionarioDadosProfissionais.getInstancia()))
{
this.btnDadosProfissionais.BackgroundImage = global::GuiWindowsForms.Properties.Resources.func_profissional_64x71;
this.btnDadosProfissionais.Enabled = false;
lblProfissionais_menu.Visible = true;
lblProfissionais_menu.ForeColor = System.Drawing.Color.Yellow;
this.btnDadosPessoais.BackgroundImage = global::GuiWindowsForms.Properties.Resources.func_dados_71x62_disabled;
this.btnDadosPessoais.Enabled = true;
lblDados_Menu.Visible = false;
lblDados_Menu.ForeColor = System.Drawing.Color.White;
}
}
示例2: verificaTela
public void verificaTela(Form form)
{
formAux2 = form;
if (formAux2.Equals(telaConfiguracoes.getInstancia()))
{
this.btnControledeAcesso.BackgroundImage = global::GuiWindowsForms.Properties.Resources.conf_acesso_64x80;
this.btnControledeAcesso.Enabled = false; //mudar para true após (botão começa true também
lblControleAcesso_menu.Visible = true;
lblControleAcesso_menu.ForeColor = System.Drawing.Color.Yellow;
}
else if (formAux2.Equals(telaConfiguracoesControleDeAcesso.getInstancia()))
{
this.btnControledeAcesso.BackgroundImage = global::GuiWindowsForms.Properties.Resources.conf_acesso_64x80_disabled;
this.btnControledeAcesso.Enabled = false;
lblControleAcesso_menu.Visible = true;
lblControleAcesso_menu.ForeColor = System.Drawing.Color.Yellow;
}
}
示例3: RemoveOwnedForm
/// <include file='doc\Form.uex' path='docs/doc[@for="Form.RemoveOwnedForm"]/*' />
/// <devdoc>
/// <para>
/// Removes a form from the list of owned forms. Also sets the owner of the
/// removed form to null.
/// </para>
/// </devdoc>
public void RemoveOwnedForm(Form ownedForm) {
if (ownedForm == null)
return;
if (ownedForm.OwnerInternal != null) {
ownedForm.Owner = null; // NOTE: this will call RemoveOwnedForm again, bypassing if.
return;
}
Form[] ownedForms = (Form[])Properties.GetObject(PropOwnedForms);
int ownedFormsCount = Properties.GetInteger(PropOwnedFormsCount);
if (ownedForms != null) {
for (int i = 0; i < ownedFormsCount; i++) {
if (ownedForm.Equals(ownedForms[i])) {
// clear out the reference.
//
ownedForms[i] = null;
// compact the array.
//
if (i + 1 < ownedFormsCount) {
Array.Copy(ownedForms, i + 1, ownedForms, i, ownedFormsCount - i - 1);
ownedForms[ownedFormsCount - 1] = null;
}
ownedFormsCount--;
}
}
Properties.SetInteger(PropOwnedFormsCount, ownedFormsCount);
}
}
示例4: RemoveOwnedForm
public void RemoveOwnedForm(Form ownedForm)
{
if (ownedForm != null)
{
if (ownedForm.OwnerInternal != null)
{
ownedForm.Owner = null;
}
else
{
Form[] sourceArray = (Form[]) base.Properties.GetObject(PropOwnedForms);
int integer = base.Properties.GetInteger(PropOwnedFormsCount);
if (sourceArray != null)
{
for (int i = 0; i < integer; i++)
{
if (ownedForm.Equals(sourceArray[i]))
{
sourceArray[i] = null;
if ((i + 1) < integer)
{
Array.Copy(sourceArray, i + 1, sourceArray, i, (integer - i) - 1);
sourceArray[integer - 1] = null;
}
integer--;
}
}
base.Properties.SetInteger(PropOwnedFormsCount, integer);
}
}
}
}
示例5: ContainsMdiChild
/// <summary>
/// Gets a value indicating if the Form can be found in any of the tabs.
/// </summary>
/// <param name="f"></param>
/// <returns></returns>
public bool ContainsMdiChild(Form f)
{
if (null == f)
return false;
foreach (MdiTabStripButton tsb in Items)
{
if (f.Equals(tsb.GetMdiChild()))
return true;
}
return false;
}
示例6: FindTab
/// <summary>
/// Finds a tab from a Form.
/// </summary>
/// <param name="f"></param>
/// <returns></returns>
public MdiTabStripButton FindTab(Form f)
{
if (null == f)
return null;
foreach (MdiTabStripButton tsb in Items)
{
if (f.Equals(tsb.GetMdiChild()))
return tsb;
}
return null;
}
示例7: verificaTela
public void verificaTela(Form form)
{
formAux = form;
if (formAux.Equals(telaAluno.getInstancia()))
{
controlaBotoesMenu(telaAluno.getInstancia());
this.btnDados.BackgroundImage = global::GuiWindowsForms.Properties.Resources.dados_73x74;
this.btnDados.Enabled = false;
lblDados_Menu.Visible = true;
lblDados_Menu.ForeColor = System.Drawing.Color.Yellow;
}
else if (formAux.Equals(telaAlunoResponsavel.getInstancia()) || formAux.Equals(telaAlunoResponsavelVinculo.getInstancia()))
{
controlaBotoesMenu(telaAlunoResponsavel.getInstancia());
this.btnResponsaveis.BackgroundImage = global::GuiWindowsForms.Properties.Resources.responsavel_73x66;
this.btnResponsaveis.Enabled = false;
lblResponsavel_menu.Visible = true;
lblResponsavel_menu.ForeColor = System.Drawing.Color.Yellow;
}
else if (formAux.Equals(telaAlunoMedicacao.getInstancia()))
{
controlaBotoesMenu(telaAlunoMedicacao.getInstancia());
this.btnInfoMedica.BackgroundImage = global::GuiWindowsForms.Properties.Resources.injecao_73x73;
this.btnInfoMedica.Enabled = false;
lblMedico_menu.Visible = true;
lblMedico_menu.ForeColor = System.Drawing.Color.Yellow;
}
else if (formAux.Equals(telaAlunoFinanceiro.getInstancia()))
{
controlaBotoesMenu(telaAlunoFinanceiro.getInstancia());
this.btnFinanceiro.BackgroundImage = global::GuiWindowsForms.Properties.Resources.financeiro_73x60;
this.btnFinanceiro.Enabled = false;
lblFinanceiro_menu.Visible = true;
lblFinanceiro_menu.ForeColor = System.Drawing.Color.Yellow;
}
else if (formAux.Equals(telaAlunoAcademico.getInstancia()))
{
controlaBotoesMenu(telaAlunoAcademico.getInstancia());
this.btnAcademico.BackgroundImage = global::GuiWindowsForms.Properties.Resources.academico_73x72;
this.btnAcademico.Enabled = false;
lblAcademico_menu.Visible = true;
lblAcademico_menu.ForeColor = System.Drawing.Color.Yellow;
}
else if (formAux.Equals(telaAlunoMatricula.getInstancia()) || formAux.Equals(telaAlunoMatriculaAtividade.getInstancia()))
{
controlaBotoesMenu(telaAlunoMatricula.getInstancia());
this.btnMatricula.BackgroundImage = global::GuiWindowsForms.Properties.Resources.matricula_68x69;
this.btnMatricula.Enabled = false;
lblMatricula_menu.Visible = true;
lblMatricula_menu.ForeColor = System.Drawing.Color.Yellow;
}
}