예제 #1
0
        private static Objects.NXTEntity DashboardToNXTEntityColors(Objects.NXTEntity nxtEntity, System.Xml.XmlReader reader)
        {
            Objects.NXTEntity newEntity = nxtEntity;
            Objects.NXTDashboard_Color newColor = new Objects.NXTDashboard_Color();

            //TODO : (:

            return newEntity;
        }
예제 #2
0
        private static Objects.NXTEntity DashboardToNXTEntityColor(Objects.NXTEntity nxtEntity, System.Xml.XmlReader reader)
        {
            Objects.NXTEntity newEntity = nxtEntity;
            Objects.NXTDashboard_Color newColor = new Objects.NXTDashboard_Color();
            int colorDepth = 0;

            if (reader.IsStartElement("color"))
            {
                colorDepth = reader.Depth;
                reader.Read();
                while (reader.Depth > colorDepth)
                {
                    switch (reader.Name)
                    {
                        case "intensity":
                            newColor.Intensity = Int32.Parse(reader.GetAttribute("value"));
                            break;
                        case "red":
                            newColor.Red = Int32.Parse(reader.GetAttribute("value"));
                            break;
                        case "green":
                            newColor.Green = Int32.Parse(reader.GetAttribute("value"));
                            break;
                        case "blue":
                            newColor.Blue = Int32.Parse(reader.GetAttribute("value"));
                            break;
                    }
                    reader.Read();
                }
                nxtEntity.Color = newColor;
            }

            return newEntity;
        }