//************************************************************************* // Constructor: BackgroundDialog() // /// <overloads> /// Initializes a new instance of the <see cref="BackgroundDialog" /> /// class. /// </overloads> /// /// <summary> /// Initializes a new instance of the <see /// cref="BackgroundDialog" /> class with a PerWorkbookSettings object. /// </summary> /// /// <param name="perWorkbookSettings"> /// The object being edited. /// </param> //************************************************************************* public BackgroundDialog ( PerWorkbookSettings perWorkbookSettings ) : this() { Debug.Assert(perWorkbookSettings != null); perWorkbookSettings.AssertValid(); m_oPerWorkbookSettings = perWorkbookSettings; 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 user settings for // this dialog. Note that the object automatically saves the settings // when the form closes. m_oBackgroundDialogUserSettings = new BackgroundDialogUserSettings(this); DoDataExchange(false); AssertValid(); }
//************************************************************************* // Constructor: BackgroundDialog() // /// <overloads> /// Initializes a new instance of the <see cref="BackgroundDialog" /> /// class. /// </overloads> /// /// <summary> /// Initializes a new instance of the <see /// cref="BackgroundDialog" /> class with a PerWorkbookSettings object. /// </summary> /// /// <param name="perWorkbookSettings"> /// The object being edited. /// </param> //************************************************************************* public BackgroundDialog( PerWorkbookSettings perWorkbookSettings ) : this() { Debug.Assert(perWorkbookSettings != null); perWorkbookSettings.AssertValid(); m_oPerWorkbookSettings = perWorkbookSettings; 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 user settings for // this dialog. Note that the object automatically saves the settings // when the form closes. m_oBackgroundDialogUserSettings = new BackgroundDialogUserSettings(this); DoDataExchange(false); AssertValid(); }