StandardCommands 클래스

정의

대부분의 애플리케이션에서 사용할 수 있는 표준 명령 집합에 대한 식별자를 정의합니다.

public ref class StandardCommands
public class StandardCommands
type StandardCommands = class
Public Class StandardCommands
상속
StandardCommands
파생

예제

다음 코드 예제에서는 클래스 MenuCommandStandardCommands 멤버를 추가 하는 방법 및 추가 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 하고 에서 StandardCommands를 포함하는 을 CommandID 추가 MenuCommand 해야 합니다.

생성자

StandardCommands()

StandardCommands 클래스의 새 인스턴스를 초기화합니다.

필드

AlignBottom

AlignBottom 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

AlignHorizontalCenters

AlignHorizontalCenters 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

AlignLeft

AlignLeft 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

AlignRight

AlignRight 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

AlignToGrid

AlignToGrid 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

AlignTop

AlignTop 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

AlignVerticalCenters

AlignVerticalCenters 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

ArrangeBottom

ArrangeBottom 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

ArrangeIcons

ArrangeIcons 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

ArrangeRight

ArrangeRight 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

BringForward

BringForward 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

BringToFront

BringToFront 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

CenterHorizontally

CenterHorizontally 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

CenterVertically

CenterVertically 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

Copy

Copy 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

Cut

Cut 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

Delete

Delete 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

DocumentOutline

Document Outline 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

F1Help

F1Help 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

Group

Group 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

HorizSpaceConcatenate

HorizSpaceConcatenate 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

HorizSpaceDecrease

HorizSpaceDecrease 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

HorizSpaceIncrease

HorizSpaceIncrease 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

HorizSpaceMakeEqual

HorizSpaceMakeEqual 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

LineupIcons

LineupIcons 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

LockControls

LockControls 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

MultiLevelRedo

MultiLevelRedo 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

MultiLevelUndo

MultiLevelUndo 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

Paste

Paste 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

Properties

Properties 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

PropertiesWindow

PropertiesWindow 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

Redo

Redo 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

Replace

Replace 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

SelectAll

SelectAll 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

SendBackward

SendBackward 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

SendToBack

SendToBack 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

ShowGrid

ShowGrid 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

ShowLargeIcons

ShowLargeIcons 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

SizeToControl

SizeToControl 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

SizeToControlHeight

SizeToControlHeight 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

SizeToControlWidth

SizeToControlWidth 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

SizeToFit

SizeToFit 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

SizeToGrid

SizeToGrid 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

SnapToGrid

SnapToGrid 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

TabOrder

TabOrder 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

Undo

Undo 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

Ungroup

Ungroup 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

VerbFirst

동사 집합에서 첫 번째 동사를 가져옵니다. 이 필드는 읽기 전용입니다.

VerbLast

동사 집합에서 마지막 동사를 가져옵니다. 이 필드는 읽기 전용입니다.

VertSpaceConcatenate

VertSpaceConcatenate 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

VertSpaceDecrease

VertSpaceDecrease 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

VertSpaceIncrease

VertSpaceIncrease 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

VertSpaceMakeEqual

VertSpaceMakeEqual 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

ViewCode

ViewCode 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

ViewGrid

ViewGrid 명령에 대한 CommandID를 가져옵니다. 이 필드는 읽기 전용입니다.

메서드

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상

추가 정보