?? imagebutton.cs
字號:
// DINAMIC XML Editor
//
// Copyright (c) 2002-2003 Dusan Hlavaty
// mailto: duddo@atlas.cz
//
// This software is licensed under the terms of
// GNU General Public license
//
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.Windows.Forms;
using System.ComponentModel;
namespace XML_editor.MyComponents
{
/// <summary>
/// Komponenta tlacidlo, ktora zobrazuje obrazok a nemoze dostat focus. Da
/// sa iba stlacat.
/// </summary>
[ToolboxBitmap(typeof(Button))]
[DefaultProperty("FlatStyle")]
public class ImageButton : Button
{
// -------------------------------------------------------------------------
/// <summary>
/// Inicializuje instanciu triedy <see cref="ImageButton"/>
/// </summary>
public ImageButton()
{
InternalConstruct();
}
// -------------------------------------------------------------------------
/// <summary>
/// Interna inicializacna metoda
/// </summary>
private void InternalConstruct()
{
// Should not be allowed to select this control
SetStyle(ControlStyles.Selectable, false);
ImageAlign = System.Drawing.ContentAlignment.MiddleCenter;
FlatStyle = FlatStyle.Flat;
}
// -------------------------------------------------------------------------
/// <summary>
/// Nastavi defaultnu velkost komponente - tak ako je odporucane
/// v dokumentacii .NET
/// </summary>
protected override Size DefaultSize
{
// .NET docs:
// In order to maintain better performance,
// you should not set the Size of a control
// in its constructor. The preferred method
// is to override the DefaultSize property.
get
{
return new Size(20, 20);
}
}
} // public class ImageButton : ...
} // namespace XML_editor.MyComponents
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -