2
을 편집 한 후 업데이트되지 :Monotouch.dialog EntryElement 내가 대화 만들려면이 코드를 사용하고
SettingsDialog settingDialog = new SettingsDialog();
RootElement dialog = settingDialog.CreateDialog();
DialogViewController dv = new DialogViewController (dialog, true);
dv.ViewDissapearing += delegate(object sender1, EventArgs e1) {
// update the values
Config.VendorId = settingDialog.VendorId;
} ;
NavigationController.PushViewController (dv, true);
를 Ths는 SettingsDialogClass
public class SettingsDialog
{
private EntryElement idElement;
public RootElement CreateDialog()
{
idElement = new EntryElement ("Vendor Id", string.Empty, Config.VendorId.ToString (CultureInfo.InvariantCulture)){ KeyboardType = UIKeyboardType.NumberPad };
element = new RootElement ("Configuration"){
new Section(){
idElement
} ,
...
}
public string VendorId {
get {
return idElement.Value;
}
}
문제에 대한 코드는 위의 것입니다 속성은 항상 이전 값을 반환하며 업데이트되지 않습니다. 그 이유는 무엇입니까?
감사, 이그나시오