Exemplo n.º 1
0
        partial void OnButtonOk(Foundation.NSObject sender)
        {
            if (__GeneratedEmailInfo == null)
            {
                Close();
                return;
            }

            if (!String.Equals(GuiNotesField.String, __GeneratedEmailInfo.Notes))
            {
                __NeedToCloseWindow = true;
                __Model.UpdateNotes(__GeneratedEmailInfo, GuiNotesField.String);
                return;
            }

            Close();
        }
        partial void OnEdit(Foundation.NSObject sender)
        {
            int row = (int)GuiTableEmails.SelectedRow;

            if (row < 0)
            {
                return;
            }

            PrivateEmailInfo email = __Model.PrivateEmails [row];

            string newNotes = IVPNAlert.ShowInputBox(string.Format(LocalizedStrings.Instance.LocalizedString("Label_PrivateEmail_NotesDialog_PARAMETRIZED"), email.Email),
                                                     "",
                                                     email.Notes,
                                                     true);

            if (newNotes == null || (email.Notes != null && newNotes.Equals(email.Notes)))
            {
                return;
            }

            __Model.UpdateNotes(email, newNotes);
        }