{"id":18854855,"url":"https://github.com/noear/uwp-messagecenter","last_synced_at":"2026-02-05T18:30:19.886Z","repository":{"id":145378896,"uuid":"47859602","full_name":"noear/uwp-messageCenter","owner":"noear","description":"noear::这是一个类似iOS里的NotificationCenter库。现在UWP也有了：）","archived":false,"fork":false,"pushed_at":"2015-12-12T01:52:14.000Z","size":10,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-30T18:38:42.883Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.noear.org","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/noear.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-12T01:36:09.000Z","updated_at":"2018-10-31T02:15:52.000Z","dependencies_parsed_at":"2023-04-15T15:44:40.319Z","dependency_job_id":null,"html_url":"https://github.com/noear/uwp-messageCenter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noear%2Fuwp-messageCenter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noear%2Fuwp-messageCenter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noear%2Fuwp-messageCenter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noear%2Fuwp-messageCenter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noear","download_url":"https://codeload.github.com/noear/uwp-messageCenter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239793064,"owners_count":19697893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T03:51:58.193Z","updated_at":"2026-02-05T18:30:19.823Z","avatar_url":"https://github.com/noear.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# uwp-messageCenter\n\n这是一个类似iOS里的NotificationCenter库。\n提供应用内不同对象之间的互动（尤其是没有直接关联的对象）。\n\n文件结构：\n```javascript\nNoear.UWP.Data{\n    MessageCenter\n}\n```\n\n示例代码：\n```java\n//Page1.cs ----------\n//\nprotected override void OnNavigatedTo(NavigationEventArgs e) {\n  //进入页面时订阅消息\"On_Addin_Add\"\n  MessageCenter.Subscribe(\"On_Addin_Add\", this, (args) =\u003e { \n      if (viewModel == null)\n          return;\n\n      if (args.Length \u003e 0) {\n          viewModel.tileList.Add(args[0] as HubTileModel);\n      }\n  });\n}\nprotected override void OnNavigatedFrom(NavigationEventArgs e){\n  if (e.NavigationMode == NavigationMode.Back) {\n    //退出时，取消对\"On_Addin_Add\"的订阅\n    MessageCenter.UnSubscribe(\"On_Addin_Add\", this); \n  }\n}\n\n//Page2.cs ----------\n//\nvoid AddinItem_Click(){\n  //给消息中心发一个消息，并传过去一个参数\n  MessageCenter.SendMessage(\"On_Addin_Add\", new HubTileModel(m));\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoear%2Fuwp-messagecenter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoear%2Fuwp-messagecenter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoear%2Fuwp-messagecenter/lists"}