示例#1
0
        private void toolNewMethod_Click(object sender, EventArgs e)
        {
            var command = new AddNewMemberCommand(parent, p => p.AddMethod());

            command.Execute();
            diagram.TrackCommand(command);
            AddNewOperation(command.Member as Method);
        }
示例#2
0
 private void toolNewEvent_Click(object sender, EventArgs e)
 {
     if (parent.SupportsEvents)
     {
         var command = new AddNewMemberCommand(parent, p => p.AddEvent());
         command.Execute();
         diagram.TrackCommand(command);
         AddNewOperation(command.Member as Event);
     }
 }
示例#3
0
        private void toolNewField_Click(object sender, EventArgs e)
        {
            if (parent.SupportsFields)
            {
                var command = new AddNewMemberCommand(parent, p => p.AddField());
                command.Execute();
                diagram.TrackCommand(command);

                AddNewField(command.Member as Field);
            }
        }
示例#4
0
        private void toolNewDestructor_Click(object sender, EventArgs e)
        {
            if (parent.SupportsDestructors)
            {
                var command = new AddNewMemberCommand(parent, p => p.AddDestructor());
                command.Execute();
                diagram.TrackCommand(command);
                ListViewItem item = AddOperationToList(command.Member as Destructor);

                item.Focused  = true;
                item.Selected = true;
                OnContentsChanged(EventArgs.Empty);
            }
        }