| | |
| | | /// <summary> |
| | | /// 加载功能收藏按钮事件 |
| | | /// </summary> |
| | | void LoadEvent_FunctionCollection(Button btn,Function function,bool isDevice) |
| | | void LoadEvent_FunctionCollection(Button btn,Function function) |
| | | { |
| | | btn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | function.collection = false; |
| | | function.collect = false; |
| | | if(function.functionCategory == FunctionCategory.Music)//处理音乐主从关系 |
| | | { |
| | | if ((function as Music.A31MusicModel).ServerClientType == 1) |
| | |
| | | } |
| | | } |
| | | string msg = function.name + Language.StringByID(StringId.CollectionCancelled); |
| | | if (isDevice) |
| | | { |
| | | LoadDeviceFunctionControlZone(); |
| | | } |
| | | else |
| | | { |
| | | LoadSceneFunctionControlZone(); |
| | | } |
| | | function.SaveFunctionData(); |
| | | new PublicAssmebly().TipMsgAutoClose(msg, true); |
| | | }; |
| | | } |
| | | /// <summary> |
| | | /// 加载场景收藏按钮事件 |
| | | /// </summary> |
| | | void LoadEvent_SceneCollection(Button btn, Scene scene) |
| | | { |
| | | btn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | scene.collect = false; |
| | | string msg = scene.name + Language.StringByID(StringId.CollectionCancelled); |
| | | LoadSceneFunctionControlZone(); |
| | | scene.SaveSceneData(); |
| | | new PublicAssmebly().TipMsgAutoClose(msg, true); |
| | | }; |
| | | } |
| | |
| | | /// <summary> |
| | | /// 加载场景控制事件 |
| | | /// </summary> |
| | | void LoadEvent_ControlScene(Button btnCoverd,Button btnName,Button btnZone ,Function function) |
| | | void LoadEvent_ControlScene(Button btnCoverd,Button btnName,Button btnZone ,Scene scene) |
| | | { |
| | | |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | string msg = function.name + Language.StringByID(StringId.AlreadyOpened); |
| | | string msg = scene.name + Language.StringByID(StringId.AlreadyOpened); |
| | | new PublicAssmebly().TipMsgAutoClose(msg, true); |
| | | Control.Ins.ControlScene(function as Scene); |
| | | Control.Ins.ControlScene(scene); |
| | | }; |
| | | btnCoverd.MouseUpEventHandler = eventHandler; |
| | | btnName.MouseUpEventHandler = eventHandler; |