예제 #1
0
        public void DesignSurface(FormCharacter fc)
        {
            var nvp = StandardPlacementLayoutSpecification.StandardViewPortForCharacter(fc, ScreenForms.Form1_1);

            Width  = nvp.Width;
            Height = nvp.Height;
        }
예제 #2
0
        public void InitMenu()
        {
            do
            {
                //Stop the comand line to see the result of what the person choosed!
                if (!Option.Equals("just started"))
                {
                    Console.ReadKey();
                }

                //Show menu and the let the user write what he wants
                ShowMenu();
                ChoseOption();

                //Based on the user option program will fallow the right flow.
                switch (Option)
                {
                case "1":
                    FormCharacter formCharacter = new FormCharacter();
                    formCharacter.ShowForm();
                    break;

                default:
                    Console.WriteLine("Invalid option!");
                    break;
                }
            } while (!Option.Equals("quit"));
        }
예제 #3
0
        public static PortalViewPort StandardViewPortForCharacter(FormCharacter fc, int fixedWidth)
        {
            int height = (1000 * fixedWidth) / fc.EnumValue();

            return(new PortalViewPort {
                Left = 0, Top = 0, Width = fixedWidth, Height = height
            });
        }
예제 #4
0
 public PortalViewPort(FormCharacter fc)
 {
     DesignSurface(fc);
 }
예제 #5
0
 public PortalViewPort(FormCharacter fc, ScreenForms sf)
 {
     DesignSurface(fc, sf);
 }
예제 #6
0
        public bool CloseInCharacter(FormCharacter other)
        {
            var numericCharacter = (int)other;

            return(Math.Abs(numericCharacter - Ratio) < (Ratio / 4));
        }
예제 #7
0
 public static PortalViewPort StandardViewPortForCharacter(FormCharacter fc, ScreenForms sf)
 {
     return(StandardViewPortForCharacter(fc, sf.EnumValue()));
 }