Esempio n. 1
0
        private void BattleForm_Load(object sender, EventArgs e)
        {
            canvas_PB.BackgroundImage       = new Bitmap("icon/background.png");
            CheckForIllegalCrossThreadCalls = false;
            healthUI = new HealthUI();
            Agent p1 = StickMan(), p2 = StickMan();

            switch (IntroIndex)
            {
            case 1:
                p1 = AgentJ();
                break;

            case 2:
                p1 = AgentG();
                break;
            }
            switch (EnemyIntroIndex)
            {
            case 1:
                p2 = AgentJ();
                break;

            case 2:
                p2 = AgentG();
                break;
            }
            world   = new World(new Size(canvas_PB.Size.Width, canvas_PB.Size.Height), p1, p2);
            agentUI = new AgentUI(world);
            operator_Tm.Start();
            ticker_Tm.Start();
            painter_Tm.Start();
        }
Esempio n. 2
0
        private void agentAdd_btn_Click(object sender, EventArgs e)
        {
            AgentUI agent = new AgentUI(SynchronizationContext.Current);

            world.AgListForDrawing.Add(agent);
            world.Agents.Post(agent);
        }
 private void Awake()
 {
     hud      = FindObjectOfType <HUD>();
     systemUI = FindObjectOfType <SystemUI>();
     agentUI  = FindObjectOfType <AgentUI>();
     player   = GetComponent <Player>();
 }
Esempio n. 4
0
 private void Awake()
 {
     agentMovementController = GetComponent <AgentMovementController>();
     select            = GetComponentInChildren <SelectableComponent>();
     agentUI           = FindObjectOfType <AgentUI>();
     abilityController = FindObjectOfType <AbilityController>();
     renderer          = GetComponentInChildren <MeshRenderer>();
 }
Esempio n. 5
0
 private void Awake()
 {
     systemUI     = FindObjectOfType <SystemUI>();
     agentUI      = FindObjectOfType <AgentUI>();
     playerBaseUI = FindObjectOfType <PlayerBaseUI>();
     selectionUI.Add(systemUI.gameObject);
     selectionUI.Add(agentUI.gameObject);
     selectionUI.Add(playerBaseUI.gameObject);
 }
Esempio n. 6
0
        internal void Cellcliick()
        {
            var value         = WarGrid1.SelectedCells[0].Value.ToString();
            var referencetype = Convert.ToInt32(WarGrid1.Rows[WarGrid1.SelectedCells[0].RowIndex].Cells[1].Value.ToString());

            if (WarGrid1.SelectedCells[0].ColumnIndex == 0)
            {
                BookingInfoUI bk = new BookingInfoUI(long.Parse(value));
                bk.ShowDialog();
            }
            else if (WarGrid1.SelectedCells[0].ColumnIndex == 1)
            {
            }
            else if (WarGrid1.SelectedCells[0].ColumnIndex == 2)
            {
                if (referencetype == 1)
                {
                    CustomerUI bk = new CustomerUI(long.Parse(value));
                    bk.ShowDialog();
                }
                else if (referencetype == 2)
                {
                    AgentUI bk = new AgentUI(long.Parse(value));
                    bk.ShowDialog();
                }


                //BookingInfoUI b = new BookingInfoUI(long.Parse(value));
                //b.ShowDialog();
            }
            else if (WarGrid1.SelectedCells[0].ColumnIndex == 3)
            {
            }
            else if (WarGrid1.SelectedCells[0].ColumnIndex == 4)
            {
                PackageUI bk = new PackageUI(long.Parse(value));
                bk.ShowDialog();
            }
            else if (WarGrid1.SelectedCells[0].ColumnIndex == 5)
            {
            }
            else if (WarGrid1.SelectedCells[0].ColumnIndex == 6)
            {
                // long bookingidrec = long.Parse(  WarGrid1.SelectedRows[0].Cells[0].Value.ToString());
                var bookingidrec = long.Parse(WarGrid1.Rows[WarGrid1.SelectedCells[0].RowIndex].Cells[6].Value.ToString());

                PrintUI bk = new PrintUI(bookingidrec);
                bk.ShowDialog();
            }
            else if (WarGrid1.SelectedCells[0].ColumnIndex == 7)
            {
            }
        }
Esempio n. 7
0
 private void TileInAgentAddNew_Click(object sender, EventArgs e)
 {
     try
     {
         AgentUI c = new AgentUI();
         c.Show();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Esempio n. 8
0
        internal void Cellcliick()
        {
            var value = WarGrid1.SelectedCells[0].Value.ToString();

            // var referencetype = Convert.ToInt32(WarGrid1.SelectedRows[0].Cells[1].Value.ToString());

            if (WarGrid1.SelectedCells[0].ColumnIndex == 0)
            {
                if (SearchFor == 1)
                {
                    CustomerUI bk = new CustomerUI(long.Parse(value));
                    bk.ShowDialog();
                }
                else if (SearchFor == 2)
                {
                    AgentUI bk = new AgentUI(long.Parse(value));
                    bk.ShowDialog();
                }
            }
            else if (WarGrid1.SelectedCells[0].ColumnIndex == 1)
            {
            }
            else if (WarGrid1.SelectedCells[0].ColumnIndex == 2)
            {
                //BookingInfoUI b = new BookingInfoUI(long.Parse(value));
                //b.ShowDialog();
            }
            else if (WarGrid1.SelectedCells[0].ColumnIndex == 3)
            {
            }
            else if (WarGrid1.SelectedCells[0].ColumnIndex == 4)
            {
            }
            else if (WarGrid1.SelectedCells[0].ColumnIndex == 5)
            {
            }
            else if (WarGrid1.SelectedCells[0].ColumnIndex == 6)
            {
            }
            else if (WarGrid1.SelectedCells[0].ColumnIndex == 7)
            {
            }
            else if (WarGrid1.SelectedCells[0].ColumnIndex == 10)
            {
                long v = long.Parse(value);
                if (v > 50000)
                {
                    AgentUI bk = new AgentUI(long.Parse(value));
                    bk.ShowDialog();
                }
            }
        }
Esempio n. 9
0
 private void BookedBy_ReferenceCode_Link_Click(object sender, EventArgs e)
 {
     try
     {
         if (referencetypeVar == 1)
         {
             CustomerUI c = new CustomerUI(long.Parse(BookedBy_ReferenceCode_Link.Text));
             c.ShowDialog();
         }
         else if (referencetypeVar == 2)
         {
             AgentUI a = new AgentUI(long.Parse(BookedBy_ReferenceCode_Link.Text));
             a.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Esempio n. 10
0
 // Start is called before the first frame update
 void Start()
 {
     AgUI = GetComponent <AgentUI>();
     text = GetComponent <Text>();
 }
Esempio n. 11
0
 public void DrawAgent(AgentUI agent)
 {
     G.DrawImage(agent.VisualElement, agent.LogicObj.X, agent.LogicObj.Y);
 }
Esempio n. 12
0
        private void button2_Click(object sender, EventArgs e)
        {
            AgentUI a = new AgentUI(int.Parse(WarTextBox2.Text));

            a.Show();
        }
Esempio n. 13
0
        private void button3_Click(object sender, EventArgs e)
        {
            AgentUI a = new AgentUI();

            a.Show();
        }