43 lines
1.3 KiB
C#
43 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using CPSO;
|
|
using CaeModel;
|
|
using CaeMesh;
|
|
using CaeGlobals;
|
|
|
|
|
|
namespace CPSO.Commands
|
|
{
|
|
[Serializable]
|
|
class CAddContactPair : PreprocessCommand
|
|
{
|
|
// Variables
|
|
private ContactPair _contactPair;
|
|
private bool _update;
|
|
|
|
|
|
// Constructor
|
|
public CAddContactPair(ContactPair contactPair, bool update)
|
|
: base("Add contact pair")
|
|
{
|
|
_contactPair = contactPair.DeepClone();
|
|
_update = update;
|
|
}
|
|
|
|
|
|
// Methods
|
|
public override bool Execute(Controller receiver)
|
|
{
|
|
receiver.AddContactPair(_contactPair.DeepClone(), _update);
|
|
return true;
|
|
}
|
|
public override string GetCommandString()
|
|
{
|
|
return base.GetCommandString() + _contactPair.ToString();
|
|
}
|
|
}
|
|
}
|