本文整理汇总了C#中System.Windows.Forms.ButtonBase类的典型用法代码示例。如果您正苦于以下问题:C# ButtonBase类的具体用法?C# ButtonBase怎么用?C# ButtonBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ButtonBase类属于System.Windows.Forms命名空间,在下文中一共展示了ButtonBase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: BeneficioCadastro
public BeneficioCadastro(
ButtonBase botaoSalvar,
ButtonBase botaoCancelar,
Form tela,
DataGridView beneficioGridView
)
{
this.Botao_Salvar = botaoSalvar;
this.Botao_Cancelar = botaoCancelar;
this.Tela = tela;
Beneficios = TiposBeneficio.ObterListaAssociada();
beneficioGridView.AutoGenerateColumns = false;
beneficioGridView.DataSource = Beneficios;
Botao_Salvar.Click += new EventHandler(Botao_Salvar_Click);
Botao_Cancelar.Click += new EventHandler(Botao_Cancelar_Click);
Beneficios.AddingNew += (sender, args) =>
{
if (beneficioGridView.Rows.Count == Beneficios.Count)
{
Beneficios.RemoveAt(Beneficios.Count - 1);
return;
}
};
AoCancelar += () =>
{
beneficioGridView.DataSource = Beneficios;
};
AoSalvar += () =>
{
TiposBeneficio.DispararAtualizacao();
};
}
开发者ID:ConradoClark,项目名称:ProjetoAdv,代码行数:34,代码来源:BeneficioCadastro.cs
示例2: TipoAcaoCadastro
public TipoAcaoCadastro(
ButtonBase botaoSalvar,
ButtonBase botaoCancelar,
Form tela,
DataGridView tipoAcaoGridView
)
{
this.Botao_Salvar = botaoSalvar;
this.Botao_Cancelar = botaoCancelar;
this.Tela = tela;
Tipos = TiposAcao.ObterListaAssociada();
tipoAcaoGridView.AutoGenerateColumns = false;
tipoAcaoGridView.DataSource = Tipos;
Tipos.AddingNew += (sender, args) =>
{
if (tipoAcaoGridView.Rows.Count == Tipos.Count)
{
Tipos.RemoveAt(Tipos.Count - 1);
return;
}
};
Botao_Salvar.Click += new EventHandler(Botao_Salvar_Click);
Botao_Cancelar.Click += new EventHandler(Botao_Cancelar_Click);
AoCancelar += () =>
{
tipoAcaoGridView.DataSource = Tipos;
};
}
开发者ID:ConradoClark,项目名称:ProjetoAdv,代码行数:28,代码来源:TipoAcaoCadastro.cs
示例3: ButtonCommandBinding
public ButtonCommandBinding(ButtonBase button, ICommand command, Func<object> commandParameterCallback)
: base(button, command)
{
this.button = button;
this.commandParameterCallback = commandParameterCallback;
UpdateEnabledProperty();
this.button.Click += ButtonClick;
}
开发者ID:keremkusmezer,项目名称:baldursgatepartygold,代码行数:8,代码来源:ButtonCommandBinding.cs
示例4: GrupoDiferencialCadastro
public GrupoDiferencialCadastro(
ButtonBase botaoSalvar,
ButtonBase botaoCancelar,
Form tela,
DataGridView grupoGridView
)
{
this.Botao_Salvar = botaoSalvar;
this.Botao_Cancelar = botaoCancelar;
this.Tela = tela;
Grupos = TiposGrupoDiferencial.ObterListaAssociada();
grupoGridView.AutoGenerateColumns = false;
grupoGridView.DataSource = Grupos;
Botao_Salvar.Click += new EventHandler(Botao_Salvar_Click);
Botao_Cancelar.Click += new EventHandler(Botao_Cancelar_Click);
Grupos.AddingNew += (sender, args) =>
{
if (grupoGridView.Rows.Count == Grupos.Count)
{
Grupos.RemoveAt(Grupos.Count - 1);
return;
}
};
AoCancelar += () =>
{
grupoGridView.DataSource = Grupos;
};
}
开发者ID:ConradoClark,项目名称:ProjetoAdv,代码行数:30,代码来源:GrupoDiferencialCadastro.cs
示例5: ButtonCommandBinding
/// <summary>
/// コンストラクタ
/// </summary>
public ButtonCommandBinding(ButtonBase button, ICommand command,
Func<object> commandParameterCallback)
: base(button, command, commandParameterCallback)
{
this.target = button;
this.target.Click += event_DoExecute;
OnUpdatedEnabled();
}
开发者ID:leontius,项目名称:Ragnarok,代码行数:12,代码来源:ButtonCommandBinding.cs
示例6: Button_SetElevationRequiredState
/// <summary>
/// Sets the elevation required state for a specified button or command link to display an elevated icon.
/// </summary>
/// <param name="button"></param>
/// <remarks>
/// http://msdn.microsoft.com/en-us/library/bb761865(VS.85).aspx
///
/// #define BCM_FIRST 0x1600 // Button control messages
/// // Macro to use on a button or command link to display an elevated icon
/// #define BCM_SETSHIELD (BCM_FIRST + 0x000C)
/// #define Button_SetElevationRequiredState(hwnd, fRequired) \
/// (LRESULT)SNDMSG((hwnd), BCM_SETSHIELD, 0, (LPARAM)fRequired)
/// </remarks>
public static void Button_SetElevationRequiredState(ButtonBase button, bool show)
{
if (button == null)
throw new ArgumentNullException("button");
button.FlatStyle = FlatStyle.System;
var buttonHandle = new HandleRef(button, button.Handle);
Trace.WriteLine("handle:" + buttonHandle.Handle);
var lParam = new IntPtr(Int32.MaxValue - 1);
IntPtr ret = SendMessage(buttonHandle, BCM_SETSHIELD, show ? new IntPtr(1) : IntPtr.Zero, ref lParam);
Trace.WriteLine(ret.ToInt64());
}
开发者ID:zippy1981,项目名称:lessmsi,代码行数:27,代码来源:ElevationNativeMethods.cs
示例7: DrawButtonBase
public override void DrawButtonBase (Graphics dc, Rectangle clip_area, ButtonBase button)
{
if (button.FlatStyle == FlatStyle.System) {
ButtonRenderer.DrawButton (
dc,
new Rectangle (Point.Empty, button.Size),
button.Text,
button.Font,
button.TextFormatFlags,
null,
Rectangle.Empty,
ShouldPaintFocusRectagle (button),
GetPushButtonState (button)
);
return;
}
base.DrawButtonBase (dc, clip_area, button);
}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:18,代码来源:ThemeVisualStyles.cs
示例8: OnToolBarButtonClick
/// <summary>
/// Metodo utilizado para lanzar el evento
/// ToolBarButtonClick
/// </summary>
/// <param name="pButtonClicked">Botón presionado</param>
private void OnToolBarButtonClick(ButtonBase pButtonClicked)
{
if (ToolBarButtonClick != null)
{
ButtonClickArgs<ButtonBase> e = new ButtonClickArgs<ButtonBase>(pButtonClicked);
if (pButtonClicked.GetType() == typeof(ButtonBase))
{
if (!string.IsNullOrEmpty(((ButtonBase)pButtonClicked).AssemblyInfo))
{
XtraForm wFrm = (XtraForm)Fwk.HelperFunctions.ReflectionFunctions.CreateInstance(((ButtonBase)pButtonClicked).AssemblyInfo);
e.Form = wFrm;
}
}
ToolBarButtonClick(this, e);
}
}
开发者ID:spzenk,项目名称:sfdocsamples,代码行数:23,代码来源:UC_ToolBarControl.cs
示例9: ProcessoCadastro
public ProcessoCadastro(Form tela, TextBoxBase buscaNumeroReferenciaInterna,
ButtonBase botaoBusca, ButtonBase botaoAdicionar,
ButtonBase botaoSalvar, ButtonBase botaoPDF, ButtonBase botaoFechar,
ButtonBase botaoRemover, ButtonBase botaoCancelar, ButtonBase botaoLimpar)
{
this.Tela = tela;
this.Busca_NumeroReferenciaInterna = buscaNumeroReferenciaInterna;
this.Botao_Busca = botaoBusca;
this.Botao_Adicionar = botaoAdicionar;
this.Botao_Salvar = botaoSalvar;
this.Botao_PDF = botaoPDF;
this.Botao_Fechar = botaoFechar;
this.Botao_Remover = botaoRemover;
this.Botao_Cancelar = botaoCancelar;
this.Botao_Limpar = botaoLimpar;
Botao_Limpar.Enabled = true;
Botao_Cancelar.Enabled = false;
this.ProcessoAtivo = new Processo();
ProcessoAtivo.IdAlterado += (antigo, novo) => buscaNumeroReferenciaInterna.Text = novo.ToString();
this.AdicionarLink();
ProcessoAtivo.OrigemDadosAlterado += (antigo, novo) =>
{
if (novo == OrigemDados.Local)
{
Botao_Limpar.Enabled = true;
Botao_Cancelar.Enabled = false;
}
else if (novo == OrigemDados.Banco)
{
Botao_Limpar.Enabled = false;
Botao_Cancelar.Enabled = true;
}
};
AoSalvar += () => { };
AoAdicionar += () => { };
AoBuscar += () => { };
AoCancelar += () => { };
AoLimpar += () => { };
AoRemover += () => { };
AntesDeSalvar += () => { return true; };
}
开发者ID:ConradoClark,项目名称:ProjetoAdv,代码行数:41,代码来源:ProcessoCadastro.cs
示例10: PendenciaCadastro
public PendenciaCadastro(
ButtonBase botaoAdicionar,
ButtonBase botaoLimpar,
ButtonBase botaoSalvar,
ButtonBase botaoCancelar,
Form tela,
DataGridView pendenciaGridView,
TextBoxBase txtPendencia
)
{
this.Botao_Adicionar = botaoAdicionar;
this.Botao_Limpar = botaoLimpar;
this.Botao_Cancelar = botaoCancelar;
this.Botao_Salvar = botaoSalvar;
this.Tela = tela;
this.Texto_Pendencia = txtPendencia;
this.ListaPendencias = Pendencias.ListarAssociado();
pendenciaGridView.AutoGenerateColumns = false;
pendenciaGridView.DataSource = ListaPendencias;
ListaPendencias.AddingNew += (sender, args) =>
{
if (pendenciaGridView.Rows.Count == ListaPendencias.Count)
{
ListaPendencias.RemoveAt(ListaPendencias.Count - 1);
return;
}
};
this.Botao_Adicionar.Click += new EventHandler(Botao_Adicionar_Click);
this.Botao_Limpar.Click += new EventHandler(Botao_Limpar_Click);
this.Botao_Salvar.Click += new EventHandler(Botao_Salvar_Click);
this.Botao_Cancelar.Click += new EventHandler(Botao_Cancelar_Click);
AoCancelar += () =>
{
pendenciaGridView.DataSource = ListaPendencias;
};
}
开发者ID:ConradoClark,项目名称:ProjetoAdv,代码行数:40,代码来源:PendenciaCadastro.cs
示例11: LoadAssembly
void LoadAssembly(string pFileName)
{
lblEx.Visible = false;
ButtonBaseList wButtons = new ButtonBaseList();
ButtonBase wButton = new ButtonBase();
try
{
Assembly wAssembly = new Assembly(pFileName);
lblFileName.Text = pFileName;
foreach (AssemblyClass wAssemblyClass in wAssembly.ClassCollections)
{
string name = wAssemblyClass.Name;
if (wAssemblyClass.BaseType != null)
{
typeof(ButtonBase).IsInstanceOfType(wButton);
//if (Fwk.HelperFunctions.TypeFunctions.TypeInheritFrom(wAssemblyClass.Type, _BaseTypesFilter))
if (inheritFromAny(wAssemblyClass.Type))
{
wButton = new ButtonBase();
wButton.AssemblyInfo = wAssemblyClass.FullyQualifiedName;
wButtons.Add(wButton);
}
}
}
listBox1.DataSource = wButtons;
}
catch (Exception ex)
{
lblEx.Visible = true;
lblEx.Text = Fwk.Exceptions.ExceptionHelper.GetAllMessageException(ex);
}
}
开发者ID:spzenk,项目名称:sfdocsamples,代码行数:40,代码来源:FRM_AssemblyExplorer.cs
示例12: get_FlatStyle
private static int get_FlatStyle(ButtonBase Instance,IntPtr l)
{
LuaApi.lua_pushnumber(l,(int)Instance.FlatStyle);
return 1;
}
开发者ID:huiguochen,项目名称:Lua4Net,代码行数:5,代码来源:ButtonBase.cs
示例13: get_ImageIndex
private static int get_ImageIndex(ButtonBase Instance,IntPtr l)
{
LuaApi.lua_pushnumber(l,Instance.ImageIndex);
return 1;
}
开发者ID:huiguochen,项目名称:Lua4Net,代码行数:5,代码来源:ButtonBase.cs
示例14: set_TextAlign
private static int set_TextAlign(ButtonBase Instance,IntPtr l)
{
Instance.TextAlign = (ContentAlignment)LuaApi.lua_tonumber(l,3);
return 0;
}
开发者ID:huiguochen,项目名称:Lua4Net,代码行数:5,代码来源:ButtonBase.cs
示例15: get_AutoEllipsis
private static int get_AutoEllipsis(ButtonBase Instance,IntPtr l)
{
LuaApi.lua_pushnumber(l,Instance.AutoEllipsis?1:0);
return 1;
}
开发者ID:huiguochen,项目名称:Lua4Net,代码行数:5,代码来源:ButtonBase.cs
示例16: set_ImageKey
private static int set_ImageKey(ButtonBase Instance,IntPtr l)
{
Instance.ImageKey = LuaApi.lua_tostring(l,3);
return 0;
}
开发者ID:huiguochen,项目名称:Lua4Net,代码行数:5,代码来源:ButtonBase.cs
示例17: set_ImeMode
private static int set_ImeMode(ButtonBase Instance,IntPtr l)
{
Instance.ImeMode = (ImeMode)LuaApi.lua_tonumber(l,3);
return 0;
}
开发者ID:huiguochen,项目名称:Lua4Net,代码行数:5,代码来源:ButtonBase.cs
示例18: set_FlatStyle
private static int set_FlatStyle(ButtonBase Instance,IntPtr l)
{
Instance.FlatStyle = (FlatStyle)LuaApi.lua_tonumber(l,3);
return 0;
}
开发者ID:huiguochen,项目名称:Lua4Net,代码行数:5,代码来源:ButtonBase.cs
示例19: set_ImageIndex
private static int set_ImageIndex(ButtonBase Instance,IntPtr l)
{
Instance.ImageIndex = (Int32)LuaApi.lua_tonumber(l,3);
return 0;
}
开发者ID:huiguochen,项目名称:Lua4Net,代码行数:5,代码来源:ButtonBase.cs
示例20: get_TextAlign
private static int get_TextAlign(ButtonBase Instance,IntPtr l)
{
LuaApi.lua_pushnumber(l,(int)Instance.TextAlign);
return 1;
}
开发者ID:huiguochen,项目名称:Lua4Net,代码行数:5,代码来源:ButtonBase.cs
注:本文中的System.Windows.Forms.ButtonBase类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论