Ejemplo n.º 1
0
    public static void Init()
    {
        AddGameObject window = EditorWindow.GetWindow <AddGameObject>();

        window.titleContent = new GUIContent("修改对象结构");
        window.ShowPopup();
    }
        public async Task <IActionResult> OnPostObjectAsync()
        {
            GameObject Go      = new GameObject();
            string     enabled = Request.Form["Enabled"].ToString().ToLower();

            if (enabled == "true")
            {
                Go.Enabled = true;
            }
            else
            {
                Go.Enabled = false;
            }

            Go.GameID           = int.Parse(Request.Form["GameID"]);
            Go.GameObjectTypeID = int.Parse(Request.Form["GameObjectTypeID"]);
            Go.Name             = Request.Form["ObjectName"];
            Go.ParentID         = int.Parse(Request.Form["ParentID"]);
            Go.ParentType       = int.Parse(Request.Form["ParentType"]);
            Go.StartDate        = DateTime.Parse(Request.Form["StartDate"].ToString());
            Go.EndDate          = DateTime.Parse(Request.Form["EndDate"].ToString());
            Go.Status           = int.Parse(Request.Form["Status"]);

            string shortNames   = Request.Form["ShortNames"];
            string Descriptions = Request.Form["Descriptions"];

            AddGameObject AGO = new AddGameObject(Go, Descriptions, shortNames);

            HttpResponseMessage responseMessage = await DS.PostAsync(AGO, "bot/AddObject");

            string content = await responseMessage.Content.ReadAsStringAsync();

            SimpleResponse SR = JsonConvert.DeserializeObject <SimpleResponse>(content);



            return(Page());
        }
Ejemplo n.º 3
0
 private void ClearTempLists()
 {
     RemoveGameObject.Clear();
     AddGameObject.Clear();
 }