Example #1
0
 public LibraryView(Model.Library library, List <IView> views, IView defaultView)
 {
     _currentView           = defaultView;
     _defaultView           = defaultView;
     library.LibraryChange += delegate { DrawCurentView(); };
     _views = views;
 }
Example #2
0
        /// <summary>
        /// Initialization
        /// </summary>
        public Video_ViewModel()
        {
            __LibraryFile    = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Epitech\\__MyLibrary";
            _NbFilesLoaded   = 0;
            Loading          = true;
            _ProgressTimer   = new DispatcherTimer();
            _Library         = new Model.Library(__LibraryFile, this);
            _Playlist        = new Model.Playlist();
            _Video           = new Model.Video();
            _IsPlaying       = false;
            _IsLoaded        = false;
            _Maximum         = 10;
            _SaveVolume      = 0;
            _SaveWidth       = Video.Media.Width;
            _SaveHeight      = Video.Media.Height;
            _Choice          = 0;
            IsFullScreen     = false;
            _LibrarySearch   = "Custom Search...";
            _GoSearch        = true;
            _WindowStateSave = WindowState.Normal;
            ControlZindex    = 7;

            _ProgressTimer.Interval      = TimeSpan.FromSeconds(1);
            _ProgressTimer.Tick         += ProgressTimer_Tick;
            Video.Media.MediaOpened     += new RoutedEventHandler(EVNT_MediaOpened);
            Video.Media.MediaEnded      += new RoutedEventHandler(EVNT_MediaEnded);
            Video.Media.ScrubbingEnabled = true;
            Video.Media.IsEnabled        = true;

            _ProgressTimer.Start();
            InitCommands();
        }
Example #3
0
        public async Task updateLibrary(Model.Library library)
        {
            await this.container.CreateIfNotExistsAsync();

            CloudBlockBlob blobReference = container.GetBlockBlobReference($"{library.id}.json");
            await blobReference.UploadTextAsync(JsonConvert.SerializeObject(library));
        }
Example #4
0
        public async Task <Model.Library> createLibrary(Model.Library library)
        {
            await this.container.CreateIfNotExistsAsync();

            Guid newId = Guid.NewGuid();

            library.id = newId.ToString();
            CloudBlockBlob blobReference = container.GetBlockBlobReference($"{library.id}.json");
            await blobReference.UploadTextAsync(JsonConvert.SerializeObject(library));

            return(library);
        }
Example #5
0
 public BorrowBookCommandProcessor(Model.Library library, IRepository repository)
 {
     _library    = library;
     _repository = repository;
 }
Example #6
0
 public ImportedLibraryBuilder()
 {
     Library = new Model.Library();
 }
Example #7
0
 public AddUserCommandProcessor(Model.Library library, IRepository repository)
 {
     _library    = library;
     _repository = repository;
 }
Example #8
0
 public ImportedLibraryBuilder()
 {
     Library = new Model.Library();
 }