Example #1
0
        static void Main(string[] args)
        {
            Title.UpperIndent(Assembly.GetExecutingAssembly());

            Controller controler = new Controller();

            LightInRoomManager    lightInRoomManager    = new LightInRoomManager();
            LightInRoomOnCommand  lightInRoomOnCommand  = new LightInRoomOnCommand(lightInRoomManager);
            LightInRoomOffCommand lightInRoomOffCommand = new LightInRoomOffCommand(lightInRoomManager);

            controler.SetComands(0, lightInRoomOnCommand, lightInRoomOffCommand);

            System.Console.WriteLine(controler);

            controler.OnClick(0);
            controler.OffClick(0);

            GarageManager gm = new GarageManager();
            MacroCommand  mc = new MacroCommand();

            mc.AddComand(new GarageDoorDownCommnad(gm));
            mc.AddComand(new GarageDoorUpCommnad(gm));
            mc.AddComand(new GarageDoorStopCommand(gm));
            mc.AddComand(new GarageDoorLightOnCommand(gm));
            mc.AddComand(new GarageDoorLightOffCommand(gm));

            controler.SetComands(1, mc, lightInRoomOffCommand);
            System.Console.WriteLine();
            controler.OnClick(1);

            Title.BottonIndent();
        }
        public AllLicensePlatesForm(GarageManager i_GarageManager)
        {
            r_GarageManagerReference = i_GarageManager;
            InitializeComponent();
            List <Vehicle> allVehicles = i_GarageManager.GetAllVehicles();

            if (allVehicles.Count == 0)
            {
                Message.Text = "There are no vehicles in the garage";
            }
            else
            {
                int lastLabelBottom = Message.Bottom;
                foreach (Vehicle vehicle in allVehicles)
                {
                    Label LicensePlateNumber = new Label();
                    LicensePlateNumber.Click      += Label_Click;
                    LicensePlateNumber.MouseEnter += LicensePlateNumber_MouseEnter;
                    LicensePlateNumber.MouseLeave += LicensePlateNumber_MouseLeave;
                    LicensePlateNumber.AutoSize    = true;
                    LicensePlateNumber.Text        = vehicle.LicensePlateNumber;
                    LicensePlateNumber.Left        = Message.Left;
                    LicensePlateNumber.Top         = lastLabelBottom + 5;
                    Controls.Add(LicensePlateNumber);
                    lastLabelBottom = LicensePlateNumber.Bottom;
                }

                ButtonExit.Top = lastLabelBottom + 20;
                this.Height    = ButtonExit.Bottom + 50;
            }

            Update();
        }
Example #3
0
        public IHttpActionResult PutGarageManager(int id, GarageManager garageManager)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != garageManager.ID)
            {
                return(BadRequest());
            }

            db.Entry(garageManager).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!GarageManagerExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
Example #4
0
        public void Start()
        {
            manager = new GarageManager();
            wl(m_HelloMsg);
            string input;

            System.Console.Write("Garage>");
            while (!(input = System.Console.ReadLine()).Equals("Q"))
            {
                if (input.Equals(""))
                {
                    System.Console.Write("Garage>");
                    continue;
                }

                Dictionary <string, string> dict = parse(input);
                if (dict != null)
                {
                    run(dict);
                }
                else
                {
                    wl("Wrong Input...");
                }

                System.Console.Write("Garage>");
            }
        }
Example #5
0
        public void SetMenu(GarageManager.Menus menu)
        {
            menuButtons[(int)GarageManager.Main.OpenMenu].isEnabled = true;
            menuButtons[(int)menu].isEnabled = false;

            GarageManager.Main.ChangeMenu(menu);
            Toggle(false);
        }
 public AddFuelForm(GarageManager i_GarageManager)
 {
     r_GarageManagerReference = i_GarageManager;
     InitializeComponent();
     foreach (string fuelType in Enum.GetNames(typeof(Fuel.eFuelType)))
     {
         ComboBoxFuelType.Items.Add(fuelType);
     }
 }
 private void Awake()
 {
     if (_instance != null && _instance != this)
     {
         Destroy(gameObject);
         return;
     }
     _instance = this;
 }
 public ChangeStatusForm(GarageManager i_GarageManager)
 {
     r_GarageManagerReference = i_GarageManager;
     InitializeComponent();
     foreach (string repairStatus in Enum.GetNames(typeof(Vehicle.eRepairStatus)))
     {
         VehicleStatuses.Items.Add(repairStatus);
     }
 }
Example #9
0
 private static void RestartManagers()
 {
     RoomManager.Restart();
     SchoolManager.Restart();
     GarageManager.Restart();
     TManager.Restart();
     DontDestroy.Restart();
     Clearing();
 }
Example #10
0
 public AddVehicleForm(GarageManager i_GarageManagerReference)
 {
     m_VehicleDetailesFilled  = false;
     r_GarageManagerReference = i_GarageManagerReference;
     InitializeComponent();
     foreach (string vehicleType in VehicleCreator.GetListOfVehicleTypes())
     {
         VehicleTypeComboBox.Items.Add(vehicleType);
     }
 }
Example #11
0
        public static void Main()
        {
            GarageManager gm = new GarageManager();
            StartMenu     sm = new StartMenu(gm);

            while (true)
            {
                sm.Show();
            }
        }
Example #12
0
	// Use this for initialization
	void Start () {
		REF = this;
		trigger = this.GetComponent<ConversationTrigger>();
		
		
		UpdateDisplay();
//		trigger.TryStartConversation(this.gameObject.transform);
		Time.timeScale = 1f;
		DialogueLua.SetVariable("FullGameOwned",SaveGameUtils.fullGameOwned);
	}
        public VehiclesByStatusForm(GarageManager i_GarageManager)
        {
            r_GarageManagerReference = i_GarageManager;
            InitializeComponent();
            foreach (string status in Enum.GetNames(typeof(Vehicle.eRepairStatus)))
            {
                StatusComboBox.Items.Add(status);
            }

            Update();
        }
Example #14
0
        public IHttpActionResult GetGarageManager(int id)
        {
            GarageManager garageManager = db.GarageManagers.Find(id);

            if (garageManager == null)
            {
                return(NotFound());
            }

            return(Ok(garageManager));
        }
Example #15
0
    async void Start()
    {
        instance = this;
        VehicleView.CallList.Add(this);
        VehicleView.CallList.Add(DealerView);
        VehicleView.CallList.Add(GarageView);
        VehicleView.Vehicles      = SaveSystem.GetVehicles();
        VehicleView.SelectedIndex = SaveSystem.GetSelectedVehicleIndex();
        await VehicleView.SpawnVehicle(SaveSystem.GetSelectedVehicleIndex());

        DealerView.view = VehicleView;
    }
Example #16
0
        public IHttpActionResult PostGarageManager(GarageManager garageManager)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.GarageManagers.Add(garageManager);
            db.SaveChanges();

            return(CreatedAtRoute("DefaultApi", new { id = garageManager.ID }, garageManager));
        }
Example #17
0
        public GarageManager Create()
        {
            var garageManager = new GarageManager();

            garageManager.AddGarage(new Garage
            {
                City   = "Köln",
                Street = "Westerwaldstr. 99",
                Zip    = "51105"
            }, 400
                                    );
            return(garageManager);
        }
 public MainForm(bool i_SaveToDataBase, IMongoCollection <BsonDocument> i_DBCollection)
 {
     r_GarageManager = new GarageManager(i_SaveToDataBase, i_DBCollection);
     InitializeComponent();
     if (i_SaveToDataBase)
     {
         selectedEnvironmentLabel.Text += "MongoDB";
     }
     else
     {
         selectedEnvironmentLabel.Text += "Local";
     }
 }
Example #19
0
        public IHttpActionResult DeleteGarageManager(int id)
        {
            GarageManager garageManager = db.GarageManagers.Find(id);

            if (garageManager == null)
            {
                return(NotFound());
            }

            db.GarageManagers.Remove(garageManager);
            db.SaveChanges();

            return(Ok(garageManager));
        }
Example #20
0
        private IEnumerator SwitchingMenu(GarageManager.Menus currentMenu)
        {
            switch (currentMenu)
            {
                case GarageManager.Menus.Edit:
                    StartCoroutine(Full());
                    break;
                case GarageManager.Menus.Paint:
                case GarageManager.Menus.Abilities:
                    StartCoroutine(Half());
                    break;
                case GarageManager.Menus.View:
                    StartCoroutine(Closed());
                    break;
            }

            yield return null;
        }
 public GarageDoorLightOffCommand(GarageManager garageManager)
 {
     _garageManager = garageManager;
 }
 public ChargeBatteryForm(GarageManager i_GarageManager)
 {
     r_GarageManagerReference = i_GarageManager;
     InitializeComponent();
 }
Example #23
0
 public FillWheelsForm(GarageManager i_GarageManager)
 {
     r_GarageManagerReference = i_GarageManager;
     InitializeComponent();
 }
Example #24
0
	public void OnDestroy() { 
		REF = null;
	}
Example #25
0
 public static void CheckPoint()
 {
     chapter = 1.3;
     GarageManager.Restart();
 }
 public VehicleFullDetailesForm(GarageManager i_GarageManager)
 {
     r_GarageManager = i_GarageManager;
     InitializeComponent();
 }
        private IEnumerator SwitchingMenu(GarageManager.Menus previousMenu, GarageManager.Menus currentMenu)
        {
            int previous = (int)previousMenu;
            if (previous < buttons.Length)
            {
                yield return StartCoroutine(ClosingMenu(buttons[previous]));
            }

            int current = (int)currentMenu;
            if (current < buttons.Length)
            {
                yield return StartCoroutine(OpeningMenu(buttons[current]));
            }
        }
Example #28
0
 public GarageDoorDownCommnad(GarageManager garageManager)
 {
     _garageManager = garageManager;
 }
Example #29
0
    // METHOD

    void Start()
    {
        garageManager = FindObjectOfType <GarageManager> ();
    }
Example #30
0
        public static void Main()
        {
            GarageManager manger = new GarageManager();

            manger.Run();
        }
Example #31
0
 public GarageDoorStopCommand(GarageManager garageManager)
 {
     _garageManager = garageManager;
 }
Example #32
0
        public GarageManagerUi()
        {
            IGarageManager garageManager = new GarageManager();

            r_Operations = garageManager.GetOperations().OrderBy(i_O => i_O.Index);
        }
 private void OnMenuChanged(GarageManager.Menus previousMenu, GarageManager.Menus currentMenu)
 {
     StopAllCoroutines();
     StartCoroutine(SwitchingMenu(previousMenu, currentMenu));
 }
Example #34
0
 internal UserInterface()
 {
     m_Garage = new GarageManager();
 }