コード例 #1
0
 public void PushText(string text)
 {
     lock (inputGate)
     {
         if (AllowedInputTypes.HasFlag(InputType.Text))
         {
             pushedString = text;
             lastType     = PushedValueType.Text;
             OnValueReceived(new ValueReceivedEventArgs(pushedString, InputType.Text));
         }
     }
 }
コード例 #2
0
 public void PushDistance(double distance)
 {
     lock (inputGate)
     {
         if (AllowedInputTypes.HasFlag(InputType.Distance))
         {
             pushedDistance = distance;
             lastType       = PushedValueType.Distance;
             OnValueReceived(new ValueReceivedEventArgs(distance));
         }
     }
 }
コード例 #3
0
 public void PushPoint(Point point)
 {
     lock (inputGate)
     {
         if (AllowedInputTypes.HasFlag(InputType.Point))
         {
             pushedPoint = point;
             lastType    = PushedValueType.Point;
             LastPoint   = point;
             OnValueReceived(new ValueReceivedEventArgs(point));
         }
     }
 }
コード例 #4
0
        public void PushEntities(IEnumerable <Entity> entities)
        {
            if (entities == null)
            {
                throw new ArgumentNullException("entities");
            }

            lock (inputGate)
            {
                if (AllowedInputTypes.HasFlag(InputType.Entities))
                {
                    pushedEntities = entities;
                    lastType       = PushedValueType.Entities;
                    OnValueReceived(new ValueReceivedEventArgs(entities));
                }
            }
        }
コード例 #5
0
        public void PushEntity(SelectedEntity entity)
        {
            if (entity == null)
            {
                throw new ArgumentNullException("entity");
            }

            lock (inputGate)
            {
                if (AllowedInputTypes.HasFlag(InputType.Entity))
                {
                    pushedEntity = entity;
                    lastType     = PushedValueType.Entity;
                    OnValueReceived(new ValueReceivedEventArgs(entity));
                }
            }
        }
コード例 #6
0
        public void PushDirective(string directive)
        {
            if (directive == null)
            {
                throw new ArgumentNullException("directive");
            }

            lock (inputGate)
            {
                if (AllowedInputTypes.HasFlag(InputType.Directive))
                {
                    if (currentDirective.AllowableDirectives.Contains(directive))
                    {
                        pushedDirective = directive;
                        lastType        = PushedValueType.Directive;
                        OnValueReceived(new ValueReceivedEventArgs(directive, InputType.Directive));
                    }
                    else
                    {
                        Workspace.OutputService.WriteLine("Bad value or directive '{0}'", directive);
                    }
                }
            }
        }