StandardCommands 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
대부분의 애플리케이션에서 사용할 수 있는 명령의 표준 집합에 대한 식별자를 정의합니다.
public ref class StandardCommands
public class StandardCommands
type StandardCommands = class
Public Class StandardCommands
- 상속
-
StandardCommands
- 파생
예제
다음 코드 예제에서는 클래스의 StandardCommands 멤버를 a MenuCommand 에 추가하는 방법과 클래스에 추가하는 MenuCommandIMenuCommandService방법을 보여 줍니다.
public ref class CDesigner: public ComponentDesigner
{
public:
[PermissionSetAttribute(SecurityAction::Demand, Name="FullTrust")]
virtual void Initialize( IComponent^ comp ) override
{
ComponentDesigner::Initialize( comp );
IMenuCommandService^ mcs = static_cast<IMenuCommandService^>(comp->Site->GetService( IMenuCommandService::typeid ));
MenuCommand^ mc = gcnew MenuCommand( gcnew EventHandler( this, &CDesigner::OnF1Help ),StandardCommands::F1Help );
mc->Enabled = true;
mc->Visible = true;
mc->Supported = true;
mcs->AddCommand( mc );
System::Windows::Forms::MessageBox::Show( "Initialize() has been invoked." );
}
private:
void OnF1Help( Object^ /*sender*/, EventArgs^ /*e*/ )
{
System::Windows::Forms::MessageBox::Show( "F1Help has been invoked." );
}
};
}
public class CDesigner : System.ComponentModel.Design.ComponentDesigner
{
public override void Initialize(IComponent comp)
{
base.Initialize(comp);
IMenuCommandService mcs = (IMenuCommandService)comp.Site.
GetService(typeof(IMenuCommandService));
MenuCommand mc = new MenuCommand(new EventHandler(OnF1Help), StandardCommands.F1Help);
mc.Enabled = true;
mc.Visible = true;
mc.Supported = true;
mcs.AddCommand(mc);
System.Windows.Forms.MessageBox.Show("Initialize() has been invoked.");
}
private void OnF1Help(object sender, EventArgs e)
{
System.Windows.Forms.MessageBox.Show("F1Help has been invoked.");
}
}
<System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.Demand, Name:="FullTrust")> _
Public Class CDesigner
Inherits System.ComponentModel.Design.ComponentDesigner
Public Overrides Sub Initialize(ByVal comp As IComponent)
MyBase.Initialize(comp)
Dim mcs As IMenuCommandService = CType(comp.Site.GetService(GetType(IMenuCommandService)), IMenuCommandService)
Dim mc As New MenuCommand(New EventHandler(AddressOf OnF1Help), StandardCommands.F1Help)
mc.Enabled = True
mc.Visible = True
mc.Supported = True
mcs.AddCommand(mc)
System.Windows.Forms.MessageBox.Show("Initialize() has been invoked.")
End Sub
Private Sub OnF1Help(ByVal sender As Object, ByVal e As EventArgs)
System.Windows.Forms.MessageBox.Show("F1Help has been invoked.")
End Sub
End Class
설명
이 클래스는 디자이너에서 CommandID 사용할 수 있는 표준 명령에 대한 식별자를 정의합니다.
클래스의 StandardCommands 명령을 디자이너 메뉴에 추가하려면 메서드 IMenuCommandService 를 AddCommand 호출하고 fromStandardCommands이 포함된 CommandID 명령을 추가 MenuCommand 해야 합니다.
생성자
| Name | Description |
|---|---|
| StandardCommands() |
StandardCommands 클래스의 새 인스턴스를 초기화합니다. |
필드
| Name | Description |
|---|---|
| AlignBottom |
CommandID AlignBottom 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| AlignHorizontalCenters |
CommandID AlignHorizontalCenters 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| AlignLeft |
CommandID AlignLeft 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| AlignRight |
CommandID AlignRight 명령의 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| AlignToGrid |
CommandID AlignToGrid 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| AlignTop |
CommandID AlignTop 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| AlignVerticalCenters |
CommandID AlignVerticalCenters 명령의 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| ArrangeBottom |
CommandID ArrangeBottom 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| ArrangeIcons |
CommandID ArrangeIcons 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| ArrangeRight |
CommandID ArrangeRight 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| BringForward |
CommandID BringForward 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| BringToFront |
CommandID BringToFront에 대한 명령을 가져옵니다. 이 필드는 읽기 전용입니다. |
| CenterHorizontally |
CommandID CenterHorizontally 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| CenterVertically |
CommandID CenterVertically 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| Copy |
CommandID 복사 명령을 가져옵니다. 이 필드는 읽기 전용입니다. |
| Cut |
잘라내기 CommandID 명령을 가져옵니다. 이 필드는 읽기 전용입니다. |
| Delete |
CommandID Delete 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| DocumentOutline |
CommandID 문서 개요 명령을 가져옵니다. 이 필드는 읽기 전용입니다. |
| F1Help |
CommandID F1Help 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| Group |
CommandID 그룹 명령의 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| HorizSpaceConcatenate |
CommandID HorizSpaceConcatenate 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| HorizSpaceDecrease |
CommandID HorizSpaceDecrease 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| HorizSpaceIncrease |
CommandID HorizSpaceIncrease 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| HorizSpaceMakeEqual |
CommandID HorizSpaceMakeEqual 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| LineupIcons |
CommandID LineupIcons 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| LockControls |
CommandID LockControls 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| MultiLevelRedo |
CommandID MultiLevelRedo 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| MultiLevelUndo |
CommandID MultiLevelUndo 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| Paste |
붙여넣기 CommandID 명령을 가져옵니다. 이 필드는 읽기 전용입니다. |
| Properties |
CommandID 속성에 대한 명령을 가져옵니다. 이 필드는 읽기 전용입니다. |
| PropertiesWindow |
CommandID PropertiesWindow 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| Redo |
for redo CommandID 명령을 가져옵니다. 이 필드는 읽기 전용입니다. |
| Replace |
CommandID Replace 명령을 가져옵니다. 이 필드는 읽기 전용입니다. |
| SelectAll |
CommandID SelectAll 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| SendBackward |
CommandID SendBackward 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| SendToBack |
CommandID SendToBack 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| ShowGrid |
CommandID ShowGrid 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| ShowLargeIcons |
CommandID ShowLargeIcons 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| SizeToControl |
CommandID SizeToControl 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| SizeToControlHeight |
CommandID SizeToControlHeight 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| SizeToControlWidth |
CommandID SizeToControlWidth 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| SizeToFit |
CommandID SizeToFit 명령을 가져옵니다. 이 필드는 읽기 전용입니다. |
| SizeToGrid |
CommandID SizeToGrid 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| SnapToGrid |
CommandID SnapToGrid 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| TabOrder |
CommandID TabOrder 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| Undo |
CommandID 실행 취소 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| Ungroup |
CommandID 그룹 해제 명령을 가져옵니다. 이 필드는 읽기 전용입니다. |
| VerbFirst |
동사 집합의 첫 번째 집합을 가져옵니다. 이 필드는 읽기 전용입니다. |
| VerbLast |
동사 집합의 마지막을 가져옵니다. 이 필드는 읽기 전용입니다. |
| VertSpaceConcatenate |
CommandID VertSpaceConcatenate 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| VertSpaceDecrease |
CommandID VertSpaceDecrease 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| VertSpaceIncrease |
CommandID VertSpaceIncrease 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| VertSpaceMakeEqual |
CommandID VertSpaceMakeEqual 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
| ViewCode |
CommandID ViewCode에 대한 명령을 가져옵니다. 이 필드는 읽기 전용입니다. |
| ViewGrid |
CommandID ViewGrid 명령에 대한 값을 가져옵니다. 이 필드는 읽기 전용입니다. |
메서드
| Name | Description |
|---|---|
| Equals(Object) |
지정한 개체와 현재 개체가 같은지 여부를 확인합니다. (다음에서 상속됨 Object) |
| GetHashCode() |
기본 해시 함수로 작동합니다. (다음에서 상속됨 Object) |
| GetType() |
현재 인스턴스의 Type 가져옵니다. (다음에서 상속됨 Object) |
| MemberwiseClone() |
현재 Object단순 복사본을 만듭니다. (다음에서 상속됨 Object) |
| ToString() |
현재 개체를 나타내는 문자열을 반환합니다. (다음에서 상속됨 Object) |