private void PopulateIndexField(IIndexField [] indexFields) { cbIndexField.Items.Clear(); foreach (IIndexField indexField in indexFields) cbIndexField.Items.Add(indexField.Label); }
public EnhancedPdfExportSetup(Settings settings, IIndexField[] indexFields) { _settings = settings; InitializeComponent(); PopulateIndexField(indexFields); UpdateUI(); }
public DmEcSetup(ref ReleaseSettings settings, IEnumerable<IExporter> exporters, IIndexField [] indexFields) { InitializeComponent(); Text = string.Format("DocumentMall Export Setup - {0}",System.Reflection.Assembly.GetExecutingAssembly().GetName().Version); _settings = settings; documentUserControl.InitializeControl(exporters, _settings.ReleaseMode, _settings.FileTypeId); LoadSettings(); PopulateDropDown(indexFields, drbDocumentType, pmDocType, bmDocType, "Custom Document Type"); PopulateDropDown(indexFields, cboSecurityKey, pmSecurityKey, bmSecurityKey, "Custom Security Key"); UpdateFileNameSetupButton(indexFields); // Commenting out the DisplayDocumentType() call // Its not in the control and I don't rememeber what it does // documentUserControl.DisplayDocumentType(false); }
public ColormaxCustomExport( IEnumerable<IExporter> exporters, string destination, Guid fileTypeId, ReleaseMode workingMode, IIndexField[] indexFields, string indexField, int padding, bool deleteFirstPage) { InitializeComponent(); this.Text = "Colormax Custom Exporter Setup - " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; /// Reflecting current settings onto UI controls input_Destination.Text = destination; m_CurrentFileTypeId = fileTypeId; /// An exporter can support both interfaces foreach (IExporter exporter in exporters) { if (exporter is IPageOutputConverter) m_PageConverters.Add(exporter as IPageOutputConverter); if (exporter is IDocumentOutputConverter) m_DocConverters.Add(exporter as IDocumentOutputConverter); } option_Single.Checked = workingMode == ReleaseMode.SinglePage; //option_Multi.Checked = workingMode == ReleaseMode.MultiPage; //set single page option option_Single.Checked = true; cbIndexValue.Items.Clear(); foreach (IIndexField field in indexFields) cbIndexValue.Items.Add(field.Label); for (int count = 0; count < indexFields.Length; count++ ) { if (indexField.Equals(cbIndexValue.Items[count])) cbIndexValue.SelectedIndex = count; } txtPadding.Text = padding.ToString(); cbDeleteFirstPage.Checked = deleteFirstPage; }
/// <summary> /// Whenever the user requests to configure the script's settings, the method will be called with /// the latest information from the application's running instance as parameters. Also, a script can /// define and add its own information to the data table and pass it further down to the exporters. /// </summary> public void Setup(IList<IExporter> exporters, IIndexField[] indexFields, IDictionary<string, string> releaseData) { ColormaxCustomExport dialog = new ColormaxCustomExport(exporters, m_Destination, m_FileTypeId, m_WorkingMode, indexFields, m_IndexField, m_Padding, m_DeleteFirstPage); if (dialog.ShowDialog() != DialogResult.OK) return; m_Destination = dialog.Destination; m_FileTypeId = dialog.FileTypeId; m_WorkingMode = dialog.WorkingMode; m_IndexField = dialog.IndexField; m_Padding = dialog.PaddingValue; m_DeleteFirstPage = dialog.DeleteFirstPage; }
public object StartRelease(IList<IExporter> exporters, IIndexField[] indexFields, IDictionary<string, string> releaseData) { _docConverter = new PdfGenerator(_settings); return null; //Have to use this since IReleaseScript2 is missing the index fields for the setup. }
public object StartRelease(IList<IExporter> exporters, IIndexField[] indexFields, IDictionary<string, string> releaseData, IApplication licenseData) { _docConverter = new PdfGenerator(_settings); return null; }
public void Setup(IList<IExporter> exporters, IIndexField[] indexFields, IDictionary<string, string> releaseData) { EnhancedPdfExportSetup setupDialog = new EnhancedPdfExportSetup(_settings, indexFields); if (setupDialog.ShowDialog() != DialogResult.OK) return; }
public object StartRelease(IList<IExporter> exporters, IIndexField[] indexFields, IDictionary<string, string> releaseData) { return null; }
public void Setup(IList<IExporter> exporters, IIndexField[] indexFields, IDictionary<string, string> releaseData) { DmEcSetup setup = new DmEcSetup(ref _releaseSettings, exporters, indexFields); setup.ShowDialog(); }
/// <summary> /// This method will be called first when the release is started. The application will pass the latest information /// from the running instance to the script through given parameters. The script should do its final check /// for proper release conditions, throwing exceptions if problems occur. /// </summary> public object StartRelease(IList<IExporter> exporters, IIndexField[] indexFields, IDictionary<string, string> releaseData) { if (string.IsNullOrEmpty(m_Destination)) throw new Exception("Please specify a release destination"); if (string.IsNullOrEmpty(m_IndexFileName)) throw new Exception("Please specify an index file name"); m_DocConverter = null; m_PageConverter = null; index = new AxIndexGenerator(); foreach (IExporter exporter in exporters) { if (exporter.Id == m_FileTypeId) { if (m_WorkingMode == ReleaseMode.SinglePage) m_PageConverter = exporter as IPageOutputConverter; else m_DocConverter = exporter as IDocumentOutputConverter; } } /// When both of them can't be found, either the user hasn't set up properly, or the chosen converter has disappeared. /// The script can declare that the release cannot continue or proceed with default settings. if (m_PageConverter == null && m_DocConverter == null) throw new Exception("Please select an output file type"); /// The application will keep any object returned from this function and pass it back to the script /// in the EndRelease call. This is usually intended to facilitate cleanup. return null; }
public object StartRelease(IList<IExporter> exporters, IIndexField[] indexFields, IDictionary<string, string> releaseData, IApplication licenseData) { if (string.IsNullOrEmpty(_exportFileName)) throw new Exception("Please specify a file name"); foreach (IExporter exporter in exporters) if (exporter.DefaultExtension == Path.GetExtension(_exportFileName).ToUpper().TrimStart('.')) if (_workingMode == ReleaseMode.SinglePage) _pageConverter = exporter as IPageOutputConverter; else _docConverter = exporter as IDocumentOutputConverter; if (_pageConverter == null && _docConverter == null) throw new Exception("Please select an output file type"); return null; }
private void UpdateFileNameSetupButton(IIndexField[] indexFields) { foreach (DefaultName name in DefaultName.GeneralValues) { pmFileName.AddItem(CreateBarButtonItem(name)); pmFolderPath.AddItem(CreateBarButtonItem(name)); } BarSubItem dateGroup = new BarSubItem(); dateGroup.Name = dateGroup.Caption = DefaultName.DateGroupName; dateGroup.ClearLinks(); pmFileName.AddItem(dateGroup); pmFolderPath.AddItem(dateGroup); foreach (DefaultName name in DefaultName.DateValues) dateGroup.AddItem(CreateBarButtonItem(name)); BarSubItem timeGroup = new BarSubItem(); timeGroup.Caption = DefaultName.TimeGroupName; timeGroup.ClearLinks(); pmFileName.AddItem(timeGroup); pmFolderPath.AddItem(timeGroup); foreach (DefaultName name in DefaultName.TimeValues) timeGroup.AddItem(CreateBarButtonItem(name)); if (indexFields != null && indexFields.Length > 0) { BarSubItem indexGroup = new BarSubItem(); indexGroup.Caption = "Index Fields"; indexGroup.ClearLinks(); pmFileName.AddItem(indexGroup); pmFolderPath.AddItem(indexGroup); for (int i = 0; i < indexFields.Length; i++) { BarButtonItem barButtonItem = new BarButtonItem(); barButtonItem.Caption = DefaultName.IndexValue.DescriptionOf(i + 1) + " - " + indexFields[i].Label; barButtonItem.Tag = DefaultName.IndexValue.TagOf(i + 1); barButtonItem.ItemClick += barButtonItem_ItemClick; indexGroup.AddItem(barButtonItem); } } }
private void PopulateDropDown(IIndexField[] indexFields, DropDownButton button, PopupMenu popupMenu, BarManager barManager, string text) { popupMenu.ClearLinks(); popupMenu.AddItem(barManager.Items.CreateButton(text)); foreach (IIndexField field in indexFields) popupMenu.AddItem(barManager.Items.CreateButton(field.Label)); SetClickEvent(barManager); button.DropDownControl = popupMenu; }
public object StartRelease(IList<IExporter> exporters, IIndexField[] indexFields, IDictionary<string, string> releaseData) { if (string.IsNullOrEmpty(_releaseSettings.Destination)) throw new Exception("Please specify a release destination"); _docConverter = null; _pageConverter = null; foreach (IExporter exporter in exporters) { if (exporter.Id == _releaseSettings.FileTypeId) { if (_releaseSettings.ReleaseMode == ReleaseMode.SinglePage) _pageConverter = exporter as IPageOutputConverter; else _docConverter = exporter as IDocumentOutputConverter; } } if (_pageConverter == null && _docConverter == null) throw new Exception("Please specify an output file type."); return null; }
/// <summary> /// Whenever the user request to configure the script's settings, the method will be called with /// latest information from the application's running instance as parameters. Also, a script can /// define and add its own information to the data table and pass them further down to the exporters. /// </summary> public void Setup(IList<IExporter> exporters, IIndexField[] indexFields, IDictionary<string, string> releaseData) { SimpleReleaseSetup setupDialog = new SimpleReleaseSetup(exporters, m_Destination, m_FileTypeId, m_WorkingMode); if (setupDialog.ShowDialog() != DialogResult.OK) return; m_Destination = setupDialog.Destination; m_FileTypeId = setupDialog.FileTypeId; m_WorkingMode = setupDialog.WorkingMode; }
/// <summary> /// Whenever the user requests to configure the script's settings, the method will be called with /// the latest information from the application's running instance as parameters. Also, a script can /// define and add its own information to the data table and pass it further down to the exporters. /// </summary> public void Setup(IList<IExporter> exporters, IIndexField[] indexFields, IDictionary<string, string> releaseData) { AxReleaseSetup setupDialog = new AxReleaseSetup(exporters, m_Destination, m_FileTypeId, m_WorkingMode, m_IndexFileName, m_MaxImageFiles); if (setupDialog.ShowDialog() != DialogResult.OK) return; m_Destination = setupDialog.Destination; m_FileTypeId = setupDialog.FileTypeId; m_WorkingMode = setupDialog.WorkingMode; m_IndexFileName = setupDialog.IndexFileName; m_MaxImageFiles = Int32.Parse(setupDialog.MaxImageFiles); }
public void Setup(IList<IExporter> exporters, IIndexField[] indexFields, IDictionary<string, string> releaseData) { }
private static IndexKeysDefinition <T> CreateIndexDefinition <T>(IndexKeysDefinition <T> index, IIndexField <T> field) { switch (field.SortOrder) { case IndexSortOrder.Desc: return(index.Descending(field.Field)); default: case IndexSortOrder.Asc: return(index.Ascending(field.Field)); } }
public object StartRelease(IList<IExporter> exporters, IIndexField[] indexFields, IDictionary<string, string> releaseData, IApplication licenseData) { _email = new Email(_settings); foreach (IExporter exporter in exporters) { if (exporter.Id == _settings.FileTypeId) { if (_settings.ReleaseMode == ReleaseMode.SinglePage) _pageConverter = exporter as IPageOutputConverter; else _documentConverter = exporter as IDocumentOutputConverter; } } return null; }