public LibraryView(Model.Library library, List <IView> views, IView defaultView) { _currentView = defaultView; _defaultView = defaultView; library.LibraryChange += delegate { DrawCurentView(); }; _views = views; }
/// <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(); }
public async Task updateLibrary(Model.Library library) { await this.container.CreateIfNotExistsAsync(); CloudBlockBlob blobReference = container.GetBlockBlobReference($"{library.id}.json"); await blobReference.UploadTextAsync(JsonConvert.SerializeObject(library)); }
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); }
public BorrowBookCommandProcessor(Model.Library library, IRepository repository) { _library = library; _repository = repository; }
public ImportedLibraryBuilder() { Library = new Model.Library(); }
public AddUserCommandProcessor(Model.Library library, IRepository repository) { _library = library; _repository = repository; }