public SslProxyFactory(IViewAccessAdapter viewAdapter) { ErrorLog.Singleton.LogSuccess("enter Ssl fac"); _rsProxy = new ReportingService(); ErrorLog.Singleton.LogSuccess("initialize ReportingService"); _policy = new SslValidation(viewAdapter); ErrorLog.Singleton.LogSuccess("initialize SslValidation"); }
/// <summary> /// Constructor /// </summary> /// <param name="viewAdapter">The adapter that give the model access /// to parts of the view.</param> /// <param name="databaseName">The name of the database.</param> /// <param name="tableName">The name of the table in the database.</param> /// <param name="columns">The columns in the table.</param> /// <param name="columnTypes">The types associated with the columns.</param> /// <param name="regkey">The name of a subkey in the registry.</param> /// <param name="xmlReportsName">The name of the reports file.</param> /// <param name="reportsXPathExpression">The XPathExpressions associated with /// retrieving the reports descriptors.</param> /// <param name="startMenuPath">The location of the shortcut in the start menu.</param> /// <param name="shortcutFile">The name of the shortcut file.</param> /// <param name="requiredPermissions">The required permissions a user must /// have use this installer.</param> /// <param name="parentPath">The parent path for reporting service folders.</param> /// <param name="folderDescription">The description for the folder.</param> /// <param name="dsName">The name of the datasource.</param> /// <param name="dsDescription">The description of the datasource.</param> public RsModel(IViewAccessAdapter viewAdapter, string databaseName, string tableName, string[] columns, Type[] columnTypes, string regkey, string xmlReportsName, string rdlFolder, string reportsXPathExpression, string startMenuPath, string shortcutFile, string[] requiredPermissions, string parentPath, string folderDescription, string dsName, string dsDescription, string reportingServicesTemplate, string mainTemplate, string reportsTemplate) { _viewAdapter = viewAdapter; _databaseName = databaseName; _tableName = tableName; _columns = columns; _columnTypes = columnTypes; _regkey = regkey; _xmlReportsName = xmlReportsName; _rdlFolder = rdlFolder; _reportsXPathExpression = reportsXPathExpression; _startMenuPath = startMenuPath; _shortcutFile = shortcutFile; _rsFac = new SslProxyFactory(viewAdapter); _requiredPermissions = requiredPermissions; _parentPath = parentPath; _folderDescription = folderDescription; _dsName = dsName; _dsDescription = dsDescription; _reportingServicesTemplate = reportingServicesTemplate; _mainTemplate = mainTemplate; _reportsTemplate = reportsTemplate; _dictReportFile = new Hashtable(); _dictReportDes = new Hashtable(); _dictReportInstalled = new Hashtable(); _rsFac = ProxyFactory.Singleton; try { // _rdlFolderPath = Path.Combine(System.Windows.Forms.Application.StartupPath, _rdlFolder); _rdlFolderPath = Path.Combine(@"../", _rdlFolder); } catch (Exception) { _rdlFolderPath = ""; } }
public void Start() { IModelAccessAdapter modelAdapter = null; IViewAccessAdapter viewAdapter = null; IRsModel model = null; IInstallerGUI view = null; if (_success) { modelAdapter = new ModelAccessAdapter(); viewAdapter = new ViewAccessAdapter(); try { ErrorLog.Singleton.LogSuccess("Calling model constructor."); model = new RsModel(viewAdapter, _databaseName, _tableName, _columns, _columnTypes, _regkey, _xmlReportsName, _rdlFolder, _reportsXPathExpression, _startMenuPath, _shortcutFile, _requiredPermissions, _parentPath, _folderDescription, _dataSourceName, _dataSourceDescription, _reportingServicesTemplate, _mainTemplate, _reportsTemplate); ErrorLog.Singleton.LogSuccess("model initialized."); } catch (Exception ex) { _success = false; ErrorLog.Singleton.LogError("Backend initialization error. Cannot complete installation.", ex.Message, ex.StackTrace); MessageBox.Show("Backend initialization error. Cannot complete installation.", "Initialization Error!"); } if (_success) { try { view = new InstallerView(modelAdapter, _header, _productName, _productAbbrev, _folder, _firstPanelImage, _lastPanelImage, _icon); } catch (Exception ex) { _success = false; ErrorLog.Singleton.LogError("Backend initialization error. Cannot complete installation.", ex.Message, ex.StackTrace); MessageBox.Show("Backend initialization error. Cannot complete installation.", "Initialization Error!"); } if (_success) { if ((model != null) && (view != null) && (modelAdapter != null) && (viewAdapter != null)) { ((ModelAccessAdapter)modelAdapter).Model = model; ((ViewAccessAdapter)viewAdapter).View = view; ErrorLog.Singleton.LogSuccess("RsInstallationController initialization complete."); view.Run(); } else { ErrorLog.Singleton.LogWarning("One or more objects was not initialized properly. Cannot complete installation."); MessageBox.Show("One or more objects was not initialized properly. Cannot complete installation.", "Initialization Error!"); } } } } }
/// <summary> /// Constructor /// </summary> /// <param name="viewAdapter">The adapter that give the model access /// to parts of the view.</param> public SslValidation(IViewAccessAdapter viewAdapter) { ErrorLog.Singleton.LogSuccess("Entered SslValidation constructor."); _viewAdapter = viewAdapter; ErrorLog.Singleton.LogSuccess("Exited SslValidation constructor."); }