| 1 | using System; |
| 2 | using System.Collections.Generic; |
| 3 | using System.Linq; |
| 4 | using System.Text; |
| 5 | using System.Threading.Tasks; |
| 6 | using UI.Controls.Window; |
| 7 | |
| 8 | namespace UI.Servicers |
| 9 | { |
| 10 | public class UIServicer : IUIServicer |
| 11 | { |
| 12 | private DefaultWindow _window; |
| 13 | public UIServicer() |
| 14 | { |
| 15 | |
| 16 | } |
| 17 | |
| 18 | public void InitWindow(DefaultWindow window_) |
| 19 | { |
| 20 | _window = window_; |
| 21 | } |
| 22 | |
| 23 | public Task<bool> ShowConfirmDialogAsync(string title_, string message_) |
| 24 | { |
| 25 | return _window.ShowConfirmDialogAsync(title_, message_); |
| 26 | } |
| 27 | |
| 28 | public Task<string> ShowInputModalAsync(string title_, string placeholder_, string value_ = null, Func<string, bool> validFnc_ = null) |
| 29 | { |
| 30 | return _window.ShowInputModalAsync(title_, placeholder_, value_, validFnc_); |
| 31 | |
| 32 | } |
| 33 | } |
| 34 | } |