mirror of
https://github.com/danog/informatica.git
synced 2024-12-04 10:27:46 +01:00
Added visual studio exercises
This commit is contained in:
parent
454b6b4357
commit
6004eed6b6
6
visual/ambo/App.config
Normal file
6
visual/ambo/App.config
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
</configuration>
|
58
visual/ambo/ConsoleApplication2.csproj
Normal file
58
visual/ambo/ConsoleApplication2.csproj
Normal file
@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{31CD28E0-8790-4ECD-A0AD-4199DDBE6631}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ConsoleApplication2</RootNamespace>
|
||||
<AssemblyName>ConsoleApplication2</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<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' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\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>
|
22
visual/ambo/ConsoleApplication2.sln
Normal file
22
visual/ambo/ConsoleApplication2.sln
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.21005.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApplication2", "ConsoleApplication2.csproj", "{31CD28E0-8790-4ECD-A0AD-4199DDBE6631}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{31CD28E0-8790-4ECD-A0AD-4199DDBE6631}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{31CD28E0-8790-4ECD-A0AD-4199DDBE6631}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{31CD28E0-8790-4ECD-A0AD-4199DDBE6631}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{31CD28E0-8790-4ECD-A0AD-4199DDBE6631}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
BIN
visual/ambo/ConsoleApplication2.v12.suo
Normal file
BIN
visual/ambo/ConsoleApplication2.v12.suo
Normal file
Binary file not shown.
81
visual/ambo/Program.cs
Normal file
81
visual/ambo/Program.cs
Normal file
@ -0,0 +1,81 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ConsoleApplication2
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Random numeroCasuale = new Random();
|
||||
Random cittaCasuale = new Random();
|
||||
int citta = cittaCasuale.Next(0, 12);
|
||||
int cur;
|
||||
int count = 0;
|
||||
List<int> nums = new List<int>();
|
||||
//bool fine = false;
|
||||
// Match the regular expression pattern against a text string.
|
||||
//byte i = 1;
|
||||
//for (byte i = 1; fine;)
|
||||
//for (; i <= 5; i++)
|
||||
bool result = false;
|
||||
|
||||
int[] ins = new int[6];
|
||||
string[] names = new string[11] { "Bari", "Cagliari", "Firenze", "Genova", "Milano", "Napoli", "Palermo", "Roma", "Torino", "Venezia", "Nazionale" };
|
||||
for (byte t = 1; t <= 5; t++)
|
||||
{
|
||||
while ((ins[t] <= 0 || ins[t] > 90) || result == false)
|
||||
{
|
||||
Console.Write("Inserire il " + t + "^ numero della ruota di " + names[citta] + ": ");
|
||||
result = int.TryParse(Console.ReadLine(), out ins[t]);
|
||||
};
|
||||
}
|
||||
for (byte i = 1; i <= 5; i++)
|
||||
{
|
||||
cur = numeroCasuale.Next(0, 91);
|
||||
while (nums.Contains(cur))
|
||||
{
|
||||
cur = numeroCasuale.Next(0, 91);
|
||||
}
|
||||
|
||||
nums.Add(cur);
|
||||
Console.WriteLine(names[citta] + ": " + cur);
|
||||
if (ins[i] == cur)
|
||||
{
|
||||
count++;
|
||||
}
|
||||
//i++;
|
||||
//fine = i <= 5;
|
||||
}
|
||||
switch (count)
|
||||
{
|
||||
|
||||
case 2:
|
||||
Console.WriteLine("Congratulazioni! Avete fatto ambo!");
|
||||
break;
|
||||
default:
|
||||
Console.WriteLine("Mi dispiace, non avete fatto ambo.");
|
||||
break;
|
||||
|
||||
}
|
||||
//Console.WriteLine(n);
|
||||
Console.Read();
|
||||
/*
|
||||
Bari
|
||||
Cagliari
|
||||
Firenze
|
||||
Genova
|
||||
Milano
|
||||
Napoli
|
||||
Palermo
|
||||
Roma
|
||||
Torino
|
||||
Venezia
|
||||
Nazionale
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
36
visual/ambo/Properties/AssemblyInfo.cs
Normal file
36
visual/ambo/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
||||
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("ConsoleApplication2")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("ConsoleApplication2")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[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("aa61b641-062a-42c5-8dc8-a519513dc3f7")]
|
||||
|
||||
// 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 Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
BIN
visual/ambo/bin/Debug/ConsoleApplication2.exe
Normal file
BIN
visual/ambo/bin/Debug/ConsoleApplication2.exe
Normal file
Binary file not shown.
6
visual/ambo/bin/Debug/ConsoleApplication2.exe.config
Normal file
6
visual/ambo/bin/Debug/ConsoleApplication2.exe.config
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
</configuration>
|
BIN
visual/ambo/bin/Debug/ConsoleApplication2.pdb
Normal file
BIN
visual/ambo/bin/Debug/ConsoleApplication2.pdb
Normal file
Binary file not shown.
BIN
visual/ambo/bin/Debug/ConsoleApplication2.vshost.exe
Normal file
BIN
visual/ambo/bin/Debug/ConsoleApplication2.vshost.exe
Normal file
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
</configuration>
|
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
@ -0,0 +1,21 @@
|
||||
C:\Users\Studente\Desktop\ConsoleApplication2\bin\Debug\ConsoleApplication2.exe.config
|
||||
C:\Users\Studente\Desktop\ConsoleApplication2\bin\Debug\ConsoleApplication2.exe
|
||||
C:\Users\Studente\Desktop\ConsoleApplication2\bin\Debug\ConsoleApplication2.pdb
|
||||
C:\Users\Studente\Desktop\ConsoleApplication2\obj\Debug\ConsoleApplication2.csprojResolveAssemblyReference.cache
|
||||
C:\Users\Studente\Desktop\ConsoleApplication2\obj\Debug\ConsoleApplication2.exe
|
||||
C:\Users\Studente\Desktop\ConsoleApplication2\obj\Debug\ConsoleApplication2.pdb
|
||||
C:\Users\Daniil\Desktop\ConsoleApplication2\bin\Debug\ConsoleApplication2.exe.config
|
||||
C:\Users\Daniil\Desktop\ConsoleApplication2\obj\Debug\ConsoleApplication2.exe
|
||||
C:\Users\Daniil\Desktop\ConsoleApplication2\obj\Debug\ConsoleApplication2.pdb
|
||||
C:\Users\Daniil\Documents\visual\duplicate_check\bin\Debug\ConsoleApplication2.exe.config
|
||||
C:\Users\Daniil\Documents\visual\duplicate_check\obj\Debug\ConsoleApplication2.exe
|
||||
C:\Users\Daniil\Documents\visual\duplicate_check\obj\Debug\ConsoleApplication2.pdb
|
||||
C:\Users\Daniil\Documents\visual\duplicate_check\bin\Debug\ConsoleApplication2.exe
|
||||
C:\Users\Daniil\Documents\visual\duplicate_check\bin\Debug\ConsoleApplication2.pdb
|
||||
C:\Users\Daniil\Documents\visual\duplicate_check\obj\Debug\ConsoleApplication2.csprojResolveAssemblyReference.cache
|
||||
C:\Users\Daniil\Documents\visual\ambo\bin\Debug\ConsoleApplication2.exe.config
|
||||
C:\Users\Daniil\Documents\visual\ambo\obj\Debug\ConsoleApplication2.exe
|
||||
C:\Users\Daniil\Documents\visual\ambo\obj\Debug\ConsoleApplication2.pdb
|
||||
C:\Users\Daniil\Documents\visual\ambo\bin\Debug\ConsoleApplication2.exe
|
||||
C:\Users\Daniil\Documents\visual\ambo\bin\Debug\ConsoleApplication2.pdb
|
||||
C:\Users\Daniil\Documents\visual\ambo\obj\Debug\ConsoleApplication2.csprojResolveAssemblyReference.cache
|
Binary file not shown.
BIN
visual/ambo/obj/Debug/ConsoleApplication2.exe
Normal file
BIN
visual/ambo/obj/Debug/ConsoleApplication2.exe
Normal file
Binary file not shown.
BIN
visual/ambo/obj/Debug/ConsoleApplication2.pdb
Normal file
BIN
visual/ambo/obj/Debug/ConsoleApplication2.pdb
Normal file
Binary file not shown.
Binary file not shown.
6
visual/duplicate_check/App.config
Normal file
6
visual/duplicate_check/App.config
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
</configuration>
|
58
visual/duplicate_check/ConsoleApplication2.csproj
Normal file
58
visual/duplicate_check/ConsoleApplication2.csproj
Normal file
@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{31CD28E0-8790-4ECD-A0AD-4199DDBE6631}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ConsoleApplication2</RootNamespace>
|
||||
<AssemblyName>ConsoleApplication2</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<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' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\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>
|
22
visual/duplicate_check/ConsoleApplication2.sln
Normal file
22
visual/duplicate_check/ConsoleApplication2.sln
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.21005.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApplication2", "ConsoleApplication2.csproj", "{31CD28E0-8790-4ECD-A0AD-4199DDBE6631}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{31CD28E0-8790-4ECD-A0AD-4199DDBE6631}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{31CD28E0-8790-4ECD-A0AD-4199DDBE6631}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{31CD28E0-8790-4ECD-A0AD-4199DDBE6631}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{31CD28E0-8790-4ECD-A0AD-4199DDBE6631}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
BIN
visual/duplicate_check/ConsoleApplication2.v12.suo
Normal file
BIN
visual/duplicate_check/ConsoleApplication2.v12.suo
Normal file
Binary file not shown.
56
visual/duplicate_check/Program.cs
Normal file
56
visual/duplicate_check/Program.cs
Normal file
@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ConsoleApplication2
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Random numeroCasuale = new Random();
|
||||
Random cittaCasuale = new Random();
|
||||
int citta = cittaCasuale.Next(0, 12);
|
||||
int cur;
|
||||
List<int> nums = new List<int>();
|
||||
//bool fine = false;
|
||||
// Match the regular expression pattern against a text string.
|
||||
//byte i = 1;
|
||||
//for (byte i = 1; fine;)
|
||||
//for (; i <= 5; i++)
|
||||
|
||||
string[] names = new string[11] { "Bari", "Cagliari", "Firenze", "Genova", "Milano", "Napoli", "Palermo", "Roma", "Torino", "Venezia", "Nazionale" };
|
||||
|
||||
for (byte i = 1; i <= 5; i++)
|
||||
{
|
||||
cur = numeroCasuale.Next(0, 91);
|
||||
while (nums.Contains(cur))
|
||||
{
|
||||
cur = numeroCasuale.Next(0, 91);
|
||||
}
|
||||
|
||||
nums.Add(cur);
|
||||
Console.WriteLine(names[citta] + ": " + cur);
|
||||
//i++;
|
||||
//fine = i <= 5;
|
||||
}
|
||||
//Console.WriteLine(n);
|
||||
Console.Read();
|
||||
/*
|
||||
Bari
|
||||
Cagliari
|
||||
Firenze
|
||||
Genova
|
||||
Milano
|
||||
Napoli
|
||||
Palermo
|
||||
Roma
|
||||
Torino
|
||||
Venezia
|
||||
Nazionale
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
36
visual/duplicate_check/Properties/AssemblyInfo.cs
Normal file
36
visual/duplicate_check/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
||||
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("ConsoleApplication2")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("ConsoleApplication2")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[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("aa61b641-062a-42c5-8dc8-a519513dc3f7")]
|
||||
|
||||
// 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 Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
BIN
visual/duplicate_check/bin/Debug/ConsoleApplication2.exe
Normal file
BIN
visual/duplicate_check/bin/Debug/ConsoleApplication2.exe
Normal file
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
</configuration>
|
BIN
visual/duplicate_check/bin/Debug/ConsoleApplication2.pdb
Normal file
BIN
visual/duplicate_check/bin/Debug/ConsoleApplication2.pdb
Normal file
Binary file not shown.
BIN
visual/duplicate_check/bin/Debug/ConsoleApplication2.vshost.exe
Normal file
BIN
visual/duplicate_check/bin/Debug/ConsoleApplication2.vshost.exe
Normal file
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
</configuration>
|
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
@ -0,0 +1,15 @@
|
||||
C:\Users\Studente\Desktop\ConsoleApplication2\bin\Debug\ConsoleApplication2.exe.config
|
||||
C:\Users\Studente\Desktop\ConsoleApplication2\bin\Debug\ConsoleApplication2.exe
|
||||
C:\Users\Studente\Desktop\ConsoleApplication2\bin\Debug\ConsoleApplication2.pdb
|
||||
C:\Users\Studente\Desktop\ConsoleApplication2\obj\Debug\ConsoleApplication2.csprojResolveAssemblyReference.cache
|
||||
C:\Users\Studente\Desktop\ConsoleApplication2\obj\Debug\ConsoleApplication2.exe
|
||||
C:\Users\Studente\Desktop\ConsoleApplication2\obj\Debug\ConsoleApplication2.pdb
|
||||
C:\Users\Daniil\Desktop\ConsoleApplication2\bin\Debug\ConsoleApplication2.exe.config
|
||||
C:\Users\Daniil\Desktop\ConsoleApplication2\obj\Debug\ConsoleApplication2.exe
|
||||
C:\Users\Daniil\Desktop\ConsoleApplication2\obj\Debug\ConsoleApplication2.pdb
|
||||
C:\Users\Daniil\Documents\visual\duplicate_check\bin\Debug\ConsoleApplication2.exe.config
|
||||
C:\Users\Daniil\Documents\visual\duplicate_check\obj\Debug\ConsoleApplication2.exe
|
||||
C:\Users\Daniil\Documents\visual\duplicate_check\obj\Debug\ConsoleApplication2.pdb
|
||||
C:\Users\Daniil\Documents\visual\duplicate_check\bin\Debug\ConsoleApplication2.exe
|
||||
C:\Users\Daniil\Documents\visual\duplicate_check\bin\Debug\ConsoleApplication2.pdb
|
||||
C:\Users\Daniil\Documents\visual\duplicate_check\obj\Debug\ConsoleApplication2.csprojResolveAssemblyReference.cache
|
Binary file not shown.
BIN
visual/duplicate_check/obj/Debug/ConsoleApplication2.exe
Normal file
BIN
visual/duplicate_check/obj/Debug/ConsoleApplication2.exe
Normal file
Binary file not shown.
BIN
visual/duplicate_check/obj/Debug/ConsoleApplication2.pdb
Normal file
BIN
visual/duplicate_check/obj/Debug/ConsoleApplication2.pdb
Normal file
Binary file not shown.
Binary file not shown.
6
visual/multi/App.config
Normal file
6
visual/multi/App.config
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
</configuration>
|
58
visual/multi/ConsoleApplication2.csproj
Normal file
58
visual/multi/ConsoleApplication2.csproj
Normal file
@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{31CD28E0-8790-4ECD-A0AD-4199DDBE6631}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ConsoleApplication2</RootNamespace>
|
||||
<AssemblyName>ConsoleApplication2</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<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' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\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>
|
22
visual/multi/ConsoleApplication2.sln
Normal file
22
visual/multi/ConsoleApplication2.sln
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.21005.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApplication2", "ConsoleApplication2.csproj", "{31CD28E0-8790-4ECD-A0AD-4199DDBE6631}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{31CD28E0-8790-4ECD-A0AD-4199DDBE6631}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{31CD28E0-8790-4ECD-A0AD-4199DDBE6631}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{31CD28E0-8790-4ECD-A0AD-4199DDBE6631}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{31CD28E0-8790-4ECD-A0AD-4199DDBE6631}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
BIN
visual/multi/ConsoleApplication2.v12.suo
Normal file
BIN
visual/multi/ConsoleApplication2.v12.suo
Normal file
Binary file not shown.
89
visual/multi/Program.cs
Normal file
89
visual/multi/Program.cs
Normal file
@ -0,0 +1,89 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ConsoleApplication2
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Random numeroCasuale = new Random();
|
||||
Random cittaCasuale = new Random();
|
||||
int citta = cittaCasuale.Next(0, 12);
|
||||
int cur;
|
||||
int count = 0;
|
||||
List<int> nums = new List<int>();
|
||||
//bool fine = false;
|
||||
// Match the regular expression pattern against a text string.
|
||||
//byte i = 1;
|
||||
//for (byte i = 1; fine;)
|
||||
//for (; i <= 5; i++)
|
||||
bool result = false;
|
||||
int[] ins = new int[6];
|
||||
string[] names = new string[11] { "Bari", "Cagliari", "Firenze", "Genova", "Milano", "Napoli", "Palermo", "Roma", "Torino", "Venezia", "Nazionale" };
|
||||
for (byte t = 1; t <= 5; t++)
|
||||
{
|
||||
while ((ins[t] <= 0 || ins[t] > 90) || result == false )
|
||||
{
|
||||
Console.Write("Inserire il " + t + "^ numero della ruota di " + names[citta] + ": ");
|
||||
result = int.TryParse(Console.ReadLine(), out ins[t]);
|
||||
};
|
||||
}
|
||||
for (byte i = 1; i <= 5; i++)
|
||||
{
|
||||
cur = numeroCasuale.Next(0, 91);
|
||||
while (nums.Contains(cur))
|
||||
{
|
||||
cur = numeroCasuale.Next(0, 91);
|
||||
}
|
||||
|
||||
nums.Add(cur);
|
||||
Console.WriteLine(names[citta] + ": " + cur);
|
||||
if (ins[i] == cur)
|
||||
{
|
||||
count++;
|
||||
}
|
||||
//i++;
|
||||
//fine = i <= 5;
|
||||
}
|
||||
switch (count)
|
||||
{
|
||||
|
||||
case 2:
|
||||
Console.WriteLine("Congratulazioni! Avete fatto ambo!");
|
||||
break;
|
||||
case 3:
|
||||
Console.WriteLine("Congratulazioni! Avete fatto una terzina!");
|
||||
break;
|
||||
case 4:
|
||||
Console.WriteLine("Congratulazioni! Avete fatto una quartina!");
|
||||
break;
|
||||
case 5:
|
||||
Console.WriteLine("Congratulazioni! Avete fatto una quintina!");
|
||||
break;
|
||||
default:
|
||||
Console.WriteLine("Mi dispiace, non avete indovinato.");
|
||||
break;
|
||||
|
||||
}
|
||||
//Console.WriteLine(n);
|
||||
Console.Read();
|
||||
/*
|
||||
Bari
|
||||
Cagliari
|
||||
Firenze
|
||||
Genova
|
||||
Milano
|
||||
Napoli
|
||||
Palermo
|
||||
Roma
|
||||
Torino
|
||||
Venezia
|
||||
Nazionale
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
36
visual/multi/Properties/AssemblyInfo.cs
Normal file
36
visual/multi/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
||||
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("ConsoleApplication2")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("ConsoleApplication2")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[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("aa61b641-062a-42c5-8dc8-a519513dc3f7")]
|
||||
|
||||
// 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 Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
BIN
visual/multi/bin/Debug/ConsoleApplication2.exe
Normal file
BIN
visual/multi/bin/Debug/ConsoleApplication2.exe
Normal file
Binary file not shown.
6
visual/multi/bin/Debug/ConsoleApplication2.exe.config
Normal file
6
visual/multi/bin/Debug/ConsoleApplication2.exe.config
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
</configuration>
|
BIN
visual/multi/bin/Debug/ConsoleApplication2.pdb
Normal file
BIN
visual/multi/bin/Debug/ConsoleApplication2.pdb
Normal file
Binary file not shown.
BIN
visual/multi/bin/Debug/ConsoleApplication2.vshost.exe
Normal file
BIN
visual/multi/bin/Debug/ConsoleApplication2.vshost.exe
Normal file
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
</configuration>
|
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
@ -0,0 +1,27 @@
|
||||
C:\Users\Studente\Desktop\ConsoleApplication2\bin\Debug\ConsoleApplication2.exe.config
|
||||
C:\Users\Studente\Desktop\ConsoleApplication2\bin\Debug\ConsoleApplication2.exe
|
||||
C:\Users\Studente\Desktop\ConsoleApplication2\bin\Debug\ConsoleApplication2.pdb
|
||||
C:\Users\Studente\Desktop\ConsoleApplication2\obj\Debug\ConsoleApplication2.csprojResolveAssemblyReference.cache
|
||||
C:\Users\Studente\Desktop\ConsoleApplication2\obj\Debug\ConsoleApplication2.exe
|
||||
C:\Users\Studente\Desktop\ConsoleApplication2\obj\Debug\ConsoleApplication2.pdb
|
||||
C:\Users\Daniil\Desktop\ConsoleApplication2\bin\Debug\ConsoleApplication2.exe.config
|
||||
C:\Users\Daniil\Desktop\ConsoleApplication2\obj\Debug\ConsoleApplication2.exe
|
||||
C:\Users\Daniil\Desktop\ConsoleApplication2\obj\Debug\ConsoleApplication2.pdb
|
||||
C:\Users\Daniil\Documents\visual\duplicate_check\bin\Debug\ConsoleApplication2.exe.config
|
||||
C:\Users\Daniil\Documents\visual\duplicate_check\obj\Debug\ConsoleApplication2.exe
|
||||
C:\Users\Daniil\Documents\visual\duplicate_check\obj\Debug\ConsoleApplication2.pdb
|
||||
C:\Users\Daniil\Documents\visual\duplicate_check\bin\Debug\ConsoleApplication2.exe
|
||||
C:\Users\Daniil\Documents\visual\duplicate_check\bin\Debug\ConsoleApplication2.pdb
|
||||
C:\Users\Daniil\Documents\visual\duplicate_check\obj\Debug\ConsoleApplication2.csprojResolveAssemblyReference.cache
|
||||
C:\Users\Daniil\Documents\visual\ambo\bin\Debug\ConsoleApplication2.exe.config
|
||||
C:\Users\Daniil\Documents\visual\ambo\obj\Debug\ConsoleApplication2.exe
|
||||
C:\Users\Daniil\Documents\visual\ambo\obj\Debug\ConsoleApplication2.pdb
|
||||
C:\Users\Daniil\Documents\visual\ambo\bin\Debug\ConsoleApplication2.exe
|
||||
C:\Users\Daniil\Documents\visual\ambo\bin\Debug\ConsoleApplication2.pdb
|
||||
C:\Users\Daniil\Documents\visual\ambo\obj\Debug\ConsoleApplication2.csprojResolveAssemblyReference.cache
|
||||
C:\Users\Daniil\Documents\visual\multi\bin\Debug\ConsoleApplication2.exe.config
|
||||
C:\Users\Daniil\Documents\visual\multi\obj\Debug\ConsoleApplication2.exe
|
||||
C:\Users\Daniil\Documents\visual\multi\obj\Debug\ConsoleApplication2.pdb
|
||||
C:\Users\Daniil\Documents\visual\multi\bin\Debug\ConsoleApplication2.exe
|
||||
C:\Users\Daniil\Documents\visual\multi\bin\Debug\ConsoleApplication2.pdb
|
||||
C:\Users\Daniil\Documents\visual\multi\obj\Debug\ConsoleApplication2.csprojResolveAssemblyReference.cache
|
Binary file not shown.
BIN
visual/multi/obj/Debug/ConsoleApplication2.exe
Normal file
BIN
visual/multi/obj/Debug/ConsoleApplication2.exe
Normal file
Binary file not shown.
BIN
visual/multi/obj/Debug/ConsoleApplication2.pdb
Normal file
BIN
visual/multi/obj/Debug/ConsoleApplication2.pdb
Normal file
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user