OSDN Git Service

Pre-PR5 Configurable Designators, Autostart, fix for Entity processing
[automap/automap.git] / Automap / Data / CommandData.cs
index 2391c0a..7f14a30 100644 (file)
@@ -16,10 +16,9 @@ namespace Automap
        public class CommandData : IAttribute
        {
                [ProtoMember(1)]
-               public RunState State { get; set; }//Run , Stop, SingleSnapshot -> Stop
+               public CommandType State { get; set; }//Run , Stop, SingleSnapshot -> Stop
+
 
-               [ProtoMember(2)]
-               private List<DelegateState> DelegatesFlags;
 
                [ProtoMember(3)]
                public string Notation { get; set; }
@@ -29,28 +28,12 @@ namespace Automap
                //Choose : Renderer(s)
 
 
-               public CommandData(RunState assumeState, bool[] theseDelegates)
+               public CommandData(CommandType assumeState)
                {
                        State = assumeState;
 
-                       DelegatesFlags = new List<DelegateState>(theseDelegates.Length);
-                       foreach (var df in theseDelegates)
-                       {
-                               DelegatesFlags.Add(new DelegateState()
-                               {
-                                       Enabled = df,
-                                       AlternateColor = null,
-                               });
-
-                       }
-
-               }
 
-               public CommandData(RunState assumeState)
-               {
-                       State = assumeState;//Never RUN.
 
-                       DelegatesFlags = new List<DelegateState>();
                }
 
 
@@ -58,7 +41,7 @@ namespace Automap
                {
                        var temp = ProtoBuf.Serializer.Deserialize<CommandData>(stream.BaseStream);
                        this.State = temp.State;
-                       this.DelegatesFlags = temp.DelegatesFlags;
+
 
                }
 
@@ -84,7 +67,7 @@ namespace Automap
 
                public string ToJsonToken()
                {
-                       return $"New-State:{State}, Delegates# {DelegatesFlags.Count} ";
+                       return $"Command-Type:{State} ";
                }
 
                public bool Equals(IWorldAccessor worldForResolve, IAttribute attr)
@@ -99,18 +82,5 @@ namespace Automap
                        return false;
                }
        }
-
-       [ProtoContract]
-       internal struct DelegateState
-       {
-               [ProtoMember(1)]
-               public bool Enabled;
-
-               [ProtoMember(2)]
-               public Color? AlternateColor;
-
-
-
-       }
 }