protected void Page_Load(object sender, EventArgs e)
        {
            SuperOfficeAuthHelper.Authorize();

            // First choose the correct installation:
            SuperOffice.Configuration.ConfigFile.WebServices.RemoteBaseURL = SuperOfficeAuthHelper.Context.NetServerUrl;

            var selPar = Request.QueryString["SelectionId"];
            int selId  = Convert.ToInt32(selPar);

            using (var selAgent = new SelectionAgent())
            {
                SelectionEntity sel = selAgent.GetSelectionEntity(selId);

                IAddressFetcher fetcher = null;
                switch (sel.TargetTableNumber)
                {
                case 5:                         // Contact
                    fetcher = new AddressFetcherFromContactSelection();
                    break;

                default:
                    fetcher = new AddressFetcherFromOtherSelections(sel.TargetTableNumber);
                    break;
                }

                Page.ClientScript.RegisterStartupScript(this.GetType(), "MapScript", fetcher.GetScript(selId), true);
            }
        }
Пример #2
0
 void Start()
 {
     selectionManager = GameObject.Find("PlayerGameManager").GetComponent<SelectionManager>();
     //		selectionManager.RegisterUnit(new UnitObject());
     spawnQueueManager = GameObject.Find("PlayerGameManager").GetComponent<SpawnQueueManager>();
     selectionAgent = GetComponent<SelectionAgent>();
     state = UnitState.Defend;
     transform.GetChild(0).localScale = new Vector3(1, 1, 0) * throwRadius * 1.4f;
     // NOTE: I have no idea why 1.4 works.  It's 2 * 0.7, but I don't know why 70% is special.
 }
Пример #3
0
    void Start()
    {
        selectionManager = GameObject.Find("PlayerGameManager").GetComponent <SelectionManager>();
//		selectionManager.RegisterUnit(new UnitObject());
        spawnQueueManager = GameObject.Find("PlayerGameManager").GetComponent <SpawnQueueManager>();
        selectionAgent    = GetComponent <SelectionAgent>();
        state             = UnitState.Defend;
        transform.GetChild(0).localScale = new Vector3(1, 1, 0) * throwRadius * 1.4f;
        // NOTE: I have no idea why 1.4 works.  It's 2 * 0.7, but I don't know why 70% is special.
    }