Merge branch 'WJC' into temp-wxr
old mode 100644
new mode 100755
Binary files differ
| | |
| | | <Folder Include="Assets\Phone\FunctionIcon\Electrical\WaterValve\" /> |
| | | <Folder Include="Assets\Phone\FunctionIcon\Electrical\ClothesHanger\" /> |
| | | <Folder Include="Assets\Phone\PirIcon\" /> |
| | | <Folder Include="Assets\Phone\VideoIcon\" /> |
| | | </ItemGroup> |
| | | <ItemGroup /> |
| | | <ItemGroup> |
| | |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\irlearn_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\curtainswitch_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalracks_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\VideoIcon\answer.png" /> |
| | | <AndroidAsset Include="Assets\Phone\VideoIcon\danyuanji.png" /> |
| | | <AndroidAsset Include="Assets\Phone\VideoIcon\hangup.png" /> |
| | | <AndroidAsset Include="Assets\Phone\VideoIcon\keshiduijiang.png" /> |
| | | <AndroidAsset Include="Assets\Phone\VideoIcon\menjin.png" /> |
| | | <AndroidAsset Include="Assets\Phone\VideoIcon\phone.png" /> |
| | | <AndroidAsset Include="Assets\Phone\VideoIcon\weiqiangji.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PirIcon\1.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PirIcon\2.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PirIcon\3.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PirIcon\4.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PirIcon\left.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PirIcon\right.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <AndroidNativeLibrary Include="libs\armeabi-v7a\libelianjni.so" /> |
| | |
| | | using System; |
| | | using Android.Content; |
| | | using Com.Widget.Jlcountrycode; |
| | | using Com.Widget.Jlcountrycode.Sortselect; |
| | | using System.Collections.Generic; |
| | | using Java.Util; |
| | | |
| | | namespace JLCountrycode |
| | | { |
| | |
| | | JLCountryCodeActivity.OnCountryCodeCallback = new OnCountryCodeCallback(action); |
| | | Shared.Application.Activity.StartActivity(new Intent(Shared.Application.Activity, typeof(JLCountryCodeActivity))); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 自定义传入字典数据 选择 |
| | | /// </summary> |
| | | /// <param name="titleStr"></param> |
| | | /// <param name="dic"></param> |
| | | /// <param name="action"></param> |
| | | public void ShowSortSelection(string titleStr, Dictionary<string, List<string>> dic, Action<string> action) |
| | | { |
| | | try |
| | | { |
| | | SortSelectionUtils.Instance.OnSortSelectCallback = new OnSSCallback(action); |
| | | SortSelectionUtils.Instance.SortSelectTitle = titleStr; |
| | | SortSelectionUtils.Instance.MSortSelectList = ConvertToHashMap(dic); |
| | | Shared.Application.Activity.StartActivity(new Intent(Shared.Application.Activity, typeof(JLSortSelectionActivity))); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Console.WriteLine(ex.ToString()); |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Dictionary 转 Android HashMap |
| | | /// </summary> |
| | | /// <param name="dict"></param> |
| | | /// <returns></returns> |
| | | Dictionary<string, ArrayList> ConvertToHashMap(Dictionary<string, List<string>> dict) |
| | | { |
| | | Dictionary<string, ArrayList> newDictionary = new Dictionary<string, ArrayList>(); |
| | | try |
| | | { |
| | | foreach (string key in dict.Keys) |
| | | { |
| | | var value = dict[key]; |
| | | var arrayList = new ArrayList(); |
| | | arrayList.AddAll(value.ToArray()); |
| | | newDictionary.Add(key, arrayList); |
| | | } |
| | | } |
| | | catch (Exception Ex) |
| | | { |
| | | //Logger.LogException(Ex); |
| | | } |
| | | return newDictionary; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | mAction?.Invoke(countryName, code); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// OnSortSelectCallback |
| | | /// </summary> |
| | | public class OnSSCallback : Java.Lang.Object, IOnSortSelectCallback |
| | | { |
| | | |
| | | Action<string> mAction; |
| | | public OnSSCallback(Action<string> action) |
| | | { |
| | | mAction = action; |
| | | } |
| | | |
| | | public void OnSortSelectCallback(string countryName) |
| | | { |
| | | mAction?.Invoke(countryName); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | <BundleResource Include="Resources\Phone\PirIcon\left.png" /> |
| | | <BundleResource Include="Resources\Phone\PirIcon\right.png" /> |
| | | <BundleResource Include="Resources\Phone\PirIcon\succeed.png" /> |
| | | <BundleResource Include="Resources\Phone\VideoIcon\hangup.png" /> |
| | | <BundleResource Include="Resources\Phone\VideoIcon\danyuanji.png" /> |
| | | <BundleResource Include="Resources\Phone\VideoIcon\.DS_Store" /> |
| | | <BundleResource Include="Resources\Phone\VideoIcon\weiqiangji.png" /> |
| | | <BundleResource Include="Resources\Phone\VideoIcon\keshiduijiang.png" /> |
| | | <BundleResource Include="Resources\Phone\VideoIcon\phone.png" /> |
| | | <BundleResource Include="Resources\Phone\VideoIcon\menjin.png" /> |
| | | <BundleResource Include="Resources\Phone\VideoIcon\answer.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ITunesArtwork Include="iTunesArtwork" /> |
| | |
| | | { |
| | | var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey); |
| | | var revString = Encoding.UTF8.GetString(bytes); |
| | | UI.UI2.PersonalCenter.PirDevice.Method.controldata = revString; |
| | | UI.UI2.PersonalCenter.PirDevice.Method.buttondata = revString; |
| | | } |
| | | #region 数据更新推送主题 |
| | | //appHomeRefresh:住宅数据刷新通知 |
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\AcControlPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\FhControlPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\TvControlPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\MainView.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\View\FrameLayout50.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\View\FrameLayout60.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\View\ShowDialog.cs" />
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | | <Folder Include="$(MSBuildThisFileDirectory)DAL\" />
|
| | |
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\View\" />
|
| | | </ItemGroup>
|
| | | </Project> |
| | |
| | | } |
| | | //new引导界面 |
| | | View.ReplicationView replication = new View.ReplicationView(); |
| | | replication.Show(); |
| | | // MainPage.BasePageView.AddChidren(replication); |
| | | replication.Show(this); |
| | | // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | |
| | | |
| | | //添加数据对象 |
| | | Entity.AttributesStatus buttonObj = new Entity.AttributesStatus(); |
| | |
| | | { |
| | | public class BrandList : FrameLayout |
| | | { |
| | | public BrandList() |
| | | |
| | | public void Show(List<Brand> brandList, string spk) |
| | | { |
| | | Tag = "PirView"; |
| | | var strList = new List<string>(); |
| | | for (int str = 0; str < brandList.Count; str++) |
| | | { |
| | | //提取字符串列表 |
| | | string s = brandList[str].brandName; |
| | | strList.Add(s); |
| | | } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="list">表示该列表元素A-Z字母筛选显示出来</param> |
| | | public void Show(List<Brand>brandList,List<string> list,string spk) |
| | | JLCountrycode.CountryCodeView.Current.ShowSortSelection("选择红外品牌", GetDateList(strList), (countryName) => |
| | | { |
| | | |
| | | var frameLayout = new FrameLayout |
| | | var brandObj = brandList.Find((c) => c.brandName == countryName); |
| | | if (brandObj == null) |
| | | { |
| | | BackgroundColor = CSS.CSS_Color.viewTop, |
| | | Height = Application.GetRealHeight(112), |
| | | Width = Application.GetRealWidth(375), |
| | | }; |
| | | this.AddChidren(frameLayout); |
| | | |
| | | var topNameBtn = new Button |
| | | { |
| | | TextSize = TextSize.text18, |
| | | TextColor = CSS.CSS_Color.textColor, |
| | | Width = Application.GetRealWidth(TextSize.view375 - 60 - 60), |
| | | Height = Application.GetRealHeight(25), |
| | | Y = Application.GetRealHeight(30), |
| | | X = Application.GetRealWidth(60), |
| | | Text = "请选择品牌", |
| | | |
| | | }; |
| | | frameLayout.AddChidren(topNameBtn); |
| | | |
| | | var backBtn = new Button |
| | | { |
| | | Width = Application.GetRealWidth(12), |
| | | Height = Application.GetRealWidth(20), |
| | | X = Application.GetRealWidth(TextSize.left16), |
| | | Y = Application.GetRealHeight(32), |
| | | UnSelectedImagePath = "LogicIcon/back.png", |
| | | }; |
| | | frameLayout.AddChidren(backBtn); |
| | | var clickBackBtn = new Button |
| | | { |
| | | Width = Application.GetRealWidth(12+16+20), |
| | | Height = Application.GetRealWidth(20+20), |
| | | Y = Application.GetRealHeight(32), |
| | | }; |
| | | frameLayout.AddChidren(clickBackBtn); |
| | | clickBackBtn.MouseUpEventHandler += (sen, e) => |
| | | { |
| | | this.RemoveFromParent(); |
| | | }; |
| | | |
| | | var editText = new EditText |
| | | { |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealWidth(28), |
| | | X = Application.GetRealWidth(TextSize.left16), |
| | | Y = Application.GetRealHeight(76), |
| | | BackgroundColor = CSS.CSS_Color.view, |
| | | TextColor = CSS.CSS_Color.textColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | |
| | | }; |
| | | frameLayout.AddChidren(editText); |
| | | |
| | | var fram = new FrameLayout |
| | | { |
| | | Y = Application.GetRealHeight(112), |
| | | Height = Application.GetRealHeight(667 - 112), |
| | | Width = Application.GetRealWidth(375), |
| | | BackgroundColor = CSS.CSS_Color.view, |
| | | }; |
| | | this.AddChidren(fram); |
| | | |
| | | |
| | | if (list == null) |
| | | { |
| | | list = new List<string>(); |
| | | } |
| | | var list1 = GetDateList(list); |
| | | |
| | | var vv = new VerticalScrolViewLayout(); |
| | | fram.AddChidren(vv); |
| | | var listStr = new List<string>(); |
| | | listStr.AddRange(list1); |
| | | editText.TextChangeEventHandler += (view, strView) => |
| | | { |
| | | listStr.Clear(); |
| | | for (int i = 0; i < list1.Count; i++) |
| | | { |
| | | var s = list1[i]; |
| | | if (s.Contains(strView)) |
| | | { |
| | | listStr.Add(s); |
| | | } |
| | | } |
| | | RefreshLayout(vv, brandList, listStr,spk); |
| | | |
| | | }; |
| | | #region A-Z |
| | | |
| | | |
| | | var a_zFra = new FrameLayout |
| | | { |
| | | Y = Application.GetRealHeight(46), |
| | | X = Application.GetRealWidth(362 - 6), |
| | | Height = Application.GetRealHeight(351), |
| | | Width = Application.GetRealWidth(10 + 6), |
| | | }; |
| | | fram.AddChidren(a_zFra); |
| | | var list2 = GetList(); |
| | | for (int i = 0; i < list2.Count; i++) |
| | | { |
| | | |
| | | var a_zBtn = new Button |
| | | { |
| | | Padding = new Padding(0, 6, 0, 0), |
| | | Y = Application.GetRealHeight(i * 13), |
| | | Width = Application.GetRealWidth(16), |
| | | Height = Application.GetRealHeight(10), |
| | | Text = list2[i], |
| | | TextSize = TextSize.text10, |
| | | TextColor = CSS.CSS_Color.textConfirmColor, |
| | | Tag = list2[i], |
| | | }; |
| | | a_zFra.AddChidren(a_zBtn); |
| | | |
| | | |
| | | a_zBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | |
| | | try |
| | | { |
| | | //找到索引值 |
| | | var index = listStr.IndexOf(a_zBtn.Tag.ToString()); |
| | | if (index != -1) |
| | | { |
| | | vv.ScrollToViewIndex(index); |
| | | } |
| | | else |
| | | { |
| | | if (a_zBtn.Tag.ToString() == "#") |
| | | { |
| | | vv.ScrollToViewIndex(0); |
| | | } |
| | | } |
| | | } |
| | | catch { } |
| | | }; |
| | | |
| | | } |
| | | #endregion |
| | | |
| | | RefreshLayout(vv, brandList, list1,spk); |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 更新列表Viev |
| | | /// </summary> |
| | | /// <param name="vv">父控件</param> |
| | | /// <param name="list">显示列表</param> |
| | | private void RefreshLayout(VerticalScrolViewLayout vv, List<Brand> brandList, List<string> list,string spk) |
| | | { |
| | | vv.RemoveAll(); |
| | | foreach (var str in list) |
| | | { |
| | | var rowLayout = new RowLayout { LineColor = CSS.CSS_Color.view }; |
| | | var textName = new Button |
| | | { |
| | | TextSize = TextSize.text16, |
| | | TextColor = CSS.CSS_Color.textColor, |
| | | Width = Application.GetRealWidth(300), |
| | | Height = Application.GetRealHeight(22), |
| | | X = Application.GetRealWidth(16), |
| | | Gravity = Gravity.CenterVertical, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = str, |
| | | }; |
| | | var clickBtn = new Button |
| | | { |
| | | Tag = str, |
| | | Width = Application.GetRealWidth(350), |
| | | }; |
| | | |
| | | if (Exist(str)) |
| | | { |
| | | //因为字母没有点击事件 |
| | | rowLayout.Height = Application.GetRealHeight(24); |
| | | rowLayout.BackgroundColor = CSS.CSS_Color.viewTop; |
| | | textName.TextSize = TextSize.text12; |
| | | rowLayout.AddChidren(textName); |
| | | } |
| | | else |
| | | { |
| | | rowLayout.Height = Application.GetRealHeight(44); |
| | | rowLayout.AddChidren(textName); |
| | | rowLayout.AddChidren(clickBtn); |
| | | } |
| | | vv.AddChidren(rowLayout); |
| | | clickBtn.MouseUpEventHandler += (sen, e) => |
| | | { |
| | | var name = clickBtn.Tag.ToString(); |
| | | var brandObj = brandList.Find((c) => c.brandName == name); |
| | | if (brandObj==null) { |
| | | return; |
| | | } |
| | | GetLibraryList(brandObj.id, (libraryList) => |
| | | { |
| | | Matching matching = new Matching(); |
| | | MainPage.BasePageView.AddChidren(matching); |
| | | matching.Show(libraryList, spk); |
| | | matching.Show(brandList, libraryList, spk); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }); |
| | | |
| | | }; |
| | | |
| | | } |
| | | |
| | | }); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | }, id, "品牌红外码库列表"); |
| | | } |
| | | /// <summary> |
| | | /// 列表是否包含该值(true=包含,false=不包含) |
| | | /// </summary> |
| | | /// <param name="str"></param> |
| | | /// <returns></returns> |
| | | private bool Exist(string str) |
| | | { |
| | | |
| | | if (GetList().Contains(str) || "主流品牌" == str) |
| | | { |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 获取显示列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private List<string> GetDateList(List<string> mList) |
| | | private Dictionary<string, List<string>> GetDateList(List<string> mList) |
| | | { |
| | | var list = new List<string>(); |
| | | Dictionary<string, List<string>> dict = new Dictionary<string, List<string>>(); |
| | | //获取A-Z字母列表 |
| | | var a_zList = GetList(false); |
| | | var a_zList = GetList(); |
| | | //遍历A-Z字母列表 |
| | | for (int i = 0; i < a_zList.Count; i++) |
| | | { |
| | | var zimu = a_zList[i]; |
| | | |
| | | var list = new List<string>(); |
| | | //遍历字符串列表 |
| | | for (int a = 0; a < mList.Count; a++) |
| | | { |
| | |
| | | //判断是否同字母 |
| | | if (zimu == a_z) |
| | | { |
| | | //判断列表是否存在字母 |
| | | if (!list.Contains(zimu)) |
| | | { |
| | | //添加字母 |
| | | list.Add(zimu); |
| | | } |
| | | //添加首字同一个字母的数据 |
| | | //添加数据 |
| | | list.Add(str); |
| | | } |
| | | |
| | | } |
| | | dict.Add(zimu, list); |
| | | } |
| | | return list; |
| | | return dict; |
| | | } |
| | | /// <summary> |
| | | /// 获取A-Z字母列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private List<string> GetList(bool value = true) |
| | | private List<string> GetList() |
| | | { |
| | | var list = new List<string>(); |
| | | if (value) |
| | | { |
| | | list.Add("#"); |
| | | } |
| | | for (int j = 65; j <= 90; j++) |
| | | { |
| | | char c = (char)j; |
| | |
| | | } |
| | | else return ("ZZ"); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | }; |
| | | #endregion |
| | | UIView(vv); |
| | | topView.topIconBtn.MouseUpEventHandler += (sender, e) => |
| | | topView.clickSetBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | var form = new AddMiniRemoteControlDirection1Page(); |
| | | form.AddForm(); |
| | |
| | | { |
| | | pirView.stateIconBtn.IsSelected = true; |
| | | pirView.stateTextBtn.IsSelected = true; |
| | | pirView.stateTextBtn.TextID = StringId.zaixian; |
| | | } |
| | | else |
| | | { |
| | | pirView.stateIconBtn.IsSelected = false; |
| | | pirView.stateTextBtn.IsSelected = false; |
| | | pirView.stateTextBtn.TextID = StringId.lixian; |
| | | } |
| | | //标记红外宝 |
| | | pirView.clickBtn.Tag = pirDevice; |
| | |
| | | { |
| | | Tag = "PirView"; |
| | | } |
| | | public void Show(List<Library> libraryList,string spk) |
| | | |
| | | public void Show(List<Brand> brandList,List<Library> libraryList,string spk) |
| | | { |
| | | |
| | | |
| | | #region 界面布局 |
| | | this.BackgroundColor = CSS.CSS_Color.viewMiddle; |
| | | PirDevice.View.TopView topView = new View.TopView(); |
| | | topView.topNameBtn.TextID = StringId.pipeiyaokongqi; |
| | | this.AddChidren(topView.FLayoutView()); |
| | | topView.clickBackBtn.MouseUpEventHandler += (sender, e) => { this.RemoveFromParent(); }; |
| | | topView.clickBackBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | BrandList brandObj = new BrandList(); |
| | | brandObj.Show(brandList, spk); |
| | | this.RemoveFromParent(); |
| | | |
| | | }; |
| | | |
| | | FrameLayout fLayout = new FrameLayout |
| | | { |
| | |
| | | Button sumBtn = new Button |
| | | { |
| | | Y = Application.GetRealHeight(267), |
| | | X = Application.GetRealWidth(170), |
| | | Width = Application.GetRealWidth(36), |
| | | X = Application.GetRealWidth(136), |
| | | Width = Application.GetRealWidth(104), |
| | | Height = Application.GetRealHeight(17), |
| | | Text = "(1/20)", |
| | | TextSize = TextSize.text12, |
| | |
| | | TextSize = TextSize.text16, |
| | | TextColor = CSS.CSS_Color.textConfirmColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | Radius = (uint)Application.GetRealHeight(44), |
| | | Radius = (uint)Application.GetRealHeight(22), |
| | | BorderWidth = 1, |
| | | BorderColor = CSS.CSS_Color.textConfirmColor, |
| | | }; |
| | |
| | | TextSize = TextSize.text16, |
| | | TextColor = CSS.CSS_Color.textWhiteColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | Radius = (uint)Application.GetRealHeight(44), |
| | | Radius = (uint)Application.GetRealHeight(22), |
| | | //BorderWidth = 1, |
| | | //BorderColor = CSS.CSS_Color.textConfirmColor, |
| | | BackgroundColor = CSS.CSS_Color.textConfirmColor, |
| | |
| | | //测试Text |
| | | testBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | var library = libraryList[index]; |
| | | var library = libraryList[index-1]; |
| | | var control = GetControl(spk, testBtn.TextID, library); |
| | | //发送测试码命令 |
| | | CodeTest(control); |
| | |
| | | // Pir.currPir = Pir.pirDeviceList[0]; |
| | | //} |
| | | //默认第一个红外宝 |
| | | Pir.currPir = Pir.pirDeviceList[0]; |
| | | int sum = 0; |
| | | Pir.currPir = Pir.pirDeviceList[0]; |
| | | for (int i = 0; i < Pir.pirDeviceList.Count; i++) |
| | |
| | | } |
| | | GetBrandList(jobDeviceType.id, (brandList) => |
| | | { |
| | | var brandSupportStrList = GetBrandSupport(if_value); |
| | | var strList = new List<string>(); |
| | | for (int str = 0; str < brandList.Count; str++) |
| | | { |
| | | string s = brandList[str].brandName; |
| | | var bool_if = brandSupportStrList.Find((c) => s.Contains(c)); |
| | | if (bool_if != null) |
| | | { |
| | | strList.Add(s); |
| | | } |
| | | |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | BrandList brandObj = new BrandList(); |
| | | MainPage.BasePageView.AddChidren(brandObj); |
| | | brandObj.Show(brandList, strList, strings[1]); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | brandObj.Show(brandList, strings[1]); |
| | | }); |
| | | |
| | | }); |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取品牌支持 |
| | | /// </summary> |
| | | /// <param name="index">索引值</param> |
| | | private List<string> GetBrandSupport(int index) |
| | | { |
| | | List<string> strList = new List<string>(); |
| | | switch (index) |
| | | { |
| | | case 1: |
| | | { |
| | | strList.Add("格力"); |
| | | strList.Add("美的"); |
| | | strList.Add("海尔"); |
| | | strList.Add("松下"); |
| | | strList.Add("海信"); |
| | | strList.Add("长虹"); |
| | | } |
| | | break; |
| | | case 2: |
| | | { |
| | | strList.Add("创维"); |
| | | strList.Add("TCL"); |
| | | strList.Add("海信"); |
| | | strList.Add("长虹"); |
| | | strList.Add("海尔"); |
| | | strList.Add("三星"); |
| | | strList.Add("乐视"); |
| | | strList.Add("索尼"); |
| | | strList.Add("LG乐金"); |
| | | } |
| | | break; |
| | | case 3: |
| | | { |
| | | } |
| | | break; |
| | | case 4: |
| | | { |
| | | } |
| | | break; |
| | | case 5: |
| | | { |
| | | } |
| | | break; |
| | | case 6: |
| | | { |
| | | } |
| | | break; |
| | | |
| | | |
| | | } |
| | | return strList; |
| | | } |
| | | /// <summary> |
| | | /// 获取设备类型str |
| | | /// </summary> |
| | |
| | | |
| | | public class PirSend |
| | | { |
| | | |
| | | /// <summary> |
| | | /// 网关ID(获取嘉乐网关ID) |
| | | /// </summary> |
| | | public static string GatewayId |
| | | { |
| | | get |
| | | { |
| | | if (Entity.DB_ResidenceData.Instance.HomeGateway == null) |
| | | { |
| | | return DriverLayer.Control.Ins.GatewayId; |
| | | } |
| | | return Entity.DB_ResidenceData.Instance.HomeGateway.gatewayId; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 住宅ID |
| | | /// </summary> |
| | |
| | | var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Ir_CodeRemove); |
| | | return responsePackNew; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 红外宝/遥控器删除 |
| | | /// </summary> |
| | |
| | | public Button sumBtn = new Button |
| | | { |
| | | Y = Application.GetRealHeight(59), |
| | | |
| | | Width = Application.GetRealWidth(20), |
| | | Width = Application.GetRealWidth(50), |
| | | Height = Application.GetRealHeight(17), |
| | | Text = "/10", |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | |
| | | X = Application.GetRealWidth(291), |
| | | Width = Application.GetRealWidth(8), |
| | | Height = Application.GetRealWidth(8), |
| | | UnSelectedImagePath = "PirIcon/online.png", |
| | | SelectedImagePath = "PirIcon/offline.png", |
| | | UnSelectedImagePath ="PirIcon/offline.png", |
| | | SelectedImagePath = "PirIcon/online.png", |
| | | }; |
| | | |
| | | /// <summary> |
| | |
| | | TextID = StringId.zaixianhwb, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = TextSize.text12, |
| | | TextColor = 0xFF67D569,// CSS.CSS_Color.textColor, |
| | | SelectedTextColor = CSS.CSS_Color.textRedColor, |
| | | TextColor = CSS.CSS_Color.textRedColor,// CSS.CSS_Color.textColor, |
| | | SelectedTextColor = 0xFF67D569, |
| | | IsBold = true, |
| | | }; |
| | | /// <summary> |
| | |
| | | { |
| | | public class ReplicationView |
| | | { |
| | | Dialog dialog = new Dialog(); |
| | | FrameLayout fLayout = new FrameLayout |
| | | { |
| | | Height = Application.GetRealHeight(667), |
| | | BackgroundColor = CSS.CSS_Color.viewMiddle, |
| | | }; |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public void Show() |
| | | public void Show(FrameLayout frame) |
| | | { |
| | | #region 界面布局 |
| | | dialog.BackgroundColor = CSS.CSS_Color.viewMiddle; |
| | | frame.AddChidren(fLayout); |
| | | PirDevice.View.TopView topView = new View.TopView(); |
| | | topView.topNameBtn.TextID = StringId.fuzhiyaokonggongnneg; |
| | | dialog.AddChidren(topView.FLayoutView()); |
| | | topView.clickBackBtn.MouseUpEventHandler += (sender, e) => { dialog.Close();}; |
| | | fLayout.AddChidren(topView.FLayoutView()); |
| | | topView.clickBackBtn.MouseUpEventHandler += (sender, e) => { RemView(); }; |
| | | FrameLayout frameLayout = new FrameLayout(); |
| | | frameLayout.Height = Application.GetRealHeight(667 - 64); |
| | | frameLayout.Y = Application.GetRealHeight(64); |
| | | // frameLayout.BackgroundColor = CSS.CSS_Color.textWhiteColor; |
| | | dialog.AddChidren(frameLayout); |
| | | fLayout.AddChidren(frameLayout); |
| | | var textBtn = new Button |
| | | { |
| | | Y = Application.GetRealHeight(24), |
| | |
| | | UnSelectedImagePath = "PirIcon/icon2.png", |
| | | }; |
| | | frameLayout.AddChidren(icon2Btn); |
| | | dialog.Show(); |
| | | #endregion |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 移除当前界面 |
| | | /// </summary> |
| | | public void RemView() { |
| | | dialog.Close(); |
| | | public void RemView() |
| | | { |
| | | fLayout.RemoveFromParent(); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using HDL_ON.UI.Music; |
| | | using Shared; |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Video |
| | | { |
| | | public class MainView : FrameLayout |
| | | { |
| | | public void Show() |
| | | { |
| | | |
| | | this.BackgroundColor = MusicColor.ViewColor; |
| | | var topView = new TopView(); |
| | | this.AddChidren(topView.TopFLayoutView()); |
| | | topView.topNameBtn.Text = "可视对讲"; |
| | | topView.clickBackBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | RemoveFromParent(); |
| | | }; |
| | | |
| | | var pageView = new PageLayout() |
| | | { |
| | | Y = Application.GetRealHeight(64), |
| | | Height = Application.GetRealHeight(667 - 64), |
| | | IsShowPoint = false, |
| | | }; |
| | | this.AddChidren(pageView); |
| | | var view1 = new FrameLayout(); |
| | | pageView.AddChidren(view1); |
| | | var view2 = new FrameLayout(); |
| | | pageView.AddChidren(view2); |
| | | View1(view1); |
| | | View2(view2); |
| | | Button btn11 = new Button |
| | | { |
| | | X = Application.GetRealWidth(170), |
| | | Y = Application.GetRealHeight(578), |
| | | Width = Application.GetRealWidth(14), |
| | | Height = Application.GetRealHeight(6), |
| | | BackgroundColor = MusicColor.SelectedColor, |
| | | Radius = (uint)Application.GetRealHeight(4), |
| | | }; |
| | | view1.AddChidren(btn11); |
| | | |
| | | Button btn12 = new Button |
| | | { |
| | | X = Application.GetRealWidth(192), |
| | | Y = Application.GetRealHeight(578), |
| | | Width = Application.GetRealWidth(14), |
| | | Height = Application.GetRealHeight(6), |
| | | BackgroundColor = 0x404484F4, |
| | | Radius = (uint)Application.GetRealHeight(4), |
| | | }; |
| | | view1.AddChidren(btn12); |
| | | Button btn21 = new Button |
| | | { |
| | | X = Application.GetRealWidth(170), |
| | | Y = Application.GetRealHeight(578), |
| | | Width = Application.GetRealWidth(14), |
| | | Height = Application.GetRealHeight(6), |
| | | BackgroundColor = 0x404484F4, |
| | | Radius = (uint)Application.GetRealHeight(4), |
| | | }; |
| | | view2.AddChidren(btn21); |
| | | |
| | | Button btn22 = new Button |
| | | { |
| | | X = Application.GetRealWidth(192), |
| | | Y = Application.GetRealHeight(578), |
| | | Width = Application.GetRealWidth(14), |
| | | Height = Application.GetRealHeight(6), |
| | | BackgroundColor = MusicColor.SelectedColor, |
| | | Radius = (uint)Application.GetRealHeight(4), |
| | | }; |
| | | view2.AddChidren(btn22); |
| | | |
| | | pageView.PageChange = (sender, e) => |
| | | { |
| | | |
| | | if (pageView.PageIndex == 0) |
| | | { |
| | | topView.topNameBtn.Text = "可视对讲"; |
| | | } |
| | | else |
| | | { |
| | | topView.topNameBtn.Text = "通话记录"; |
| | | |
| | | } |
| | | }; |
| | | } |
| | | /// <summary> |
| | | /// 第一个界面 |
| | | /// </summary> |
| | | /// <param name="view1">父控件</param> |
| | | void View1(FrameLayout view1) |
| | | { |
| | | |
| | | var bjFl = new FrameLayout |
| | | { |
| | | Y = Application.GetRealHeight(24), |
| | | X = Application.GetRealWidth(24), |
| | | Height = Application.GetRealHeight(526), |
| | | Width = Application.GetRealWidth(327), |
| | | BackgroundImagePath = "MusicIcon/playBj.png", |
| | | }; |
| | | view1.AddChidren(bjFl); |
| | | /// <summary> |
| | | /// 汉字 |
| | | /// </summary> |
| | | Button nameBtn = new Button |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(16), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealHeight(33), |
| | | TextColor = MusicColor.MusicTxet14Color, |
| | | TextSize = TextSize.Text24, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = "可视对讲", |
| | | }; |
| | | bjFl.AddChidren(nameBtn); |
| | | /// <summary> |
| | | /// 区域名称 |
| | | /// </summary> |
| | | Button regionBtn = new Button |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(53), |
| | | Width = Application.GetRealWidth(270), |
| | | Height = Application.GetRealHeight(17), |
| | | TextColor = MusicColor.MusicNoTxetColor, |
| | | TextSize = TextSize.Text12, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = "123456" |
| | | }; |
| | | bjFl.AddChidren(regionBtn); |
| | | /// <summary> |
| | | ///收藏图标 |
| | | /// </summary> |
| | | Button collectIconBtn = new Button |
| | | { |
| | | X = Application.GetRealWidth(273), |
| | | Y = Application.GetRealHeight(14), |
| | | Width = Application.GetRealWidth(40), |
| | | Height = Application.GetRealWidth(40), |
| | | UnSelectedImagePath = "MusicIcon/collect.png", |
| | | SelectedImagePath = "MusicIcon/collectSelected.png", |
| | | }; |
| | | bjFl.AddChidren(collectIconBtn); |
| | | |
| | | Button intercomBtnIcon = new Button |
| | | { |
| | | X = Application.GetRealWidth(84), |
| | | Y = Application.GetRealHeight(118), |
| | | Width = Application.GetRealWidth(160), |
| | | Height = Application.GetRealWidth(160), |
| | | UnSelectedImagePath = "VideoIcon/keshiduijiang.png", |
| | | |
| | | }; |
| | | bjFl.AddChidren(intercomBtnIcon); |
| | | |
| | | var vv = new VerticalScrolViewLayout { |
| | | Y = Application.GetRealHeight(306), |
| | | Height = Application.GetRealHeight(220), |
| | | Width = Application.GetRealWidth(327), |
| | | }; |
| | | bjFl.AddChidren(vv); |
| | | //数组个数 |
| | | int value = 15; |
| | | //先计算数据所需要的很高度; |
| | | int l = 0; |
| | | if (value % 3 == 0) |
| | | { |
| | | l = value / 3; |
| | | } |
| | | else |
| | | { |
| | | |
| | | l = (value / 3) + 1; |
| | | } |
| | | var fL = new FrameLayout |
| | | { |
| | | Height = Application.GetRealHeight((48 + 24) * l), |
| | | |
| | | }; |
| | | vv.AddChidren(fL); |
| | | int line = 0; |
| | | for (int i = 1, j = 0; i <= value; i++, j++) |
| | | { |
| | | var fLayout = new FrameLayout |
| | | { |
| | | Width = Application.GetRealWidth(50), |
| | | Height = Application.GetRealWidth(48), |
| | | X = Application.GetRealWidth(31 + (58 + 50) * j), |
| | | Y = Application.GetRealHeight(20 + (48 + 24) * line), |
| | | |
| | | }; |
| | | fL.AddChidren(fLayout); |
| | | |
| | | var iconBtn = new Button |
| | | { |
| | | X = Application.GetRealWidth(11), |
| | | Width = Application.GetRealWidth(28), |
| | | Height = Application.GetRealWidth(28), |
| | | UnSelectedImagePath = "VideoIcon/weiqiangji.png", |
| | | }; |
| | | fLayout.AddChidren(iconBtn); |
| | | |
| | | var iconNameBtn = new Button |
| | | { |
| | | Y = iconBtn.Bottom + Application.GetRealHeight(6), |
| | | Width = Application.GetRealWidth(50), |
| | | Height = Application.GetRealHeight(14), |
| | | TextSize = TextSize.Text10, |
| | | TextColor = CSS.CSS_Color.TextualColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | Text="查看单元机" |
| | | }; |
| | | fLayout.AddChidren(iconNameBtn); |
| | | |
| | | var clickBtn = new Button { Tag = i }; |
| | | fLayout.AddChidren(clickBtn); |
| | | if (i % 3 == 0) |
| | | { |
| | | //满一行重置j=0值; |
| | | j = -1; |
| | | line += 1; |
| | | } |
| | | // GetIconAndText(i, deviceIconBtn, iconNameBtn); |
| | | clickBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | |
| | | ////1=空调;2=电视;3=风扇;4=机顶盒;5=DVD/EVD/VCD;6=投影仪;7=自定义; |
| | | //int if_value = int.Parse(clickBtn.Tag.ToString()); |
| | | //if (if_value == 7) |
| | | //{ |
| | | // Method method = new Method(); |
| | | // method.AddControl(this, (control) => |
| | | // { |
| | | // AddButton addButton = new AddButton(); |
| | | // MainPage.BasePageView.AddChidren(addButton); |
| | | // addButton.Show(control); |
| | | // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | // }); |
| | | //} |
| | | //else |
| | | //{ |
| | | // if (DeviceTypeList.Count == 0) |
| | | // { |
| | | // GetDeviceTypeList(true, () => |
| | | // { |
| | | // DeviceTypeViewClick(if_value); |
| | | |
| | | // }); |
| | | // } |
| | | // else |
| | | // { |
| | | // DeviceTypeViewClick(if_value); |
| | | // } |
| | | //} |
| | | }; |
| | | } |
| | | |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 第二个界面 |
| | | /// </summary> |
| | | /// <param name="view2">父控件</param> |
| | | void View2(FrameLayout view2) |
| | | { |
| | | |
| | | var bjFl = new FrameLayout |
| | | { |
| | | Y = Application.GetRealHeight(24), |
| | | X = Application.GetRealWidth(24), |
| | | Height = Application.GetRealHeight(526), |
| | | Width = Application.GetRealWidth(327), |
| | | BackgroundImagePath = "MusicIcon/playBj.png", |
| | | }; |
| | | view2.AddChidren(bjFl); |
| | | /// <summary> |
| | | /// 汉字 |
| | | /// </summary> |
| | | Button nameBtn = new Button |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(16), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealHeight(33), |
| | | TextColor = MusicColor.MusicTxet14Color, |
| | | TextSize = TextSize.Text24, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = "通话记录", |
| | | }; |
| | | bjFl.AddChidren(nameBtn); |
| | | /// <summary> |
| | | /// 云端照片只保留30天 |
| | | /// </summary> |
| | | Button regionBtn = new Button |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(53), |
| | | Width = Application.GetRealWidth(270), |
| | | Height = Application.GetRealHeight(17), |
| | | TextColor = MusicColor.SelectedColor, |
| | | TextSize = TextSize.Text12, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = "*云端照片只保留30天" |
| | | }; |
| | | bjFl.AddChidren(regionBtn); |
| | | |
| | | var vv = new VerticalScrolViewLayout |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(58), |
| | | Height = Application.GetRealHeight(458), |
| | | Width = Application.GetRealWidth(295), |
| | | }; |
| | | bjFl.AddChidren(vv); |
| | | for (int i = 0; i < 6; i++) |
| | | { |
| | | |
| | | if (i == 0|| i == 2) |
| | | { |
| | | View.FrameLayout50 frameLayout50 = new View.FrameLayout50(); |
| | | vv.AddChidren(frameLayout50.FLayoutView()); |
| | | } |
| | | else |
| | | { |
| | | View.FrameLayout60 frameLayout60 = new View.FrameLayout60(); |
| | | vv.AddChidren(frameLayout60.FLayoutView()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | using System; |
| | | using HDL_ON.UI.UI2.Intelligence.Automation.LogicView; |
| | | using Shared; |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Video.View |
| | | { |
| | | public class FrameLayout50 |
| | | { |
| | | /// <summary> |
| | | /// 主控件View |
| | | /// </summary> |
| | | public FrameLayout frameLayout = new FrameLayout |
| | | { |
| | | Height = Application.GetRealHeight(50), |
| | | // BackgroundColor = CSS.CSS_Color.view, |
| | | }; |
| | | /// <summary> |
| | | /// 文本描述 |
| | | /// </summary> |
| | | public Button btnText = new Button |
| | | { |
| | | Y = Application.GetRealHeight(24), |
| | | Width = Application.GetRealWidth(200), |
| | | Height = Application.GetRealHeight(22), |
| | | TextColor = CSS.CSS_Color.textColor, |
| | | TextSize = TextSize.text16, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | IsBold = true, |
| | | Text= "2020年", |
| | | }; |
| | | |
| | | public Button btnClick = new Button |
| | | { |
| | | Height = Application.GetRealHeight(50), |
| | | }; |
| | | /// <summary> |
| | | /// View的方法 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public FrameLayout FLayoutView() |
| | | { |
| | | frameLayout.AddChidren(btnText); |
| | | frameLayout.AddChidren(btnClick); |
| | | return frameLayout; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using HDL_ON.UI.UI2.Intelligence.Automation.LogicView; |
| | | using Shared; |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Video.View |
| | | { |
| | | public class FrameLayout60 |
| | | { |
| | | /// <summary> |
| | | /// 主控件View |
| | | /// </summary> |
| | | public FrameLayout frameLayout = new FrameLayout |
| | | { |
| | | Height = Application.GetRealHeight(60), |
| | | //BackgroundColor = CSS.CSS_Color.view, |
| | | }; |
| | | |
| | | /// <summary> |
| | | /// 文本描述 |
| | | /// </summary> |
| | | public Button btnText = new Button |
| | | { |
| | | Y=Application.GetRealHeight(10), |
| | | Width = Application.GetRealWidth(200), |
| | | Height = Application.GetRealHeight(20), |
| | | TextColor = CSS.CSS_Color.textColor, |
| | | TextSize = TextSize.text14, |
| | | Text= "门口机呼叫", |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | /// <summary> |
| | | /// 时间文本描述 |
| | | /// </summary> |
| | | public Button btnTime = new Button |
| | | { |
| | | X=Application.GetRealWidth(82), |
| | | Y = Application.GetRealHeight(10), |
| | | Width = Application.GetRealWidth(120), |
| | | Height = Application.GetRealHeight(20), |
| | | TextColor = CSS.CSS_Color.textColor, |
| | | TextSize = TextSize.text14, |
| | | TextAlignment=TextAlignment.CenterLeft, |
| | | Text = "15:01", |
| | | }; |
| | | /// <summary> |
| | | /// 编辑文本 |
| | | /// </summary> |
| | | public Button btnEditText = new Button |
| | | { |
| | | Y = Application.GetRealHeight(32), |
| | | Width = Application.GetRealWidth(260), |
| | | Height = Application.GetRealHeight(17), |
| | | TextSize = TextSize.text12, |
| | | TextColor = CSS.CSS_Color.textCancelColor, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = "已接听, 已开锁", |
| | | }; |
| | | |
| | | |
| | | /// <summary> |
| | | /// 图标 |
| | | /// </summary> |
| | | public Button btnNextIcon = new Button |
| | | { |
| | | Width = Application.GetRealWidth(102), |
| | | Height = Application.GetRealWidth(56), |
| | | UnSelectedImagePath = "LogicIcon/next.png", |
| | | X = Application.GetRealWidth(191), |
| | | Visible=false, |
| | | }; |
| | | |
| | | /// <summary> |
| | | /// 线 |
| | | /// </summary> |
| | | public Button btnLine = new Button |
| | | { |
| | | Width = Application.GetRealWidth(295), |
| | | Height = 1, |
| | | BackgroundColor = CSS.CSS_Color.viewLine, |
| | | |
| | | }; |
| | | |
| | | public Button btnClick = new Button |
| | | { |
| | | Height = Application.GetRealHeight(50), |
| | | }; |
| | | /// <summary> |
| | | /// View的方法 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public FrameLayout FLayoutView() |
| | | { |
| | | frameLayout.AddChidren(btnText); |
| | | frameLayout.AddChidren(btnTime); |
| | | frameLayout.AddChidren(btnEditText); |
| | | frameLayout.AddChidren(btnNextIcon); |
| | | btnLine.Y = frameLayout.Height - 1; |
| | | frameLayout.AddChidren(btnLine); |
| | | frameLayout.AddChidren(btnClick); |
| | | return frameLayout; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using HDL_ON.UI.Music; |
| | | using Shared; |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Video.View |
| | | { |
| | | public class ShowDialog |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="title">标题</param> |
| | | /// <param name="action1">回调函数</param> |
| | | /// <param name="action2">回调函数</param> |
| | | public void ClickBox(string title, Action<Dialog> action1, Action<Dialog> action2) |
| | | { |
| | | Dialog dialog = new Dialog() |
| | | { |
| | | BackgroundColor = MusicColor.PopupBackgroundColor, |
| | | }; |
| | | |
| | | FrameLayout whiteView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(56), |
| | | Y = Application.GetRealHeight(261), |
| | | Width = Application.GetRealWidth(263), |
| | | Height = Application.GetRealHeight(145), |
| | | BackgroundColor = MusicColor.WhiteColor, |
| | | BorderColor = 0x00000000, |
| | | BorderWidth = 0, |
| | | Radius = (uint)Application.GetRealHeight(16), |
| | | }; |
| | | dialog.AddChidren(whiteView); |
| | | |
| | | Button dianhuaIconBtn = new Button |
| | | { |
| | | X = Application.GetRealWidth(46), |
| | | Y = Application.GetRealHeight(20), |
| | | Width = Application.GetRealWidth(32), |
| | | Height = Application.GetRealWidth(32), |
| | | UnSelectedImagePath = "VideoIcon/phone.png", |
| | | }; |
| | | whiteView.AddChidren(dianhuaIconBtn); |
| | | |
| | | Button btnTitle = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(25), |
| | | X = Application.GetRealWidth(86), |
| | | Height = Application.GetRealHeight(22), |
| | | Width = Application.GetRealWidth(150), |
| | | TextColor = MusicColor.TextColor, |
| | | TextSize = TextSize.Text16, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = "来自“围墙机”呼叫", |
| | | |
| | | }; |
| | | whiteView.AddChidren(btnTitle); |
| | | |
| | | Button guaduanIconBtn = new Button |
| | | { |
| | | X = Application.GetRealWidth(75), |
| | | Y = Application.GetRealHeight(68), |
| | | Width = Application.GetRealWidth(32), |
| | | Height = Application.GetRealWidth(32), |
| | | UnSelectedImagePath = "VideoIcon/hangup.png", |
| | | }; |
| | | whiteView.AddChidren(guaduanIconBtn); |
| | | Button jietingIconBtn = new Button |
| | | { |
| | | X = Application.GetRealWidth(157), |
| | | Y = Application.GetRealHeight(68), |
| | | Width = Application.GetRealWidth(32), |
| | | Height = Application.GetRealWidth(32), |
| | | UnSelectedImagePath = "VideoIcon/answer.png", |
| | | }; |
| | | whiteView.AddChidren(jietingIconBtn); |
| | | dialog.Show(); |
| | | |
| | | guaduanIconBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | action1(dialog); |
| | | }; |
| | | jietingIconBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | |
| | | action2(dialog); |
| | | }; |
| | | |
| | | } |
| | | |
| | | } |
| | | } |