| | 1 | | public interface IPublishPopupController |
| | 2 | | { |
| | 3 | | public float currentProgress { get; } |
| | 4 | |
|
| | 5 | | void Initialize(IPublishPopupView publishPopupView); |
| | 6 | | void Dispose(); |
| | 7 | | void PublishStart(); |
| | 8 | | void PublishEnd(bool isOk, string message); |
| | 9 | | void SetPercentage(float newValue); |
| | 10 | | } |
| | 11 | |
|
| | 12 | | public class PublishPopupController : IPublishPopupController |
| | 13 | | { |
| 0 | 14 | | public float currentProgress => publishPopupView.currentProgress; |
| | 15 | |
|
| | 16 | | internal IPublishPopupView publishPopupView; |
| | 17 | |
|
| 0 | 18 | | public void Initialize(IPublishPopupView publishPopupView) { this.publishPopupView = publishPopupView; } |
| | 19 | |
|
| 0 | 20 | | public void Dispose() { } |
| | 21 | |
|
| | 22 | | public void PublishStart() |
| | 23 | | { |
| 1 | 24 | | publishPopupView.PublishStart(); |
| 1 | 25 | | SetPercentage(0f); |
| 1 | 26 | | } |
| | 27 | |
|
| 4 | 28 | | public void PublishEnd(bool isOk, string message) { publishPopupView.PublishEnd(isOk, message); } |
| | 29 | |
|
| 4 | 30 | | public void SetPercentage(float newValue) { publishPopupView.SetPercentage(newValue); } |
| | 31 | | } |