File was renamed from ZigbeeApp/Shared/Phone/MainPage/Controls/SelectLocalDeviceImageForm.cs |
| | |
| | | using System.Collections.Generic;
|
| | | using System.Text;
|
| | |
|
| | | namespace Shared.Phone.MainPage.Controls
|
| | | namespace Shared.Phone.MainPage
|
| | | {
|
| | | /// <summary>
|
| | | /// 选择本地设备图片的界面
|
| | |
| | | /// 结束选择的事件(图片名字)
|
| | | /// </summary>
|
| | | public Action<string> FinishSelectEvent = null;
|
| | | /// <summary>
|
| | | /// 当前选择的图标控件
|
| | | /// </summary>
|
| | | private PicViewControl selectContr = null;
|
| | |
|
| | | #endregion
|
| | |
|
| | |
| | | //初始化中部信息
|
| | | this.InitMiddleFrame();
|
| | | //设置头部信息
|
| | | base.SetTitleText(Language.StringByID(R.MyInternationalizationString.LocalPicture));
|
| | | base.SetTitleText(Language.StringByID(R.MyInternationalizationString.SelectIcon));
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | listView.AddChidren(frameRow);
|
| | | }
|
| | | //背景
|
| | | var frameBack = new FrameLayoutControl();
|
| | | var frameBack = new FrameLayoutStatuControl();
|
| | | frameBack.UseClickStatu = false;
|
| | | frameBack.Height = backWidth;
|
| | | frameBack.Width = backWidth;
|
| | |
| | |
|
| | | frameBack.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //结束选择的事件
|
| | | //this.FinishSelectEvent?.Invoke(btnIcon.ImagePath);
|
| | | this.CloseForm();
|
| | | btnIcon.IsSelected = !btnIcon.IsSelected;
|
| | | if (this.selectContr != null && this.selectContr.UnSelectedImagePath != btnIcon.UnSelectedImagePath)
|
| | | {
|
| | | //取消掉前一个
|
| | | this.selectContr.IsSelected = false;
|
| | | }
|
| | | this.selectContr = btnIcon;
|
| | | };
|
| | | }
|
| | |
|
| | | //保存
|
| | | //确定
|
| | | var btnSave = new BottomClickButton();
|
| | | btnSave.TextID = R.MyInternationalizationString.uSave;
|
| | | btnSave.TextID = R.MyInternationalizationString.uConfirm1;
|
| | | bodyFrameLayout.AddChidren(btnSave);
|
| | | btnSave.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | if (this.selectContr != null && this.selectContr.IsSelected == true)
|
| | | {
|
| | | //调用回调函数
|
| | | this.FinishSelectEvent?.Invoke(this.selectContr.UnSelectedImagePath);
|
| | | }
|
| | | this.CloseForm();
|
| | | };
|
| | |
|
| | | //调整桌布高度
|