Example #1
0
		public override bool SelectFolderDialog(SelectFolderDialogParams folderParams, SelectFolderDialogDelegate callback)
		{
			SelectFolderDialog(ref folderParams);
			UiThread.RunOnIdle(() =>
			{
				callback(folderParams);
			});
			return true;
		}
Example #2
0
        public override string SelectFolderDialog(ref SelectFolderDialogParams folderParams)
        {
            WidgetForWindowsFormsAbstract.MainWindowsFormsWindow.ShowingSystemDialog = true;

            FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog();
            folderBrowserDialog.Description = folderParams.Description;
            switch (folderParams.RootFolder)
            {
                case SelectFolderDialogParams.RootFolderTypes.MyComputer:
                    folderBrowserDialog.RootFolder = Environment.SpecialFolder.MyComputer;
                    break;

                default:
                    throw new NotImplementedException();
            }
            folderBrowserDialog.ShowNewFolderButton = folderParams.ShowNewFolderButton;

            folderBrowserDialog.ShowDialog();

            WidgetForWindowsFormsAbstract.MainWindowsFormsWindow.ShowingSystemDialog = false;
            return folderBrowserDialog.SelectedPath;
        }
Example #3
0
		public static bool SelectFolderDialog(SelectFolderDialogParams folderParams, FileDialogCreator.SelectFolderDialogDelegate callback)
		{
			return FileDialogCreatorPlugin.SelectFolderDialog(folderParams, callback);
		}
Example #4
0
		public abstract bool SelectFolderDialog(SelectFolderDialogParams folderParams, SelectFolderDialogDelegate callback);
Example #5
0
 public static bool SelectFolderDialog(SelectFolderDialogParams folderParams, FileDialogCreator.SelectFolderDialogDelegate callback)
 {
     return(FileDialogCreatorPlugin.SelectFolderDialog(folderParams, callback));
 }
Example #6
0
 public abstract bool SelectFolderDialog(SelectFolderDialogParams folderParams, SelectFolderDialogDelegate callback);
 public static bool SelectFolderDialog(SelectFolderDialogParams folderParams, Action <SelectFolderDialogParams> callback)
 {
     return(FileDialogCreatorPlugin.SelectFolderDialog(folderParams, callback));
 }
 public abstract bool SelectFolderDialog(SelectFolderDialogParams folderParams, Action <SelectFolderDialogParams> callback);
Example #9
0
 public abstract string SelectFolderDialog(ref SelectFolderDialogParams folderParams);
Example #10
0
 public static string SelectFolderDialog(ref SelectFolderDialogParams folderParams)
 {
     return FileDialogCreatorPlugin.SelectFolderDialog(ref folderParams);
 }
Example #11
0
		private void onSelectFolderDialog(SelectFolderDialogParams openParams)
		{
			string path = openParams.FolderPath;
			if (path != null && path != "")
			{
				List<PrintItem> parts = QueueData.Instance.CreateReadOnlyPartList();
				if (parts.Count > 0)
				{
					if (exportingWindow == null)
					{
						exportingWindow = new ExportToFolderFeedbackWindow(parts.Count, parts[0].Name, ActiveTheme.Instance.PrimaryBackgroundColor);
						exportingWindow.Closed += new EventHandler(ExportToFolderFeedbackWindow_Closed);
						exportingWindow.ShowAsSystemWindow();
					}
					else
					{
						exportingWindow.BringToFront();
					}

					ExportToFolderProcess exportToFolderProcess = new ExportToFolderProcess(parts, path);
					exportToFolderProcess.StartingNextPart += exportingWindow.StartingNextPart;
					exportToFolderProcess.UpdatePartStatus += exportingWindow.UpdatePartStatus;
					exportToFolderProcess.DoneSaving += exportingWindow.DoneSaving;
					exportToFolderProcess.Start();
				}
			}
		}
Example #12
0
		private void SelectLocationToExportGCode(object state)
		{
			SelectFolderDialogParams selectParams = new SelectFolderDialogParams("Select Location To Save Files");
			selectParams.ActionButtonLabel = "Export".Localize();
			selectParams.Title = "MatterControl: Select A Folder";

			FileDialog.SelectFolderDialog(selectParams, onSelectFolderDialog);
		}
Example #13
0
 public override bool SelectFolderDialog(SelectFolderDialogParams folderParams, Action <SelectFolderDialogParams> callback)
 {
     throw new NotImplementedException();
 }
		private void SelectLocationToExportGCode(object state)
        {
            SelectFolderDialogParams selectParams = new SelectFolderDialogParams("Select Location To Save Files");
			selectParams.ActionButtonLabel = LocalizedString.Get("Export");
            selectParams.Title = "MatterControl: Select A Folder";

            string path = FileDialog.SelectFolderDialog(ref selectParams);
            if (path != null && path != "")
            {
                List<PrintItem> parts = QueueData.Instance.CreateReadOnlyPartList();
                if (parts.Count > 0)
                {
                    if (exportingWindow == null)
                    {
                        exportingWindow = new ExportToFolderFeedbackWindow(parts.Count, parts[0].Name, ActiveTheme.Instance.PrimaryBackgroundColor);
                        exportingWindow.Closed += new EventHandler(ExportToFolderFeedbackWindow_Closed);
                        exportingWindow.ShowAsSystemWindow();
                    }
                    else
                    {
                        exportingWindow.BringToFront();
                    }

                    ExportToFolderProcess exportToFolderProcess = new ExportToFolderProcess(parts, path);
                    exportToFolderProcess.StartingNextPart += exportingWindow.StartingNextPart;
                    exportToFolderProcess.UpdatePartStatus += exportingWindow.UpdatePartStatus;
                    exportToFolderProcess.DoneSaving += exportingWindow.DoneSaving;
                    exportToFolderProcess.Start();
                }
            }
        }