Ejemplo n.º 1
0
        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();
                }
            }
        }
Ejemplo n.º 2
0
        private void onSelectFolderDialog(SelectFolderDialogParams openParams)
        {
            string path = openParams.FolderPath;

            if (path != null && path != "")
            {
                List <PrintItem> parts = QueueData.Instance.CreateReadOnlyPartList(true);
                if (parts.Count > 0)
                {
                    if (exportingWindow == null)
                    {
                        exportingWindow         = new ExportToFolderFeedbackWindow(parts.Count, parts[0].Name, ActiveTheme.Instance.PrimaryBackgroundColor);
                        exportingWindow.Closed += 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();
                }
            }
        }
Ejemplo n.º 3
0
        private static void SelectLocationToExportGCode(object state)
        {
            SelectFolderDialogParams selectParams = new SelectFolderDialogParams("Select Location To Save Files");

            selectParams.ActionButtonLabel = "Export";
            selectParams.Title             = "MatterControl: Select A Folder";

            string path = FileDialog.SelectFolderDialog(ref selectParams);

            if (path != null && path != "")
            {
                List <PrintItem> parts = PrintQueueControl.Instance.CreateReadOnlyPartList();
                if (parts.Count > 0)
                {
                    ExportToFolderFeedbackWindow exportingWindow = new ExportToFolderFeedbackWindow(parts.Count, parts[0].Name, ActiveTheme.Instance.PrimaryBackgroundColor);
                    exportingWindow.ShowAsSystemWindow();

                    ExportToFolderProcess exportToFolderProcess = new ExportToFolderProcess(parts, path);
                    exportToFolderProcess.StartingNextPart += exportingWindow.StartingNextPart;
                    exportToFolderProcess.UpdatePartStatus += exportingWindow.UpdatePartStatus;
                    exportToFolderProcess.DoneSaving       += exportingWindow.DoneSaving;
                    exportToFolderProcess.Start();
                }
            }
        }
Ejemplo n.º 4
0
 private void exportToSDProcess_UpdateRemainingItems(object sender, EventArgs e)
 {
     ExportToFolderProcess exportToSDProcess = (ExportToFolderProcess)sender;
 }
Ejemplo n.º 5
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();
				}
			}
		}
		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();
                }
            }
        }