private void importFile_Click()
 {
     FileDialog.OpenFileDialog(
         new OpenFileDialogParams(ApplicationSettings.OpenPrintableFileParams)
     {
         MultiSelect       = true,
         ActionButtonLabel = "Add to Queue",
         Title             = "MatterControl: Select A File"
     },
         (openParams) =>
     {
         if (openParams.FileNames != null)
         {
             foreach (string loadedFileName in openParams.FileNames)
             {
                 if (Path.GetExtension(loadedFileName).ToUpper() == ".ZIP")
                 {
                     ProjectFileHandler project = new ProjectFileHandler(null);
                     List <PrintItem> partFiles = project.ImportFromProjectArchive(loadedFileName);
                     if (partFiles != null)
                     {
                         foreach (PrintItem part in partFiles)
                         {
                             QueueData.Instance.AddItem(new PrintItemWrapper(new PrintItem(part.Name, part.FileLocation)));
                         }
                     }
                 }
                 else
                 {
                     QueueData.Instance.AddItem(new PrintItemWrapper(new PrintItem(Path.GetFileNameWithoutExtension(loadedFileName), Path.GetFullPath(loadedFileName))));
                 }
             }
         }
     });
 }
		private void importFile_Click()
		{
			FileDialog.OpenFileDialog(
				new OpenFileDialogParams(ApplicationSettings.OpenPrintableFileParams)
				{
					MultiSelect = true,
					ActionButtonLabel = "Add to Queue",
					Title = "MatterControl: Select A File"
				},
				(openParams) =>
				{
					if (openParams.FileNames != null)
					{
						foreach (string loadedFileName in openParams.FileNames)
						{
							if (Path.GetExtension(loadedFileName).ToUpper() == ".ZIP")
							{
								ProjectFileHandler project = new ProjectFileHandler(null);
								List<PrintItem> partFiles = project.ImportFromProjectArchive(loadedFileName);
								if (partFiles != null)
								{
									foreach (PrintItem part in partFiles)
									{
										QueueData.Instance.AddItem(new PrintItemWrapper(new PrintItem(part.Name, part.FileLocation)));
									}
								}
							}
							else
							{
								QueueData.Instance.AddItem(new PrintItemWrapper(new PrintItem(Path.GetFileNameWithoutExtension(loadedFileName), Path.GetFullPath(loadedFileName))));
							}
						}
					}
				});
		}