void PartSheetClickOnIdle(object state) { List <PrintItem> parts = QueueData.Instance.CreateReadOnlyPartList(); if (parts.Count > 0) { SaveFileDialogParams saveParams = new SaveFileDialogParams("Save Parts Sheet|*.pdf"); saveParams.ActionButtonLabel = LocalizedString.Get("Save Parts Sheet"); string saveParamsTitleLabel = "MatterControl".Localize(); string saveParamsTitleLabelFull = LocalizedString.Get("Save"); saveParams.Title = string.Format("{0}: {1}", saveParamsTitleLabel, saveParamsTitleLabelFull); System.IO.Stream streamToSaveTo = FileDialog.SaveFileDialog(ref saveParams); if (streamToSaveTo != null) { streamToSaveTo.Close(); } if (saveParams.FileName != null) { PartsSheet currentPartsInQueue = new PartsSheet(parts, saveParams.FileName); currentPartsInQueue.SaveSheets(); SavePartsSheetFeedbackWindow feedbackWindow = new SavePartsSheetFeedbackWindow(parts.Count, parts[0].Name, ActiveTheme.Instance.PrimaryBackgroundColor); currentPartsInQueue.UpdateRemainingItems += feedbackWindow.StartingNextPart; currentPartsInQueue.DoneSaving += feedbackWindow.DoneSaving; feedbackWindow.ShowAsSystemWindow(); } } }
private void PartSheetClickOnIdle() { #if !__ANDROID__ List <PrintItem> parts = QueueData.Instance.CreateReadOnlyPartList(true); if (parts.Count > 0) { FileDialog.SaveFileDialog( new SaveFileDialogParams("Save Parts Sheet|*.pdf") { ActionButtonLabel = "Save Parts Sheet".Localize(), Title = string.Format("{0}: {1}", "MatterControl".Localize(), "Save".Localize()) }, (saveParams) => { if (!string.IsNullOrEmpty(saveParams.FileName)) { PartsSheet currentPartsInQueue = new PartsSheet(parts, saveParams.FileName); currentPartsInQueue.SaveSheets(); SavePartsSheetFeedbackWindow feedbackWindow = new SavePartsSheetFeedbackWindow(parts.Count, parts[0].Name, ActiveTheme.Instance.PrimaryBackgroundColor); currentPartsInQueue.UpdateRemainingItems += feedbackWindow.StartingNextPart; currentPartsInQueue.DoneSaving += feedbackWindow.DoneSaving; feedbackWindow.ShowAsSystemWindow(); } }); } #endif }
void PartSheetClickOnIdle(object state) { #if !__ANDROID__ List <PrintItem> parts = QueueData.Instance.CreateReadOnlyPartList(); if (parts.Count > 0) { string documentsPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal); FileDialog.SaveFileDialog( new SaveFileDialogParams("Save Parts Sheet|*.pdf") { InitialDirectory = documentsPath, ActionButtonLabel = "Save Parts Sheet".Localize(), Title = string.Format("{0}: {1}", "MatterControl".Localize(), "Save".Localize()) }, (saveParams) => { if (saveParams.FileName != null) { PartsSheet currentPartsInQueue = new PartsSheet(parts, saveParams.FileName); currentPartsInQueue.SaveSheets(); SavePartsSheetFeedbackWindow feedbackWindow = new SavePartsSheetFeedbackWindow(parts.Count, parts[0].Name, ActiveTheme.Instance.PrimaryBackgroundColor); currentPartsInQueue.UpdateRemainingItems += feedbackWindow.StartingNextPart; currentPartsInQueue.DoneSaving += feedbackWindow.DoneSaving; feedbackWindow.ShowAsSystemWindow(); } }); } #endif }
void createPatrsSheetsButton_Click(object sender, MouseEventArgs mouseEvent) { List <PrintItem> parts = PrintQueueControl.Instance.CreateReadOnlyPartList(); SaveFileDialogParams saveParams = new SaveFileDialogParams("Save Parts Sheet|*.pdf"); System.IO.Stream streamToSaveTo = FileDialog.SaveFileDialog(ref saveParams); if (streamToSaveTo != null) { string partFileName = saveParams.FileName; if (!partFileName.StartsWith("" + Path.DirectorySeparatorChar)) { partFileName = Path.DirectorySeparatorChar + partFileName; } PartsSheet currentPartsInQueue = new PartsSheet(parts, partFileName); currentPartsInQueue.SaveSheets(); } }
void createPartsSheetsButton_Click(object sender, EventArgs mouseEvent) { #if !__ANDROID__ List <PrintItem> parts = QueueData.Instance.CreateReadOnlyPartList(); FileDialog.SaveFileDialog( new SaveFileDialogParams("Save Parts Sheet|*.pdf"), (saveParams) => { string partFileName = saveParams.FileName; if (!partFileName.StartsWith("" + Path.DirectorySeparatorChar)) { partFileName = Path.DirectorySeparatorChar + partFileName; } PartsSheet currentPartsInQueue = new PartsSheet(parts, partFileName); currentPartsInQueue.SaveSheets(); }); #endif }
void createPartsSheetsButton_Click(object sender, EventArgs mouseEvent) { #if !__ANDROID__ List <PrintItem> parts = QueueData.Instance.CreateReadOnlyPartList(); string documentsPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal); FileDialog.SaveFileDialog( new SaveFileDialogParams("Save Parts Sheet|*.pdf", initialDirectory: documentsPath), (saveParams) => { string partFileName = saveParams.FileName; if (!partFileName.StartsWith("" + Path.DirectorySeparatorChar)) { partFileName = Path.DirectorySeparatorChar + partFileName; } PartsSheet currentPartsInQueue = new PartsSheet(parts, partFileName); currentPartsInQueue.SaveSheets(); }); #endif }
void createPatrsSheetsButton_Click(object sender, MouseEventArgs mouseEvent) { List<PrintItem> parts = PrintQueueControl.Instance.CreateReadOnlyPartList(); SaveFileDialogParams saveParams = new SaveFileDialogParams("Save Parts Sheet|*.pdf"); System.IO.Stream streamToSaveTo = FileDialog.SaveFileDialog(ref saveParams); if (streamToSaveTo != null) { string partFileName = saveParams.FileName; if ( !partFileName.StartsWith ("" + Path.DirectorySeparatorChar) ) { partFileName = Path.DirectorySeparatorChar + partFileName; } PartsSheet currentPartsInQueue = new PartsSheet(parts, partFileName); currentPartsInQueue.SaveSheets(); } }
private void PartSheetClickOnIdle(object state) { #if !__ANDROID__ List<PrintItem> parts = QueueData.Instance.CreateReadOnlyPartList(); if (parts.Count > 0) { FileDialog.SaveFileDialog( new SaveFileDialogParams("Save Parts Sheet|*.pdf") { ActionButtonLabel = "Save Parts Sheet".Localize(), Title = string.Format("{0}: {1}", "MatterControl".Localize(), "Save".Localize()) }, (saveParams) => { if (saveParams.FileName != null) { PartsSheet currentPartsInQueue = new PartsSheet(parts, saveParams.FileName); currentPartsInQueue.SaveSheets(); SavePartsSheetFeedbackWindow feedbackWindow = new SavePartsSheetFeedbackWindow(parts.Count, parts[0].Name, ActiveTheme.Instance.PrimaryBackgroundColor); currentPartsInQueue.UpdateRemainingItems += feedbackWindow.StartingNextPart; currentPartsInQueue.DoneSaving += feedbackWindow.DoneSaving; feedbackWindow.ShowAsSystemWindow(); } }); } #endif }
void PartSheetClickOnIdle(object state) { List<PrintItem> parts = QueueData.Instance.CreateReadOnlyPartList(); if (parts.Count > 0) { string documentsPath = System.Environment.GetFolderPath (System.Environment.SpecialFolder.Personal); SaveFileDialogParams saveParams = new SaveFileDialogParams("Save Parts Sheet|*.pdf", initialDirectory: documentsPath); saveParams.ActionButtonLabel = LocalizedString.Get("Save Parts Sheet"); string saveParamsTitleLabel = "MatterControl".Localize(); string saveParamsTitleLabelFull = LocalizedString.Get ("Save"); saveParams.Title = string.Format("{0}: {1}",saveParamsTitleLabel,saveParamsTitleLabelFull); System.IO.Stream streamToSaveTo = FileDialog.SaveFileDialog(ref saveParams); if (streamToSaveTo != null) { streamToSaveTo.Close (); } if (saveParams.FileName != null) { PartsSheet currentPartsInQueue = new PartsSheet(parts, saveParams.FileName); currentPartsInQueue.SaveSheets(); SavePartsSheetFeedbackWindow feedbackWindow = new SavePartsSheetFeedbackWindow(parts.Count, parts[0].Name, ActiveTheme.Instance.PrimaryBackgroundColor); currentPartsInQueue.UpdateRemainingItems += feedbackWindow.StartingNextPart; currentPartsInQueue.DoneSaving += feedbackWindow.DoneSaving; feedbackWindow.ShowAsSystemWindow(); } } }
void createPartsSheetsButton_Click(object sender, MouseEventArgs mouseEvent) { List<PrintItem> parts = QueueData.Instance.CreateReadOnlyPartList(); string documentsPath = System.Environment.GetFolderPath (System.Environment.SpecialFolder.Personal); SaveFileDialogParams saveParams = new SaveFileDialogParams("Save Parts Sheet|*.pdf", initialDirectory: documentsPath); System.IO.Stream streamToSaveTo = FileDialog.SaveFileDialog(ref saveParams); if (streamToSaveTo != null) { string partFileName = saveParams.FileName; if ( !partFileName.StartsWith ("" + Path.DirectorySeparatorChar) ) { partFileName = Path.DirectorySeparatorChar + partFileName; } PartsSheet currentPartsInQueue = new PartsSheet(parts, partFileName); currentPartsInQueue.SaveSheets(); } }
void PartSheetClickOnIdle(object state) { List<PrintItem> parts = PrintQueueControl.Instance.CreateReadOnlyPartList(); if (parts.Count > 0) { SaveFileDialogParams saveParams = new SaveFileDialogParams("Save Parts Sheet|*.pdf"); saveParams.ActionButtonLabel = new LocalizedString("Save Parts Sheet").Translated; string saveParamsTitleLbl = new LocalizedString("MatterContol").Translated; string saveParamsTitleLblFull = new LocalizedString ("Save").Translated; saveParams.Title = string.Format("{0}: {1}",saveParamsTitleLbl,saveParamsTitleLblFull); System.IO.Stream streamToSaveTo = FileDialog.SaveFileDialog(ref saveParams); if (streamToSaveTo != null) { streamToSaveTo.Close (); } if (saveParams.FileName != null) { PartsSheet currentPartsInQueue = new PartsSheet(parts, saveParams.FileName); currentPartsInQueue.SaveSheets(); SavePartsSheetFeedbackWindow feedbackWindow = new SavePartsSheetFeedbackWindow(parts.Count, parts[0].Name, ActiveTheme.Instance.PrimaryBackgroundColor); currentPartsInQueue.UpdateRemainingItems += feedbackWindow.StartingNextPart; currentPartsInQueue.DoneSaving += feedbackWindow.DoneSaving; feedbackWindow.ShowAsSystemWindow(); } } }
private void createPartsSheetsButton_Click(object sender, EventArgs mouseEvent) { #if !__ANDROID__ List<PrintItem> parts = QueueData.Instance.CreateReadOnlyPartList(); FileDialog.SaveFileDialog( new SaveFileDialogParams("Save Parts Sheet|*.pdf"), (saveParams) => { string partFileName = saveParams.FileName; if (!partFileName.StartsWith("" + Path.DirectorySeparatorChar)) { partFileName = Path.DirectorySeparatorChar + partFileName; } PartsSheet currentPartsInQueue = new PartsSheet(parts, partFileName); currentPartsInQueue.SaveSheets(); }); #endif }