public void DesignSurface(FormCharacter fc) { var nvp = StandardPlacementLayoutSpecification.StandardViewPortForCharacter(fc, ScreenForms.Form1_1); Width = nvp.Width; Height = nvp.Height; }
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")); }
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 }); }
public PortalViewPort(FormCharacter fc) { DesignSurface(fc); }
public PortalViewPort(FormCharacter fc, ScreenForms sf) { DesignSurface(fc, sf); }
public bool CloseInCharacter(FormCharacter other) { var numericCharacter = (int)other; return(Math.Abs(numericCharacter - Ratio) < (Ratio / 4)); }
public static PortalViewPort StandardViewPortForCharacter(FormCharacter fc, ScreenForms sf) { return(StandardViewPortForCharacter(fc, sf.EnumValue())); }