Thread: [Mantisconnect-cvs] SF.net SVN: mantisconnect: [41] mantisconnect/trunk/clients/dotnet
Brought to you by:
vboctor
From: <vb...@us...> - 2006-09-16 06:51:26
|
Revision: 41 http://svn.sourceforge.net/mantisconnect/?rev=41&view=rev Author: vboctor Date: 2006-09-15 23:50:58 -0700 (Fri, 15 Sep 2006) Log Message: ----------- - Simplifying the compilation of the .NET code by including the key and the config with the correct names. - Upgrading the project files to .NET 2.0 format. This version is compiled using C# Express. Modified Paths: -------------- mantisconnect/trunk/clients/dotnet/MantisFilters/AssemblyInfo.cs mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFilters.csproj mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFiltersForm.cs mantisconnect/trunk/clients/dotnet/MantisSubmit/AssemblyInfo.cs mantisconnect/trunk/clients/dotnet/MantisSubmit/MantisSubmit.csproj mantisconnect/trunk/clients/dotnet/NantTasks/Nant.MantisConnect.Tasks.csproj mantisconnect/trunk/clients/dotnet/NantTasks/SubmitTask.cs mantisconnect/trunk/clients/dotnet/UnitTests/Filters.cs mantisconnect/trunk/clients/dotnet/UnitTests/MantisConnect.UnitTests.csproj mantisconnect/trunk/clients/dotnet/everything.sln mantisconnect/trunk/clients/dotnet/mantisconnect/AssemblyInfo.cs mantisconnect/trunk/clients/dotnet/mantisconnect/MantisConnect.csproj mantisconnect/trunk/clients/dotnet/mantisconnect/Web References/MantisConnectWebservice/Reference.cs mantisconnect/trunk/clients/dotnet/mantisconnect/Web References/MantisConnectWebservice/Reference.map mantisconnect/trunk/clients/dotnet/mantisconnect/Web References/MantisConnectWebservice/mantisconnect.wsdl mantisconnect/trunk/clients/dotnet/mantisnotify/AssemblyInfo.cs mantisconnect/trunk/clients/dotnet/mantisnotify/MantisNotify.csproj Added Paths: ----------- mantisconnect/trunk/clients/dotnet/MantisFilters/app.config mantisconnect/trunk/clients/dotnet/MantisSubmit/app.config mantisconnect/trunk/clients/dotnet/mantisconnect/MantisConnect.csproj.user mantisconnect/trunk/clients/dotnet/mantisconnect/Properties/ mantisconnect/trunk/clients/dotnet/mantisconnect/Properties/Settings.Designer.cs mantisconnect/trunk/clients/dotnet/mantisconnect/Properties/Settings.settings mantisconnect/trunk/clients/dotnet/mantisconnect/Web References/MantisConnectWebservice/AccountData.datasource mantisconnect/trunk/clients/dotnet/mantisconnect/Web References/MantisConnectWebservice/CustomFieldDefinitionData.datasource mantisconnect/trunk/clients/dotnet/mantisconnect/Web References/MantisConnectWebservice/FilterData.datasource mantisconnect/trunk/clients/dotnet/mantisconnect/Web References/MantisConnectWebservice/IssueData.datasource mantisconnect/trunk/clients/dotnet/mantisconnect/Web References/MantisConnectWebservice/IssueHeaderData.datasource mantisconnect/trunk/clients/dotnet/mantisconnect/Web References/MantisConnectWebservice/ObjectRef.datasource mantisconnect/trunk/clients/dotnet/mantisconnect/Web References/MantisConnectWebservice/ProjectAttachmentData.datasource mantisconnect/trunk/clients/dotnet/mantisconnect/Web References/MantisConnectWebservice/ProjectData.datasource mantisconnect/trunk/clients/dotnet/mantisconnect/Web References/MantisConnectWebservice/ProjectVersionData.datasource mantisconnect/trunk/clients/dotnet/mantisconnect/app.config mantisconnect/trunk/clients/dotnet/mantisconnect/mantisconnect.snk mantisconnect/trunk/clients/dotnet/mantisconnect.snk mantisconnect/trunk/clients/dotnet/mantisnotify/app.config Removed Paths: ------------- mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFilters.exe.config.sample mantisconnect/trunk/clients/dotnet/MantisSubmit/MantisSubmit.exe.config.sample mantisconnect/trunk/clients/dotnet/mantisconnect.snk.sample Property Changed: ---------------- mantisconnect/trunk/clients/dotnet/ mantisconnect/trunk/clients/dotnet/MantisFilters/ mantisconnect/trunk/clients/dotnet/MantisSubmit/ mantisconnect/trunk/clients/dotnet/NantTasks/ mantisconnect/trunk/clients/dotnet/UnitTests/ mantisconnect/trunk/clients/dotnet/mantisconnect/ mantisconnect/trunk/clients/dotnet/mantisnotify/ Property changes on: mantisconnect/trunk/clients/dotnet ___________________________________________________________________ Name: svn:ignore + everything.suo Property changes on: mantisconnect/trunk/clients/dotnet/MantisFilters ___________________________________________________________________ Name: svn:ignore + bin obj Modified: mantisconnect/trunk/clients/dotnet/MantisFilters/AssemblyInfo.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisFilters/AssemblyInfo.cs 2006-09-16 06:41:29 UTC (rev 40) +++ mantisconnect/trunk/clients/dotnet/MantisFilters/AssemblyInfo.cs 2006-09-16 06:50:58 UTC (rev 41) @@ -67,7 +67,6 @@ // documentation for more information on this. // [assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile(@"..\..\..\MantisConnect.snk")] [assembly: AssemblyKeyName("")] [assembly: CLSCompliant(true)] Modified: mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFilters.csproj =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFilters.csproj 2006-09-16 06:41:29 UTC (rev 40) +++ mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFilters.csproj 2006-09-16 06:50:58 UTC (rev 41) @@ -1,124 +1,119 @@ -<VisualStudioProject> - <CSHARP - ProjectType = "Local" - ProductVersion = "7.10.3077" - SchemaVersion = "2.0" - ProjectGuid = "{F8C0F2F2-77E1-431B-95BB-6683A92266FE}" - > - <Build> - <Settings - ApplicationIcon = "App.ico" - AssemblyKeyContainerName = "" - AssemblyName = "MantisFilters" - AssemblyOriginatorKeyFile = "" - DefaultClientScript = "JScript" - DefaultHTMLPageLayout = "Grid" - DefaultTargetSchema = "IE50" - DelaySign = "false" - OutputType = "WinExe" - PreBuildEvent = "" - PostBuildEvent = 'copy "$(ProjectDir)$(TargetName)$(TargetExt).config" "$(TargetDir)"' - RootNamespace = "MantisFilters" - RunPostBuildEvent = "OnBuildSuccess" - StartupObject = "" - > - <Config - Name = "Debug" - AllowUnsafeBlocks = "false" - BaseAddress = "285212672" - CheckForOverflowUnderflow = "false" - ConfigurationOverrideFile = "" - DefineConstants = "DEBUG;TRACE" - DocumentationFile = "" - DebugSymbols = "true" - FileAlignment = "4096" - IncrementalBuild = "false" - NoStdLib = "false" - NoWarn = "" - Optimize = "false" - OutputPath = "bin\Debug\" - RegisterForComInterop = "false" - RemoveIntegerChecks = "false" - TreatWarningsAsErrors = "true" - WarningLevel = "4" - /> - <Config - Name = "Release" - AllowUnsafeBlocks = "false" - BaseAddress = "285212672" - CheckForOverflowUnderflow = "false" - ConfigurationOverrideFile = "" - DefineConstants = "TRACE" - DocumentationFile = "" - DebugSymbols = "false" - FileAlignment = "4096" - IncrementalBuild = "false" - NoStdLib = "false" - NoWarn = "" - Optimize = "true" - OutputPath = "bin\Release\" - RegisterForComInterop = "false" - RemoveIntegerChecks = "false" - TreatWarningsAsErrors = "true" - WarningLevel = "4" - /> - </Settings> - <References> - <Reference - Name = "System" - AssemblyName = "System" - HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll" - /> - <Reference - Name = "System.Data" - AssemblyName = "System.Data" - HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll" - /> - <Reference - Name = "System.Drawing" - AssemblyName = "System.Drawing" - HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll" - /> - <Reference - Name = "System.Windows.Forms" - AssemblyName = "System.Windows.Forms" - HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Windows.Forms.dll" - /> - <Reference - Name = "System.XML" - AssemblyName = "System.Xml" - HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" - /> - <Reference - Name = "MantisConnect" - Project = "{F4391F6F-0239-48E2-B415-C39A6D920303}" - Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" - /> - </References> - </Build> - <Files> - <Include> - <File - RelPath = "App.ico" - BuildAction = "Content" - /> - <File - RelPath = "AssemblyInfo.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "MantisFiltersForm.cs" - SubType = "Form" - BuildAction = "Compile" - /> - <File - RelPath = "MantisFiltersForm.resx" - DependentUpon = "MantisFiltersForm.cs" - BuildAction = "EmbeddedResource" - /> - </Include> - </Files> - </CSHARP> -</VisualStudioProject> - +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <ProjectType>Local</ProjectType> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{F8C0F2F2-77E1-431B-95BB-6683A92266FE}</ProjectGuid> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ApplicationIcon>App.ico</ApplicationIcon> + <AssemblyKeyContainerName> + </AssemblyKeyContainerName> + <AssemblyName>MantisFilters</AssemblyName> + <AssemblyOriginatorKeyFile> + </AssemblyOriginatorKeyFile> + <DefaultClientScript>JScript</DefaultClientScript> + <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> + <DefaultTargetSchema>IE50</DefaultTargetSchema> + <DelaySign>false</DelaySign> + <OutputType>WinExe</OutputType> + <RootNamespace>MantisFilters</RootNamespace> + <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> + <StartupObject> + </StartupObject> + <FileUpgradeFlags> + </FileUpgradeFlags> + <UpgradeBackupLocation> + </UpgradeBackupLocation> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <OutputPath>bin\Debug\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <DebugSymbols>true</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>false</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + <DebugType>full</DebugType> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <OutputPath>bin\Release\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>TRACE</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <DebugSymbols>false</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>true</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + <DebugType>none</DebugType> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <ItemGroup> + <Reference Include="System"> + <Name>System</Name> + </Reference> + <Reference Include="System.Data"> + <Name>System.Data</Name> + </Reference> + <Reference Include="System.Drawing"> + <Name>System.Drawing</Name> + </Reference> + <Reference Include="System.Windows.Forms"> + <Name>System.Windows.Forms</Name> + </Reference> + <Reference Include="System.Xml"> + <Name>System.XML</Name> + </Reference> + <ProjectReference Include="..\mantisconnect\MantisConnect.csproj"> + <Name>MantisConnect</Name> + <Project>{F4391F6F-0239-48E2-B415-C39A6D920303}</Project> + <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <Content Include="App.ico" /> + <Compile Include="AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="MantisFiltersForm.cs"> + <SubType>Form</SubType> + </Compile> + <EmbeddedResource Include="MantisFiltersForm.resx"> + <DependentUpon>MantisFiltersForm.cs</DependentUpon> + </EmbeddedResource> + </ItemGroup> + <ItemGroup> + <None Include="app.config" /> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <PropertyGroup> + <PreBuildEvent> + </PreBuildEvent> + <PostBuildEvent> + </PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file Deleted: mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFilters.exe.config.sample =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFilters.exe.config.sample 2006-09-16 06:41:29 UTC (rev 40) +++ mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFilters.exe.config.sample 2006-09-16 06:50:58 UTC (rev 41) @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252" ?> -<configuration> - <appSettings> - <add key="MantisConnectWebsite" value="http://www.futureware.biz/mantisconnect/" /> - <add key="MantisConnectUrl" value="http://www.futureware.biz/mantis/mc/mantisconnect.php" /> - <add key="MantisUserName" value="" /> - <add key="MantisPassword" value="" /> - <add key="BasicHttpAuthUserName" value="" /> - <add key="BasicHttpAuthPassword" value="" /> - </appSettings> -</configuration> \ No newline at end of file Modified: mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFiltersForm.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFiltersForm.cs 2006-09-16 06:41:29 UTC (rev 40) +++ mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFiltersForm.cs 2006-09-16 06:50:58 UTC (rev 41) @@ -183,7 +183,7 @@ } else { - DataTable table = Request.ArrayToDataTable( typeof( Issue ), session.Request.GetIssues( Convert.ToInt32( filtersComboBox.SelectedValue ), 1, 10 ), "Issues" ); + DataTable table = Request.ArrayToDataTable( typeof( Issue ), session.Request.GetIssues( 0, Convert.ToInt32( filtersComboBox.SelectedValue ), 1, 10 ), "Issues" ); dataGrid1.DataSource = table; } Added: mantisconnect/trunk/clients/dotnet/MantisFilters/app.config =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisFilters/app.config (rev 0) +++ mantisconnect/trunk/clients/dotnet/MantisFilters/app.config 2006-09-16 06:50:58 UTC (rev 41) @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="Windows-1252" ?> +<configuration> + <appSettings> + <add key="MantisConnectWebsite" value="http://www.futureware.biz/mantisconnect/" /> + <add key="MantisConnectUrl" value="http://www.futureware.biz/mantis/mc/mantisconnect.php" /> + <add key="MantisUserName" value="" /> + <add key="MantisPassword" value="" /> + <add key="BasicHttpAuthUserName" value="" /> + <add key="BasicHttpAuthPassword" value="" /> + </appSettings> +</configuration> \ No newline at end of file Property changes on: mantisconnect/trunk/clients/dotnet/MantisSubmit ___________________________________________________________________ Name: svn:ignore + bin obj Modified: mantisconnect/trunk/clients/dotnet/MantisSubmit/AssemblyInfo.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisSubmit/AssemblyInfo.cs 2006-09-16 06:41:29 UTC (rev 40) +++ mantisconnect/trunk/clients/dotnet/MantisSubmit/AssemblyInfo.cs 2006-09-16 06:50:58 UTC (rev 41) @@ -67,7 +67,6 @@ // documentation for more information on this. // [assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile(@"..\..\..\MantisConnect.snk")] [assembly: AssemblyKeyName("")] [assembly: CLSCompliant(true)] Modified: mantisconnect/trunk/clients/dotnet/MantisSubmit/MantisSubmit.csproj =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisSubmit/MantisSubmit.csproj 2006-09-16 06:41:29 UTC (rev 40) +++ mantisconnect/trunk/clients/dotnet/MantisSubmit/MantisSubmit.csproj 2006-09-16 06:50:58 UTC (rev 41) @@ -1,137 +1,120 @@ -<VisualStudioProject> - <CSHARP - ProjectType = "Local" - ProductVersion = "7.10.3077" - SchemaVersion = "2.0" - ProjectGuid = "{580C279D-3855-45F7-8EE2-BB036A1CA4A4}" - > - <Build> - <Settings - ApplicationIcon = "App.ico" - AssemblyKeyContainerName = "" - AssemblyName = "MantisSubmit" - AssemblyOriginatorKeyFile = "" - DefaultClientScript = "JScript" - DefaultHTMLPageLayout = "Grid" - DefaultTargetSchema = "IE50" - DelaySign = "false" - OutputType = "WinExe" - PreBuildEvent = "" - PostBuildEvent = 'copy "$(ProjectDir)$(TargetName)$(TargetExt).config" "$(TargetDir)"' - RootNamespace = "Futureware.MantisSubmit" - RunPostBuildEvent = "OnBuildSuccess" - StartupObject = "" - > - <Config - Name = "Debug" - AllowUnsafeBlocks = "false" - BaseAddress = "285212672" - CheckForOverflowUnderflow = "false" - ConfigurationOverrideFile = "" - DefineConstants = "DEBUG;TRACE" - DocumentationFile = "" - DebugSymbols = "true" - FileAlignment = "4096" - IncrementalBuild = "false" - NoStdLib = "false" - NoWarn = "" - Optimize = "false" - OutputPath = "bin\Debug\" - RegisterForComInterop = "false" - RemoveIntegerChecks = "false" - TreatWarningsAsErrors = "true" - WarningLevel = "4" - /> - <Config - Name = "Release" - AllowUnsafeBlocks = "false" - BaseAddress = "285212672" - CheckForOverflowUnderflow = "false" - ConfigurationOverrideFile = "" - DefineConstants = "TRACE" - DocumentationFile = "" - DebugSymbols = "false" - FileAlignment = "4096" - IncrementalBuild = "false" - NoStdLib = "false" - NoWarn = "" - Optimize = "true" - OutputPath = "bin\Release\" - RegisterForComInterop = "false" - RemoveIntegerChecks = "false" - TreatWarningsAsErrors = "true" - WarningLevel = "4" - /> - </Settings> - <References> - <Reference - Name = "System" - AssemblyName = "System" - HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll" - /> - <Reference - Name = "System.Data" - AssemblyName = "System.Data" - HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll" - /> - <Reference - Name = "System.Drawing" - AssemblyName = "System.Drawing" - HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll" - /> - <Reference - Name = "System.Windows.Forms" - AssemblyName = "System.Windows.Forms" - HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Windows.Forms.dll" - /> - <Reference - Name = "System.XML" - AssemblyName = "System.Xml" - HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" - /> - <Reference - Name = "MantisConnect" - Project = "{F4391F6F-0239-48E2-B415-C39A6D920303}" - Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" - /> - </References> - </Build> - <Files> - <Include> - <File - RelPath = "App.ico" - BuildAction = "Content" - /> - <File - RelPath = "AssemblyInfo.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "MantisSubmit.exe.config" - BuildAction = "None" - /> - <File - RelPath = "MantisSubmit.exe.config.sample" - BuildAction = "None" - /> - <File - RelPath = "MantisSubmitApp.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "SubmitIssue.cs" - SubType = "Form" - BuildAction = "Compile" - /> - <File - RelPath = "SubmitIssue.resx" - DependentUpon = "SubmitIssue.cs" - BuildAction = "EmbeddedResource" - /> - </Include> - </Files> - </CSHARP> -</VisualStudioProject> - +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <ProjectType>Local</ProjectType> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{580C279D-3855-45F7-8EE2-BB036A1CA4A4}</ProjectGuid> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ApplicationIcon>App.ico</ApplicationIcon> + <AssemblyKeyContainerName> + </AssemblyKeyContainerName> + <AssemblyName>MantisSubmit</AssemblyName> + <AssemblyOriginatorKeyFile> + </AssemblyOriginatorKeyFile> + <DefaultClientScript>JScript</DefaultClientScript> + <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> + <DefaultTargetSchema>IE50</DefaultTargetSchema> + <DelaySign>false</DelaySign> + <OutputType>WinExe</OutputType> + <RootNamespace>Futureware.MantisSubmit</RootNamespace> + <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> + <StartupObject> + </StartupObject> + <FileUpgradeFlags> + </FileUpgradeFlags> + <UpgradeBackupLocation> + </UpgradeBackupLocation> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <OutputPath>bin\Debug\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <DebugSymbols>true</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>false</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + <DebugType>full</DebugType> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <OutputPath>bin\Release\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>TRACE</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <DebugSymbols>false</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>true</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + <DebugType>none</DebugType> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <ItemGroup> + <Reference Include="System"> + <Name>System</Name> + </Reference> + <Reference Include="System.Data"> + <Name>System.Data</Name> + </Reference> + <Reference Include="System.Drawing"> + <Name>System.Drawing</Name> + </Reference> + <Reference Include="System.Windows.Forms"> + <Name>System.Windows.Forms</Name> + </Reference> + <Reference Include="System.Xml"> + <Name>System.XML</Name> + </Reference> + <ProjectReference Include="..\mantisconnect\MantisConnect.csproj"> + <Name>MantisConnect</Name> + <Project>{F4391F6F-0239-48E2-B415-C39A6D920303}</Project> + <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <Content Include="App.ico" /> + <Compile Include="AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="MantisSubmitApp.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="SubmitIssue.cs"> + <SubType>Form</SubType> + </Compile> + <None Include="app.config" /> + <EmbeddedResource Include="SubmitIssue.resx"> + <DependentUpon>SubmitIssue.cs</DependentUpon> + </EmbeddedResource> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <PropertyGroup> + <PreBuildEvent> + </PreBuildEvent> + <PostBuildEvent> + </PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file Deleted: mantisconnect/trunk/clients/dotnet/MantisSubmit/MantisSubmit.exe.config.sample =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisSubmit/MantisSubmit.exe.config.sample 2006-09-16 06:41:29 UTC (rev 40) +++ mantisconnect/trunk/clients/dotnet/MantisSubmit/MantisSubmit.exe.config.sample 2006-09-16 06:50:58 UTC (rev 41) @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252" ?> -<configuration> - <appSettings> - <add key="MantisConnectWebsite" value="http://www.futureware.biz/mantisconnect/" /> - <add key="MantisConnectUrl" value="http://www.futureware.biz/mantis/mc/mantisconnect.php" /> - <add key="MantisUserName" value="" /> - <add key="MantisPassword" value="" /> - <add key="BasicHttpAuthUserName" value="" /> - <add key="BasicHttpAuthPassword" value="" /> - </appSettings> -</configuration> \ No newline at end of file Added: mantisconnect/trunk/clients/dotnet/MantisSubmit/app.config =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisSubmit/app.config (rev 0) +++ mantisconnect/trunk/clients/dotnet/MantisSubmit/app.config 2006-09-16 06:50:58 UTC (rev 41) @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="Windows-1252" ?> +<configuration> + <appSettings> + <add key="MantisConnectWebsite" value="http://www.futureware.biz/mantisconnect/" /> + <add key="MantisConnectUrl" value="http://www.futureware.biz/mantis/mc/mantisconnect.php" /> + <add key="MantisUserName" value="" /> + <add key="MantisPassword" value="" /> + <add key="BasicHttpAuthUserName" value="" /> + <add key="BasicHttpAuthPassword" value="" /> + </appSettings> +</configuration> \ No newline at end of file Property changes on: mantisconnect/trunk/clients/dotnet/NantTasks ___________________________________________________________________ Name: svn:ignore + bin obj Futureware.MantisConnect.Nant.xml Modified: mantisconnect/trunk/clients/dotnet/NantTasks/Nant.MantisConnect.Tasks.csproj =================================================================== --- mantisconnect/trunk/clients/dotnet/NantTasks/Nant.MantisConnect.Tasks.csproj 2006-09-16 06:41:29 UTC (rev 40) +++ mantisconnect/trunk/clients/dotnet/NantTasks/Nant.MantisConnect.Tasks.csproj 2006-09-16 06:50:58 UTC (rev 41) @@ -1,115 +1,112 @@ -<VisualStudioProject> - <CSHARP - ProjectType = "Local" - ProductVersion = "7.10.3077" - SchemaVersion = "2.0" - ProjectGuid = "{0544FA07-F895-4F0E-B61F-CBA7A794F89C}" - > - <Build> - <Settings - ApplicationIcon = "" - AssemblyKeyContainerName = "" - AssemblyName = "Nant.Futureware.MantisConnect.Tasks" - AssemblyOriginatorKeyFile = "" - DefaultClientScript = "JScript" - DefaultHTMLPageLayout = "Grid" - DefaultTargetSchema = "IE50" - DelaySign = "false" - OutputType = "Library" - PreBuildEvent = "" - PostBuildEvent = "" - RootNamespace = "NantTask" - RunPostBuildEvent = "OnBuildSuccess" - StartupObject = "" - > - <Config - Name = "Debug" - AllowUnsafeBlocks = "false" - BaseAddress = "285212672" - CheckForOverflowUnderflow = "false" - ConfigurationOverrideFile = "" - DefineConstants = "DEBUG;TRACE" - DocumentationFile = "Futureware.MantisConnect.Nant.xml" - DebugSymbols = "true" - FileAlignment = "4096" - IncrementalBuild = "false" - NoStdLib = "false" - NoWarn = "" - Optimize = "false" - OutputPath = "bin\Debug\" - RegisterForComInterop = "false" - RemoveIntegerChecks = "false" - TreatWarningsAsErrors = "true" - WarningLevel = "4" - /> - <Config - Name = "Release" - AllowUnsafeBlocks = "false" - BaseAddress = "285212672" - CheckForOverflowUnderflow = "false" - ConfigurationOverrideFile = "" - DefineConstants = "TRACE" - DocumentationFile = "Futureware.MantisConnect.Nant.xml" - DebugSymbols = "false" - FileAlignment = "4096" - IncrementalBuild = "false" - NoStdLib = "false" - NoWarn = "" - Optimize = "true" - OutputPath = "bin\Release\" - RegisterForComInterop = "false" - RemoveIntegerChecks = "false" - TreatWarningsAsErrors = "true" - WarningLevel = "4" - /> - </Settings> - <References> - <Reference - Name = "System" - AssemblyName = "System" - HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll" - /> - <Reference - Name = "System.Data" - AssemblyName = "System.Data" - HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll" - /> - <Reference - Name = "System.XML" - AssemblyName = "System.Xml" - HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" - /> - <Reference - Name = "MantisConnect" - Project = "{F4391F6F-0239-48E2-B415-C39A6D920303}" - Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" - /> - <Reference - Name = "NAnt.Core" - AssemblyName = "NAnt.Core" - HintPath = "external-bin\NAnt.Core.dll" - /> - </References> - </Build> - <Files> - <Include> - <File - RelPath = "AssemblyInfo.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "BaseTask.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "SubmitTask.cs" - SubType = "Code" - BuildAction = "Compile" - /> - </Include> - </Files> - </CSHARP> -</VisualStudioProject> - +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <ProjectType>Local</ProjectType> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{0544FA07-F895-4F0E-B61F-CBA7A794F89C}</ProjectGuid> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ApplicationIcon> + </ApplicationIcon> + <AssemblyKeyContainerName> + </AssemblyKeyContainerName> + <AssemblyName>Nant.Futureware.MantisConnect.Tasks</AssemblyName> + <AssemblyOriginatorKeyFile> + </AssemblyOriginatorKeyFile> + <DefaultClientScript>JScript</DefaultClientScript> + <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> + <DefaultTargetSchema>IE50</DefaultTargetSchema> + <DelaySign>false</DelaySign> + <OutputType>Library</OutputType> + <RootNamespace>NantTask</RootNamespace> + <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> + <StartupObject> + </StartupObject> + <FileUpgradeFlags> + </FileUpgradeFlags> + <UpgradeBackupLocation> + </UpgradeBackupLocation> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <OutputPath>bin\Debug\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DocumentationFile>Futureware.MantisConnect.Nant.xml</DocumentationFile> + <DebugSymbols>true</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>false</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + <DebugType>full</DebugType> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <OutputPath>bin\Release\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>TRACE</DefineConstants> + <DocumentationFile>Futureware.MantisConnect.Nant.xml</DocumentationFile> + <DebugSymbols>false</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>true</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + <DebugType>none</DebugType> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <ItemGroup> + <Reference Include="NAnt.Core"> + <Name>NAnt.Core</Name> + <HintPath>external-bin\NAnt.Core.dll</HintPath> + </Reference> + <Reference Include="System"> + <Name>System</Name> + </Reference> + <Reference Include="System.Data"> + <Name>System.Data</Name> + </Reference> + <Reference Include="System.Xml"> + <Name>System.XML</Name> + </Reference> + <ProjectReference Include="..\mantisconnect\MantisConnect.csproj"> + <Name>MantisConnect</Name> + <Project>{F4391F6F-0239-48E2-B415-C39A6D920303}</Project> + <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <Compile Include="AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="BaseTask.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="SubmitTask.cs"> + <SubType>Code</SubType> + </Compile> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <PropertyGroup> + <PreBuildEvent> + </PreBuildEvent> + <PostBuildEvent> + </PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file Modified: mantisconnect/trunk/clients/dotnet/NantTasks/SubmitTask.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/NantTasks/SubmitTask.cs 2006-09-16 06:41:29 UTC (rev 40) +++ mantisconnect/trunk/clients/dotnet/NantTasks/SubmitTask.cs 2006-09-16 06:50:58 UTC (rev 41) @@ -260,12 +260,6 @@ "Failure connecting to Mantis.\n{0}", issue.ToString() ), Location, ex); } - catch - { - throw new BuildException(string.Format(CultureInfo.InvariantCulture, - "Failure connecting to Mantis.\n{0}", issue.ToString() ), - Location); - } } #endregion Override implementation of Task Property changes on: mantisconnect/trunk/clients/dotnet/UnitTests ___________________________________________________________________ Name: svn:ignore + bin obj Modified: mantisconnect/trunk/clients/dotnet/UnitTests/Filters.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/UnitTests/Filters.cs 2006-09-16 06:41:29 UTC (rev 40) +++ mantisconnect/trunk/clients/dotnet/UnitTests/Filters.cs 2006-09-16 06:50:58 UTC (rev 41) @@ -47,7 +47,7 @@ foreach( Filter filter in filters ) { - Session.Request.GetIssues( filter.Id, 1, 10 ); + Session.Request.GetIssues( 0, filter.Id, 1, 10 ); } } } Modified: mantisconnect/trunk/clients/dotnet/UnitTests/MantisConnect.UnitTests.csproj =================================================================== --- mantisconnect/trunk/clients/dotnet/UnitTests/MantisConnect.UnitTests.csproj 2006-09-16 06:41:29 UTC (rev 40) +++ mantisconnect/trunk/clients/dotnet/UnitTests/MantisConnect.UnitTests.csproj 2006-09-16 06:50:58 UTC (rev 41) @@ -1,172 +1,150 @@ -<VisualStudioProject> - <CSHARP - ProjectType = "Local" - ProductVersion = "7.10.3077" - SchemaVersion = "2.0" - ProjectGuid = "{007994C8-29E4-4C9C-AF10-9DA4FBBB83E8}" - > - <Build> - <Settings - ApplicationIcon = "" - AssemblyKeyContainerName = "" - AssemblyName = "Futureware.MantisConnect.UnitTests" - AssemblyOriginatorKeyFile = "" - DefaultClientScript = "JScript" - DefaultHTMLPageLayout = "Grid" - DefaultTargetSchema = "IE50" - DelaySign = "false" - OutputType = "Library" - PreBuildEvent = "" - PostBuildEvent = "" - RootNamespace = "Futureware.MantisConnect.UnitTests" - RunPostBuildEvent = "OnBuildSuccess" - StartupObject = "" - > - <Config - Name = "Debug" - AllowUnsafeBlocks = "false" - BaseAddress = "285212672" - CheckForOverflowUnderflow = "false" - ConfigurationOverrideFile = "" - DefineConstants = "DEBUG;TRACE" - DocumentationFile = "" - DebugSymbols = "true" - FileAlignment = "4096" - IncrementalBuild = "false" - NoStdLib = "false" - NoWarn = "" - Optimize = "false" - OutputPath = "bin\Debug\" - RegisterForComInterop = "false" - RemoveIntegerChecks = "false" - TreatWarningsAsErrors = "true" - WarningLevel = "4" - /> - <Config - Name = "Release" - AllowUnsafeBlocks = "false" - BaseAddress = "285212672" - CheckForOverflowUnderflow = "false" - ConfigurationOverrideFile = "" - DefineConstants = "TRACE" - DocumentationFile = "" - DebugSymbols = "false" - FileAlignment = "4096" - IncrementalBuild = "false" - NoStdLib = "false" - NoWarn = "" - Optimize = "true" - OutputPath = "bin\Release\" - RegisterForComInterop = "false" - RemoveIntegerChecks = "false" - TreatWarningsAsErrors = "true" - WarningLevel = "4" - /> - </Settings> - <References> - <Reference - Name = "System" - AssemblyName = "System" - HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll" - /> - <Reference - Name = "System.Data" - AssemblyName = "System.Data" - HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll" - /> - <Reference - Name = "System.XML" - AssemblyName = "System.Xml" - HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" - /> - <Reference - Name = "nunit.framework" - AssemblyName = "nunit.framework" - HintPath = "Libs\nunit.framework.dll" - Private = "True" - /> - <Reference - Name = "nunit.core" - AssemblyName = "nunit.core" - HintPath = "Libs\nunit.core.dll" - Private = "True" - /> - <Reference - Name = "MantisConnect" - Project = "{F4391F6F-0239-48E2-B415-C39A6D920303}" - Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" - /> - <Reference - Name = "System.Web.Services" - AssemblyName = "System.Web.Services" - HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Web.Services.dll" - /> - </References> - </Build> - <Files> - <Include> - <File - RelPath = "AssemblyInfo.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "BaseTestFixture.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "Config.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "Filters.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "IssueGetLastId.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "ProjectCategories.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "ProjectVersions.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "RetrieveEnums.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "RetrieveIssues.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "SubmitIssues.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "SubmitNotes.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "UpdateIssues.cs" - SubType = "Code" - BuildAction = "Compile" - /> - </Include> - </Files> - </CSHARP> -</VisualStudioProject> - +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <ProjectType>Local</ProjectType> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{007994C8-29E4-4C9C-AF10-9DA4FBBB83E8}</ProjectGuid> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ApplicationIcon> + </ApplicationIcon> + <AssemblyKeyContainerName> + </AssemblyKeyContainerName> + <AssemblyName>Futureware.MantisConnect.UnitTests</AssemblyName> + <AssemblyOriginatorKeyFile> + </AssemblyOriginatorKeyFile> + <DefaultClientScript>JScript</DefaultClientScript> + <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> + <DefaultTargetSchema>IE50</DefaultTargetSchema> + <DelaySign>false</DelaySign> + <OutputType>Library</OutputType> + <RootNamespace>Futureware.MantisConnect.UnitTests</RootNamespace> + <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> + <StartupObject> + </StartupObject> + <FileUpgradeFlags> + </FileUpgradeFlags> + <UpgradeBackupLocation> + </UpgradeBackupLocation> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <OutputPath>bin\Debug\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <DebugSymbols>true</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>false</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + <DebugType>full</DebugType> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <OutputPath>bin\Release\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>TRACE</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <DebugSymbols>false</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>true</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + <DebugType>none</DebugType> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <ItemGroup> + <Reference Include="nunit.core"> + <Name>nunit.core</Name> + <HintPath>Libs\nunit.core.dll</HintPath> + <Private>True</Private> + </Reference> + <Reference Include="nunit.framework"> + <Name>nunit.framework</Name> + <HintPath>Libs\nunit.framework.dll</HintPath> + <Private>True</Private> + </Reference> + <Reference Include="System"> + <Name>System</Name> + </Reference> + <Reference Include="System.Data"> + <Name>System.Data</Name> + </Reference> + <Reference Include="System.Web.Services"> + <Name>System.Web.Services</Name> + </Reference> + <Reference Include="System.Xml"> + <Name>System.XML</Name> + </Reference> + <ProjectReference Include="..\mantisconnect\MantisConnect.csproj"> + <Name>MantisConnect</Name> + <Project>{F4391F6F-0239-48E2-B415-C39A6D920303}</Project> + <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <Compile Include="AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="BaseTestFixture.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Config.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Filters.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="IssueGetLastId.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ProjectCategories.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ProjectVersions.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="RetrieveEnums.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="RetrieveIssues.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="SubmitIssues.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="SubmitNotes.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="UpdateIssues.cs"> + <SubType>Code</SubType> + </Compile> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <PropertyGroup> + <PreBuildEvent> + </PreBuildEvent> + <PostBuildEvent> + </PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file Modified: mantisconnect/trunk/clients/dotnet/everything.sln =================================================================== --- mantisconnect/trunk/clients/dotnet/everything.sln 2006-09-16 06:41:29 UTC (rev 40) +++ mantisconnect/trunk/clients/dotnet/everything.sln 2006-09-16 06:50:58 UTC (rev 41) @@ -1,61 +1,49 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MantisConnect", "mantisconnect\MantisConnect.csproj", "{F4391F6F-0239-48E2-B415-C39A6D920303}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MantisNotify", "mantisnotify\MantisNotify.csproj", "{2A8447AC-E15C-4A8F-BDED-8E4373D574D4}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nant.MantisConnect.Tasks", "NantTasks\Nant.MantisConnect.Tasks.csproj", "{0544FA07-F895-4F0E-B61F-CBA7A794F89C}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MantisSubmit", "MantisSubmit\MantisSubmit.csproj", "{580C279D-3855-45F7-8EE2-BB036A1CA4A4}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MantisFilters", "MantisFilters\MantisFilters.csproj", "{F8C0F2F2-77E1-431B-95BB-6683A92266FE}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MantisConnect.UnitTests", "UnitTests\MantisConnect.UnitTests.csproj", "{007994C8-29E4-4C9C-AF10-9DA4FBBB83E8}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {F4391F6F-0239-48E2-B415-C39A6D920303}.Debug.ActiveCfg = Debug|.NET - {F4391F6F-0239-48E2-B415-C39A6D920303}.Debug.Build.0 = Debug|.NET - {F4391F6F-0239-48E2-B415-C39A6D920303}.Release.ActiveCfg = Release|.NET - {F4391F6F-0239-48E2-B415-C39A6D920303}.Release.Build.0 = Release|.NET - {2A8447AC-E15C-4A8F-BDED-8E4373D574D4}.Debug.ActiveCfg = Debug|.NET - {2A8447AC-E15C-4A8F-BDED-8E4373D574D4}.Debug.Build.0 = Debug|.NET - {2A8447AC-E15C-4A8F-BDED-8E4373D574D4}.Release.ActiveCfg = Release|.NET - {2A8447AC-E15C-4A8F-BDED-8E4373D574D4}.Release.Build.0 = Release|.NET - {0544FA07-F895-4F0E-B61F-CBA7A794F89C}.Debug.ActiveCfg = Debug|.NET - {0544FA07-F895-4F0E-B61F-CBA7A794F89C}.Debug.Build.0 = Debug|.NET - {0544FA07-F895-4F0E-B61F-CBA7A794F89C}.Release.ActiveCfg = Release|.NET - {0544FA07-F895-4F0E-B61F-CBA7A794F89C}.Release.Build.0 = Release|.NET - {580C279D-3855-45F7-8EE2-BB036A1CA4A4}.Debug.ActiveCfg = Debug|.NET - {580C279D-3855-45F7-8EE2-BB036A1CA4A4}.Debug.Build.0 = Debug|.NET - {580C279D-3855-45F7-8EE2-BB036A1CA4A4}.Release.ActiveCfg = Release|.NET - {580C279D-3855-45F7-8EE2-BB036A1CA4A4}.Release.Build.0 = Release|.NET - {F8C0F2F2-77E1-431B-95BB-6683A92266FE}.Debug.ActiveCfg = Debug|.NET - {F8C0F2F2-77E1-431B-95BB-6683A92266FE}.Debug.Build.0 = Debug|.NET - {F8C0F2F2-77E1-431B-95BB-6683A92266FE}.Release.ActiveCfg = Release|.NET - {F8C0F2F2-77E1-431B-95BB-6683A92266FE}.Release.Build.0 = Release|.NET - {007994C8-29E4-4C9C-AF10-9DA4FBBB83E8}.Debug.ActiveCfg = Debug|.NET - {007994C8-29E4-4C9C-AF10-9DA4FBBB83E8}.Debug.Build.0 = Debug|.NET - {007994C8-29E4-4C9C-AF10-9DA4FBBB83E8}.Release.ActiveCfg = Release|.NET - {007994C8-29E4-4C9C-AF10-9DA4FBBB83E8}.Release.Build.0 = Release|.NET + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F4391F6F-0239-48E2-B415-C39A6D920303}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F4391F6F-0239-48E2-B415-C39A6D920303}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F4391F6F-0239-48E2-B415-C39A6D920303}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F4391F6F-0239-48E2-B415-C39A6D920303}.Release|Any CPU.Build.0 = Release|Any CPU + {2A8447AC-E15C-4A8F-BDED-8E4373D574D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2A8447AC-E15C-4A8F-BDED-8E4373D574D4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2A8447AC-E15C-4A8F-BDED-8E4373D574D4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2A8447AC-E15C-4A8F-BDED-8E4373D574D4}.Release|Any CPU.Build.0 = Release|Any CPU + {0544FA07-F895-4F0E-B61F-CBA7A794F89C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0544FA07-F895-4F0E-B61F-CBA7A794F89C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0544FA07-F895-4F0E-B61F-CBA7A794F89C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0544FA07-F895-4F0E-B61F-CBA7A794F89C}.Release|Any CPU.Build.0 = Release|Any CPU + {580C279D-3855-45F7-8EE2-BB036A1CA4A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {580C279D-3855-45F7-8EE2-BB036A1CA4A4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {580C279D-3855-45F7-8EE2-BB036A1CA4A4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {580C279D-3855-45F7-8EE2-BB036A1CA4A4}.Release|Any CPU.Build.0 = Release|Any CPU + {F8C0F2F2-77E1-431B-95BB-6683A92266FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F8C0F2F2-77E1-431B-95BB-6683A92266FE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F8C0F2F2-77E1-431B-95BB-6683A92266FE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F8C0F2F2-77E1-431B-95BB-6683A92266FE}.Release|Any CPU.Build.0 = Release|Any CPU + {007994C8-29E4-4C9C-AF10-9DA4FBBB83E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {007994C8-29E4-4C9C-AF10-9DA4FBBB83E8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {007994C8-29E4-4C9C-AF10-9DA4FBBB83E8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {007994C8-29E4-4C9C-AF10-9DA4FBBB83E8}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection EndGlobal Property changes on: mantisconnect/trunk/clients/dotnet/mantisconnect ____________________________________... [truncated message content] |
From: <vb...@us...> - 2006-10-26 06:08:33
|
Revision: 79 http://svn.sourceforge.net/mantisconnect/?rev=79&view=rev Author: vboctor Date: 2006-10-25 23:08:22 -0700 (Wed, 25 Oct 2006) Log Message: ----------- - Compile with Visual C# Express Edition - Fixed #211: Support mc_project_get_issues() - Fixed #273: Support mc_project_add() and mc_project_delete() - Fixed #274: Support mc_project_version_add/update/delete() Modified Paths: -------------- mantisconnect/trunk/clients/dotnet/MantisSubmit/MantisSubmit.csproj mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.cs mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.resx mantisconnect/trunk/clients/dotnet/MantisSubmit/app.config mantisconnect/trunk/clients/dotnet/mantisconnect/MantisConnect.csproj mantisconnect/trunk/clients/dotnet/mantisconnect/MantisConnect.csproj.user mantisconnect/trunk/clients/dotnet/mantisconnect/Project.cs mantisconnect/trunk/clients/dotnet/mantisconnect/ProjectVersion.cs mantisconnect/trunk/clients/dotnet/mantisconnect/Request.cs mantisconnect/trunk/clients/dotnet/mantisconnect/Web References/MantisConnectWebservice/Reference.cs mantisconnect/trunk/clients/dotnet/mantisconnect/Web References/MantisConnectWebservice/mantisconnect.wsdl Modified: mantisconnect/trunk/clients/dotnet/MantisSubmit/MantisSubmit.csproj =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisSubmit/MantisSubmit.csproj 2006-10-21 10:00:31 UTC (rev 78) +++ mantisconnect/trunk/clients/dotnet/MantisSubmit/MantisSubmit.csproj 2006-10-26 06:08:22 UTC (rev 79) @@ -108,6 +108,7 @@ <None Include="app.config" /> <EmbeddedResource Include="SubmitIssue.resx"> <DependentUpon>SubmitIssue.cs</DependentUpon> + <SubType>Designer</SubType> </EmbeddedResource> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> Modified: mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.cs 2006-10-21 10:00:31 UTC (rev 78) +++ mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.cs 2006-10-26 06:08:22 UTC (rev 79) @@ -15,6 +15,7 @@ using System.Collections; using System.Configuration; using System.ComponentModel; +using System.IO; using System.Net; using System.Windows.Forms; @@ -47,6 +48,14 @@ private System.Windows.Forms.ComboBox categoryComboBox; private System.Windows.Forms.Label label9; private System.Windows.Forms.StatusBarPanel statusBarPanel; + private Label lblCustomField1; + private TextBox firstCustomFieldTextBox; + private TextBox secondCustomFieldTextBox; + private Label lblCustomField2; + private OpenFileDialog openFileDialog1; + private TextBox attachmentTextBox; + private Label label10; + private Button browseButton; /// <summary> /// Required designer variable. /// </summary> @@ -97,11 +106,19 @@ this.label6 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); this.statusBar = new System.Windows.Forms.StatusBar(); + this.statusBarPanel = new System.Windows.Forms.StatusBarPanel(); this.versionComboBox = new System.Windows.Forms.ComboBox(); this.label8 = new System.Windows.Forms.Label(); this.categoryComboBox = new System.Windows.Forms.ComboBox(); this.label9 = new System.Windows.Forms.Label(); - this.statusBarPanel = new System.Windows.Forms.StatusBarPanel(); + this.lblCustomField1 = new System.Windows.Forms.Label(); + this.firstCustomFieldTextBox = new System.Windows.Forms.TextBox(); + this.secondCustomFieldTextBox = new System.Windows.Forms.TextBox(); + this.lblCustomField2 = new System.Windows.Forms.Label(); + this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + this.attachmentTextBox = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); + this.browseButton = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel)).BeginInit(); this.SuspendLayout(); // @@ -111,12 +128,12 @@ this.summaryTextBox.Name = "summaryTextBox"; this.summaryTextBox.Size = new System.Drawing.Size(472, 20); this.summaryTextBox.TabIndex = 7; - this.summaryTextBox.Text = ""; // // label1 // this.label1.Location = new System.Drawing.Point(32, 272); this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(100, 23); this.label1.TabIndex = 1; this.label1.Text = "Summary"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -124,8 +141,9 @@ // submitButton // this.submitButton.DialogResult = System.Windows.Forms.DialogResult.OK; - this.submitButton.Location = new System.Drawing.Point(304, 496); + this.submitButton.Location = new System.Drawing.Point(300, 614); this.submitButton.Name = "submitButton"; + this.submitButton.Size = new System.Drawing.Size(75, 23); this.submitButton.TabIndex = 9; this.submitButton.Text = "Submit"; this.submitButton.Click += new System.EventHandler(this.submitButton_Click); @@ -185,6 +203,7 @@ // this.label5.Location = new System.Drawing.Point(32, 304); this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(100, 23); this.label5.TabIndex = 10; this.label5.Text = "Description"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -196,7 +215,6 @@ this.descriptionTextBox.Name = "descriptionTextBox"; this.descriptionTextBox.Size = new System.Drawing.Size(472, 176); this.descriptionTextBox.TabIndex = 8; - this.descriptionTextBox.Text = ""; // // projectComboBox // @@ -218,7 +236,7 @@ // // label7 // - this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); + this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label7.Location = new System.Drawing.Point(32, 16); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(616, 48); @@ -227,14 +245,20 @@ // // statusBar // - this.statusBar.Location = new System.Drawing.Point(0, 536); + this.statusBar.Location = new System.Drawing.Point(0, 654); this.statusBar.Name = "statusBar"; this.statusBar.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] { - this.statusBarPanel}); + this.statusBarPanel}); this.statusBar.ShowPanels = true; this.statusBar.Size = new System.Drawing.Size(664, 22); this.statusBar.TabIndex = 14; // + // statusBarPanel + // + this.statusBarPanel.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring; + this.statusBarPanel.Name = "statusBarPanel"; + this.statusBarPanel.Width = 647; + // // versionComboBox // this.versionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; @@ -269,15 +293,81 @@ this.label9.Text = "Category"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // statusBarPanel + // lblCustomField1 // - this.statusBarPanel.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring; - this.statusBarPanel.Width = 648; + this.lblCustomField1.Location = new System.Drawing.Point(35, 494); + this.lblCustomField1.Name = "lblCustomField1"; + this.lblCustomField1.Size = new System.Drawing.Size(100, 23); + this.lblCustomField1.TabIndex = 19; + this.lblCustomField1.Text = "Custom Field 1"; + this.lblCustomField1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // + // firstCustomFieldTextBox + // + this.firstCustomFieldTextBox.Enabled = false; + this.firstCustomFieldTextBox.Location = new System.Drawing.Point(160, 494); + this.firstCustomFieldTextBox.Name = "firstCustomFieldTextBox"; + this.firstCustomFieldTextBox.Size = new System.Drawing.Size(472, 20); + this.firstCustomFieldTextBox.TabIndex = 20; + // + // secondCustomFieldTextBox + // + this.secondCustomFieldTextBox.Enabled = false; + this.secondCustomFieldTextBox.Location = new System.Drawing.Point(160, 526); + this.secondCustomFieldTextBox.Name = "secondCustomFieldTextBox"; + this.secondCustomFieldTextBox.Size = new System.Drawing.Size(472, 20); + this.secondCustomFieldTextBox.TabIndex = 22; + // + // lblCustomField2 + // + this.lblCustomField2.Location = new System.Drawing.Point(35, 526); + this.lblCustomField2.Name = "lblCustomField2"; + this.lblCustomField2.Size = new System.Drawing.Size(100, 23); + this.lblCustomField2.TabIndex = 21; + this.lblCustomField2.Text = "Custom Field 2"; + this.lblCustomField2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // openFileDialog1 + // + this.openFileDialog1.FileName = "openFileDialog1"; + // + // attachmentTextBox + // + this.attachmentTextBox.Location = new System.Drawing.Point(160, 558); + this.attachmentTextBox.Name = "attachmentTextBox"; + this.attachmentTextBox.Size = new System.Drawing.Size(436, 20); + this.attachmentTextBox.TabIndex = 24; + // + // label10 + // + this.label10.Location = new System.Drawing.Point(32, 558); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(100, 23); + this.label10.TabIndex = 23; + this.label10.Text = "Attachment"; + this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // browseButton + // + this.browseButton.Location = new System.Drawing.Point(603, 554); + this.browseButton.Name = "browseButton"; + this.browseButton.Size = new System.Drawing.Size(29, 23); + this.browseButton.TabIndex = 25; + this.browseButton.Text = "..."; + this.browseButton.UseVisualStyleBackColor = true; + this.browseButton.Click += new System.EventHandler(this.browseButton_Click); + // // SubmitIssueForm // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); - this.ClientSize = new System.Drawing.Size(664, 558); + this.ClientSize = new System.Drawing.Size(664, 676); + this.Controls.Add(this.browseButton); + this.Controls.Add(this.attachmentTextBox); + this.Controls.Add(this.label10); + this.Controls.Add(this.secondCustomFieldTextBox); + this.Controls.Add(this.lblCustomField2); + this.Controls.Add(this.firstCustomFieldTextBox); + this.Controls.Add(this.lblCustomField1); this.Controls.Add(this.categoryComboBox); this.Controls.Add(this.label9); this.Controls.Add(this.versionComboBox); @@ -302,6 +392,7 @@ this.Load += new System.EventHandler(this.SubmitIssue_Load); ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel)).EndInit(); this.ResumeLayout(false); + this.PerformLayout(); } #endregion @@ -357,6 +448,14 @@ { try { + string attachment = this.attachmentTextBox.Text; + + if (attachment.Length > 0 && !File.Exists(attachment)) + { + MessageBox.Show(String.Format("File '{0}' doesn't exist", attachment)); + return; + } + statusBar.Panels[0].Text = "Checking if issue already reported..."; // Check if issue was previously logged in Mantis. @@ -383,14 +482,23 @@ statusBar.Panels[0].Text = "Submitting issue..."; + int newIssueId = session.Request.IssueAdd( issue ); + + statusBar.Panels[0].Text = String.Format("Submitting attachment to issue {0}...", newIssueId); + + if (attachment.Length > 0) + { + session.Request.IssueAttachmentAdd(newIssueId, attachment); + } + // Submit the issue and show its id in the status bar - statusBar.Panels[0].Text = string.Format( "Issued added as {0}.", session.Request.IssueAdd( issue ) ); + statusBar.Panels[0].Text = string.Format("Issued added as {0}.", newIssueId); ResetForm(); } catch( Exception ex ) { - MessageBox.Show( ex.Message, "Webservice Error", MessageBoxButtons.OK, MessageBoxIcon.Stop ); + MessageBox.Show( ex.ToString(), "Webservice Error", MessageBoxButtons.OK, MessageBoxIcon.Stop ); statusBar.Text = string.Empty; } catch @@ -433,6 +541,9 @@ { int projectId = (int)projectComboBox.SelectedValue; + this.lblCustomField1.Text = "Custom Field 1"; + this.lblCustomField2.Text = "Custom Field 2"; + if ( projectId == 0 ) { categoryComboBox.DataSource = null; @@ -469,5 +580,16 @@ /// Session used to communicate with MantisConnect. /// </summary> private Session session; + + private void browseButton_Click(object sender, EventArgs e) + { + this.openFileDialog1.FileName = this.attachmentTextBox.Text; + this.openFileDialog1.CheckFileExists = true; + + if (this.openFileDialog1.ShowDialog() == DialogResult.OK) + { + this.attachmentTextBox.Text = this.openFileDialog1.FileName; + } + } } } Modified: mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.resx =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.resx 2006-10-21 10:00:31 UTC (rev 78) +++ mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.resx 2006-10-26 06:08:22 UTC (rev 79) @@ -3,7 +3,7 @@ <!-- Microsoft ResX Schema - Version 1.3 + Version 2.0 The primary goals of this format is to allow a simple XML format that is mostly human readable. The generation and parsing of the @@ -14,16 +14,17 @@ ... ado.net/XML headers & schema ... <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">1.3</resheader> + <resheader name="version">2.0</resheader> <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1">this is my long string</data> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - [base64 mime encoded serialized .NET Framework object] + <value>[base64 mime encoded serialized .NET Framework object]</value> </data> <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - [base64 mime encoded string representing a byte array form of the .NET Framework object] + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> </data> There are any number of "resheader" rows that contain simple @@ -35,7 +36,7 @@ Classes that don't support this are serialized and stored with the mimetype set. - The mimetype is used forserialized objects, and tells the + The mimetype is used for serialized objects, and tells the ResXResourceReader how to depersist the object. This is currently not extensible. For a given mimetype the value must be set accordingly: @@ -45,7 +46,7 @@ mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with - : System.Serialization.Formatters.Binary.BinaryFormatter + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 @@ -59,18 +60,37 @@ : and then encoded with base64 encoding. --> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> <xsd:element name="data"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="resheader"> @@ -89,219 +109,15 @@ <value>text/microsoft-resx</value> </resheader> <resheader name="version"> - <value>1.3</value> + <value>2.0</value> </resheader> <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <data name="summaryTextBox.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="summaryTextBox.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="summaryTextBox.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="label1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="label1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="label1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="submitButton.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="submitButton.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="submitButton.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="label2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="label2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="label2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="priorityComboBox.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="priorityComboBox.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="priorityComboBox.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="severityComboBox.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="severityComboBox.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="severityComboBox.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="label3.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="label3.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="label3.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="reproducibilityComboBox.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="reproducibilityComboBox.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="reproducibilityComboBox.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="label4.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="label4.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="label4.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="label5.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="label5.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="label5.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="descriptionTextBox.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="descriptionTextBox.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="descriptionTextBox.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="projectComboBox.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="projectComboBox.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="projectComboBox.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="label6.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="label6.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="label6.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="label7.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="label7.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="label7.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="statusBar.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="statusBar.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="statusBar.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="versionComboBox.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="versionComboBox.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="versionComboBox.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="label8.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="label8.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="label8.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="categoryComboBox.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="categoryComboBox.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="categoryComboBox.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="label9.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="label9.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="label9.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="statusBarPanel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="statusBarPanel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>8, 8</value> - </data> - <data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>(Default)</value> - </data> - <data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </data> - <data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>80</value> - </data> - <data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </data> - <data name="$this.Name"> - <value>SubmitIssueForm</value> - </data> - <data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> + <metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> </root> \ No newline at end of file Modified: mantisconnect/trunk/clients/dotnet/MantisSubmit/app.config =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisSubmit/app.config 2006-10-21 10:00:31 UTC (rev 78) +++ mantisconnect/trunk/clients/dotnet/MantisSubmit/app.config 2006-10-26 06:08:22 UTC (rev 79) @@ -2,9 +2,9 @@ <configuration> <appSettings> <add key="MantisConnectWebsite" value="http://www.futureware.biz/mantisconnect/" /> - <add key="MantisConnectUrl" value="http://www.futureware.biz/mantis/mc/mantisconnect.php" /> - <add key="MantisUserName" value="" /> - <add key="MantisPassword" value="" /> + <add key="MantisConnectUrl" value="http://localhost:8008/mantisbt/mc/mantisconnect.php" /> + <add key="MantisUserName" value="administrator" /> + <add key="MantisPassword" value="root" /> <add key="BasicHttpAuthUserName" value="" /> <add key="BasicHttpAuthPassword" value="" /> </appSettings> Modified: mantisconnect/trunk/clients/dotnet/mantisconnect/MantisConnect.csproj =================================================================== --- mantisconnect/trunk/clients/dotnet/mantisconnect/MantisConnect.csproj 2006-10-21 10:00:31 UTC (rev 78) +++ mantisconnect/trunk/clients/dotnet/mantisconnect/MantisConnect.csproj 2006-10-26 06:08:22 UTC (rev 79) @@ -120,6 +120,7 @@ <Compile Include="IssueRelationship.cs"> <SubType>Code</SubType> </Compile> + <Compile Include="MimeTypes.cs" /> <Compile Include="ObjectRef.cs"> <SubType>Code</SubType> </Compile> Modified: mantisconnect/trunk/clients/dotnet/mantisconnect/MantisConnect.csproj.user =================================================================== --- mantisconnect/trunk/clients/dotnet/mantisconnect/MantisConnect.csproj.user 2006-10-21 10:00:31 UTC (rev 78) +++ mantisconnect/trunk/clients/dotnet/mantisconnect/MantisConnect.csproj.user 2006-10-26 06:08:22 UTC (rev 79) @@ -1,5 +1,5 @@ <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> - <ProjectView>ProjectFiles</ProjectView> + <ProjectView>ShowAllFiles</ProjectView> </PropertyGroup> </Project> \ No newline at end of file Modified: mantisconnect/trunk/clients/dotnet/mantisconnect/Project.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/mantisconnect/Project.cs 2006-10-21 10:00:31 UTC (rev 78) +++ mantisconnect/trunk/clients/dotnet/mantisconnect/Project.cs 2006-10-26 06:08:22 UTC (rev 79) @@ -1,4 +1,4 @@ -#region Copyright \xA9 2004-2005 Victor Boctor +#region Copyright \xA9 2004-2006 Victor Boctor // // MantisConnect is copyrighted to Victor Boctor // @@ -20,6 +20,17 @@ [Serializable] public sealed class Project { + /// <summary> + /// The Id to be used when calling APIs to indicate the default project for the logged + /// in user. + /// </summary> + public const int DefaultProject = -1; + + /// <summary> + /// The id to be used when calling APIs to indicate all projects. + /// </summary> + public const int AllProjects = 0; + /// <summary> /// Default Constructor /// </summary> @@ -44,6 +55,30 @@ } /// <summary> + /// Convert this instance to the type supported by the webservice proxy. + /// </summary> + /// <returns>A copy of this instance in the webservice proxy type.</returns> + internal MantisConnectWebservice.ProjectData ToWebservice() + { + MantisConnectWebservice.ProjectData projectData = new MantisConnectWebservice.ProjectData(); + + projectData.id = this.Id.ToString(); + projectData.name = this.Name; + projectData.description = this.Description; + projectData.enabled = this.Enabled; + projectData.enabledSpecified = true; + projectData.file_path = this.FilePath; + projectData.view_state = this.ViewState.ToWebservice(); + projectData.status = this.Status.ToWebservice(); + + // TODO: At the moment this is not used by project_add() or Mantis?! + projectData.access_min = new MantisConnectWebservice.ObjectRef(); + projectData.access_min.id = "0"; + + return projectData; + } + + /// <summary> /// Converts an array of projects from webservice type to this type. /// </summary> /// <param name="projectData">Project data.</param> Modified: mantisconnect/trunk/clients/dotnet/mantisconnect/ProjectVersion.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/mantisconnect/ProjectVersion.cs 2006-10-21 10:00:31 UTC (rev 78) +++ mantisconnect/trunk/clients/dotnet/mantisconnect/ProjectVersion.cs 2006-10-26 06:08:22 UTC (rev 79) @@ -1,4 +1,4 @@ -#region Copyright \xA9 2004-2005 Victor Boctor +#region Copyright \xA9 2004-2006 Victor Boctor // // MantisConnect is copyrighted to Victor Boctor // @@ -42,6 +42,26 @@ } /// <summary> + /// Convert this instance to the type supported by the webservice proxy. + /// </summary> + /// <returns>A copy of this instance in the webservice proxy type.</returns> + internal MantisConnectWebservice.ProjectVersionData ToWebservice() + { + MantisConnectWebservice.ProjectVersionData projectVersionData = new MantisConnectWebservice.ProjectVersionData(); + + projectVersionData.id = this.Id.ToString(); + projectVersionData.project_id = this.ProjectId.ToString(); + projectVersionData.description = this.Description; + projectVersionData.name = this.Name; + projectVersionData.released = this.IsReleased; + projectVersionData.releasedSpecified = true; + projectVersionData.date_order = this.DateOrder; + projectVersionData.date_orderSpecified = true; + + return projectVersionData; + } + + /// <summary> /// Converts an array of project versions from webservice proxy type to this type. /// </summary> /// <param name="projectVersionDataArray">Project version data array.</param> Modified: mantisconnect/trunk/clients/dotnet/mantisconnect/Request.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/mantisconnect/Request.cs 2006-10-21 10:00:31 UTC (rev 78) +++ mantisconnect/trunk/clients/dotnet/mantisconnect/Request.cs 2006-10-26 06:08:22 UTC (rev 79) @@ -1,4 +1,4 @@ -#region Copyright \xA9 2004 Victor Boctor +#region Copyright \xA9 2004-2006 Victor Boctor // // MantisConnect is copyrighted to Victor Boctor // @@ -15,8 +15,10 @@ using System.Data; using System.Diagnostics; using System.Globalization; +using System.IO; using System.Net; using System.Reflection; +using System.Text; using System.Text.RegularExpressions; namespace Futureware.MantisConnect @@ -97,6 +99,7 @@ /// Delete the issue with the specified id /// </summary> /// <param name="issueId">Id of issue to delete</param> + /// <exception cref="ArgumentOutOfRangeException">The issue id is invalid.</exception> public void IssueDelete( int issueId ) { ValidateIssueId( issueId ); @@ -122,6 +125,18 @@ } /// <summary> + /// Gets all issues that are visible to the current user independent of the current + /// project. + /// </summary> + /// <param name="pageNumber">The page number (1-based)</param> + /// <param name="issuesPerPage">The number of issues per page.</param> + /// <returns></returns> + public Issue[] IssueGetAll(int pageNumber, int issuesPerPage) + { + return this.ProjectGetIssues(Project.AllProjects, pageNumber, issuesPerPage); + } + + /// <summary> /// Check if there exists an issue with the specified id. /// </summary> /// <param name="issueId">Id of issue to check for.</param> @@ -216,6 +231,61 @@ } /// <summary> + /// Adds a project to the Mantis database. + /// </summary> + /// <param name="project">The project data, the project id is not required.</param> + public void ProjectAdd(Project project) + { + mc.mc_project_add(session.Username, session.Password, project.ToWebservice()); + } + + /// <summary> + /// Deletes a project given it's id. + /// </summary> + /// <param name="projectId">The project id.</param> + /// <exception cref="ArgumentOutOfRangeException">Project id is invalid.</exception> + public void ProjectDelete(int projectId) + { + ValidateProjectId(projectId); + + mc.mc_project_delete(session.Username, session.Password, projectId.ToString()); + } + + /// <summary> + /// Adds a project version. + /// </summary> + /// <param name="version">The new project version details.</param> + public void ProjectVersionAdd(ProjectVersion version) + { + mc.mc_project_version_add(session.Username, session.Password, version.ToWebservice()); + } + + /// <summary> + /// Updates the project version data. + /// </summary> + /// <param name="version">The project version with the approriate id.</param> + /// <exception cref="ArgumentOutOfRangeException">Version id or project id is invalid.</exception> + public void ProjectVersionUpdate(ProjectVersion version) + { + ValidateProjectVersionId(version.Id); + ValidateProjectId(version.ProjectId); + + mc.mc_project_version_update(session.Username, session.Password, version.Id.ToString(), version.ToWebservice()); + } + + /// <summary> + /// Deletes a project version given it's id. + /// </summary> + /// <param name="projectVersionId">The project version id.</param> + /// <exception cref="ArgumentOutOfRangeException">The project version id is invalid.</exception> + public void ProjectVersionDelete(int projectVersionId) + { + ValidateProjectVersionId(projectVersionId); + + mc.mc_project_version_delete(session.Username, session.Password, projectVersionId.ToString()); + } + + /// <summary> /// Get categories defined for the project with the specified id. /// </summary> /// <remarks> @@ -272,6 +342,31 @@ } /// <summary> + /// Gets the issues that are visible to the logged in user and belong to the project + /// with the specified id. + /// </summary> + /// <param name="projectId">The project id or <see cref="Project.AllProjects"/> or <see cref="Project.DefaultProject"/>.</param> + /// <param name="pageNumber">The page number (1-based)</param> + /// <param name="issuesPerPage">The number of issues per page.</param> + /// <returns></returns> + public Issue[] ProjectGetIssues(int projectId, int pageNumber, int issuesPerPage) + { + ValidateProjectId(projectId); + + if (pageNumber < 1) + { + throw new ArgumentOutOfRangeException("pageNumber"); + } + + if (issuesPerPage < 1) + { + throw new ArgumentOutOfRangeException("issuesPerPage"); + } + + return Issue.ConvertArray(mc.mc_project_get_issues(session.Username, session.Password, projectId.ToString(), pageNumber.ToString(), issuesPerPage.ToString())); + } + + /// <summary> /// Get string value of the specified configuration option. /// </summary> /// <remarks> @@ -326,15 +421,32 @@ /// Adds an attachment to an issue. /// </summary> /// <param name="issueId">The id of the issue to associate the attachment with.</param> - /// <param name="name">The file name of the attachment. This is typically the file name with the path.</param> + /// <param name="fileName">The file name of the attachment. Only the file name dot extension.</param> /// <param name="fileType">The mime file type.</param> /// <param name="base64Content">A byte array that contains a base 64 encoding of the attachment.</param> /// <returns>The attachment id.</returns> - public int IssueAttachmentAdd( int issueId, string name, string fileType, System.Byte[] base64Content) + public int IssueAttachmentAdd(int issueId, string fileName, string fileType, System.Byte[] base64Content) { - return Convert.ToInt32( mc.mc_issue_attachment_add( session.Username, session.Password, issueId.ToString(), name, fileType, base64Content ) ); + return Convert.ToInt32( mc.mc_issue_attachment_add(session.Username, session.Password, issueId.ToString(), fileName, fileType, base64Content)); } + /// <summary> + /// Uploads the specified file to the specified issue. + /// </summary> + /// <param name="issueId">The issue id</param> + /// <param name="fileName">The file</param> + /// <returns></returns> + public int IssueAttachmentAdd(int issueId, string fileName) + { + byte[] bytes = File.ReadAllBytes(fileName); + string base64 = Convert.ToBase64String(bytes); + + ASCIIEncoding encoding = new ASCIIEncoding(); + byte[] encoded = encoding.GetBytes(base64); + + return this.IssueAttachmentAdd(issueId, Path.GetFileName(fileName), MimeTypes.GetMimeType(Path.GetExtension(fileName)), encoded); + } + /// <summary> /// Deletes an attachment given it's id. /// </summary> @@ -379,6 +491,19 @@ } /// <summary> + /// Validates a project version id and raises an exception if it is not valid. + /// </summary> + /// <param name="projectVersionId">Project Version Id</param> + /// <exception cref="ArgumentOutOfRangeException">The project version id is 0 or negative.</exception> + private static void ValidateProjectVersionId(int projectVersionId) + { + if (projectVersionId < 1) + { + throw new ArgumentOutOfRangeException("projectVersionId"); + } + } + + /// <summary> /// /// </summary> /// <param name="issue"></param> Modified: mantisconnect/trunk/clients/dotnet/mantisconnect/Web References/MantisConnectWebservice/Reference.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/mantisconnect/Web References/MantisConnectWebservice/Reference.cs 2006-10-21 10:00:31 UTC (rev 78) +++ mantisconnect/trunk/clients/dotnet/mantisconnect/Web References/MantisConnectWebservice/Reference.cs 2006-10-26 06:08:22 UTC (rev 79) @@ -30,7 +30,6 @@ [System.Xml.Serialization.SoapIncludeAttribute(typeof(FilterData))] [System.Xml.Serialization.SoapIncludeAttribute(typeof(CustomFieldDefinitionData))] [System.Xml.Serialization.SoapIncludeAttribute(typeof(ProjectAttachmentData))] - [System.Xml.Serialization.SoapIncludeAttribute(typeof(ProjectVersionData))] [System.Xml.Serialization.SoapIncludeAttribute(typeof(IssueHeaderData))] [System.Xml.Serialization.SoapIncludeAttribute(typeof(CustomFieldValueForIssueData))] [System.Xml.Serialization.SoapIncludeAttribute(typeof(RelationshipData))] @@ -105,6 +104,12 @@ private System.Threading.SendOrPostCallback mc_project_get_versionsOperationCompleted; + private System.Threading.SendOrPostCallback mc_project_version_addOperationCompleted; + + private System.Threading.SendOrPostCallback mc_project_version_updateOperationCompleted; + + private System.Threading.SendOrPostCallback mc_project_version_deleteOperationCompleted; + private System.Threading.SendOrPostCallback mc_project_get_released_versionsOperationCompleted; private System.Threading.SendOrPostCallback mc_project_get_unreleased_versionsOperationCompleted; @@ -268,6 +273,15 @@ public event mc_project_get_versionsCompletedEventHandler mc_project_get_versionsCompleted; /// <remarks/> + public event mc_project_version_addCompletedEventHandler mc_project_version_addCompleted; + + /// <remarks/> + public event mc_project_version_updateCompletedEventHandler mc_project_version_updateCompleted; + + /// <remarks/> + public event mc_project_version_deleteCompletedEventHandler mc_project_version_deleteCompleted; + + /// <remarks/> public event mc_project_get_released_versionsCompletedEventHandler mc_project_get_released_versionsCompleted; /// <remarks/> @@ -1915,6 +1929,153 @@ } /// <remarks/> + [System.Web.Services.Protocols.SoapRpcMethodAttribute("http://localhost/mantisbt/mc/mantisconnect.php/mc_project_version_add", RequestNamespace="http://futureware.biz/mantisconnect", ResponseNamespace="http://futureware.biz/mantisconnect")] + [return: System.Xml.Serialization.SoapElementAttribute("return", DataType="integer")] + public string mc_project_version_add(string username, string password, ProjectVersionData version) { + object[] results = this.Invoke("mc_project_version_add", new object[] { + username, + password, + version}); + return ((string)(results[0])); + } + + /// <remarks/> + public System.IAsyncResult Beginmc_project_version_add(string username, string password, ProjectVersionData version, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("mc_project_version_add", new object[] { + username, + password, + version}, callback, asyncState); + } + + /// <remarks/> + public string Endmc_project_version_add(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((string)(results[0])); + } + + /// <remarks/> + public void mc_project_version_addAsync(string username, string password, ProjectVersionData version) { + this.mc_project_version_addAsync(username, password, version, null); + } + + /// <remarks/> + public void mc_project_version_addAsync(string username, string password, ProjectVersionData version, object userState) { + if ((this.mc_project_version_addOperationCompleted == null)) { + this.mc_project_version_addOperationCompleted = new System.Threading.SendOrPostCallback(this.Onmc_project_version_addOperationCompleted); + } + this.InvokeAsync("mc_project_version_add", new object[] { + username, + password, + version}, this.mc_project_version_addOperationCompleted, userState); + } + + private void Onmc_project_version_addOperationCompleted(object arg) { + if ((this.mc_project_version_addCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.mc_project_version_addCompleted(this, new mc_project_version_addCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// <remarks/> + [System.Web.Services.Protocols.SoapRpcMethodAttribute("http://localhost/mantisbt/mc/mantisconnect.php/mc_project_version_update", RequestNamespace="http://futureware.biz/mantisconnect", ResponseNamespace="http://futureware.biz/mantisconnect")] + [return: System.Xml.Serialization.SoapElementAttribute("return")] + public bool mc_project_version_update(string username, string password, [System.Xml.Serialization.SoapElementAttribute(DataType="integer")] string version_id, ProjectVersionData version) { + object[] results = this.Invoke("mc_project_version_update", new object[] { + username, + password, + version_id, + version}); + return ((bool)(results[0])); + } + + /// <remarks/> + public System.IAsyncResult Beginmc_project_version_update(string username, string password, string version_id, ProjectVersionData version, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("mc_project_version_update", new object[] { + username, + password, + version_id, + version}, callback, asyncState); + } + + /// <remarks/> + public bool Endmc_project_version_update(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((bool)(results[0])); + } + + /// <remarks/> + public void mc_project_version_updateAsync(string username, string password, string version_id, ProjectVersionData version) { + this.mc_project_version_updateAsync(username, password, version_id, version, null); + } + + /// <remarks/> + public void mc_project_version_updateAsync(string username, string password, string version_id, ProjectVersionData version, object userState) { + if ((this.mc_project_version_updateOperationCompleted == null)) { + this.mc_project_version_updateOperationCompleted = new System.Threading.SendOrPostCallback(this.Onmc_project_version_updateOperationCompleted); + } + this.InvokeAsync("mc_project_version_update", new object[] { + username, + password, + version_id, + version}, this.mc_project_version_updateOperationCompleted, userState); + } + + private void Onmc_project_version_updateOperationCompleted(object arg) { + if ((this.mc_project_version_updateCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.mc_project_version_updateCompleted(this, new mc_project_version_updateCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// <remarks/> + [System.Web.Services.Protocols.SoapRpcMethodAttribute("http://localhost/mantisbt/mc/mantisconnect.php/mc_project_version_delete", RequestNamespace="http://futureware.biz/mantisconnect", ResponseNamespace="http://futureware.biz/mantisconnect")] + [return: System.Xml.Serialization.SoapElementAttribute("return")] + public bool mc_project_version_delete(string username, string password, [System.Xml.Serialization.SoapElementAttribute(DataType="integer")] string version_id) { + object[] results = this.Invoke("mc_project_version_delete", new object[] { + username, + password, + version_id}); + return ((bool)(results[0])); + } + + /// <remarks/> + public System.IAsyncResult Beginmc_project_version_delete(string username, string password, string version_id, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("mc_project_version_delete", new object[] { + username, + password, + version_id}, callback, asyncState); + } + + /// <remarks/> + public bool Endmc_project_version_delete(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((bool)(results[0])); + } + + /// <remarks/> + public void mc_project_version_deleteAsync(string username, string password, string version_id) { + this.mc_project_version_deleteAsync(username, password, version_id, null); + } + + /// <remarks/> + public void mc_project_version_deleteAsync(string username, string password, string version_id, object userState) { + if ((this.mc_project_version_deleteOperationCompleted == null)) { + this.mc_project_version_deleteOperationCompleted = new System.Threading.SendOrPostCallback(this.Onmc_project_version_deleteOperationCompleted); + } + this.InvokeAsync("mc_project_version_delete", new object[] { + username, + password, + version_id}, this.mc_project_version_deleteOperationCompleted, userState); + } + + private void Onmc_project_version_deleteOperationCompleted(object arg) { + if ((this.mc_project_version_deleteCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.mc_project_version_deleteCompleted(this, new mc_project_version_deleteCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// <remarks/> [System.Web.Services.Protocols.SoapRpcMethodAttribute("http://localhost/mantisbt/mc/mantisconnect.php/mc_project_get_released_versions", RequestNamespace="http://futureware.biz/mantisconnect", ResponseNamespace="http://futureware.biz/mantisconnect")] [return: System.Xml.Serialization.SoapElementAttribute("return")] public ProjectVersionData[] mc_project_get_released_versions(string username, string password, [System.Xml.Serialization.SoapElementAttribute(DataType="integer")] string project_id) { @@ -5122,6 +5283,84 @@ /// <remarks/> [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.112")] + public delegate void mc_project_version_addCompletedEventHandler(object... [truncated message content] |
From: <vb...@us...> - 2007-04-22 04:53:33
|
Revision: 136 http://svn.sourceforge.net/mantisconnect/?rev=136&view=rev Author: vboctor Date: 2007-04-21 21:53:32 -0700 (Sat, 21 Apr 2007) Log Message: ----------- - Modified the ProjectVersionAdd() in the dotnet client to return the version id + added some extra validation. - Added some test cases for the version add cases. Modified Paths: -------------- mantisconnect/trunk/clients/dotnet/UnitTests/ProjectVersions.cs mantisconnect/trunk/clients/dotnet/mantisconnect/Properties/Settings.Designer.cs mantisconnect/trunk/clients/dotnet/mantisconnect/Request.cs Modified: mantisconnect/trunk/clients/dotnet/UnitTests/ProjectVersions.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/UnitTests/ProjectVersions.cs 2007-04-22 02:25:31 UTC (rev 135) +++ mantisconnect/trunk/clients/dotnet/UnitTests/ProjectVersions.cs 2007-04-22 04:53:32 UTC (rev 136) @@ -112,5 +112,118 @@ Session.Request.ProjectGetVersionsUnreleased( projectId ); } #endregion + + #region Request.ProjectGetVersions() + [Test] + public void ProjectVersionAddNotReleased() + { + ProjectVersionAddTestCase(false); + } + + [Test] + public void ProjectVersionAddReleased() + { + ProjectVersionAddTestCase(true); + } + + [Test] + [ExpectedException(typeof(ArgumentException))] + public void ProjectVersionAddWithId() + { + ProjectVersion versionToAdd = CreateVersionToAdd(); + versionToAdd.Id = 1000; + Session.Request.ProjectVersionAdd(versionToAdd); + } + + [Test] + [ExpectedException(typeof(ArgumentNullException))] + public void ProjectVersionAddWithNullName() + { + ProjectVersion versionToAdd = CreateVersionToAdd(); + versionToAdd.Name = null; + Session.Request.ProjectVersionAdd(versionToAdd); + } + + [Test] + [ExpectedException(typeof(ArgumentNullException))] + public void ProjectVersionAddWithNullDescription() + { + ProjectVersion versionToAdd = CreateVersionToAdd(); + versionToAdd.Description = null; + Session.Request.ProjectVersionAdd(versionToAdd); + } + #endregion + + #region Private Methods + /// <summary> + /// Get a project version by id or null if not found. + /// </summary> + /// <param name="projectVersionId">The version id</param> + /// <returns></returns> + private ProjectVersion GetProjectVersionById(int projectVersionId) + { + ProjectVersion[] versions = Session.Request.ProjectGetVersions(this.FirstProjectId); + + foreach (ProjectVersion version in versions) + { + if (version.Id == projectVersionId) + { + return version; + } + } + + return null; + } + + private void ProjectVersionAddTestCase(bool released) + { + const string VersionName = "VersionName"; + const string VersionDescription = "VersionDescription"; + DateTime now = DateTime.Now; + + ProjectVersion version = new ProjectVersion(); + version.ProjectId = this.FirstProjectId; + version.Name = VersionName; + version.Description = VersionDescription; + version.DateOrder = now; + version.IsReleased = released; + + int versionId = Session.Request.ProjectVersionAdd(version); + + try + { + // Check that the version id is set. + Assert.AreEqual(versionId, version.Id); + Assert.AreNotEqual(versionId, 0); + + ProjectVersion versionAdded = GetProjectVersionById(versionId); + + Assert.AreEqual(versionAdded.Id, versionId); + Assert.AreEqual(versionAdded.Name, VersionName); + Assert.AreEqual(versionAdded.Description, VersionDescription); + Assert.AreEqual(versionAdded.DateOrder, now); + Assert.AreEqual(versionAdded.IsReleased, released); + } + finally + { + Session.Request.ProjectVersionDelete(versionId); + } + } + + private ProjectVersion CreateVersionToAdd() + { + const string VersionName = "VersionName"; + const string VersionDescription = "VersionDescription"; + + ProjectVersion version = new ProjectVersion(); + version.ProjectId = this.FirstProjectId; + version.Name = VersionName; + version.Description = VersionDescription; + version.DateOrder = DateTime.Now; + version.IsReleased = false; + + return version; + } + #endregion } } Modified: mantisconnect/trunk/clients/dotnet/mantisconnect/Properties/Settings.Designer.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/mantisconnect/Properties/Settings.Designer.cs 2007-04-22 02:25:31 UTC (rev 135) +++ mantisconnect/trunk/clients/dotnet/mantisconnect/Properties/Settings.Designer.cs 2007-04-22 04:53:32 UTC (rev 136) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:2.0.50727.112 +// Runtime Version:2.0.50727.312 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. Modified: mantisconnect/trunk/clients/dotnet/mantisconnect/Request.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/mantisconnect/Request.cs 2007-04-22 02:25:31 UTC (rev 135) +++ mantisconnect/trunk/clients/dotnet/mantisconnect/Request.cs 2007-04-22 04:53:32 UTC (rev 136) @@ -263,12 +263,31 @@ } /// <summary> - /// Adds a project version. + /// Adds a project version and sets the id on the supplied project version instance. /// </summary> /// <param name="version">The new project version details.</param> - public void ProjectVersionAdd(ProjectVersion version) + /// <returns>The version id of the added project version.</returns> + public int ProjectVersionAdd(ProjectVersion version) { - mc.mc_project_version_add(session.Username, session.Password, version.ToWebservice()); + ValidateProjectId(version.ProjectId); + + if (version.Id != 0) + { + throw new ArgumentException("Version already has a version id"); + } + + if (version.Name == null) + { + throw new ArgumentNullException("version.Name"); + } + + if (version.Description == null) + { + throw new ArgumentNullException("version.Description"); + } + + version.Id = Convert.ToInt32(mc.mc_project_version_add(session.Username, session.Password, version.ToWebservice())); + return version.Id; } /// <summary> @@ -281,6 +300,16 @@ ValidateProjectVersionId(version.Id); ValidateProjectId(version.ProjectId); + if (version.Name == null) + { + throw new ArgumentNullException("version.Name"); + } + + if (version.Description == null) + { + throw new ArgumentNullException("version.Description"); + } + mc.mc_project_version_update(session.Username, session.Password, version.Id.ToString(), version.ToWebservice()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vb...@us...> - 2007-05-30 06:17:56
|
Revision: 139 http://svn.sourceforge.net/mantisconnect/?rev=139&view=rev Author: vboctor Date: 2007-05-29 23:17:55 -0700 (Tue, 29 May 2007) Log Message: ----------- A cropper plug-in to upload screenshots to Mantis. Modified Paths: -------------- mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.cs mantisconnect/trunk/clients/dotnet/everything.sln Added Paths: ----------- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Cropper.Mantis.csproj mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.Designer.cs mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.cs mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.resx mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Libs/ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Libs/Cropper.Extensibility.dll mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Libs/Skybound.VisualStyles.dll mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.Designer.cs mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.cs mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.resx mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectSettings.cs mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Properties/ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Properties/AssemblyInfo.cs mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.Designer.cs mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.cs mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.resx mantisconnect/trunk/clients/dotnet/Cropper.Mantis/SendToMantis.cs Property changes on: mantisconnect/trunk/clients/dotnet/Cropper.Mantis ___________________________________________________________________ Name: svn:ignore + bin obj *.user Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Cropper.Mantis.csproj =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Cropper.Mantis.csproj (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Cropper.Mantis.csproj 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,86 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{DC45223F-F5BC-4ED6-903C-343E4D70D155}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>Cropper.Mantis</RootNamespace> + <AssemblyName>Cropper.Mantis</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="Cropper.Extensibility, Version=1.9.1.89, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>Libs\Cropper.Extensibility.dll</HintPath> + </Reference> + <Reference Include="Skybound.VisualStyles, Version=2.0.0.0, Culture=neutral, PublicKeyToken=f2d73a45b3e75a83"> + <SpecificVersion>False</SpecificVersion> + <HintPath>Libs\Skybound.VisualStyles.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="MantisConnectOptionsForm.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="MantisConnectOptionsForm.Designer.cs"> + <DependentUpon>MantisConnectOptionsForm.cs</DependentUpon> + </Compile> + <Compile Include="MantisConnectSettings.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="ScreenshotDetailsForm.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="ScreenshotDetailsForm.Designer.cs"> + <DependentUpon>ScreenshotDetailsForm.cs</DependentUpon> + </Compile> + <Compile Include="SendToMantis.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\mantisconnect\MantisConnect.csproj"> + <Project>{F4391F6F-0239-48E2-B415-C39A6D920303}</Project> + <Name>MantisConnect</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="MantisConnectOptionsForm.resx"> + <SubType>Designer</SubType> + <DependentUpon>MantisConnectOptionsForm.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="ScreenshotDetailsForm.resx"> + <SubType>Designer</SubType> + <DependentUpon>ScreenshotDetailsForm.cs</DependentUpon> + </EmbeddedResource> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.Designer.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.Designer.cs (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.Designer.cs 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,101 @@ +namespace Cropper.SendToFTP +{ + partial class FilenameInputDialog + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.btnOK = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.txtFilename = new System.Windows.Forms.TextBox(); + this.btnCancel = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // btnOK + // + this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; + this.btnOK.Location = new System.Drawing.Point(198, 39); + this.btnOK.Name = "btnOK"; + this.btnOK.Size = new System.Drawing.Size(75, 23); + this.btnOK.TabIndex = 1; + this.btnOK.Text = "OK"; + this.btnOK.UseVisualStyleBackColor = true; + this.btnOK.Click += new System.EventHandler(this.btnOK_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(13, 13); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(52, 13); + this.label1.TabIndex = 1; + this.label1.Text = "Filename:"; + // + // txtFilename + // + this.txtFilename.Location = new System.Drawing.Point(72, 13); + this.txtFilename.Name = "txtFilename"; + this.txtFilename.Size = new System.Drawing.Size(201, 20); + this.txtFilename.TabIndex = 0; + // + // btnCancel + // + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(117, 39); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(75, 23); + this.btnCancel.TabIndex = 3; + this.btnCancel.Text = "Cancel"; + this.btnCancel.UseVisualStyleBackColor = true; + // + // FilenameInputDialog + // + this.AcceptButton = this.btnOK; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnCancel; + this.ClientSize = new System.Drawing.Size(282, 71); + this.Controls.Add(this.btnCancel); + this.Controls.Add(this.txtFilename); + this.Controls.Add(this.label1); + this.Controls.Add(this.btnOK); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Name = "FilenameInputDialog"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Input filename..."; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button btnOK; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox txtFilename; + private System.Windows.Forms.Button btnCancel; + } +} \ No newline at end of file Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.cs (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.cs 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace Cropper.SendToFTP +{ + public partial class FilenameInputDialog : Form + { + private string _filename; + + public string Filename + { + get { return _filename; } + set { _filename = value; } + } + + + public FilenameInputDialog() + { + InitializeComponent(); + } + + private void btnOK_Click(object sender, EventArgs e) + { + this.Filename = txtFilename.Text; + base.Close(); + } + + } +} \ No newline at end of file Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.resx =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.resx (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.resx 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Libs/Cropper.Extensibility.dll =================================================================== (Binary files differ) Property changes on: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Libs/Cropper.Extensibility.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Libs/Skybound.VisualStyles.dll =================================================================== (Binary files differ) Property changes on: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Libs/Skybound.VisualStyles.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.Designer.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.Designer.cs (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.Designer.cs 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,202 @@ +namespace Cropper.Mantis +{ + partial class MantisConnectOptionsForm + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.passwordTextBox = new System.Windows.Forms.TextBox(); + this.userNameTextBox = new System.Windows.Forms.TextBox(); + this.serverTextBox = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.themedTabControl1.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.SuspendLayout(); + // + // themedTabControl1 + // + this.themedTabControl1.Size = new System.Drawing.Size(324, 391); + // + // tabPage1 + // + this.tabPage1.Controls.Add(this.label9); + this.tabPage1.Controls.Add(this.label8); + this.tabPage1.Controls.Add(this.label7); + this.tabPage1.Controls.Add(this.label6); + this.tabPage1.Controls.Add(this.label5); + this.tabPage1.Controls.Add(this.label4); + this.tabPage1.Controls.Add(this.passwordTextBox); + this.tabPage1.Controls.Add(this.userNameTextBox); + this.tabPage1.Controls.Add(this.serverTextBox); + this.tabPage1.Controls.Add(this.label3); + this.tabPage1.Controls.Add(this.label2); + this.tabPage1.Controls.Add(this.label1); + this.tabPage1.Size = new System.Drawing.Size(316, 365); + // + // passwordTextBox + // + this.passwordTextBox.Location = new System.Drawing.Point(86, 120); + this.passwordTextBox.Name = "passwordTextBox"; + this.passwordTextBox.PasswordChar = '*'; + this.passwordTextBox.Size = new System.Drawing.Size(210, 20); + this.passwordTextBox.TabIndex = 11; + // + // userNameTextBox + // + this.userNameTextBox.Location = new System.Drawing.Point(86, 85); + this.userNameTextBox.Name = "userNameTextBox"; + this.userNameTextBox.Size = new System.Drawing.Size(210, 20); + this.userNameTextBox.TabIndex = 10; + // + // serverTextBox + // + this.serverTextBox.Location = new System.Drawing.Point(86, 32); + this.serverTextBox.Name = "serverTextBox"; + this.serverTextBox.Size = new System.Drawing.Size(210, 20); + this.serverTextBox.TabIndex = 9; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(9, 123); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(53, 13); + this.label3.TabIndex = 8; + this.label3.Text = "Password"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(9, 88); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(60, 13); + this.label2.TabIndex = 7; + this.label2.Text = "User Name"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(9, 32); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(38, 13); + this.label1.TabIndex = 6; + this.label1.Text = "Server"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(9, 55); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(297, 13); + this.label4.TabIndex = 12; + this.label4.Text = "e.g. http://www.example.com/mantis/mc/mantisconnect.php"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label5.Location = new System.Drawing.Point(9, 171); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(92, 13); + this.label5.TabIndex = 13; + this.label5.Text = "Dependencies:"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(9, 194); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(162, 13); + this.label6.TabIndex = 14; + this.label6.Text = "Mantis - http://www.mantisbt.org"; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(9, 220); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(290, 13); + this.label7.TabIndex = 15; + this.label7.Text = "MantisConnect - http://www.futureware.biz/mantisconnect/"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label8.Location = new System.Drawing.Point(9, 249); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(55, 13); + this.label8.TabIndex = 16; + this.label8.Text = "License:"; + // + // label9 + // + this.label9.Location = new System.Drawing.Point(9, 271); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(290, 89); + this.label9.TabIndex = 17; + this.label9.Text = "The Mantis Cropper Plug-in is free for use for users with valid MantisConnect lic" + + "ense (see http://www.futureware.biz/mantisconnect/license.php)"; + // + // MantisConnectOptionsForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(324, 391); + this.Name = "MantisConnectOptionsForm"; + this.Text = "MantisConnectOptions"; + this.themedTabControl1.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); + this.tabPage1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TextBox passwordTextBox; + private System.Windows.Forms.TextBox userNameTextBox; + private System.Windows.Forms.TextBox serverTextBox; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label8; + + } +} \ No newline at end of file Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.cs (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.cs 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,50 @@ +#region Copyright \xA9 2004-2007 Victor Boctor +// +// MantisConnect is copyrighted to Victor Boctor +// +// This program is distributed under the terms and conditions of the GPL +// See LICENSE file for details. +// +// For commercial applications to link with or modify MantisConnect, they require the +// purchase of a MantisConnect commerical license. +// +#endregion + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +using Fusion8.Cropper.Extensibility; + +namespace Cropper.Mantis +{ + public partial class MantisConnectOptionsForm : BaseConfigurationForm + { + public MantisConnectOptionsForm() + { + InitializeComponent(); + } + + public string UserName + { + get { return this.userNameTextBox.Text; } + set { this.userNameTextBox.Text = value; } + } + + public string Password + { + get { return this.passwordTextBox.Text; } + set { this.passwordTextBox.Text = value; } + } + + public string Url + { + get { return this.serverTextBox.Text; } + set { this.serverTextBox.Text = value; } + } + } +} \ No newline at end of file Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.resx =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.resx (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.resx 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectSettings.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectSettings.cs (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectSettings.cs 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,52 @@ +#region Copyright \xA9 2004-2007 Victor Boctor +// +// MantisConnect is copyrighted to Victor Boctor +// +// This program is distributed under the terms and conditions of the GPL +// See LICENSE file for details. +// +// For commercial applications to link with or modify MantisConnect, they require the +// purchase of a MantisConnect commerical license. +// +#endregion + +using System; +using System.Collections.Generic; +using System.Text; + +namespace Cropper.Mantis +{ + public class MantisConnectSettings + { + private string url = "http://localhost:8008/mantisbt/mc/mantisconnect.php"; + private string userName = "administrator"; + private string password = "root"; + + public string Url + { + get { return this.url; } + set { this.url = value; } + } + + public string UserName + { + get { return this.userName; } + set { this.userName = value; } + } + + public string Password + { + get { return this.password; } + set { this.password = value; } + } + + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("\nUrl:" + this.Url); + sb.Append("\nUserName:" + this.UserName); + sb.Append("\nPassword:" + this.Password); + return sb.ToString(); + } + } +} Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Properties/AssemblyInfo.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Properties/AssemblyInfo.cs (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Properties/AssemblyInfo.cs 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,47 @@ +#region Copyright © 2004-2007 Victor Boctor +// +// MantisConnect is copyrighted to Victor Boctor +// +// This program is distributed under the terms and conditions of the GPL +// See LICENSE file for details. +// +// For commercial applications to link with or modify MantisConnect, they require the +// purchase of a MantisConnect commerical license. +// +#endregion + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Mantis Cropper Plugin")] +[assembly: AssemblyDescription("A screen capture for Cropper")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Futureware")] +[assembly: AssemblyProduct("Mantis Cropper Plugin")] +[assembly: AssemblyCopyright("Copyright © Futureware 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("716c3ffb-a0e2-4bcc-84f0-d12cefbd2f06")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.Designer.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.Designer.cs (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.Designer.cs 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,196 @@ +namespace Cropper.Mantis +{ + partial class ScreenshotDetailsForm + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.issueIdTextBox = new System.Windows.Forms.TextBox(); + this.fileNameTextBox = new System.Windows.Forms.TextBox(); + this.uploadToMantisButton = new System.Windows.Forms.Button(); + this.cancelButton = new System.Windows.Forms.Button(); + this.label3 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.noteTextBox = new System.Windows.Forms.TextBox(); + this.issueSummaryTextBox = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); + this.getIssueBackgroundWorker = new System.ComponentModel.BackgroundWorker(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(12, 18); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(42, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Issue #"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(12, 47); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(54, 13); + this.label2.TabIndex = 2; + this.label2.Text = "File Name"; + // + // issueIdTextBox + // + this.issueIdTextBox.Location = new System.Drawing.Point(96, 18); + this.issueIdTextBox.Name = "issueIdTextBox"; + this.issueIdTextBox.Size = new System.Drawing.Size(100, 20); + this.issueIdTextBox.TabIndex = 1; + this.issueIdTextBox.TextChanged += new System.EventHandler(this.issueIdTextBox_TextChanged); + // + // fileNameTextBox + // + this.fileNameTextBox.Location = new System.Drawing.Point(96, 44); + this.fileNameTextBox.Name = "fileNameTextBox"; + this.fileNameTextBox.Size = new System.Drawing.Size(141, 20); + this.fileNameTextBox.TabIndex = 3; + this.fileNameTextBox.TextChanged += new System.EventHandler(this.fileNameTextBox_TextChanged); + // + // uploadToMantisButton + // + this.uploadToMantisButton.DialogResult = System.Windows.Forms.DialogResult.OK; + this.uploadToMantisButton.Enabled = false; + this.uploadToMantisButton.Location = new System.Drawing.Point(139, 318); + this.uploadToMantisButton.Name = "uploadToMantisButton"; + this.uploadToMantisButton.Size = new System.Drawing.Size(121, 23); + this.uploadToMantisButton.TabIndex = 9; + this.uploadToMantisButton.Text = "Upload to Mantis"; + this.uploadToMantisButton.UseVisualStyleBackColor = true; + this.uploadToMantisButton.Click += new System.EventHandler(this.uploadToMantisButton_Click); + // + // cancelButton + // + this.cancelButton.CausesValidation = false; + this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancelButton.Location = new System.Drawing.Point(288, 318); + this.cancelButton.Name = "cancelButton"; + this.cancelButton.Size = new System.Drawing.Size(110, 23); + this.cancelButton.TabIndex = 10; + this.cancelButton.Text = "Cancel"; + this.cancelButton.UseVisualStyleBackColor = true; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(234, 47); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(24, 13); + this.label3.TabIndex = 4; + this.label3.Text = ".jpg"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(12, 96); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(78, 13); + this.label4.TabIndex = 7; + this.label4.Text = "Note (Optional)"; + // + // noteTextBox + // + this.noteTextBox.AcceptsReturn = true; + this.noteTextBox.Location = new System.Drawing.Point(96, 96); + this.noteTextBox.Multiline = true; + this.noteTextBox.Name = "noteTextBox"; + this.noteTextBox.Size = new System.Drawing.Size(454, 203); + this.noteTextBox.TabIndex = 8; + // + // issueSummaryTextBox + // + this.issueSummaryTextBox.Location = new System.Drawing.Point(96, 70); + this.issueSummaryTextBox.Name = "issueSummaryTextBox"; + this.issueSummaryTextBox.ReadOnly = true; + this.issueSummaryTextBox.Size = new System.Drawing.Size(454, 20); + this.issueSummaryTextBox.TabIndex = 6; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(12, 73); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(78, 13); + this.label5.TabIndex = 5; + this.label5.Text = "Issue Summary"; + // + // getIssueBackgroundWorker + // + this.getIssueBackgroundWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.getIssueBackgroundWorker_DoWork); + this.getIssueBackgroundWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.getIssueBackgroundWorker_RunWorkerCompleted); + // + // ScreenshotDetailsForm + // + this.AcceptButton = this.uploadToMantisButton; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.cancelButton; + this.ClientSize = new System.Drawing.Size(562, 353); + this.ControlBox = false; + this.Controls.Add(this.issueSummaryTextBox); + this.Controls.Add(this.label5); + this.Controls.Add(this.noteTextBox); + this.Controls.Add(this.label4); + this.Controls.Add(this.label3); + this.Controls.Add(this.cancelButton); + this.Controls.Add(this.uploadToMantisButton); + this.Controls.Add(this.fileNameTextBox); + this.Controls.Add(this.issueIdTextBox); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "ScreenshotDetailsForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Screenshot Details"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox issueIdTextBox; + private System.Windows.Forms.TextBox fileNameTextBox; + private System.Windows.Forms.Button uploadToMantisButton; + private System.Windows.Forms.Button cancelButton; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox noteTextBox; + private System.Windows.Forms.TextBox issueSummaryTextBox; + private System.Windows.Forms.Label label5; + private System.ComponentModel.BackgroundWorker getIssueBackgroundWorker; + } +} \ No newline at end of file Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.cs (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.cs 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,150 @@ +#region Copyright \xA9 2004-2007 Victor Boctor +// +// MantisConnect is copyrighted to Victor Boctor +// +// This program is distributed under the terms and conditions of the GPL +// See LICENSE file for details. +// +// For commercial applications to link with or modify MantisConnect, they require the +// purchase of a MantisConnect commerical license. +// +#endregion + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace Cropper.Mantis +{ + public partial class ScreenshotDetailsForm : Form + { + private string filePath; + private ProcessImageHandler processImageHandler; + private SentToMantisFormat sendToMantis; + + public delegate void ProcessImageHandler(int issueId, string filePath, string fileName, string note); + + /// <summary> + /// The constructor for the screenshot details form. + /// </summary> + /// <param name="filePath">The full file path of the screenshot.</param> + public ScreenshotDetailsForm(SentToMantisFormat sendToMantis, ProcessImageHandler processImageHandler, string filePath) + { + if (sendToMantis == null) + { + throw new ArgumentNullException("sendToMantis"); + } + + if (processImageHandler == null) + { + throw new ArgumentNullException("processImageHandler"); + } + + if (filePath == null) + { + throw new ArgumentNullException("filePath"); + } + + this.processImageHandler = processImageHandler; + this.filePath = filePath; + this.sendToMantis = sendToMantis; + + InitializeComponent(); + } + + /// <summary> + /// The file name dot extension that will appear on the View Issue page next to the screen capture. + /// </summary> + private string FileName + { + get + { + return this.fileNameTextBox.Text + ".jpg"; + } + } + + /// <summary> + /// The id of the issue that the screen capture will be attached to. + /// </summary> + private int IssueId + { + get + { + return int.Parse(this.issueIdTextBox.Text.Trim()); + } + } + + /// <summary> + /// The note to add along with attaching the screen capture. If empty, then no note will be added. + /// </summary> + private string Note + { + get + { + return this.noteTextBox.Text.Trim(); + } + } + + /// <summary> + /// Triggered when the issue id text box is modified. It enables/disables controls as appropriate. + /// </summary> + /// <param name="sender">not used</param> + /// <param name="e">not used</param> + private void issueIdTextBox_TextChanged(object sender, EventArgs e) + { + this.EnableControls(); + this.getIssueBackgroundWorker.RunWorkerAsync(); + } + + /// <summary> + /// Triggered when the file name is modified. It enables/disables controls as appropriate. + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void fileNameTextBox_TextChanged(object sender, EventArgs e) + { + this.EnableControls(); + } + + /// <summary> + /// A helper method that is called from events to enable/disable controls based on the data + /// entered by the user. + /// </summary> + private void EnableControls() + { + int issueId; + this.uploadToMantisButton.Enabled = this.fileNameTextBox.Text.Trim().Length > 0 && + this.issueIdTextBox.Text.Trim().Length > 0 && + Int32.TryParse(this.issueIdTextBox.Text, out issueId); + } + + private void uploadToMantisButton_Click(object sender, EventArgs e) + { + this.processImageHandler(this.IssueId, this.filePath, this.FileName, this.Note); + } + + private void getIssueBackgroundWorker_DoWork(object sender, DoWorkEventArgs e) + { + this.issueSummaryTextBox.Text = "Retrieving issue summary..."; + + int issueId; + if (Int32.TryParse(this.issueIdTextBox.Text, out issueId)) + { + e.Result = this.sendToMantis.GetIssueSummary(issueId); + } + else + { + e.Result = "<invalid issue id>"; + } + } + + private void getIssueBackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) + { + this.issueSummaryTextBox.Text = (string)e.Result; + } + } +} \ No newline at end of file Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.resx =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.resx (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.resx 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + ... [truncated message content] |
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. |
From: <vb...@us...> - 2007-10-20 22:06:23
|
Revision: 144 http://mantisconnect.svn.sourceforge.net/mantisconnect/?rev=144&view=rev Author: vboctor Date: 2007-10-20 15:06:19 -0700 (Sat, 20 Oct 2007) Log Message: ----------- Fixed #350: Replace MantisEnum.Labels with MantisEnum.GetLabels() + several other enhancements Modified Paths: -------------- mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.cs mantisconnect/trunk/clients/dotnet/UnitTests/RetrieveEnums.cs mantisconnect/trunk/clients/dotnet/mantisconnect/Enumeration.cs Modified: mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.cs 2007-10-20 21:09:23 UTC (rev 143) +++ mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.cs 2007-10-20 22:06:19 UTC (rev 144) @@ -425,9 +425,9 @@ projectComboBox.SelectedIndex = 0; PopulateProjectDependentFields(); - priorityComboBox.DataSource = session.Config.PriorityEnum.Labels; - severityComboBox.DataSource = session.Config.SeverityEnum.Labels; - reproducibilityComboBox.DataSource = session.Config.ReproducibilityEnum.Labels; + priorityComboBox.DataSource = session.Config.PriorityEnum.GetLabels(); + severityComboBox.DataSource = session.Config.SeverityEnum.GetLabels(); + reproducibilityComboBox.DataSource = session.Config.ReproducibilityEnum.GetLabels(); } catch( Exception ex ) { Modified: mantisconnect/trunk/clients/dotnet/UnitTests/RetrieveEnums.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/UnitTests/RetrieveEnums.cs 2007-10-20 21:09:23 UTC (rev 143) +++ mantisconnect/trunk/clients/dotnet/UnitTests/RetrieveEnums.cs 2007-10-20 22:06:19 UTC (rev 144) @@ -11,6 +11,7 @@ #endregion using System; +using System.Collections.Generic; using System.Net; using System.Web.Services.Protocols; @@ -39,7 +40,7 @@ public void StatusEnum() { MantisEnum statusEnum = Session.Config.StatusEnum; - Assert.IsTrue( statusEnum.Labels.Length > 0 ); + Assert.IsTrue( statusEnum.Count > 0 ); WriteEnum( "Status", statusEnum ); } @@ -47,7 +48,7 @@ public void PriorityEnum() { MantisEnum priorityEnum = Session.Config.PriorityEnum; - Assert.IsTrue( priorityEnum.Labels.Length > 0 ); + Assert.IsTrue( priorityEnum.Count > 0 ); WriteEnum( "Priority", priorityEnum ); } @@ -55,7 +56,7 @@ public void SeverityEnum() { MantisEnum severityEnum = Session.Config.SeverityEnum; - Assert.IsTrue( severityEnum.Labels.Length > 0 ); + Assert.IsTrue( severityEnum.Count > 0 ); WriteEnum( "Severity", severityEnum ); } @@ -63,7 +64,7 @@ public void ProjectionEnum() { MantisEnum projectionEnum = Session.Config.ProjectionEnum; - Assert.IsTrue( projectionEnum.Labels.Length > 0 ); + Assert.IsTrue( projectionEnum.Count > 0 ); WriteEnum( "Projection", projectionEnum ); } @@ -71,7 +72,7 @@ public void EtaEnum() { MantisEnum etaEnum = Session.Config.EtaEnum; - Assert.IsTrue( etaEnum.Labels.Length > 0 ); + Assert.IsTrue( etaEnum.Count > 0 ); WriteEnum( "Eta", etaEnum ); } @@ -79,7 +80,7 @@ public void ReproducibilityEnum() { MantisEnum reproducibilityEnum = Session.Config.ReproducibilityEnum; - Assert.IsTrue( reproducibilityEnum.Labels.Length > 0 ); + Assert.IsTrue( reproducibilityEnum.Count > 0 ); WriteEnum( "Reproducibility", reproducibilityEnum ); } @@ -87,7 +88,7 @@ public void AccessLevelEnum() { MantisEnum accessLevelEnum = Session.Config.AccessLevelEnum; - Assert.IsTrue( accessLevelEnum.Labels.Length > 0 ); + Assert.IsTrue( accessLevelEnum.Count > 0 ); WriteEnum( "AccessLevel", accessLevelEnum ); } @@ -95,7 +96,7 @@ public void ResolutionEnum() { MantisEnum resolutionEnum = Session.Config.ResolutionEnum; - Assert.IsTrue( resolutionEnum.Labels.Length > 0 ); + Assert.IsTrue( resolutionEnum.Count > 0 ); WriteEnum( "Resolution", resolutionEnum ); } @@ -103,7 +104,7 @@ public void ViewStateEnum() { MantisEnum viewStateEnum = Session.Config.ViewStateEnum; - Assert.IsTrue( viewStateEnum.Labels.Length > 0 ); + Assert.IsTrue( viewStateEnum.Count > 0 ); WriteEnum( "ViewState", viewStateEnum ); } @@ -112,10 +113,12 @@ Console.WriteLine(); Console.WriteLine( enumType ); - string[] labels = mantisEnum.Labels; - - foreach( string label in labels ) - Console.WriteLine( label ); + ICollection<string> labels = mantisEnum.GetLabels(); + + foreach (string label in labels) + { + Console.WriteLine(label); + } } } } Modified: mantisconnect/trunk/clients/dotnet/mantisconnect/Enumeration.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/mantisconnect/Enumeration.cs 2007-10-20 21:09:23 UTC (rev 143) +++ mantisconnect/trunk/clients/dotnet/mantisconnect/Enumeration.cs 2007-10-20 22:06:19 UTC (rev 144) @@ -1,4 +1,4 @@ -#region Copyright \xA9 2004 Victor Boctor +#region Copyright \xA9 2004-2007 Victor Boctor // // MantisConnect is copyrighted to Victor Boctor // @@ -11,7 +11,8 @@ #endregion using System; -using System.Collections; +using System.Collections.Generic; +using System.Globalization; namespace Futureware.MantisConnect { @@ -25,33 +26,90 @@ public sealed class MantisEnum { /// <summary> + /// The enumeration string supplied at construction time. + /// </summary> + private readonly string enumeration; + + /// <summary> + /// A dictionary that maps labels to their corresponding code. + /// </summary> + private Dictionary<string, int> labelToCodeMap; + + /// <summary> + /// A dictionary that maps codes to their corresponding labels. + /// </summary> + private Dictionary<int, string> codeToLabelMap; + + /// <summary> /// Constructor /// </summary> /// <param name="enumeration">Enumeration string to work with.</param> - public MantisEnum( string enumeration ) + public MantisEnum(string enumeration) { + if (String.IsNullOrEmpty(enumeration)) + { + throw new ArgumentNullException(enumeration); + } + this.enumeration = enumeration; + + string[] entries = enumeration.Split(','); + + this.labelToCodeMap = new Dictionary<string, int>(entries.Length); + this.codeToLabelMap = new Dictionary<int, string>(entries.Length); + + int code; + string label; + + foreach (string entry in entries) + { + string[] details = entry.Split(':'); + if (details.Length != 2) + { + throw new FormatException(String.Format(CultureInfo.InvariantCulture, "Invalid enumeration '{0}'.", enumeration)); + } + + if (!Int32.TryParse(details[0].Trim(), out code)) + { + throw new FormatException(String.Format(CultureInfo.InvariantCulture, "Invalid code '{0}' in enumeration '{1}'.", details[0], enumeration)); + } + + label = details[1].Trim(); + if (label.Length == 0) + { + throw new FormatException(String.Format(CultureInfo.InvariantCulture, "Code '{0}' has an empty label in enumeration '{1}'", code, enumeration)); + } + + if (this.labelToCodeMap.ContainsKey(label)) + { + throw new FormatException(String.Format(CultureInfo.InvariantCulture, "Label '{0}' exists more than once in enumeration '{1}'", label, enumeration)); + } + + if (this.codeToLabelMap.ContainsKey(code)) + { + throw new FormatException(String.Format(CultureInfo.InvariantCulture, "Code '{0}' exists more than once in enumeration '{1}'", code, enumeration)); + } + + this.labelToCodeMap[label] = code; + this.codeToLabelMap[code] = label; + } } /// <summary> /// Given an id, this indexer returns the corresponding enumeration name. /// </summary> /// <param name="id">The enumeration value id.</param> - public string this [int id] + /// <returns>The enumeration label.</returns> + public string this[int id] { get { - string[] entries = enumeration.Split( ',' ); - - foreach ( string entry in entries ) + if (this.codeToLabelMap.ContainsKey(id)) { - string[] details = entry.Split( ':' ); - - if ( details[0] == id.ToString() ) - return details[1]; + return this.codeToLabelMap[id]; } - return string.Format( "@{0}@", id ); + return string.Format(CultureInfo.InvariantCulture, "@{0}@", id); } } @@ -59,18 +117,14 @@ /// Given a name, this indexer returns the corresponding enumeration id. /// </summary> /// <param name="name">The enumeration value name.</param> + /// <returns>The enumeration code.</returns> public int this [string name] { get { - string[] entries = enumeration.Split( ',' ); - - foreach ( string entry in entries ) + if (this.labelToCodeMap.ContainsKey(name)) { - string[] details = entry.Split( ':' ); - - if ( details[1] == name ) - return Convert.ToInt32( details[0] ); + return this.labelToCodeMap[name]; } return 0; @@ -78,32 +132,49 @@ } /// <summary> - /// Returns an array of strings containing the labels in the enumerations. + /// The number of values in the enumeration. /// </summary> - /// <value>Array of enumeration labels.</value> - public string[] Labels + public int Count { - get - { - string[] entries = enumeration.Split( ',' ); + get { return this.labelToCodeMap.Count; } + } - string[] labels = new string[ entries.Length ]; + /// <summary> + /// Returns a collection containing the labels in the enumeration. + /// </summary> + /// <returns>A collection of the labels.</returns> + public ICollection<string> GetLabels() + { + Dictionary<string, int>.KeyCollection keys = this.labelToCodeMap.Keys; - int i = 0; - foreach ( string entry in entries ) - { - string[] details = entry.Split( ':' ); - labels[i] = details[1]; - ++i; - } - - return labels; + string[] labels = new string[keys.Count]; + + int i = 0; + foreach ( string label in keys ) + { + labels[i++] = label; } + + return labels; } /// <summary> - /// The enumeration string supplied at construction time. + /// Returns a collection containing the codes in the enumeration. /// </summary> - private readonly string enumeration; + /// <returns>A collection of the codes.</returns> + public ICollection<int> GetCodes() + { + Dictionary<int, string>.KeyCollection keys = this.codeToLabelMap.Keys; + + int[] codes = new int[keys.Count]; + + int i = 0; + foreach (int code in keys) + { + codes[i++] = code; + } + + return codes; + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vb...@us...> - 2007-11-01 15:40:50
|
Revision: 146 http://mantisconnect.svn.sourceforge.net/mantisconnect/?rev=146&view=rev Author: vboctor Date: 2007-11-01 08:40:48 -0700 (Thu, 01 Nov 2007) Log Message: ----------- 1. Some unit test fixes. 2. When sending data to webservice, set the date submitted and last updated. Mantis can then override them as necessary. Modified Paths: -------------- mantisconnect/trunk/clients/dotnet/UnitTests/BaseTestFixture.cs mantisconnect/trunk/clients/dotnet/UnitTests/ProjectVersions.cs mantisconnect/trunk/clients/dotnet/mantisconnect/Issue.cs Modified: mantisconnect/trunk/clients/dotnet/UnitTests/BaseTestFixture.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/UnitTests/BaseTestFixture.cs 2007-10-20 23:09:12 UTC (rev 145) +++ mantisconnect/trunk/clients/dotnet/UnitTests/BaseTestFixture.cs 2007-11-01 15:40:48 UTC (rev 146) @@ -34,7 +34,7 @@ protected string Url { - get { return "http://localhost:8008/mantisbt/mc/mantisconnect.php"; } + get { return "http://localhost:8008/mantisbt/api/soap/mantisconnect.php"; } } protected void Connect() Modified: mantisconnect/trunk/clients/dotnet/UnitTests/ProjectVersions.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/UnitTests/ProjectVersions.cs 2007-10-20 23:09:12 UTC (rev 145) +++ mantisconnect/trunk/clients/dotnet/UnitTests/ProjectVersions.cs 2007-11-01 15:40:48 UTC (rev 146) @@ -179,7 +179,7 @@ { const string VersionName = "VersionName"; const string VersionDescription = "VersionDescription"; - DateTime now = DateTime.Now; + DateTime now = DateTime.Today; // Use today to avoid approximation errors ProjectVersion version = new ProjectVersion(); version.ProjectId = this.FirstProjectId; @@ -198,11 +198,11 @@ ProjectVersion versionAdded = GetProjectVersionById(versionId); - Assert.AreEqual(versionAdded.Id, versionId); - Assert.AreEqual(versionAdded.Name, VersionName); - Assert.AreEqual(versionAdded.Description, VersionDescription); - Assert.AreEqual(versionAdded.DateOrder, now); - Assert.AreEqual(versionAdded.IsReleased, released); + Assert.AreEqual(versionId, versionAdded.Id); + Assert.AreEqual(VersionName, versionAdded.Name); + Assert.AreEqual(VersionDescription, versionAdded.Description); + Assert.AreEqual(now, versionAdded.DateOrder); + Assert.AreEqual(released, versionAdded.IsReleased); } finally { Modified: mantisconnect/trunk/clients/dotnet/mantisconnect/Issue.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/mantisconnect/Issue.cs 2007-10-20 23:09:12 UTC (rev 145) +++ mantisconnect/trunk/clients/dotnet/mantisconnect/Issue.cs 2007-11-01 15:40:48 UTC (rev 146) @@ -100,10 +100,12 @@ issueData.status = this.Status.ToWebservice(); issueData.reporter = this.ReportedBy.ToWebservice(); issueData.handler = this.AssignedTo == null ? null : this.AssignedTo.ToWebservice(); + issueData.date_submitted = this.dateSubmitted; + issueData.last_updated = this.lastUpdated; - issueData.notes = IssueNote.ConvertArrayToWebservice( this.Notes ); + issueData.notes = IssueNote.ConvertArrayToWebservice( this.Notes ); - // TODO: Attachments + // TODO: Attachments // TODO: Relationships return issueData; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |