{"id":19976687,"url":"https://github.com/jungwoo-an/sweetalertsharp","last_synced_at":"2025-05-04T03:30:33.221Z","repository":{"id":109495378,"uuid":"164442729","full_name":"Jungwoo-An/SweetAlertSharp","owner":"Jungwoo-An","description":":speech_balloon: beautiful, simply, alternative to MessageBox class.","archived":false,"fork":false,"pushed_at":"2019-07-01T14:15:45.000Z","size":149,"stargazers_count":14,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T02:43:02.206Z","etag":null,"topics":["alert","csharp","dialog","messagebox","sweetalert"],"latest_commit_sha":null,"homepage":"","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/Jungwoo-An.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-07T14:15:18.000Z","updated_at":"2024-07-05T16:22:46.000Z","dependencies_parsed_at":"2023-05-01T22:32:01.757Z","dependency_job_id":null,"html_url":"https://github.com/Jungwoo-An/SweetAlertSharp","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jungwoo-An%2FSweetAlertSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jungwoo-An%2FSweetAlertSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jungwoo-An%2FSweetAlertSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jungwoo-An%2FSweetAlertSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jungwoo-An","download_url":"https://codeload.github.com/Jungwoo-An/SweetAlertSharp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252283523,"owners_count":21723487,"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":["alert","csharp","dialog","messagebox","sweetalert"],"created_at":"2024-11-13T03:25:09.822Z","updated_at":"2025-05-04T03:30:33.216Z","avatar_url":"https://github.com/Jungwoo-An.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"![logo](https://github.com/Jungwoo-An/SweetAlertSharp/raw/master/static/logo.png)\n\nbeautiful, simply, alternative for MessageBox class.\ninspired by [sweetalert2](https://github.com/sweetalert2/sweetalert2)\n\n## Preview\n\n![preview](https://github.com/Jungwoo-An/SweetAlertSharp/raw/master/static/preview.gif)\n\n## Installation\n\n```bash\nPM\u003e Install-Package SweetAlertSharp\n```\n\n## Usage\n\n**Basic**\n\n```cs\nconst result = SweetAlert.Show(\"Caption\", \"Content\");\n```\n\n**Yes No**\n\n```cs\nconst result = SweetAlert.Show(\"Caption\", \"Content\", SweetAlertButton.YesNo);\n```\n\n**With Icon**\n\n```cs\nconst result = SweetAlert.Show(\"Caption\", \"Content\", msgImage: SweetAlertImage.INFORMATION);\n```\n\n**Custom Button Text**\n\n```cs\nvar alert = new SweetAlert();\nalert.Caption = \"Custom Alert\";\nalert.Message = \"Content\";\nalert.MsgButton = SweetAlertButton.YesNo;\nalert.OkText = \"Yes.\";\nalert.CancelText = \"No!\";\n\nSweetAlertResult result = alert.ShowDialog();\n```\n\n**Custom Button Layout**\n\n```cs\nvar alert = new SweetAlert();\nalert.Caption = \"Custom Layout\";\nalert.Message = \"Content\";\nalert.ButtonContent = new StackPanel();\n\nSweetAlertResult result = alert.ShowDialog();\n```\n\n**Delay (ex: loading)**\n\n```cs\nvar canClose = false;\nvar alert = new SweetAlert();\nalert.Caption = \"Delay\";\nalert.Message = \"Wait!\";\nalert.ButtonContent = \"Loading ...\";\nalert.PreClose += (object window, CancelEventArgs cancelEvent) =\u003e\n{\n    cancelEvent.Cancel = !canClose;\n};\n\nTask.Run(async () =\u003e\n{\n    await Task.Delay(3000);\n    await Dispatcher.BeginInvoke(new Action(() =\u003e\n    {\n        canClose = true;\n\n        alert.ButtonContent = \"Ok!\";\n    }));\n});\n\nvar reuslt = alert.ShowDialog();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjungwoo-an%2Fsweetalertsharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjungwoo-an%2Fsweetalertsharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjungwoo-an%2Fsweetalertsharp/lists"}