private void InitItem() { // InitTitle(Tools.GetMessageById("33101")); group1 = GetChild("n9").asGroup; group2 = GetChild("n10").asGroup; textTitle = GetChild("n6").asTextField; textTitle.text = Tools.GetMessageById("13128"); btnOk = GetChild("n7").asButton; btnOk.text = Tools.GetMessageById("13079"); btnCancel = GetChild("n8").asButton; btnCancel.text = Tools.GetMessageById("14025"); group2.visible = true; userName = this.GetChild("n5").asComboBox; // userName.onChanged.Add (() => // { // uname = userName.text; // }); //GObject obj= this.GetChild("n3"); //obj.visible = false; // input_password = obj.asCom.GetChild ("n1").asTextInput; // input_password.promptText = Tools.GetMessageById ("13084"); // input_password.maxLength = (int)DataManager.inst.systemSimple["password_num"]; // input_password.restrict = Config.REG_NUMORABC; // input_password.displayAsPassword = true; List <string[]> pList = LocalStore.GetUids(); string[] myItem = new string[] { }; foreach (string[] dic in pList) { if (dic[0] == userModel.uid) { myItem = dic; pList.Remove(dic); break; } } // string[] tempItem= pList[0]; // pList[pList.IndexOf(myItem)] = tempItem; // pList[0] = myItem; // if (pList.Count != 0) // { foreach (string[] dic in pList) { ulist.Add(dic[1]); // if (dic [0] != userModel.uid) { // ulist.Add (dic [1]); //} } ulist.Add(Tools.GetMessageById("13066")); userName.items = ulist.ToArray(); // uid = ((object[])pList[0])[0].ToString(); // uname = ((object[])pList[0])[1].ToString(); // pwd = myItem[2]; // utype = ((object[])pList[0])[3].ToString(); uInfo = myItem; userName.onChanged.Add(() => { if (userName.selectedIndex == ulist.Count - 1) { ViewManager.inst.CloseView(); ViewManager.inst.ShowView <MediatorChangeAccountIcon>(); } else { uInfo = (string[])pList[userName.selectedIndex]; if (uInfo[0].ToString() == userModel.uid) { ViewManager.inst.CloseView(this); } else { group1.visible = true; group2.visible = false; // pwd = uInfo[2].ToString(); // utype = uInfo[3].ToString(); } } }); // } // else // { // //userName.text = Tools.GetMessageById ("13102"); userName.text = userModel.uname; // } btn_ok = this.GetChild("n0").asButton; btn_ok.text = Tools.GetMessageById("13076"); btnCancel.onClick.Add(() => { ViewManager.inst.CloseView(); }); btnOk.onClick.Add(() => { if (userName.text == "") { ViewManager.inst.ShowText(Tools.GetMessageById("13033")); } else { if (uInfo != null && uInfo.Length > 0) { Send(uInfo[0], uInfo[2], uInfo[3]); } } }); btn_ok.onClick.Add(() => { if (userName.text == "") { ViewManager.inst.ShowText(Tools.GetMessageById("13033")); } else { if (uInfo != null && uInfo.Length > 0) { Send(uInfo[0], uInfo[2], uInfo[3]); } } }); }