[Mantisconnect-cvs] SF.net SVN: mantisconnect: [145] mantisconnect/trunk/clients/dotnet
Brought to you by:
vboctor
From: <vb...@us...> - 2007-10-20 23:09:13
|
Revision: 145 http://mantisconnect.svn.sourceforge.net/mantisconnect/?rev=145&view=rev Author: vboctor Date: 2007-10-20 16:09:12 -0700 (Sat, 20 Oct 2007) Log Message: ----------- Fixed #306: SubmitIssue.cs is trying to use the System.Configuration.ConfigurationSettings.AppSettings method. Fixed #351: Increase minimum .NET requirement to .NET 2.0. Modified Paths: -------------- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Cropper.Mantis.csproj mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFilters.csproj mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFiltersForm.cs mantisconnect/trunk/clients/dotnet/MantisSubmit/MantisSubmit.csproj mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.cs mantisconnect/trunk/clients/dotnet/everything.build mantisconnect/trunk/clients/dotnet/mantisnotify/MantisNotify.csproj mantisconnect/trunk/clients/dotnet/mantisnotify/MantisNotifyForm.cs Modified: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Cropper.Mantis.csproj =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Cropper.Mantis.csproj 2007-10-20 22:06:19 UTC (rev 144) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Cropper.Mantis.csproj 2007-10-20 23:09:12 UTC (rev 145) @@ -37,6 +37,7 @@ <HintPath>Libs\Skybound.VisualStyles.dll</HintPath> </Reference> <Reference Include="System" /> + <Reference Include="System.configuration" /> <Reference Include="System.Data" /> <Reference Include="System.Drawing" /> <Reference Include="System.Web.Services" /> Modified: mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFilters.csproj =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFilters.csproj 2007-10-20 22:06:19 UTC (rev 144) +++ mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFilters.csproj 2007-10-20 23:09:12 UTC (rev 145) @@ -76,6 +76,7 @@ <Reference Include="System"> <Name>System</Name> </Reference> + <Reference Include="System.configuration" /> <Reference Include="System.Data"> <Name>System.Data</Name> </Reference> Modified: mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFiltersForm.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFiltersForm.cs 2007-10-20 22:06:19 UTC (rev 144) +++ mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFiltersForm.cs 2007-10-20 23:09:12 UTC (rev 145) @@ -1,4 +1,4 @@ -#region Copyright \xA9 2004 Victor Boctor +#region Copyright \xA9 2004-2007 Victor Boctor // // MantisConnect is copyrighted to Victor Boctor // @@ -13,6 +13,7 @@ using System; using System.Drawing; using System.Collections; +using System.Collections.Specialized; using System.ComponentModel; using System.Configuration; using System.Data; @@ -31,6 +32,7 @@ private System.Windows.Forms.ComboBox filtersComboBox; private System.Windows.Forms.DataGrid dataGrid1; private System.Windows.Forms.Button getIssuesButton; + /// <summary> /// Required designer variable. /// </summary> @@ -131,26 +133,25 @@ { MessageBox.Show( ex.Message, "Webservice Error", MessageBoxButtons.OK, MessageBoxIcon.Stop ); } - catch - { - MessageBox.Show( "Unknown Exception", "Webservice Error", MessageBoxButtons.OK, MessageBoxIcon.Stop ); - } } private void MantisFiltersForm_Load(object sender, System.EventArgs e) { NetworkCredential nc = null; - string basicHttpAuthUserName = ConfigurationSettings.AppSettings["BasicHttpAuthUserName"]; - string basicHttpAuthPassword = ConfigurationSettings.AppSettings["BasicHttpAuthPassword"]; - if ( ( basicHttpAuthUserName != null ) && ( basicHttpAuthUserName.Length > 0 ) && ( basicHttpAuthPassword != null ) ) - nc = new NetworkCredential( basicHttpAuthUserName, basicHttpAuthPassword ); + NameValueCollection appSettings = ConfigurationManager.AppSettings; + string basicHttpAuthUserName = appSettings["BasicHttpAuthUserName"]; + string basicHttpAuthPassword = appSettings["BasicHttpAuthPassword"]; + if (!String.IsNullOrEmpty(basicHttpAuthUserName) && basicHttpAuthPassword != null) + { + nc = new NetworkCredential(basicHttpAuthUserName, basicHttpAuthPassword); + } - string mantisConnectUrl = ConfigurationSettings.AppSettings["MantisConnectUrl"]; - string mantisUserName = ConfigurationSettings.AppSettings["MantisUserName"]; - string mantisPassword = ConfigurationSettings.AppSettings["MantisPassword"]; + string mantisConnectUrl = appSettings["MantisConnectUrl"]; + string mantisUserName = appSettings["MantisUserName"]; + string mantisPassword = appSettings["MantisPassword"]; - session = new Session( mantisConnectUrl, mantisUserName, mantisPassword, nc ); + session = new Session(mantisConnectUrl, mantisUserName, mantisPassword, nc); session.Connect(); populating = true; Modified: mantisconnect/trunk/clients/dotnet/MantisSubmit/MantisSubmit.csproj =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisSubmit/MantisSubmit.csproj 2007-10-20 22:06:19 UTC (rev 144) +++ mantisconnect/trunk/clients/dotnet/MantisSubmit/MantisSubmit.csproj 2007-10-20 23:09:12 UTC (rev 145) @@ -76,6 +76,7 @@ <Reference Include="System"> <Name>System</Name> </Reference> + <Reference Include="System.configuration" /> <Reference Include="System.Data"> <Name>System.Data</Name> </Reference> Modified: mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.cs 2007-10-20 22:06:19 UTC (rev 144) +++ mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.cs 2007-10-20 23:09:12 UTC (rev 145) @@ -1,4 +1,4 @@ -#region Copyright \xA9 2004 Victor Boctor +#region Copyright \xA9 2004-2007 Victor Boctor // // MantisConnect is copyrighted to Victor Boctor // @@ -13,6 +13,7 @@ using System; using System.Drawing; using System.Collections; +using System.Collections.Specialized; using System.Configuration; using System.ComponentModel; using System.IO; @@ -403,17 +404,21 @@ { NetworkCredential nc = null; - string basicHttpAuthUserName = ConfigurationSettings.AppSettings["BasicHttpAuthUserName"]; - string basicHttpAuthPassword = ConfigurationSettings.AppSettings["BasicHttpAuthPassword"]; - if ( ( basicHttpAuthUserName != null ) && ( basicHttpAuthUserName.Length > 0 ) && ( basicHttpAuthPassword != null ) ) - nc = new NetworkCredential( basicHttpAuthUserName, basicHttpAuthPassword ); + NameValueCollection appSettings = ConfigurationManager.AppSettings; - string mantisConnectUrl = ConfigurationSettings.AppSettings["MantisConnectUrl"]; - string mantisUserName = ConfigurationSettings.AppSettings["MantisUserName"]; - string mantisPassword = ConfigurationSettings.AppSettings["MantisPassword"]; + string basicHttpAuthUserName = appSettings["BasicHttpAuthUserName"]; + string basicHttpAuthPassword = appSettings["BasicHttpAuthPassword"]; + if (!String.IsNullOrEmpty(basicHttpAuthUserName) && basicHttpAuthPassword != null) + { + nc = new NetworkCredential(basicHttpAuthUserName, basicHttpAuthPassword); + } - session = new Session( mantisConnectUrl, mantisUserName, mantisPassword, nc ); + string mantisConnectUrl = appSettings["MantisConnectUrl"]; + string mantisUserName = appSettings["MantisUserName"]; + string mantisPassword = appSettings["MantisPassword"]; + session = new Session(mantisConnectUrl, mantisUserName, mantisPassword, nc); + session.Connect(); populating = true; @@ -433,10 +438,6 @@ { MessageBox.Show( ex.Message, "Webservice Error", MessageBoxButtons.OK, MessageBoxIcon.Stop ); } - catch - { - MessageBox.Show( "Unknown Exception", "Webservice Error", MessageBoxButtons.OK, MessageBoxIcon.Stop ); - } } /// <summary> @@ -501,11 +502,6 @@ MessageBox.Show( ex.ToString(), "Webservice Error", MessageBoxButtons.OK, MessageBoxIcon.Stop ); statusBar.Text = string.Empty; } - catch - { - MessageBox.Show( "Unknown Exception", "Webservice Error", MessageBoxButtons.OK, MessageBoxIcon.Stop ); - statusBar.Text = string.Empty; - } } /// <summary> @@ -561,10 +557,6 @@ { MessageBox.Show( ex.Message, "Webservice Error", MessageBoxButtons.OK, MessageBoxIcon.Stop ); } - catch - { - MessageBox.Show( "Unknown Exception", "Webservice Error", MessageBoxButtons.OK, MessageBoxIcon.Stop ); - } } /// <summary> Modified: mantisconnect/trunk/clients/dotnet/everything.build =================================================================== --- mantisconnect/trunk/clients/dotnet/everything.build 2007-10-20 22:06:19 UTC (rev 144) +++ mantisconnect/trunk/clients/dotnet/everything.build 2007-10-20 23:09:12 UTC (rev 145) @@ -1,6 +1,6 @@ <?xml version="1.0" ?> <project name="MantisConnect" default="all"> - <property name="nant.settings.currentframework" value="net-1.1" /> + <property name="nant.settings.currentframework" value="net-2.0" /> <echo message="Using '${nant.settings.currentframework}' framework on '${nant.platform.name}' platform."/> @@ -52,16 +52,7 @@ </target> <target name="portability"> - <property name="nant.settings.currentframework" value="net-1.1" /> - <call target="all_using_dotnetframework" /> - - <property name="nant.settings.currentframework" value="net-1.0" /> - <call target="all_using_dotnetframework" /> - - <property name="nant.settings.currentframework" value="netcf-1.0" /> - <call target="all_using_dotnetframework" /> - <property name="nant.settings.currentframework" value="net-2.0" /> <call target="all_using_dotnetframework" /> </target> -</project> \ No newline at end of file +</project> Modified: mantisconnect/trunk/clients/dotnet/mantisnotify/MantisNotify.csproj =================================================================== --- mantisconnect/trunk/clients/dotnet/mantisnotify/MantisNotify.csproj 2007-10-20 22:06:19 UTC (rev 144) +++ mantisconnect/trunk/clients/dotnet/mantisnotify/MantisNotify.csproj 2007-10-20 23:09:12 UTC (rev 145) @@ -76,6 +76,7 @@ <Reference Include="System"> <Name>System</Name> </Reference> + <Reference Include="System.configuration" /> <Reference Include="System.Data"> <Name>System.Data</Name> </Reference> Modified: mantisconnect/trunk/clients/dotnet/mantisnotify/MantisNotifyForm.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/mantisnotify/MantisNotifyForm.cs 2007-10-20 22:06:19 UTC (rev 144) +++ mantisconnect/trunk/clients/dotnet/mantisnotify/MantisNotifyForm.cs 2007-10-20 23:09:12 UTC (rev 145) @@ -1,4 +1,4 @@ -#region Copyright \xA9 2004 Victor Boctor +#region Copyright \xA9 2004-2007 Victor Boctor // // MantisConnect is copyrighted to Victor Boctor // @@ -13,11 +13,12 @@ using System; using System.Drawing; using System.Collections; +using System.Collections.Specialized; using System.ComponentModel; -using System.Windows.Forms; +using System.Configuration; using System.Data; using System.Net; -using System.Configuration; +using System.Windows.Forms; using CustomUIControls; @@ -299,10 +300,11 @@ { Hide(); - checkMantisTimer.Interval = Convert.ToInt32( ConfigurationSettings.AppSettings["CheckForNewIssuesEverySecs"] ) * 1000; - timeToShowNotificationInMs = Convert.ToInt32( ConfigurationSettings.AppSettings["TimeToShowNotificationSecs"] ) * 1000; - timeToStayNotificationInMs = Convert.ToInt32( ConfigurationSettings.AppSettings["TimeToStayNotificationSecs"] ) * 1000;; - timeToHideNotificationInMs = Convert.ToInt32( ConfigurationSettings.AppSettings["TimeToHideNotificationSecs"] ) * 1000;; + NameValueCollection appSettings = ConfigurationManager.AppSettings; + checkMantisTimer.Interval = Convert.ToInt32(appSettings["CheckForNewIssuesEverySecs"]) * 1000; + timeToShowNotificationInMs = Convert.ToInt32(appSettings["TimeToShowNotificationSecs"]) * 1000; + timeToStayNotificationInMs = Convert.ToInt32(appSettings["TimeToStayNotificationSecs"]) * 1000; + timeToHideNotificationInMs = Convert.ToInt32(appSettings["TimeToHideNotificationSecs"]) * 1000; taskbarNotifier = new TaskbarNotifier(); taskbarNotifier.SetBackgroundBitmap( new Bitmap( GetType(), "skin.bmp"), Color.FromArgb( 255, 0, 255 ) ); @@ -326,14 +328,17 @@ { NetworkCredential nc = null; - string basicHttpAuthUserName = ConfigurationSettings.AppSettings["BasicHttpAuthUserName"]; - string basicHttpAuthPassword = ConfigurationSettings.AppSettings["BasicHttpAuthPassword"]; - if ( ( basicHttpAuthUserName != null ) && ( basicHttpAuthUserName.Length > 0 ) && ( basicHttpAuthPassword != null ) ) - nc = new NetworkCredential( basicHttpAuthUserName, basicHttpAuthPassword ); + NameValueCollection appSettings = ConfigurationManager.AppSettings; + string basicHttpAuthUserName = appSettings["BasicHttpAuthUserName"]; + string basicHttpAuthPassword = appSettings["BasicHttpAuthPassword"]; + if (!String.IsNullOrEmpty(basicHttpAuthUserName) && basicHttpAuthPassword != null) + { + nc = new NetworkCredential(basicHttpAuthUserName, basicHttpAuthPassword); + } - string mantisConnectUrl = ConfigurationSettings.AppSettings["MantisConnectUrl"]; - string mantisUserName = ConfigurationSettings.AppSettings["MantisUserName"]; - string mantisPassword = ConfigurationSettings.AppSettings["MantisPassword"]; + string mantisConnectUrl = appSettings["MantisConnectUrl"]; + string mantisUserName = appSettings["MantisUserName"]; + string mantisPassword = appSettings["MantisPassword"]; session = new Session( mantisConnectUrl, mantisUserName, mantisPassword, nc ); session.Connect(); @@ -357,7 +362,7 @@ private void TitleClick( object sender, EventArgs e ) { - string url = ConfigurationSettings.AppSettings["MantisConnectWebsite"]; + string url = ConfigurationManager.AppSettings["MantisConnectWebsite"]; if ( url != null ) { @@ -372,7 +377,7 @@ { get { - return ConfigurationSettings.AppSettings["BugtrackerUrl"]; + return ConfigurationManager.AppSettings["BugtrackerUrl"]; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |