Ejemplo n.º 1
0
        public static string GetSocketPlanFileName(string originalName, SocketPlanType type)
        {
            var s = originalName.Split('-');

            if (s.Length != 6)
            {
                throw new ApplicationException("Invalid file name. Cannot create ");
            }

            if (type == SocketPlanType.Individual)
            {
                return(s[0] + "-" + s[1] + "-" + s[2] + "-" + s[3] + "-" + s[4] + "-SP_Individual-" + s[5]);
            }
            else if (type == SocketPlanType.Pattern)
            {
                return(s[0] + "-" + s[1] + "-" + s[2] + "-" + s[3] + "-" + s[4] + "-SP_Pattern-" + s[5]);
            }
            else
            {
                throw new ApplicationException("Invalid socket plan type.");
            }
        }
Ejemplo n.º 2
0
        public static void Bring1FDrawingToTop(SocketPlanType type)
        {
            var drawings = Drawing.GetAll(false);

            Drawing groundFloor;

            if (type == SocketPlanType.Individual)
            {
                groundFloor = drawings.Find(p => p.Floor == 1 && p.Name.Contains("Individual"));
            }
            else if (type == SocketPlanType.Pattern)
            {
                groundFloor = drawings.Find(p => p.Floor == 1 && p.Name.Contains("Pattern"));
            }
            else
            {
                throw new ApplicationException("Invalid socket plan type is selected.");
            }

            if (groundFloor != null)
            {
                WindowController2.BringDrawingToTop(groundFloor.WindowHandle);
            }
        }
Ejemplo n.º 3
0
 public Framing(int scale, SocketPlanType type)
 {
     this.scale = scale;
     this.type  = type;
 }