Пример #1
0
        public static Assembly CreateAssembly(string title, string subtitle /*, object properties*/)
        {
            //Experior.Catalog.Assemblies.MyAssemblyInfo info = new Experior.Catalog.Assemblies.MyAssemblyInfo();
            //info.name = Experior.Core.Assemblies.Assembly.GetValidName("MyAssembly");
            //Experior.Catalog.Assemblies.MyAssembly assembly = new Experior.Catalog.Assemblies.MyAssembly(info);

            Experior.Core.Assemblies.Assembly assembly = null;


            if (title == "Simulation UK")
            {
                SimulationUKInfo simulationInfo = new SimulationUKInfo();
                simulationInfo.name       = Experior.Core.Assemblies.Assembly.GetValidName("Simulation ");
                simulationInfo.position.Y = 0;
                return(new SimControllerUK(simulationInfo));
            }

            return(assembly);
        }
Пример #2
0
        //public delegate bool TelegramRecievedHandle(CasePLC_Datcom sender, string type, string[] telegramFields, ushort number_of_blocks);
        /// <summary>
        /// Handle project specific telegrams. If false is returned then the plc will handle it. If true is returned the plc expects the user to handle the telegram.
        /// </summary>
        //public TelegramRecievedHandle HandleTelegram;

        //public Dictionary<string, CallForwardLocation> callForwardTable = new Dictionary<string, CallForwardLocation>();


        //public int MaxRoutingTableEntries = int.MaxValue;
        //public int NumberOfDestWords = 4;
        //public Dictionary<string, UInt16[]> routingTable = new Dictionary<string, UInt16[]>(); //SSCCBarcode, Destinations[]

        public SimControllerUK(SimulationUKInfo info) : base(info)
        {
            //statusColours.Add(CasePLC_State.Unknown, Color.Gainsboro);
            //statusColours.Add(CasePLC_State.Ready, Color.Yellow);
            //statusColours.Add(CasePLC_State.Auto, Color.DarkGreen);
            //statusColours.Add(CasePLC_State.NotReady, Color.Gainsboro);

            //caseDatcomInfo = info;

            plcCube = new Cube(Color.Wheat, 2.5f, 0.5f, 0.5f);

            //door1 = new Cube(Color.Wheat, 0.62f, 1.585f, 0.25f);
            //door2 = new Cube(Color.Wheat, 0.62f, 1.585f, 0.25f);
            //plinth = new Cube(Color.DimGray, 1.32f, 0.1985f, 0.42f);

            Font f = new Font("Helvetica", 0.4f, FontStyle.Bold, GraphicsUnit.Pixel);

            displayText       = new Text3D(Color.Blue, 0.4f, 0.3f, f);
            displayText.Pitch = (float)Math.PI / 2;

            //AddPart((RigidPart)displayText, new Vector3(-0.62f, 1.25f, -0.125f));

            AddPart((RigidPart)plcCube, new Vector3(0, -0.25f, 0));
            AddPart((RigidPart)displayText, new Vector3(-1.1f, -0.1f, -0.125f));



            //AddPart((RigidPart)door1, new Vector3(-0.325f, 0.5425f, -0.1f));
            //AddPart((RigidPart)door2, new Vector3(0.325f, 0.5425f, -0.1f));
            //AddPart((RigidPart)plinth, new Vector3(0, -0.355f, 0));

            displayText.Text = info.name;
            OnNameChanged   += SimulationUK_OnNameChanged;

            //if (info.receiverID != 0)
            //ReceiverID = info.receiverID;

            //if (info.senderID != 0)
            //SenderID = info.senderID;
        }