public void Load(NpcData data) { Clear(); if (data == null) { HasChanges = false; return; } // string var_ai = data.GetValue(NpcData.VAR_NPC_AI, null); ScriptProperty prop = ScriptProperty.FromString(var_ai); string name = prop.ScriptName; // if (!string.IsNullOrEmpty(name)) { ScriptPageControl page, first_page; first_page = page = addTab(name); // string current, super; bool has_super; current = name; do { super = page.GetSuper(); has_super = (!string.IsNullOrEmpty(super) && super != current && super != "(null)"); if (has_super) { page = addTab(super); } }while (page != null && has_super); // is_loading = true; current_page = first_page; lstScript.SelectedItem = first_page.Script; setPage(first_page.Script); is_loading = false; } // HasChanges = false; }
private string getAI(string value) { ai_property = ScriptProperty.FromString(value); return(ai_property.ScriptName); }