Beispiel #1
0
        private void Initialize(PowerStatusType powerStatus)
        {
            switch (powerStatus)
            {
            case PowerStatusType.Sleep:

                StatusText = "Entering sleep mode";
                SvgPath    = "TouchPanel.Icons.moon_stars_white.svg";
                break;

            case PowerStatusType.Restart:
                StatusText = "Restarting panel";
                SvgPath    = "TouchPanel.Icons.undo_white.svg";
                break;

            case PowerStatusType.Shutdown:
                StatusText = "Shutting down";
                SvgPath    = "TouchPanel.Icons.power_off_white.svg";
                break;
            }
        }
 public PowerStatusPage(PowerStatusType powerStatus)
 {
     InitializeComponent();
     BindingContext = new PowerStatusViewModel(powerStatus);
 }
Beispiel #3
0
 public PowerStatusViewModel(PowerStatusType powerStatus)
 {
     Initialize(powerStatus);
 }