void _presenter_FileLoaded(object sender, FileLoadedEventArgs e) { Debug(string.Format("File is loaded: {0} Size: {1} bytes", e.FileName, e.TotalSize)); btnStart.Enabled = true; btnEnd.Enabled = true; _presenter.SetEncoding(_selectedEncoder); _reader.SetScrollMaster(e.TotalSize); txtFilePath.Text = Path.Combine(e.Path, e.FileName); ShowSizeOfFile(e.TotalSize); }
/// <summary> /// Обработчик события загрузки проекта /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void _view_FileLoaded(object sender, FileLoadedEventArgs e) { _model.ClearCanvas(); foreach (var command in e.RedoList) { CommandFactory.RestorePointersToModel(command, _model); } _undoRedoStack.Reset(); _saveState = SaveState.OpenedFile; FixCommands(e.UndoCount, e.RedoList); _view.Canvas.Refresh(); }
private async void FileServiceOnFileLoaded(object sender, FileLoadedEventArgs eventArgs) { if (MusicFileLoaded == null) { throw new Exception("You must subscribe to MusicFileLoaded"); } var id3Tag = await _id3TagService.GetId3TagAsync(eventArgs.File); var musicFile = new MusicFile { FileName = eventArgs.File.Name, FilePath = eventArgs.File.Path, ArtistName = id3Tag.Artist, AlbumName = id3Tag.Album, Genre = id3Tag.Genre, SongTitle = id3Tag.Title, AlbumArt = id3Tag.AlbumArt }; MusicFileLoaded(this, new MusicFileLoadedEventArgs(musicFile)); }
private void Loader_FileLoaded(Object sender, FileLoadedEventArgs e) { mediaList.Add(e.Media); this.Invoke(new Action(SetStatusLabel)); }