| | |
| | | #region ■ 变量声明___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 添加联系方式的事件
|
| | | /// </summary>
|
| | | public Action AddPhoneEvent = null;
|
| | | /// <summary>
|
| | | /// 信息提示控件
|
| | | /// </summary>
|
| | | private NormalViewControl btnErrorMsg = null;
|
| | |
| | | {
|
| | | Contacts.ContactAction = (phoneName, phoneNum) =>
|
| | | {
|
| | | if (string.IsNullOrEmpty(phoneName) == true)
|
| | | {
|
| | | return;
|
| | | }
|
| | | //手机号检测
|
| | | if (this.CheckPhoneNumber("86", phoneNum, phoneName) == false)
|
| | | {
|
| | |
| | |
|
| | | //初始化中部信息
|
| | | this.InitMiddleFrame();
|
| | |
|
| | | //重写底层返回按键事件
|
| | | this.BackButtonClickEvent = (sender) =>
|
| | | {
|
| | | this.AddPhoneEvent = null;
|
| | | this.CloseForm();
|
| | | };
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | btnArea.TextAlignment = TextAlignment.Center;
|
| | | btnArea.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | frameBack.AddChidren(btnArea);
|
| | | btnArea.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var form = new AreaCodeSelectForm();
|
| | | form.AddForm();
|
| | | form.FinishSelectEvent += (code) =>
|
| | | {
|
| | | btnArea.Text = "+" + code;
|
| | | };
|
| | | };
|
| | | //目前只针对+86
|
| | | //btnArea.ButtonClickEvent += (sender, e) =>
|
| | | //{
|
| | | // var form = new AreaCodeSelectForm();
|
| | | // form.AddForm();
|
| | | // form.FinishSelectEvent += (code) =>
|
| | | // {
|
| | | // btnArea.Text = "+" + code;
|
| | | // };
|
| | | //};
|
| | | //电话输入框
|
| | | var txtPhone = new TextInputControl(Application.GetRealWidth(634), btnArea.Height, false);
|
| | | txtPhone.X = btnArea.Right + Application.GetRealWidth(35);
|
| | |
| | | var txtNote = new TextInputControl(Application.GetRealWidth(740), txtPhone.Height, false);
|
| | | txtNote.X = ControlCommonResourse.XXLeft;
|
| | | txtNote.Y = btnLine.Bottom + Application.GetRealHeight(60);
|
| | | txtNote.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseInpuBackup);
|
| | | txtNote.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPlesaeInputNoteInformation);
|
| | | frameBack.AddChidren(txtNote);
|
| | | //取消图标
|
| | | var btnCancel2 = new MostRightIconControl(69, 69);
|
| | |
| | | return;
|
| | | }
|
| | | this.CloseForm();
|
| | |
|
| | | //调用回调函数
|
| | | this.AddPhoneEvent?.Invoke();
|
| | | this.AddPhoneEvent = null;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | }
|
| | | if (strNote == string.Empty)
|
| | | {
|
| | | //请输入备注名称
|
| | | btnErrorMsg.Text = Language.StringByID(R.MyInternationalizationString.uPleaseInpuBackup);
|
| | | //请输入备注内容
|
| | | btnErrorMsg.Text = Language.StringByID(R.MyInternationalizationString.uPlesaeInputNoteInformation);
|
| | | return false;
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | |
| | |
|
| | | |
| | | }
|
| | | }
|