Beispiel #1
0
		public void SetComic(Comic comic)
		{
			if (_comic == comic)
				return;
			if (_comic != null)
			{
				_comic.PropertyChanged -= Comic_PropertyChanged;
				if (_comic.Images != null)
					_comic.Images.CollectionChanged -= ComicImageCollection_CollectionChanged;
			}
			_comic = comic;
			if (comic != null)
			{
				comic.PropertyChanged += Comic_PropertyChanged;
				if (comic.Images != null)
					comic.Images.CollectionChanged += ComicImageCollection_CollectionChanged;
				ComicImageCollection_CollectionChanged(comic.Images, new System.Collections.Specialized.NotifyCollectionChangedEventArgs(System.Collections.Specialized.NotifyCollectionChangedAction.Reset));
				using (comic.EnterUndirtiableSection())
					cmbPageTurningDirection.SelectedIndex = (int)PageTurningDirection.ToRight - 1;
			}
		}
Beispiel #2
0
		public ViewerForm(string fileName) : this()
		{
			icd = new Comic(); // Construct with read-only mode.
			openingFileName = fileName;
		}