Exemplo n.º 1
0
        private void Search()
        {
            ClearStatusMessage();
            var code       = txtSearchKey.Text.ToLower();
            var branchCode = txtBranchCode.Text.ToLower();

            try
            {
                var task = ShowBankBranch
                ? GridLoader.SearchByKey(code, branchCode)
                : GridLoader.SearchByKey(code);

                ProgressDialog.Start(ParentForm, task, false, SessionKey);
                grdSearch.DataSource = new BindingSource(task.Result, null);
            }
            catch (Exception ex)
            {
                Debug.Fail(ex.ToString());
            }

            if (grdSearch.RowCount == 0)
            {
                ShowWarningDialog(MsgWngNotExistSearchData);
                txtSearchKey.Select();
            }
            else
            {
                grdSearch.Select();
            }
        }
 void Start()
 {
     mapsloader        = GameObject.Find("GlobalScripts").GetComponent <MapsLoader>();
     gridloader        = GameObject.Find("GlobalScripts").GetComponent <GridLoader>();
     selectedProp      = proplist [0];
     selectedPropIndex = 0;
     mouse             = GameObject.Find("Mouse");
     player            = GameObject.Find("Player");
     mouse.SetActive(false);
 }
Exemplo n.º 3
0
 public static Grid Easy()
 {
     return(GridLoader.Load(@"...|752|81.
                              ...|.4.|..6
                              2..|.83|..5
                              -----------   
                              ..9|...|283
                              .8.|397|.4.
                              314|...|7..
                              -----------
                              1..|43.|..7
                              4..|.7.|...
                              .95|261|..."));
 }
Exemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        gridLoader = GameObject.FindGameObjectWithTag("GameController").GetComponent<GridLoader>();
        guiScript = GameObject.FindGameObjectWithTag("GameController").GetComponent<GUIScript>();
        cameraComponent = this.GetComponent<Camera>();
        simulationScript = GameObject.FindGameObjectWithTag("GameController").GetComponent<SimulationScript>();

        //This determines how the mouse direction is mapped to movements in the 3d space
        right = new Vector3(1,0,-1).normalized;
        upward = new Vector3(1,0,1).normalized;

        groundPlane = new Plane(new Vector3(0,1,0), new Vector3(0,0,0));

        mode = "panning";
        meteorSelect.renderer.enabled = false;

        shakeTime = 0.0f;
    }
Exemplo n.º 5
0
        public void UpdateSpawnerIDs()
        {
            m_spawnerIDsLabel.text = String.Empty;
            String path       = Application.streamingAssetsPath + "/Maps/";
            String path2      = m_mapList.selection + ".xml";
            String p_fileName = Path.Combine(path, path2);
            Grid   grid       = GridLoader.Load(p_fileName);

            foreach (GridSlot gridSlot in grid.SlotIterator())
            {
                foreach (Spawn spawn in gridSlot.SpawnObjects)
                {
                    if (spawn.ObjectType == EObjectType.PARTY)
                    {
                        UILabel spawnerIDsLabel = m_spawnerIDsLabel;
                        spawnerIDsLabel.text = spawnerIDsLabel.text + spawn.ID.ToString() + ";";
                    }
                }
            }
            m_spawnerIDsLabel.Update();
        }
Exemplo n.º 6
0
        private static void Main(string[] _)
        {
            var window   = MainWindow.Create();
            var view     = new View(window);
            var model    = new Model(GridLoader.CreateGrid());
            var control  = new Control(model, view);
            var keyboard = window.KeyboardState;

            window.MouseMove   += args => control.PlacePath(window.MousePosition.X, window.Size.Y - 1 - window.MousePosition.Y, keyboard);
            window.MouseMove   += args => control.ShowTowerSample(window.MousePosition.X, window.Size.Y - 1 - window.MousePosition.Y, keyboard);
            window.MouseDown   += args => control.Click(window.MousePosition.X, window.Size.Y - 1 - window.MousePosition.Y, keyboard);
            window.UpdateFrame += args =>
            {
                control.Update((float)args.Time, window.KeyboardState);
                model.Update((float)args.Time);
            };                                                                  // call update once each frame
            window.Resize      += args => view.Resize(args.Width, args.Height); // on window resize inform view
            window.RenderFrame += _ => view.Draw(model);                        // first draw the model
            window.RenderFrame += _ => window.SwapBuffers();                    // buffer swap needed for double buffering
            window.Run();
        }
Exemplo n.º 7
0
        public RegularGrid GetGrid()
        {
            GridLoader loader = new GridLoader();

            return(loader.Load(RSConfig.GridFile));
        }
Exemplo n.º 8
0
 // Start is called before the first frame update
 void Start()
 {
     objectPooler = ObjectPooler.Instance;
     gl           = GameObject.Find("GridControl").GetComponent <GridLoader>();
 }
Exemplo n.º 9
0
 // Start is called before the first frame update
 void Start()
 {
     StartCoroutine(Countdown(2));
     objectPooler = ObjectPooler.Instance;
     gl           = GameObject.Find("GridControl").GetComponent <GridLoader>();
 }
Exemplo n.º 10
0
    // Use this for initialization
    void Start()
    {
        populationTimer = populationCycleTime;
        population = 20.0f;

        food = 50.0f;

        happiness = 50.0f;
        happinessTimer = happinessCycleTime;

        aiBuilder = GetComponent<AIBuilder>();
        gridLoader = GetComponent<GridLoader>();
        cameraControl = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<CameraControl>();
        defeat = false;
    }