Esempio n. 1
0
 public MediaFoundationPlaybackViewModel(IAppStateOwner owner)
 {
     AppStateOwner    = owner;
     inputPathHistory = new ObservableCollection <string>();
     LoadCommand      = new RelayCommand(Load, () => IsStopped);
     PlayCommand      = new RelayCommand(Play, () => !IsPlaying);
     PauseCommand     = new RelayCommand(Pause, () => IsPlaying);
     StopCommand      = new RelayCommand(Stop, () => !IsStopped);
     _timer.Interval  = TimeSpan.FromMilliseconds(500);
     _timer.Tick     += OnTimerUpdatePositions;
 }
Esempio n. 2
0
        public static bool CheckIfLaunched(IAppStateOwner parent)
        {
            while (!checkProcesses())
            {
                var result = parent.DisplayWarningDialogOkCancel("Please Launch the OhmStudio client and authenticate then click Ok", "OhmStudio is not launched");
                if (!result)
                {
                    return(false);
                }
            }

            return(true);
        }
Esempio n. 3
0
 public MainViewModel(IAppStateOwner parent) : base(parent)
 {
     AppStateOwner = parent;
     UrlBase       = "https://www.ohmstudio.com/v3/feed/my_projects_p?page=";
     CreateCacheFolders();
 }