private void StopStartProgram(ProgramViewModel program, bool start)
 {
     MainThreadUtility.InvokeOnMain(() =>
     {
         this.NavigateTo(ProgramRepeatSelectViewController.CreateInstance(this.Device?.Id, start, program));
     });
 }
        public static ProgramRepeatSelectViewController CreateInstance(string deviceId, bool start, ProgramViewModel program)
        {
            ExceptionUtility.Try(() =>
            {
                if (_instance != null)
                {
                    _instance.Dispose();
                    _instance = null;
                }
            });

            if (_instance == null)
            {
                _instance = new ProgramRepeatSelectViewController(deviceId, start, program);
            }

            return(_instance);
        }