File was renamed from ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DialogInputFrameControl.cs |
| | |
| | | /// <para>子控件添加完成后,请调用【InitLastControl】函数完成最后的初始化(仅限None模式)</para>
|
| | | /// <para>确认按钮的单击事件为:ComfirmClickEvent</para>
|
| | | /// </summary>
|
| | | public class DialogInputFrameControl : FrameLayout
|
| | | public class DialogInputForm : DialogCommonForm
|
| | | {
|
| | | #region ■ 变量声明___________________________
|
| | |
|
| | |
| | | /// <para>子控件添加完成后,请调用【FinishInitControl】函数完成最后的初始化(仅限None模式)</para>
|
| | | /// <para>确认按钮的单击事件为:ComfirmClickEvent</para>
|
| | | /// </summary>
|
| | | /// <param name="mainFrame">
|
| | | /// <para>载体父控件(会自动将该控件加入此载体父控件)</para>
|
| | | /// <para>可以为空,当为空时,请在添加入载体父控件后,调用InitframeControl函数进行初始化</para>
|
| | | /// </param>
|
| | | /// <param name="i_dialogFrameMode">弹窗模式</param>
|
| | | public DialogInputFrameControl(FrameLayout mainFrame, DialogFrameMode i_dialogFrameMode = DialogFrameMode.None)
|
| | | public void ShowForm(DialogFrameMode i_dialogFrameMode = DialogFrameMode.None)
|
| | | {
|
| | | this.dialogFrameMode = i_dialogFrameMode;
|
| | |
|
| | | if (mainFrame != null)
|
| | | {
|
| | | mainFrame.AddChidren(this);
|
| | | //初始化桌布控件
|
| | | this.InitframeControl();
|
| | | }
|
| | | //初始化桌布控件
|
| | | this.InitMiddleFrame();
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化桌布控件
|
| | | /// </summary>
|
| | | public void InitframeControl()
|
| | | public void InitMiddleFrame()
|
| | | {
|
| | | if (this.frameLayout != null)
|
| | | {
|
| | | this.frameLayout.RemoveAll();
|
| | | }
|
| | | else
|
| | | {
|
| | | this.BackgroundColor = UserCenterColor.Current.DialogBackColor;
|
| | | }
|
| | |
|
| | | //这是一个框
|
| | | this.frameLayout = new FrameLayout();
|
| | | frameLayout.Height = Application.GetRealHeight(538);
|
| | |
| | | frameLayout.AddChidren(btnCancel);
|
| | | btnCancel.MouseUpEventHandler += (sender, e) =>
|
| | | {
|
| | | this.RemoveFromParent();
|
| | | this.CloseForm();
|
| | | };
|
| | |
|
| | | //确认
|
| | |
| | | frameLayout.AddChidren(btnOk);
|
| | | btnOk.MouseUpEventHandler += (sender, e) =>
|
| | | {
|
| | | if (this.Text == string.Empty && this.txtInput != null && string.IsNullOrEmpty(this.txtInput.PlaceholderText) == false)
|
| | | {
|
| | | var alert = new ShowMsgControl(ShowMsgType.Error, this.txtInput.PlaceholderText);
|
| | | alert.Show();
|
| | | return;
|
| | | }
|
| | | if (this.ComfirmClickEvent == null)
|
| | | {
|
| | | this.RemoveFromParent();
|
| | | this.CloseForm();
|
| | | return;
|
| | | }
|
| | | this.ComfirmClickEvent(this.Text);
|
| | |
| | | /// <summary>
|
| | | /// 画面关闭
|
| | | /// </summary>
|
| | | public void CloseDialog()
|
| | | public override void CloseFormBefore()
|
| | | {
|
| | | this.ComfirmClickEvent = null;
|
| | | this.RemoveFromParent();
|
| | |
|
| | | base.CloseFormBefore();
|
| | | }
|
| | |
|
| | | #endregion
|