//************************************************************************* // Constructor: GeneralUserSettingsDialog() // /// <summary> /// Initializes a new instance of the <see /// cref="GeneralUserSettingsDialog" /> class. /// </summary> /// /// <param name="generalUserSettings"> /// The object being edited. /// </param> /// /// <param name="workbook"> /// Workbook containing the graph data. /// </param> //************************************************************************* public GeneralUserSettingsDialog ( GeneralUserSettings generalUserSettings, Microsoft.Office.Interop.Excel.Workbook workbook ) { Debug.Assert(generalUserSettings != null); Debug.Assert(workbook != null); generalUserSettings.AssertValid(); m_oGeneralUserSettings = generalUserSettings; m_oWorkbook = workbook; m_oAxisFont = m_oGeneralUserSettings.AxisFont; m_oLabelUserSettings = m_oGeneralUserSettings.LabelUserSettings; m_oOpenFileDialog = new OpenFileDialog(); m_oOpenFileDialog.Filter = "All files (*.*)|*.*|" + SaveableImageFormats.Filter ; m_oOpenFileDialog.Title = "Browse for Background Image"; // Instantiate an object that saves and retrieves the position of this // dialog. Note that the object automatically saves the settings when // the form closes. m_oGeneralUserSettingsDialogUserSettings = new GeneralUserSettingsDialogUserSettings(this); InitializeComponent(); nudEdgeWidth.Minimum = (Decimal)EdgeWidthConverter.MinimumWidthWorkbook; nudEdgeWidth.Maximum = (Decimal)EdgeWidthConverter.MaximumWidthWorkbook; nudRelativeArrowSize.Minimum = (Decimal)EdgeDrawer.MinimumRelativeArrowSize; nudRelativeArrowSize.Maximum = (Decimal)EdgeDrawer.MaximumRelativeArrowSize; cbxEdgeBezierDisplacementFactor.PopulateWithObjectsAndText( 0.1, "Low", 0.2, "Medium", 0.6, "High", 1.2, "Very High" ); cbxEdgeBundlerStraightening.PopulateWithObjectsAndText( 0.15F, "Tight", 0.40F, "Medium", 0.60F, "Loose" ); nudVertexRadius.Minimum = nudVertexImageSize.Minimum = (Decimal)VertexRadiusConverter.MinimumRadiusWorkbook; nudVertexRadius.Maximum = nudVertexImageSize.Maximum = (Decimal)VertexRadiusConverter.MaximumRadiusWorkbook; ( new VertexShapeConverter() ).PopulateComboBox(cbxVertexShape, false); nudVertexAlpha.Minimum = nudEdgeAlpha.Minimum = (Decimal)AlphaConverter.MinimumAlphaWorkbook; nudVertexAlpha.Maximum = nudEdgeAlpha.Maximum = (Decimal)AlphaConverter.MaximumAlphaWorkbook; nudVertexRelativeOuterGlowSize.Minimum = (Decimal)VertexDrawer.MinimumRelativeOuterGlowSize; nudVertexRelativeOuterGlowSize.Maximum = (Decimal)VertexDrawer.MaximumRelativeOuterGlowSize; DoDataExchange(false); AssertValid(); }
//************************************************************************* // Constructor: GeneralUserSettingsDialog() // /// <summary> /// Initializes a new instance of the <see /// cref="GeneralUserSettingsDialog" /> class. /// </summary> /// /// <param name="generalUserSettings"> /// The object being edited. /// </param> /// /// <param name="workbook"> /// Workbook containing the graph data. /// </param> //************************************************************************* public GeneralUserSettingsDialog ( GeneralUserSettings generalUserSettings, Microsoft.Office.Interop.Excel.Workbook workbook ) { Debug.Assert(generalUserSettings != null); Debug.Assert(workbook != null); generalUserSettings.AssertValid(); m_oGeneralUserSettings = generalUserSettings; m_oWorkbook = workbook; m_oAxisFont = m_oGeneralUserSettings.AxisFont; m_oLabelUserSettings = m_oGeneralUserSettings.LabelUserSettings; m_oOpenFileDialog = new OpenFileDialog(); m_oOpenFileDialog.Filter = "All files (*.*)|*.*|" + SaveableImageFormats.Filter ; m_oOpenFileDialog.Title = "Browse for Background Image"; // Instantiate an object that saves and retrieves the position of this // dialog. Note that the object automatically saves the settings when // the form closes. m_oGeneralUserSettingsDialogUserSettings = new GeneralUserSettingsDialogUserSettings(this); InitializeComponent(); nudEdgeWidth.Minimum = (Decimal)EdgeWidthConverter.MinimumWidthWorkbook; nudEdgeWidth.Maximum = (Decimal)EdgeWidthConverter.MaximumWidthWorkbook; nudRelativeArrowSize.Minimum = (Decimal)EdgeDrawer.MinimumRelativeArrowSize; nudRelativeArrowSize.Maximum = (Decimal)EdgeDrawer.MaximumRelativeArrowSize; cbxEdgeBezierDisplacementFactor.PopulateWithObjectsAndText( 0.1, "Low", 0.2, "Medium", 0.6, "High", 1.2, "Very High" ); cbxEdgeBundlerStraightening.PopulateWithObjectsAndText( 0.15F, "Tight", 0.40F, "Medium", 0.60F, "Loose" ); nudVertexRadius.Minimum = nudVertexImageSize.Minimum = (Decimal)VertexRadiusConverter.MinimumRadiusWorkbook; nudVertexRadius.Maximum = nudVertexImageSize.Maximum = (Decimal)VertexRadiusConverter.MaximumRadiusWorkbook; (new VertexShapeConverter()).PopulateComboBox(cbxVertexShape, false); nudVertexAlpha.Minimum = nudEdgeAlpha.Minimum = (Decimal)AlphaConverter.MinimumAlphaWorkbook; nudVertexAlpha.Maximum = nudEdgeAlpha.Maximum = (Decimal)AlphaConverter.MaximumAlphaWorkbook; nudVertexRelativeOuterGlowSize.Minimum = (Decimal)VertexDrawer.MinimumRelativeOuterGlowSize; nudVertexRelativeOuterGlowSize.Maximum = (Decimal)VertexDrawer.MaximumRelativeOuterGlowSize; DoDataExchange(false); AssertValid(); }