예제 #1
0
파일: MainWindow.cs 프로젝트: mono/f-spot
		void StartImport (SafeUri uri)
		{
			var controller = new ImportController (true);
			controller.StatusEvent += evnt => {
				if (evnt == ImportEvent.ImportFinished) {
					if (controller.PhotosImported > 0) {
						query.RollSet = new RollSet (Database.Rolls.GetRolls (1));
					}
				}
			};
			var import_window = new ImportDialog (controller, Window);
			import_window.Show ();
		}
예제 #2
0
파일: MainWindow.cs 프로젝트: mono/f-spot
		public void ImportUriList (UriList list, bool copy)
		{
			// Drag'n drop import.
			var controller = new ImportController (false);
			controller.StatusEvent += (evnt) => ThreadAssist.ProxyToMain (() => {
				if (evnt == ImportEvent.ImportFinished) {
					if (controller.PhotosImported > 0) {
						query.RollSet = new RollSet (Database.Rolls.GetRolls (1));
					}
				}
			});

			var source = new MultiFileImportSource (list.ToArray ());
			controller.ActiveSource = source;
			controller.CopyFiles = copy;
			controller.DuplicateDetect = true;
			controller.RecurseSubdirectories = true;
			controller.RemoveOriginals = false;

			var import_window = new ImportDialog (controller, Window);
			import_window.Show ();

			controller.StartImport ();
		}