| | |
| | | var list = FunctionList.List.GetDeviceFunctionList(); |
| | | foreach (var function in list) |
| | | { |
| | | |
| | | |
| | | //音乐模块有主从关系,需要特殊处理 |
| | | if (SPK.MusicSpkList().Contains( function.spk)) |
| | | { |
| | | continue; |
| | | //var music = function as Music.A31MusicModel; |
| | | //var music = Music.A31MusicModel.A31MusicModelList.Find((obj) => obj.sid == function.sid); |
| | | //if (music == null) |
| | | //{ |
| | | // continue; |
| | | //} |
| | | //if (music.ServerClientType == -1) |
| | | //{ |
| | | // continue; |
| | | //} |
| | | //else if (music.ServerClientType == 1) |
| | | //{ |
| | | // if (!music.MainPlayCollection) |
| | | // { |
| | | // continue; |
| | | // } |
| | | //} |
| | | //else |
| | | //{ |
| | | // if (!music.collect) |
| | | // { |
| | | // continue; |
| | | // } |
| | | //} |
| | | } |
| | | else |
| | | { |
| | |
| | | Width = Application.GetRealWidth(160), |
| | | Height = Application.GetRealHeight(105), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(5), |
| | | Radius = (uint)Application.GetRealWidth(15), |
| | | }; |
| | | view1.AddChidren(view); |
| | | |
| | |
| | | |
| | | var btnLogo = new Button() |
| | | { |
| | | Y = Application.GetRealWidth(90), |
| | | Y = Application.GetRealWidth(85), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/LvJianLogo.png", |
| | | SelectedImagePath = "FunctionIcon/Acst/LvJianLogo.png", |
| | | Width = Application.GetRealWidth(80), |
| | |
| | | view.AddChidren(btnAcstPower); |
| | | btnAcstPower.MouseUpEventHandler = (sender, e) => { |
| | | btnAcstPower.IsSelected = !btnAcstPower.IsSelected; |
| | | string onoff = btnAcstPower.IsSelected ? "on" : "off"; |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, onoff); |
| | | Control.Ins.SendWriteCommand(FunctionList.List.GetAcstParentList()[0], d); |
| | | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | string onoff = btnAcstPower.IsSelected ? "on" : "off"; |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, onoff); |
| | | foreach (var temp in FunctionList.List.GetAcstParentList()) |
| | | { |
| | | Control.Ins.SendWriteCommand(temp, d); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | | |
| | | |