init
58
ApplicationCrèche 1.sln
Normal file
@ -0,0 +1,58 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ApplicationCrèche 1", "ApplicationCrèche 1\ApplicationCrèche 1.vbproj", "{B4F616BE-465C-48AC-85E6-672DA34168F3}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{07793840-34C0-4C10-80B4-522B7746CF01}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
ApplicationCrèche 1.vsmdi = ApplicationCrèche 1.vsmdi
|
||||
Database\Crib.mdf = Database\Crib.mdf
|
||||
Database\Crib_log.LDF = Database\Crib_log.LDF
|
||||
Local.testsettings = Local.testsettings
|
||||
TraceAndTestImpact.testsettings = TraceAndTestImpact.testsettings
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "TestProjectCreche", "TestProjectCreche\TestProjectCreche.vbproj", "{9ECEEE15-A011-4654-AA8D-28E3889EB563}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B4F616BE-465C-48AC-85E6-672DA34168F3}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{B4F616BE-465C-48AC-85E6-672DA34168F3}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{B4F616BE-465C-48AC-85E6-672DA34168F3}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{B4F616BE-465C-48AC-85E6-672DA34168F3}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{B4F616BE-465C-48AC-85E6-672DA34168F3}.Debug|x86.Build.0 = Debug|x86
|
||||
{B4F616BE-465C-48AC-85E6-672DA34168F3}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{B4F616BE-465C-48AC-85E6-672DA34168F3}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{B4F616BE-465C-48AC-85E6-672DA34168F3}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{B4F616BE-465C-48AC-85E6-672DA34168F3}.Release|x86.ActiveCfg = Release|x86
|
||||
{B4F616BE-465C-48AC-85E6-672DA34168F3}.Release|x86.Build.0 = Release|x86
|
||||
{9ECEEE15-A011-4654-AA8D-28E3889EB563}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9ECEEE15-A011-4654-AA8D-28E3889EB563}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9ECEEE15-A011-4654-AA8D-28E3889EB563}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{9ECEEE15-A011-4654-AA8D-28E3889EB563}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{9ECEEE15-A011-4654-AA8D-28E3889EB563}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{9ECEEE15-A011-4654-AA8D-28E3889EB563}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{9ECEEE15-A011-4654-AA8D-28E3889EB563}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9ECEEE15-A011-4654-AA8D-28E3889EB563}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9ECEEE15-A011-4654-AA8D-28E3889EB563}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{9ECEEE15-A011-4654-AA8D-28E3889EB563}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{9ECEEE15-A011-4654-AA8D-28E3889EB563}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{9ECEEE15-A011-4654-AA8D-28E3889EB563}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(TestCaseManagementSettings) = postSolution
|
||||
CategoryFile = ApplicationCrèche 1.vsmdi
|
||||
EndGlobalSection
|
||||
EndGlobal
|
6
ApplicationCrèche 1.vsmdi
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<TestLists xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
|
||||
<TestList name="Listes de tests" id="8c43106b-9dc1-4907-a29f-aa66a61bf5b6">
|
||||
<RunConfiguration id="c75f53d8-a653-4b47-8cb8-3cb38cb8522a" name="Local" storage="local.testsettings" type="Microsoft.VisualStudio.TestTools.Common.TestRunConfiguration, Microsoft.VisualStudio.QualityTools.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
</TestList>
|
||||
</TestLists>
|
9
ApplicationCrèche 1/App.config
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
</configSections>
|
||||
<connectionStrings />
|
||||
<startup>
|
||||
<supportedRuntime version="v2.0.50727" />
|
||||
</startup>
|
||||
</configuration>
|
298
ApplicationCrèche 1/ApplicationCrèche 1.vbproj
Normal file
@ -0,0 +1,298 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>
|
||||
</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{B4F616BE-465C-48AC-85E6-672DA34168F3}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>ApplicationCrèche_1.My.MyApplication</StartupObject>
|
||||
<RootNamespace>ApplicationCrèche_1</RootNamespace>
|
||||
<AssemblyName>ApplicationCrèche 1</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>WindowsForms</MyType>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>ApplicationCrèche 1.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>ApplicationCrèche 1.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.Entity" />
|
||||
<Reference Include="System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Drawing" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Windows.Forms" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Database\CrecheDataSet.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>CrecheDataSet.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DataManager\SQLManager.vb" />
|
||||
<Compile Include="Forms\FormBabySitterID.Designer.vb">
|
||||
<DependentUpon>FormBabySitterID.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\FormBabySitterID.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\FormList.Designer.vb">
|
||||
<DependentUpon>FormList.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\FormList.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\FormChildID.Designer.vb">
|
||||
<DependentUpon>FormChildID.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\FormChildID.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\FormID.Designer.vb">
|
||||
<DependentUpon>FormID.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\FormID.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\FormMain.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\FormMain.Designer.vb">
|
||||
<DependentUpon>FormMain.vb</DependentUpon>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\FormParentID.Designer.vb">
|
||||
<DependentUpon>FormParentID.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\FormParentID.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\SharedRessources.vb" />
|
||||
<Compile Include="Model\BabySitter.vb" />
|
||||
<Compile Include="Model\Child.vb" />
|
||||
<Compile Include="Forms\ListEnums.vb" />
|
||||
<Compile Include="Model\Meet.vb" />
|
||||
<Compile Include="Model\Parent.vb" />
|
||||
<Compile Include="Model\Person.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Forms\FormBabySitterID.resx">
|
||||
<DependentUpon>FormBabySitterID.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\FormList.resx">
|
||||
<DependentUpon>FormList.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\FormChildID.resx">
|
||||
<DependentUpon>FormChildID.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\FormID.resx">
|
||||
<DependentUpon>FormID.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\FormMain.en.resx">
|
||||
<DependentUpon>FormMain.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\FormMain.fr-FR.resx">
|
||||
<DependentUpon>FormMain.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\FormMain.resx">
|
||||
<DependentUpon>FormMain.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\FormParentID.resx">
|
||||
<DependentUpon>FormParentID.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="ClassDiagram1.cd" />
|
||||
<None Include="Database\CrecheDataSet.xsc">
|
||||
<DependentUpon>CrecheDataSet.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="Database\CrecheDataSet.xsd">
|
||||
<Generator>MSDataSetGenerator</Generator>
|
||||
<LastGenOutput>CrecheDataSet.Designer.vb</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="Database\CrecheDataSet.xss">
|
||||
<DependentUpon>CrecheDataSet.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.SQL.Server.Compact.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>SQL Server Compact 3.5 SP2</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<Content Include="Database\Creche.mdf">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Database\Creche_log.ldf">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<DependentUpon>Creche.mdf</DependentUpon>
|
||||
</Content>
|
||||
<None Include="Resources\UnpingedWindows.png" />
|
||||
<None Include="Resources\PingedWindows.png" />
|
||||
<None Include="Resources\WindowList1.png" />
|
||||
<None Include="Resources\WindowList.png" />
|
||||
<None Include="Resources\CloseWindow.png" />
|
||||
<Content Include="Resources\EditSheet2.ico" />
|
||||
<Content Include="Resources\NewSheet2.ico" />
|
||||
<Content Include="Resources\NormalSheetLight.ico" />
|
||||
<None Include="Resources\SelectSheet.png" />
|
||||
<None Include="Resources\WrongSheetLight.png" />
|
||||
<None Include="Resources\WarningSheetLight.png" />
|
||||
<None Include="Resources\WarningSheetFrench.png" />
|
||||
<None Include="Resources\WarningSheet2Light.png" />
|
||||
<None Include="Resources\ValidedSheet.png" />
|
||||
<None Include="Resources\SaveMultiFloppy.png" />
|
||||
<None Include="Resources\SaveFloppy.png" />
|
||||
<None Include="Resources\SaveAsFloppy.png" />
|
||||
<None Include="Resources\RPNM Save.png" />
|
||||
<None Include="Resources\OpenSheetbook.png" />
|
||||
<None Include="Resources\OpenFolder2.png" />
|
||||
<None Include="Resources\OpenFolder.png" />
|
||||
<None Include="Resources\OpenedSheetbook.png" />
|
||||
<None Include="Resources\NormalSheetLight.png" />
|
||||
<None Include="Resources\NewSheetbook2.png" />
|
||||
<None Include="Resources\NewSheetbook.png" />
|
||||
<None Include="Resources\NewSheet2.png" />
|
||||
<None Include="Resources\NewCollection.png" />
|
||||
<None Include="Resources\GumSheet.png" />
|
||||
<None Include="Resources\GoLink.png" />
|
||||
<None Include="Resources\EditSheet21.png" />
|
||||
<None Include="Resources\DeleteSheet3.png" />
|
||||
<None Include="Resources\DeleteSheet2.png" />
|
||||
<None Include="Resources\DeleteSheet1.png" />
|
||||
<None Include="Resources\CloseSheetbook.png" />
|
||||
<None Include="Resources\CloseSheet2.png" />
|
||||
<None Include="Resources\CloseFolder.png" />
|
||||
<None Include="Resources\CancelSheet.png" />
|
||||
<None Include="Resources\AddSheet21.png" />
|
||||
<None Include="Resources\AddSheet1.png" />
|
||||
<None Include="Resources\EditSheet2.png" />
|
||||
<None Include="Resources\DeleteSheet.png" />
|
||||
<None Include="Resources\AddSheet2.png" />
|
||||
<None Include="Resources\AddSheet.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.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>
|
133
ApplicationCrèche 1/ClassDiagram1.cd
Normal file
@ -0,0 +1,133 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Class Name="ApplicationCrèche_1.FormBabySitterID" Collapsed="true">
|
||||
<Position X="7.5" Y="7.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>gAAQQAQAECAMAQIBQACAAIADAACABAAAEAAQAgAACgA=</HashCode>
|
||||
<FileName>Forms\FormBabySitterID.vb</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="ApplicationCrèche_1.FormChildID" Collapsed="true">
|
||||
<Position X="12" Y="7.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>QBkVSgACXHIAAQABQECRAYhSAgAAIAAAAAIBAgASAIA=</HashCode>
|
||||
<FileName>Forms\FormChildID.vb</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="ApplicationCrèche_1.FormID" Collapsed="true">
|
||||
<Position X="9.75" Y="6" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAIIgECAAAwAAQQKAARCCAAAAAQAAAgAAEAAAgAA=</HashCode>
|
||||
<FileName>Forms\FormID.vb</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="ApplicationCrèche_1.FormList" Collapsed="true">
|
||||
<Position X="9.75" Y="8.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>A0AUAEgABCASgAIIEICSwACiTMAACUUEgAIIBBACIAE=</HashCode>
|
||||
<FileName>Forms\FormList.vb</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="ApplicationCrèche_1.FormMain" Collapsed="true">
|
||||
<Position X="12" Y="8.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>gyRIAGACCHIgQoCEoBDGAIoniEIAAAkCAEAhQJeAgGk=</HashCode>
|
||||
<FileName>Forms\FormMain.vb</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="ApplicationCrèche_1.FormParentID" Collapsed="true">
|
||||
<Position X="9.75" Y="7.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAQQACEVKAQAQAAQACAAQACABgAAAAAgAAAAgAAAAA=</HashCode>
|
||||
<FileName>Forms\FormParentID.vb</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="ApplicationCrèche_1.BabySitter">
|
||||
<Position X="2.75" Y="5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAQAAAAAAAIEgAAAAIAAAAAAAgAAACAAAAAAA=</HashCode>
|
||||
<FileName>Model\BabySitter.vb</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="ApplicationCrèche_1.Child">
|
||||
<Position X="5" Y="5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAQAAACMAAEAAAAABAIAAAAAAAAAAAAAEAAAAA=</HashCode>
|
||||
<FileName>Model\Child.vb</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="ApplicationCrèche_1.Meet">
|
||||
<Position X="5" Y="0.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAIAAAGAACAAAAIABAJAAgAAAAACBAgAAAAAAAAgA=</HashCode>
|
||||
<FileName>Model\Meet.vb</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="ApplicationCrèche_1.Parent">
|
||||
<Position X="0.5" Y="5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAABA=</HashCode>
|
||||
<FileName>Model\Parent.vb</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="ApplicationCrèche_1.Person">
|
||||
<Position X="2.75" Y="0.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAEAEAAAAAhAAAAAAAFAhAAAAAIAAAAAAAAAAEAAAgA=</HashCode>
|
||||
<FileName>Model\Person.vb</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="ApplicationCrèche_1.SQLManager">
|
||||
<Position X="11.75" Y="0.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AkIEAAACBAASAAIEHBRCgAAAAAAAAQAAoGAAgIAQAAA=</HashCode>
|
||||
<FileName>DataManager\SQLManager.vb</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="ApplicationCrèche_1.My.MyApplication" Collapsed="true">
|
||||
<Position X="9.75" Y="4" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="ApplicationCrèche_1.My.MySettings" Collapsed="true">
|
||||
<Position X="9.75" Y="5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAgAAAQAABAAIAAABAABAAAAAAAAAABAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Enum Name="ApplicationCrèche_1.IDFormMode" Collapsed="true">
|
||||
<Position X="7.5" Y="5.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAgAQAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Forms\ListEnums.vb</FileName>
|
||||
</TypeIdentifier>
|
||||
</Enum>
|
||||
<Enum Name="ApplicationCrèche_1.PersonType" Collapsed="true">
|
||||
<Position X="7.5" Y="6" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AIAAAgAAAAAAAIAAAAAAQAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Forms\ListEnums.vb</FileName>
|
||||
</TypeIdentifier>
|
||||
</Enum>
|
||||
<Module Name="ApplicationCrèche_1.SharedRessources" Collapsed="true">
|
||||
<Position X="7.5" Y="3" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAQAA=</HashCode>
|
||||
<FileName>Forms\SharedRessources.vb</FileName>
|
||||
</TypeIdentifier>
|
||||
</Module>
|
||||
<Module Name="ApplicationCrèche_1.My.MySettingsProperty" Collapsed="true">
|
||||
<Position X="7.5" Y="3.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Module>
|
||||
<Module Name="ApplicationCrèche_1.My.Resources.Resources" Collapsed="true">
|
||||
<Position X="7.5" Y="4.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>GEAAEQAAEEQBIACwAKABEAADIYCRAICAACQABEAAAIA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Module>
|
||||
<Font Name="Segoe UI" Size="9" />
|
||||
</ClassDiagram>
|
1
ApplicationCrèche 1/DBString.ini
Normal file
@ -0,0 +1 @@
|
||||
Data Source=.\SQLEXPRESS8;Initial Catalog=Creche;Integrated Security=True;Pooling=False
|
26
ApplicationCrèche 1/DataManager/ImaginaryModelGenerator.vb
Normal file
@ -0,0 +1,26 @@
|
||||
Public Class ImaginaryModelGenerator
|
||||
|
||||
Public bs1 As BabySitter
|
||||
Public bs2 As BabySitter
|
||||
Public m1 As Meet
|
||||
Public c1 As Child
|
||||
Public c2 As Child
|
||||
Public p1 As Parent
|
||||
Public p2 As Parent
|
||||
|
||||
Public Sub New()
|
||||
bs1 = New BabySitter(1, "bs1", "bs1", "1111")
|
||||
bs2 = New BabySitter(2, "bs2", "bs2", "2222")
|
||||
|
||||
m1 = New Meet()
|
||||
m1.monday = True
|
||||
m1.sunday = True
|
||||
|
||||
c1 = New Child(1, "c1", "c1", "", New Date(), m1)
|
||||
c2 = New Child(2, "c2", "c2", "", New Date(), m1)
|
||||
|
||||
p1 = New Parent(1, "p1", "p1", "1111", "1111")
|
||||
p2 = New Parent(2, "p2", "p2", "2222", "2222")
|
||||
End Sub
|
||||
|
||||
End Class
|
943
ApplicationCrèche 1/DataManager/SQLManager.vb
Normal file
@ -0,0 +1,943 @@
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.IO
|
||||
|
||||
Public Class SQLManager
|
||||
Shared DBConnexion As SqlConnection
|
||||
|
||||
Shared Sub New()
|
||||
Dim fileName As String = "DBString.ini"
|
||||
Dim exePath As String = Application.StartupPath()
|
||||
Dim filePath As String = exePath & "\" & fileName
|
||||
If File.Exists(filePath) Then
|
||||
Dim txtReader As StreamReader
|
||||
Dim StrContents As String
|
||||
Try
|
||||
txtReader = New StreamReader(filePath)
|
||||
StrContents = txtReader.ReadLine()
|
||||
Catch ex As Exception
|
||||
MsgBox("The application was unable to load the database connexion string from the file : " & vbNewLine & filePath & vbNewLine & "Please check if the database is launched and loaded, and the initialisation file containt a operationnal connexion string." & vbNewLine & "The program will close.", MsgBoxStyle.OkOnly & MsgBoxStyle.Critical, "Impossible to connect to the database")
|
||||
End
|
||||
End Try
|
||||
Try
|
||||
DBConnexion = New SqlConnection(StrContents)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly & MsgBoxStyle.Critical)
|
||||
End Try
|
||||
Else
|
||||
Dim txtReader As StreamWriter
|
||||
Try
|
||||
File.Create(filePath)
|
||||
txtReader = New StreamWriter(filePath)
|
||||
txtReader.WriteLine("Data Source=TIMONIUM\SQLEXPRESS8;Initial Catalog=Creche;Integrated Security=True;Pooling=False")
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & vbNewLine & "The program will close.", MsgBoxStyle.OkOnly & MsgBoxStyle.Critical, "Impossible to start")
|
||||
End
|
||||
End Try
|
||||
MsgBox("The application was unable to find the connexion string file at " & vbNewLine & filePath & vbNewLine & "Please check if the fill exists and contains a valid database connexion string.", MsgBoxStyle.OkOnly & MsgBoxStyle.Critical, "File not found")
|
||||
End
|
||||
End If
|
||||
DBConnexion.Open()
|
||||
End Sub
|
||||
|
||||
|
||||
' ----- DB Methods for Children -----'
|
||||
''' <summary>
|
||||
''' Get a all information about a Child whose his ID is passed as a parameter
|
||||
''' </summary>
|
||||
''' <param name="id">The id of the child to get from the database</param>
|
||||
''' <returns>a Child as complete as possible</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function getChildByID(id As Integer) As Child
|
||||
Dim aChild As Child = Nothing
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
Dim results As SqlDataReader
|
||||
Dim FK_Parent1id As UInteger
|
||||
Dim FK_Parent2id As UInteger
|
||||
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "SELECT * FROM Child WHERE idChild = @id"
|
||||
request.Parameters.Add("@id", SqlDbType.Int).Value = id
|
||||
results = request.ExecuteReader()
|
||||
'While (results.Read())
|
||||
' Console.WriteLine(results.GetInt32(2))
|
||||
'End While
|
||||
If (results.HasRows) Then
|
||||
results.Read()
|
||||
If results.IsDBNull(0) Then
|
||||
FK_Parent1id = 0
|
||||
Else
|
||||
FK_Parent1id = results.GetInt32(0)
|
||||
End If
|
||||
If results.IsDBNull(1) Then
|
||||
FK_Parent2id = 0
|
||||
Else
|
||||
FK_Parent2id = results.GetInt32(1)
|
||||
End If
|
||||
|
||||
aChild = New Child(results.GetInt32(2))
|
||||
aChild.firstname = results.GetString(3)
|
||||
aChild.lastname = results.GetString(4)
|
||||
aChild.gender = results.GetBoolean(5)
|
||||
aChild.bornDate = results.GetDateTime(6)
|
||||
aChild.address = results.GetString(7)
|
||||
results.Close()
|
||||
Else
|
||||
Throw New IndexOutOfRangeException("The specified index does not exist on the database")
|
||||
End If
|
||||
|
||||
If FK_Parent1id <> 0 Then
|
||||
aChild.parent1 = Me.getParentByID(FK_Parent1id)
|
||||
End If
|
||||
If FK_Parent2id <> 0 Then
|
||||
aChild.parent2 = Me.getParentByID(FK_Parent2id)
|
||||
End If
|
||||
aChild.meet = Me.getMeetByChildId(id)
|
||||
|
||||
'request.CommandText = "SELECT * FROM Parent WHERE idParent = @id"
|
||||
'request.Parameters("@id").Value = FK_Parent1id
|
||||
'results = request.ExecuteReader()
|
||||
'If (results.HasRows) Then
|
||||
' results.Read()
|
||||
' Dim parent1 As Parent = New Parent(results.GetInt32(0))
|
||||
' parent1.firstname = results.GetString(1)
|
||||
' parent1.lastname = results.GetString(2)
|
||||
' parent1.gender = results.GetBoolean(3)
|
||||
' parent1.phone = results.GetString(4)
|
||||
' parent1.address = results.GetString(5)
|
||||
' aChild.parent1 = parent1
|
||||
' results.Close()
|
||||
' Console.WriteLine(parent1.toString())
|
||||
'Else
|
||||
' aChild.parent1 = Nothing
|
||||
'End If
|
||||
|
||||
'request.CommandText = "SELECT * FROM Parent WHERE idParent = @id"
|
||||
'request.Parameters("@id").Value = FK_Parent2id
|
||||
'results = request.ExecuteReader()
|
||||
'If (results.HasRows) Then
|
||||
' results.Read()
|
||||
' Dim parent2 As Parent = New Parent(results.GetInt32(0))
|
||||
' parent2.firstname = results.GetString(1)
|
||||
' parent2.lastname = results.GetString(2)
|
||||
' parent2.gender = results.GetBoolean(3)
|
||||
' parent2.phone = results.GetString(4)
|
||||
' parent2.address = results.GetString(5)
|
||||
' aChild.parent2 = parent2
|
||||
' results.Close()
|
||||
' Console.WriteLine(parent2.toString())
|
||||
'Else
|
||||
' aChild.parent2 = Nothing
|
||||
'End If
|
||||
|
||||
If Not results.IsClosed Then results.Close()
|
||||
Return aChild
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Send requests to the database to compose a list of all the children
|
||||
''' </summary>
|
||||
''' <returns>A list of all the children</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function getChildren() As List(Of Child)
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "SELECT idChild FROM Child"
|
||||
|
||||
Dim results As SqlDataReader
|
||||
results = request.ExecuteReader()
|
||||
Dim allID As List(Of Integer) = New List(Of Integer)
|
||||
While (results.Read())
|
||||
allID.Add(results.GetInt32(0))
|
||||
End While
|
||||
results.Close()
|
||||
|
||||
Dim AllChildren As List(Of Child) = New List(Of Child)
|
||||
For Each id As Integer In allID
|
||||
AllChildren.Add(getChildByID(id))
|
||||
Next
|
||||
|
||||
Return AllChildren
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Add a Child to the database with all needed data
|
||||
''' </summary>
|
||||
''' <param name="aChild">The child to add to the database</param>
|
||||
''' <remarks>Currently, it only add a new children, no parents, no meet.</remarks>
|
||||
Public Function addChild(aChild As Child) As Integer
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "INSERT INTO Child (FK_idParent1, FK_idParent2, ChildFirstName, ChildLastName, ChildGender, ChildBornDate, ChildCareAddress) VALUES (@idp1, @idp2, @chfn, @chln, @chgd, @chbd, @chds)"
|
||||
|
||||
If Not aChild.parent1 Is Nothing Then
|
||||
request.Parameters.Add("@idp1", SqlDbType.Int).Value = aChild.parent1.id
|
||||
Else
|
||||
request.Parameters.Add("@idp1", SqlDbType.Int).Value = DBNull.Value
|
||||
End If
|
||||
|
||||
If Not aChild.parent2 Is Nothing Then
|
||||
request.Parameters.Add("@idp2", SqlDbType.Int).Value = aChild.parent2.id
|
||||
Else
|
||||
request.Parameters.Add("@idp2", SqlDbType.Int).Value = DBNull.Value
|
||||
End If
|
||||
|
||||
request.Parameters.Add("@chfn", SqlDbType.NVarChar).Value = aChild.firstname
|
||||
request.Parameters.Add("@chln", SqlDbType.NVarChar).Value = aChild.lastname
|
||||
request.Parameters.Add("@chgd", SqlDbType.Bit).Value = aChild.gender
|
||||
request.Parameters.Add("@chbd", SqlDbType.Date).Value = aChild.bornDate
|
||||
request.Parameters.Add("@chds", SqlDbType.NVarChar).Value = aChild.address
|
||||
request.ExecuteReader().Close()
|
||||
|
||||
'If Not aChild.meet Is Nothing And aChild.meet.id = 0 Then
|
||||
' addMeet(aChild.meet, aChild.id)
|
||||
'End If
|
||||
|
||||
request.CommandText = "SELECT idChild FROM Child where ChildFirstName = @chfn AND ChildLastName = @chln AND ChildGender = @chgd AND ChildBornDate = @chbd AND ChildCareAddress = @chds"
|
||||
Dim results As SqlDataReader
|
||||
results = request.ExecuteReader()
|
||||
results.Read()
|
||||
Dim idChild As Integer = results.GetInt32(0)
|
||||
results.Close()
|
||||
Return idChild
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Edit the specified Child in the database
|
||||
''' </summary>
|
||||
''' <param name="aChild">The child to edit (The most important is it's ID)</param>
|
||||
''' <remarks></remarks>
|
||||
Public Sub editChild(aChild As Child)
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "UPDATE Child SET FK_idParent1 = @idp1, FK_idParent2 = @idp2, ChildFirstName = @chfn, ChildLastName = @chln, ChildGender = @chgd, ChildBornDate = @chbd, ChildCareAddress = @chds WHERE idChild = @chid"
|
||||
request.Parameters.Add("@chid", SqlDbType.Int).Value = aChild.id
|
||||
|
||||
If Not aChild.parent1 Is Nothing Then
|
||||
request.Parameters.Add("@idp1", SqlDbType.Int).Value = aChild.parent1.id
|
||||
Else
|
||||
request.Parameters.Add("@idp1", SqlDbType.Int).Value = DBNull.Value
|
||||
End If
|
||||
|
||||
If Not aChild.parent2 Is Nothing Then
|
||||
request.Parameters.Add("@idp2", SqlDbType.Int).Value = aChild.parent2.id
|
||||
Else
|
||||
request.Parameters.Add("@idp2", SqlDbType.Int).Value = DBNull.Value
|
||||
End If
|
||||
|
||||
request.Parameters.Add("@chfn", SqlDbType.NVarChar).Value = aChild.firstname
|
||||
request.Parameters.Add("@chln", SqlDbType.NVarChar).Value = aChild.lastname
|
||||
request.Parameters.Add("@chgd", SqlDbType.Bit).Value = aChild.gender
|
||||
request.Parameters.Add("@chbd", SqlDbType.Date).Value = aChild.bornDate
|
||||
request.Parameters.Add("@chds", SqlDbType.NVarChar).Value = aChild.address
|
||||
request.ExecuteReader().Close()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Delete the Child in the Database based on his id.
|
||||
''' </summary>
|
||||
''' <param name="id">The id of the Child to delete</param>
|
||||
''' <remarks>The Child is deleted with the corresponding meet.</remarks>
|
||||
Public Sub deleteChildByID(id As Integer)
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
|
||||
' Delete the associated Meet of the child.
|
||||
request.CommandText = "SELECT idMeet FROM Meet WHERE FK_idChild = @chidmeet"
|
||||
request.Parameters.Add("@chidmeet", SqlDbType.Int).Value = id
|
||||
Dim result As SqlDataReader = request.ExecuteReader()
|
||||
|
||||
Dim idmeet As Integer = Nothing
|
||||
If result.HasRows() Then
|
||||
result.Read()
|
||||
idmeet = result.GetInt32(0)
|
||||
result.Close()
|
||||
End If
|
||||
|
||||
' if there is no meet asociated, we can delete child safely from de db.
|
||||
' else, we delete meeet first.
|
||||
If Not idmeet = Nothing Then
|
||||
deleteMeet(idmeet)
|
||||
End If
|
||||
If Not result.IsClosed Then result.Close()
|
||||
|
||||
' Then delete the child from the database.
|
||||
request = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "DELETE FROM Child WHERE idChild = @chid"
|
||||
request.Parameters.Add("@chid", SqlDbType.Int).Value = id
|
||||
request.ExecuteReader.Close()
|
||||
End Sub
|
||||
|
||||
Function getChildByMeetID(id As Integer) As Child
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "SELECT FK_idChild FROM Meet WHERE idMeet = @id"
|
||||
request.Parameters.Add("@id", SqlDbType.Int).Value = id
|
||||
Dim results As SqlDataReader
|
||||
results = request.ExecuteReader()
|
||||
|
||||
Dim aChild As Child = Nothing
|
||||
If results.HasRows Then
|
||||
results.Read()
|
||||
Dim idChild As UInteger = results.GetValue(0)
|
||||
results.Close()
|
||||
aChild = getChildByID(idChild)
|
||||
End If
|
||||
If Not results.IsClosed Then results.Close()
|
||||
Return aChild
|
||||
End Function
|
||||
|
||||
' ----- DB Methods for Parents -----'
|
||||
''' <summary>
|
||||
''' Get all information about a PArent whose his ID is passed as a parameter
|
||||
''' </summary>
|
||||
''' <param name="id">The id of the Parent to get from the database</param>
|
||||
''' <returns>a Parent</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function getParentByID(id As Integer) As Parent
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "SELECT * FROM Parent WHERE idParent = @id"
|
||||
request.Parameters.Add("@id", SqlDbType.Int).Value = id
|
||||
Dim results As SqlDataReader
|
||||
results = request.ExecuteReader()
|
||||
|
||||
Dim aParent As Parent = Nothing
|
||||
If results.HasRows Then
|
||||
results.Read()
|
||||
aParent = New Parent(results.GetInt32(0))
|
||||
aParent.firstname = results.GetString(1)
|
||||
aParent.lastname = results.GetString(2)
|
||||
aParent.phone = results.GetString(4)
|
||||
aParent.gender = results.GetBoolean(3)
|
||||
aParent.address = results.GetString(5)
|
||||
results.Close()
|
||||
End If
|
||||
If Not results.IsClosed Then results.Close()
|
||||
Return aParent
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Send requests to the database to compose a list of all the parents
|
||||
''' </summary>
|
||||
''' <returns>The list containing all parents</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function getParents() As List(Of Parent)
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "SELECT idParent FROM Parent"
|
||||
|
||||
Dim results As SqlDataReader
|
||||
results = request.ExecuteReader()
|
||||
Dim allID As List(Of Integer) = New List(Of Integer)
|
||||
While (results.Read())
|
||||
allID.Add(results.GetInt32(0))
|
||||
End While
|
||||
results.Close()
|
||||
|
||||
Dim AllParent As List(Of Parent) = New List(Of Parent)
|
||||
For Each id As Integer In allID
|
||||
AllParent.Add(getParentByID(id))
|
||||
Next
|
||||
|
||||
Return AllParent
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Get a list of children for the parent where the id is passed as a parameter
|
||||
''' </summary>
|
||||
''' <param name="id">the id of the parent</param>
|
||||
''' <returns>a list of childrens of this parent</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function getChildenOf(id As Integer) As List(Of Child)
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "SELECT idChild FROM Child WHERE FK_idParent1 = @id OR FK_idParent2 = @id"
|
||||
request.Parameters.Add("@id", SqlDbType.Int).Value = id
|
||||
|
||||
Dim results As SqlDataReader
|
||||
results = request.ExecuteReader()
|
||||
Dim allId As List(Of Integer) = New List(Of Integer)
|
||||
While results.Read
|
||||
allId.Add(results.GetInt32(0))
|
||||
End While
|
||||
results.Close()
|
||||
|
||||
Dim theChildren As List(Of Child) = New List(Of Child)
|
||||
For Each Childid As Integer In allId
|
||||
Dim aChild As Child = getChildByID(Childid)
|
||||
theChildren.Add(aChild)
|
||||
Next
|
||||
|
||||
Return theChildren
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Add a Parent to the database with all needed data
|
||||
''' </summary>
|
||||
''' <param name="parent">the parent to add into the database</param>
|
||||
''' <remarks></remarks>
|
||||
Public Function addParent(parent As Parent) As Integer
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "INSERT INTO Parent (ParentFirstName, ParentLastName, ParentGender, ParentPhone, ParentAddress) VALUES (@pfn, @pln, @pgd, @pph, @pds)"
|
||||
|
||||
request.Parameters.Add("@pfn", SqlDbType.NVarChar).Value = parent.firstname
|
||||
request.Parameters.Add("@pln", SqlDbType.NVarChar).Value = parent.lastname
|
||||
request.Parameters.Add("@pgd", SqlDbType.Bit).Value = parent.gender
|
||||
request.Parameters.Add("@pph", SqlDbType.NVarChar).Value = parent.phone
|
||||
request.Parameters.Add("@pds", SqlDbType.NVarChar).Value = parent.address
|
||||
request.ExecuteReader().Close()
|
||||
|
||||
request.CommandText = "SELECT idParent FROM Parent WHERE ParentFirstName = @pfn AND ParentLastName = @pln AND ParentGender = @pgd AND ParentPhone = @pph AND ParentAddress = @pds"
|
||||
Dim results As SqlDataReader
|
||||
results = request.ExecuteReader()
|
||||
results.Read()
|
||||
Dim idParent As Integer = results.GetInt32(0)
|
||||
results.Close()
|
||||
Return idParent
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Edit the specified Parent in the database
|
||||
''' </summary>
|
||||
''' <param name="parent">The parent to edit in the database (The most important is ot's ID)</param>
|
||||
''' <remarks></remarks>
|
||||
Public Sub editParent(parent As Parent)
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "UPDATE Parent SET ParentFirstName = @pfn, ParentLastName = @pln, ParentGender = @pgd, ParentPhone = @pph, ParentAddress = @pds WHERE idParent = @pid"
|
||||
|
||||
request.Parameters.Add("@pid", SqlDbType.Int).Value = parent.id
|
||||
request.Parameters.Add("@pfn", SqlDbType.NVarChar).Value = parent.firstname
|
||||
request.Parameters.Add("@pln", SqlDbType.NVarChar).Value = parent.lastname
|
||||
request.Parameters.Add("@pgd", SqlDbType.Bit).Value = parent.gender
|
||||
request.Parameters.Add("@pph", SqlDbType.NVarChar).Value = parent.phone
|
||||
request.Parameters.Add("@pds", SqlDbType.NVarChar).Value = parent.address
|
||||
request.ExecuteReader().Close()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Delete the Parent in the Database based on the id.
|
||||
''' </summary>
|
||||
''' <param name="id">The id of the Parent to delete</param>
|
||||
''' <remarks>Delete only the Parent without nothing more</remarks>
|
||||
Public Sub deleteParentByID(id As Integer)
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "SELECT idChild FROM Child WHERE FK_idParent1 = @pid OR FK_idParent2 = @pid "
|
||||
request.Parameters.Add("@pid", SqlDbType.Int).Value = id
|
||||
Dim result As SqlDataReader = request.ExecuteReader
|
||||
|
||||
If result.HasRows Then
|
||||
Dim allChildID As List(Of Integer) = New List(Of Integer)
|
||||
While result.Read
|
||||
allChildID.Add(result.GetInt32(0))
|
||||
End While
|
||||
result.Close()
|
||||
|
||||
Dim allChild As List(Of Child) = New List(Of Child)
|
||||
For Each idChild As Integer In allChildID
|
||||
allChild.Add(getChildByID(idChild))
|
||||
Next
|
||||
|
||||
For Each Child As Child In allChild
|
||||
|
||||
If Not Child.parent1 Is Nothing AndAlso Child.parent1.id = id Then
|
||||
request = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "UPDATE Child SET FK_idParent1 = @pfk WHERE idChild = @cid"
|
||||
request.Parameters.Add("@pfk", SqlDbType.Int).Value = DBNull.Value
|
||||
request.Parameters.Add("@cid", SqlDbType.Int).Value = Child.id
|
||||
request.ExecuteReader.Close()
|
||||
End If
|
||||
If Not Child.parent2 Is Nothing AndAlso Child.parent2.id = id Then
|
||||
request = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "UPDATE Child SET FK_idParent2 = @pfk WHERE idChild = @cid"
|
||||
request.Parameters.Add("@pfk", SqlDbType.Int).Value = DBNull.Value
|
||||
request.Parameters.Add("@cid", SqlDbType.Int).Value = Child.id
|
||||
request.ExecuteReader.Close()
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
request = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "DELETE FROM Parent WHERE idParent = @pid"
|
||||
request.Parameters.Add("@pid", SqlDbType.Int).Value = id
|
||||
request.ExecuteReader.Close()
|
||||
End Sub
|
||||
|
||||
' ----- DB Methods for Babysitter -----'
|
||||
|
||||
''' <summary>
|
||||
''' Get all information about a Babysitter whose his ID is passed as a parameter
|
||||
''' </summary>
|
||||
''' <param name="id">The id of the child to get from the database</param>
|
||||
''' <returns>A Babysitter as complete as possible</returns>
|
||||
''' <remarks>If the babysitter have Meets the function also these meets into the Babysitters objet, or Nohting insead.</remarks>
|
||||
Public Function getBabysitterByID(id As Integer) As BabySitter
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "SELECT * FROM Babysitter WHERE idBS = @id"
|
||||
request.Parameters.Add("@id", SqlDbType.Int).Value = id
|
||||
Dim results As SqlDataReader
|
||||
results = request.ExecuteReader()
|
||||
|
||||
Dim aSB As BabySitter
|
||||
If results.HasRows Then
|
||||
results.Read()
|
||||
aSB = New BabySitter(results.GetInt32(3))
|
||||
aSB.firstname = results.GetString(4)
|
||||
aSB.lastname = results.GetString(5)
|
||||
aSB.gender = results.GetBoolean(6)
|
||||
aSB.address = results.GetString(7)
|
||||
aSB.phone1 = results.GetString(8)
|
||||
|
||||
Dim nbMeet1 As Integer
|
||||
Dim nbMeet2 As Integer
|
||||
Dim nbMeet3 As Integer
|
||||
|
||||
If Not results.IsDBNull(0) Then
|
||||
nbMeet1 = results.GetInt32(0)
|
||||
Else
|
||||
nbMeet1 = Nothing
|
||||
End If
|
||||
If Not results.IsDBNull(1) Then
|
||||
nbMeet2 = results.GetInt32(1)
|
||||
Else
|
||||
nbMeet2 = Nothing
|
||||
End If
|
||||
If Not results.IsDBNull(2) Then
|
||||
nbMeet3 = results.GetInt32(2)
|
||||
Else
|
||||
nbMeet3 = Nothing
|
||||
End If
|
||||
|
||||
If Not results.IsDBNull(9) Then
|
||||
aSB.phone2 = results.GetString(9)
|
||||
Else
|
||||
aSB.phone2 = Nothing
|
||||
End If
|
||||
results.Close()
|
||||
|
||||
If Not nbMeet1 = Nothing Then
|
||||
aSB.meet1 = Me.getMeetByID(nbMeet1)
|
||||
End If
|
||||
If Not nbMeet2 = Nothing Then
|
||||
aSB.meet2 = Me.getMeetByID(nbMeet2)
|
||||
End If
|
||||
If Not nbMeet3 = Nothing Then
|
||||
aSB.meet3 = Me.getMeetByID(nbMeet3)
|
||||
End If
|
||||
|
||||
Else
|
||||
Throw New IndexOutOfRangeException("The specified index does not exist on the database")
|
||||
End If
|
||||
|
||||
Return aSB
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Send requests to the database to compose a liste of all the babysitters
|
||||
''' </summary>
|
||||
''' <returns>A List(of BabySitters)</returns>
|
||||
''' <remarks>Use getBabysitter(id)</remarks>
|
||||
Public Function getBabysitters() As List(Of BabySitter)
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "SELECT idBS FROM Babysitter"
|
||||
|
||||
Dim results As SqlDataReader
|
||||
results = request.ExecuteReader()
|
||||
Dim allID As List(Of Integer) = New List(Of Integer)
|
||||
While (results.Read())
|
||||
allID.Add(results.GetInt32(0))
|
||||
End While
|
||||
results.Close()
|
||||
|
||||
Dim AllBS As List(Of BabySitter) = New List(Of BabySitter)
|
||||
For Each id As Integer In allID
|
||||
Try
|
||||
AllBS.Add(getBabysitterByID(id))
|
||||
Catch ex As SqlException
|
||||
Console.WriteLine("SQLManager")
|
||||
Console.WriteLine(ex.Message)
|
||||
End Try
|
||||
Next
|
||||
Return AllBS
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Get a babysitter based on the Meet ID provided as a parameter
|
||||
''' </summary>
|
||||
''' <param name="id">The ID of the meet</param>
|
||||
''' <returns>A babysitter if a meet is founded in the Database, or Nothing else.</returns>
|
||||
''' <remarks>If a meet has no babysitter in the database, the meet is immediately deleted.</remarks>
|
||||
Public Function getBabysitterByMeetID(id As Integer) As BabySitter
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "SELECT * FROM Babysitter WHERE FK_idMeet1 = @id OR FK_idMeet2 = @id OR FK_idMeet3 = @id"
|
||||
request.Parameters.Add("@id", SqlDbType.Int).Value = id
|
||||
Dim results As SqlDataReader
|
||||
results = request.ExecuteReader()
|
||||
Dim aSB As BabySitter = Nothing
|
||||
If results.HasRows Then
|
||||
results.Read()
|
||||
|
||||
aSB = New BabySitter(results.GetInt32(3))
|
||||
aSB.firstname = results.GetString(4)
|
||||
aSB.lastname = results.GetString(5)
|
||||
aSB.gender = results.GetBoolean(6)
|
||||
aSB.address = results.GetString(7)
|
||||
aSB.phone1 = results.GetString(8)
|
||||
If Not results.IsDBNull(9) Then
|
||||
aSB.phone2 = results.GetString(9)
|
||||
Else
|
||||
aSB.phone2 = Nothing
|
||||
End If
|
||||
results.Close()
|
||||
End If
|
||||
Return aSB
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Get all availables babysitters from the databases.
|
||||
''' </summary>
|
||||
''' <returns>z List(of Babysitter)</returns>
|
||||
''' <remarks>Babysitters that have less than 3 meets</remarks>
|
||||
Public Function getAvailableBabysitters() As List(Of BabySitter)
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "SELECT idBS FROM Babysitter WHERE FK_idMeet1 IS NULL OR FK_idMeet2 IS NULL OR FK_idMeet3 IS NULL"
|
||||
|
||||
Dim results As SqlDataReader
|
||||
results = request.ExecuteReader()
|
||||
Dim allID As List(Of Integer) = New List(Of Integer)
|
||||
While (results.Read())
|
||||
allID.Add(results.GetInt32(0))
|
||||
End While
|
||||
results.Close()
|
||||
|
||||
Dim AllBS As List(Of BabySitter) = New List(Of BabySitter)
|
||||
For Each id As Integer In allID
|
||||
Try
|
||||
AllBS.Add(getBabysitterByID(id))
|
||||
Catch ex As SqlException
|
||||
Console.WriteLine("SQLManager")
|
||||
Console.WriteLine(ex.Message)
|
||||
End Try
|
||||
Next
|
||||
Return AllBS
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Add a Babysitter to the database.
|
||||
''' </summary>
|
||||
''' <param name="aBS"></param>
|
||||
''' <returns></returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function addBabysitter(aBS As BabySitter) As Integer
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "INSERT INTO Babysitter (BSFirstName, BSLastName, BSGender, BSAddress, BSPhone1, BSPhone2) VALUES (@bsfn, @bsln, @bsgd, @bsds, @bsp1, @bsp2)"
|
||||
|
||||
request.Parameters.Add("@bsfn", SqlDbType.NVarChar).Value = aBS.firstname
|
||||
request.Parameters.Add("@bsln", SqlDbType.NVarChar).Value = aBS.lastname
|
||||
request.Parameters.Add("@bsgd", SqlDbType.Bit).Value = aBS.gender
|
||||
request.Parameters.Add("@bsp1", SqlDbType.NVarChar).Value = aBS.phone1
|
||||
request.Parameters.Add("@bsds", SqlDbType.NVarChar).Value = aBS.address
|
||||
If Not aBS.phone2 Is Nothing Then
|
||||
request.Parameters.Add("@bsp2", SqlDbType.NVarChar).Value = aBS.phone2
|
||||
Else
|
||||
request.Parameters.Add("@bsp2", SqlDbType.NVarChar).Value = DBNull.Value
|
||||
End If
|
||||
request.ExecuteReader().Close()
|
||||
|
||||
request.CommandText = "SELECT idBS FROM babysitter WHERE BSFirstName = @bsfn AND BSLastName = @bsln AND BSGender = @bsgd AND BSAddress = @bsds"
|
||||
Dim results As SqlDataReader
|
||||
results = request.ExecuteReader()
|
||||
results.Read()
|
||||
Dim idBS As Integer = results.GetInt32(0)
|
||||
results.Close()
|
||||
Return idBS
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Edit a BabySitter with the givent babysitter
|
||||
''' </summary>
|
||||
''' <param name="aBS">The babysitter with new information. The ID of the babysitter is mandatory.</param>
|
||||
''' <remarks>The meet is not managed here. see updateBabysitterMeets</remarks>
|
||||
Public Sub editBabysitter(aBS As BabySitter)
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "UPDATE Babysitter SET BSFirstName = @bsfn, BSLastName = @bsln, BSGender = @bsg, BSAddress = @bsad, BSPhone1 = @bsph1, BSPhone2 = @bsph2 WHERE idBS = @bsid"
|
||||
|
||||
'If Not aBS.meet1 Is Nothing Then
|
||||
' request.Parameters.Add("@bsfk1", SqlDbType.Int).Value = aBS.meet1.id
|
||||
'End If
|
||||
'If Not aBS.meet2 Is Nothing Then
|
||||
' request.Parameters.Add("@fkbs2", SqlDbType.Int).Value = aBS.meet2.id
|
||||
'End If
|
||||
'If Not aBS.meet3 Is Nothing Then
|
||||
' request.Parameters.Add("@fkbs3", SqlDbType.Int).Value = aBS.meet3.id
|
||||
'End If
|
||||
request.Parameters.Add("@bsfn", SqlDbType.NVarChar).Value = aBS.firstname
|
||||
request.Parameters.Add("@bsln", SqlDbType.NVarChar).Value = aBS.lastname
|
||||
request.Parameters.Add("@bsg", SqlDbType.Bit).Value = aBS.gender
|
||||
request.Parameters.Add("@bsad", SqlDbType.NVarChar).Value = aBS.address
|
||||
request.Parameters.Add("@bsph1", SqlDbType.NVarChar).Value = aBS.phone1
|
||||
If Not aBS.phone2 Is Nothing Then
|
||||
request.Parameters.Add("@bsph2", SqlDbType.NVarChar).Value = aBS.phone2
|
||||
Else
|
||||
request.Parameters.Add("@bsph2", SqlDbType.NVarChar).Value = DBNull.Value
|
||||
End If
|
||||
request.Parameters.Add("@bsid", SqlDbType.Int).Value = aBS.id
|
||||
request.ExecuteReader().Close()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Update the relationshop between a babysitter and a meet. Many parameters can be added, making this method powerfull :
|
||||
''' - The meet and a babysitter to add : The meet is associated to the babysitter (BSID) in one of the 3 avalaible meeting (BSPod).
|
||||
''' - The meet and a babysitter to remove : The meet can be nothing, one of the 3 babisitter's meets is removed.
|
||||
''' - The meet and both. The meet is removed from one babyssiter and then added to another babysitter.
|
||||
''' </summary>
|
||||
''' <param name="meetNumber">The ID of the meet</param>
|
||||
''' <param name="BSIDAdd">The ID of the babyssiter who recieved the meet. This parameter is mandatory with the next one.</param>
|
||||
''' <param name="BSPosAdd">The firts avalaible empty meet of the babysitter where the meet Id will be placed. This parameter is mandatory with the previous one.</param>
|
||||
''' <param name="BSIDRemove">The ID of the babyssiter where the meet is to remove. This parameter is mandatory with the next one.</param>
|
||||
''' <param name="BSPosRemove">The firts avalaible empty meet of the babysitter where the meet Id will be removed. This parameter is mandatory with the previous one.</param>
|
||||
''' <remarks>TO get the first empty meet of a babysitter, see getFirstFreeMeetOf method</remarks>
|
||||
Public Sub updateBabysitterMeets(meetNumber As UShort, Optional BSIDAdd As Integer = 0, Optional BSPosAdd As Integer = 0, Optional BSIDRemove As Integer = 0, Optional BSPosRemove As Integer = 0)
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
If BSPosRemove >= 1 And BSPosRemove <= 4 Then
|
||||
Select Case BSPosRemove
|
||||
'Case 1
|
||||
' request.CommandText = "UPDATE Babysitter SET FK_idMeet1 = @bsfkR WHERE idBS = @bsidR"
|
||||
Case 2
|
||||
request.CommandText = "UPDATE Babysitter SET FK_idMeet1 = @bsfkR WHERE idBS = @bsidR"
|
||||
Case 3
|
||||
request.CommandText = "UPDATE Babysitter SET FK_idMeet2 = @bsfkR WHERE idBS = @bsidR"
|
||||
Case 4
|
||||
request.CommandText = "UPDATE Babysitter SET FK_idMeet3 = @bsfkR WHERE idBS = @bsidR"
|
||||
End Select
|
||||
'request.Parameters.Add("@bsPosR", SqlDbType.Int).Value = BSPosRemove
|
||||
request.Parameters.Add("@bsfkR", SqlDbType.Int).Value = DBNull.Value
|
||||
request.Parameters.Add("@bsidR", SqlDbType.Int).Value = BSIDRemove
|
||||
|
||||
request.ExecuteReader().Close()
|
||||
End If
|
||||
|
||||
If BSPosAdd >= 1 And BSPosAdd <= 3 Then
|
||||
Select Case BSPosAdd
|
||||
Case 1
|
||||
request.CommandText = "UPDATE Babysitter SET FK_idMeet1 = @bsfkA WHERE idBS = @bsidA"
|
||||
Case 2
|
||||
request.CommandText = "UPDATE Babysitter SET FK_idMeet2 = @bsfkA WHERE idBS = @bsidA"
|
||||
Case 3
|
||||
request.CommandText = "UPDATE Babysitter SET FK_idMeet3 = @bsfkA WHERE idBS = @bsidA"
|
||||
End Select
|
||||
'request.Parameters.Add("@bsPosA", SqlDbType.Int).Value = BSPosAdd
|
||||
request.Parameters.Add("@bsfkA", SqlDbType.Int).Value = meetNumber
|
||||
request.Parameters.Add("@bsidA", SqlDbType.Int).Value = BSIDAdd
|
||||
|
||||
request.ExecuteReader().Close()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Delete a babysitter and associated Meets from the database
|
||||
''' </summary>
|
||||
''' <param name="id">The id of the babysiter to delete</param>
|
||||
''' <remarks>Be aware that some child will loose their Meet.</remarks>
|
||||
Public Sub deleteBabysitterByID(id As Integer)
|
||||
Dim aBS As BabySitter = getBabysitterByID(id)
|
||||
|
||||
If Not aBS.meet1 Is Nothing Then deleteMeet(aBS.meet1.id)
|
||||
If Not aBS.meet2 Is Nothing Then deleteMeet(aBS.meet2.id)
|
||||
If Not aBS.meet3 Is Nothing Then deleteMeet(aBS.meet3.id)
|
||||
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "DELETE FROM Babysitter WHERE idBS = @BSid"
|
||||
request.Parameters.Add("@BSid", SqlDbType.Int).Value = id
|
||||
request.ExecuteReader.Close()
|
||||
|
||||
End Sub
|
||||
|
||||
'----- DB Methods for Meet -----'
|
||||
''' <summary>
|
||||
''' Get a meet by its ID
|
||||
''' </summary>
|
||||
''' <param name="id"></param>
|
||||
''' <returns>a meet or nothing</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function getMeetByID(id As Integer) As Meet
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "SELECT * FROM Meet WHERE idMeet = @id"
|
||||
request.Parameters.Add("@id", SqlDbType.Int).Value = id
|
||||
Dim results As SqlDataReader
|
||||
results = request.ExecuteReader()
|
||||
|
||||
Dim aMeet As Meet = Nothing
|
||||
If (results.HasRows) Then
|
||||
results.Read()
|
||||
aMeet = New Meet(results.GetInt32(1))
|
||||
aMeet.monday = results.GetBoolean(2)
|
||||
aMeet.tuesday = results.GetBoolean(3)
|
||||
aMeet.wednesday = results.GetBoolean(4)
|
||||
aMeet.thursday = results.GetBoolean(5)
|
||||
aMeet.friday = results.GetBoolean(6)
|
||||
aMeet.saturday = results.GetBoolean(7)
|
||||
aMeet.sunday = results.GetBoolean(8)
|
||||
results.Close()
|
||||
End If
|
||||
If Not results.IsClosed Then results.Close()
|
||||
Return aMeet
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Get a meet for a given Child ID
|
||||
''' </summary>
|
||||
''' <param name="id">The Id of the Child associated with the meet</param>
|
||||
''' <returns>The corresponding meet or nothing if the child has no meet</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function getMeetByChildId(id As Integer) As Meet
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "SELECT * FROM Meet WHERE FK_idChild = @id"
|
||||
request.Parameters.Add("@id", SqlDbType.Int).Value = id
|
||||
Dim results As SqlDataReader
|
||||
results = request.ExecuteReader()
|
||||
|
||||
Dim aMeet As Meet = Nothing
|
||||
If (results.HasRows) Then
|
||||
results.Read()
|
||||
aMeet = New Meet(results.GetInt32(1))
|
||||
aMeet.monday = results.GetBoolean(2)
|
||||
aMeet.tuesday = results.GetBoolean(3)
|
||||
aMeet.wednesday = results.GetBoolean(4)
|
||||
aMeet.thursday = results.GetBoolean(5)
|
||||
aMeet.friday = results.GetBoolean(6)
|
||||
aMeet.saturday = results.GetBoolean(7)
|
||||
aMeet.sunday = results.GetBoolean(8)
|
||||
results.Close()
|
||||
End If
|
||||
|
||||
If Not results.IsClosed Then results.Close()
|
||||
Return aMeet
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Edit this meet by updating his values
|
||||
''' </summary>
|
||||
''' <param name="aMeet">The meet to edit with new modifications</param>
|
||||
''' <remarks>The Meet Id is mandatory</remarks>
|
||||
Public Sub editMeet(aMeet As Meet)
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "UPDATE Meet SET Monday = @mon, Tuesday = @tue, Wednesday = @wed, Thursday = @thr, Friday = @fri, Saturday = @sat, Sunday = @sun WHERE idMeet = @idm"
|
||||
|
||||
request.Parameters.Add("@mon", SqlDbType.Bit).Value = aMeet.monday
|
||||
request.Parameters.Add("@tue", SqlDbType.Bit).Value = aMeet.tuesday
|
||||
request.Parameters.Add("@wed", SqlDbType.Bit).Value = aMeet.wednesday
|
||||
request.Parameters.Add("@thr", SqlDbType.Bit).Value = aMeet.thursday
|
||||
request.Parameters.Add("@fri", SqlDbType.Bit).Value = aMeet.friday
|
||||
request.Parameters.Add("@sat", SqlDbType.Bit).Value = aMeet.saturday
|
||||
request.Parameters.Add("@sun", SqlDbType.Bit).Value = aMeet.sunday
|
||||
request.Parameters.Add("@idm", SqlDbType.Int).Value = aMeet.id
|
||||
request.ExecuteReader().Close()
|
||||
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Add a meet to the database.
|
||||
''' </summary>
|
||||
''' <param name="aMeet">The meet to add</param>
|
||||
''' <param name="childID">The id of the child associated</param>
|
||||
''' <returns></returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function addMeet(aMeet As Meet, childID As Integer) As Integer
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
request.CommandText = "INSERT INTO Meet (FK_idChild, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday) VALUES (@idc, @mon, @tue, @wed, @thr, @fri, @sat, @sun)"
|
||||
|
||||
request.Parameters.Add("@mon", SqlDbType.Bit).Value = aMeet.monday
|
||||
request.Parameters.Add("@tue", SqlDbType.Bit).Value = aMeet.tuesday
|
||||
request.Parameters.Add("@wed", SqlDbType.Bit).Value = aMeet.wednesday
|
||||
request.Parameters.Add("@thr", SqlDbType.Bit).Value = aMeet.thursday
|
||||
request.Parameters.Add("@fri", SqlDbType.Bit).Value = aMeet.friday
|
||||
request.Parameters.Add("@sat", SqlDbType.Bit).Value = aMeet.saturday
|
||||
request.Parameters.Add("@sun", SqlDbType.Bit).Value = aMeet.sunday
|
||||
request.Parameters.Add("@idc", SqlDbType.Int).Value = childID
|
||||
request.ExecuteReader().Close()
|
||||
|
||||
request.CommandText = "SELECT idMeet FROM Meet WHERE FK_idChild = @idch"
|
||||
request.Parameters.Add("@idch", SqlDbType.Int).Value = childID
|
||||
Dim results As SqlDataReader
|
||||
results = request.ExecuteReader()
|
||||
results.Read()
|
||||
Dim idBS As Integer = results.GetInt32(0)
|
||||
results.Close()
|
||||
Return idBS
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Delete the Meet where the id is given. Also update the associated Babysitter
|
||||
''' </summary>
|
||||
''' <param name="id">The id of the meet to delete</param>
|
||||
''' <remarks>Be aware of the difference between the Child ID (Foreing Key) and the Meet ID.</remarks>
|
||||
Public Sub deleteMeet(id As Integer)
|
||||
Dim request As SqlCommand = New SqlCommand()
|
||||
request.Connection = DBConnexion
|
||||
|
||||
' First wee search wich babysitter has the meet.
|
||||
request.CommandText = "SELECT FK_idMeet1, FK_idMeet2, FK_idMeet3, idBS FROM Babysitter WHERE FK_idMeet1 = @id OR FK_idMeet2 = @id OR FK_idMeet3 = @id"
|
||||
request.Parameters.Add("@id", SqlDbType.Int).Value = id
|
||||
|
||||
Dim results As SqlDataReader
|
||||
results = request.ExecuteReader()
|
||||
|
||||
' Then we delete this meet from it.
|
||||
'If there is no bs associated with this meet, we can delete it from the db
|
||||
If results.HasRows Then
|
||||
results.Read()
|
||||
Dim idBS As Integer = results.GetInt32(3)
|
||||
Dim wantedID As UShort = 0
|
||||
If Not results.IsDBNull(0) AndAlso id = results.GetInt32(0) Then
|
||||
wantedID = 1
|
||||
ElseIf Not results.IsDBNull(1) AndAlso id = results.GetInt32(1) Then
|
||||
wantedID = 2
|
||||
ElseIf Not results.IsDBNull(2) AndAlso id = results.GetInt32(2) Then
|
||||
wantedID = 3
|
||||
End If
|
||||
|
||||
results.Close()
|
||||
|
||||
Select Case wantedID
|
||||
Case 1
|
||||
request.CommandText = "UPDATE Babysitter SET FK_idMeet1 = @bsfk WHERE idBS = @bsid"
|
||||
Case 2
|
||||
request.CommandText = "UPDATE Babysitter SET FK_idMeet2 = @bsfk WHERE idBS = @bsid"
|
||||
Case 3
|
||||
request.CommandText = "UPDATE Babysitter SET FK_idMeet3 = @bsfk WHERE idBS = @bsid"
|
||||
End Select
|
||||
request.Parameters.Add("@bsfk", SqlDbType.Int).Value = DBNull.Value
|
||||
request.Parameters.Add("@bsid", SqlDbType.Int).Value = idBS
|
||||
request.ExecuteReader().Close()
|
||||
End If
|
||||
|
||||
'Finaly, the meet has no more constraint in the database, we can safely delete it.
|
||||
request.CommandText = "DELETE FROM Meet WHERE idMeet = @chid"
|
||||
request.Parameters.Add("@chid", SqlDbType.Int).Value = id
|
||||
request.ExecuteReader.Close()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
242
ApplicationCrèche 1/Database/CrecheDataSet.Designer.vb
generated
Normal file
@ -0,0 +1,242 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Ce code a été généré par un outil.
|
||||
' Version du runtime :4.0.30319.18033
|
||||
'
|
||||
' Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
|
||||
' le code est régénéré.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict Off
|
||||
Option Explicit On
|
||||
|
||||
|
||||
|
||||
'''<summary>
|
||||
'''Represents a strongly typed in-memory cache of data.
|
||||
'''</summary>
|
||||
<Global.System.Serializable(), _
|
||||
Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
|
||||
Global.System.ComponentModel.ToolboxItem(true), _
|
||||
Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema"), _
|
||||
Global.System.Xml.Serialization.XmlRootAttribute("CrecheDataSet"), _
|
||||
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")> _
|
||||
Partial Public Class CrecheDataSet
|
||||
Inherits Global.System.Data.DataSet
|
||||
|
||||
Private _schemaSerializationMode As Global.System.Data.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Sub New()
|
||||
MyBase.New
|
||||
Me.BeginInit
|
||||
Me.InitClass
|
||||
Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
|
||||
AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
|
||||
AddHandler MyBase.Relations.CollectionChanged, schemaChangedHandler
|
||||
Me.EndInit
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
|
||||
MyBase.New(info, context, false)
|
||||
If (Me.IsBinarySerialized(info, context) = true) Then
|
||||
Me.InitVars(false)
|
||||
Dim schemaChangedHandler1 As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
|
||||
AddHandler Me.Tables.CollectionChanged, schemaChangedHandler1
|
||||
AddHandler Me.Relations.CollectionChanged, schemaChangedHandler1
|
||||
Return
|
||||
End If
|
||||
Dim strSchema As String = CType(info.GetValue("XmlSchema", GetType(String)),String)
|
||||
If (Me.DetermineSchemaSerializationMode(info, context) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then
|
||||
Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet()
|
||||
ds.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))
|
||||
Me.DataSetName = ds.DataSetName
|
||||
Me.Prefix = ds.Prefix
|
||||
Me.Namespace = ds.Namespace
|
||||
Me.Locale = ds.Locale
|
||||
Me.CaseSensitive = ds.CaseSensitive
|
||||
Me.EnforceConstraints = ds.EnforceConstraints
|
||||
Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add)
|
||||
Me.InitVars
|
||||
Else
|
||||
Me.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))
|
||||
End If
|
||||
Me.GetSerializationData(info, context)
|
||||
Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
|
||||
AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
|
||||
AddHandler Me.Relations.CollectionChanged, schemaChangedHandler
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
|
||||
Global.System.ComponentModel.BrowsableAttribute(true), _
|
||||
Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Visible)> _
|
||||
Public Overrides Property SchemaSerializationMode() As Global.System.Data.SchemaSerializationMode
|
||||
Get
|
||||
Return Me._schemaSerializationMode
|
||||
End Get
|
||||
Set
|
||||
Me._schemaSerializationMode = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
|
||||
Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
|
||||
Public Shadows ReadOnly Property Tables() As Global.System.Data.DataTableCollection
|
||||
Get
|
||||
Return MyBase.Tables
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
|
||||
Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
|
||||
Public Shadows ReadOnly Property Relations() As Global.System.Data.DataRelationCollection
|
||||
Get
|
||||
Return MyBase.Relations
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Protected Overrides Sub InitializeDerivedDataSet()
|
||||
Me.BeginInit
|
||||
Me.InitClass
|
||||
Me.EndInit
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Overrides Function Clone() As Global.System.Data.DataSet
|
||||
Dim cln As CrecheDataSet = CType(MyBase.Clone,CrecheDataSet)
|
||||
cln.InitVars
|
||||
cln.SchemaSerializationMode = Me.SchemaSerializationMode
|
||||
Return cln
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Protected Overrides Function ShouldSerializeTables() As Boolean
|
||||
Return false
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Protected Overrides Function ShouldSerializeRelations() As Boolean
|
||||
Return false
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Protected Overrides Sub ReadXmlSerializable(ByVal reader As Global.System.Xml.XmlReader)
|
||||
If (Me.DetermineSchemaSerializationMode(reader) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then
|
||||
Me.Reset
|
||||
Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet()
|
||||
ds.ReadXml(reader)
|
||||
Me.DataSetName = ds.DataSetName
|
||||
Me.Prefix = ds.Prefix
|
||||
Me.Namespace = ds.Namespace
|
||||
Me.Locale = ds.Locale
|
||||
Me.CaseSensitive = ds.CaseSensitive
|
||||
Me.EnforceConstraints = ds.EnforceConstraints
|
||||
Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add)
|
||||
Me.InitVars
|
||||
Else
|
||||
Me.ReadXml(reader)
|
||||
Me.InitVars
|
||||
End If
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Protected Overrides Function GetSchemaSerializable() As Global.System.Xml.Schema.XmlSchema
|
||||
Dim stream As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
|
||||
Me.WriteXmlSchema(New Global.System.Xml.XmlTextWriter(stream, Nothing))
|
||||
stream.Position = 0
|
||||
Return Global.System.Xml.Schema.XmlSchema.Read(New Global.System.Xml.XmlTextReader(stream), Nothing)
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Friend Overloads Sub InitVars()
|
||||
Me.InitVars(true)
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Friend Overloads Sub InitVars(ByVal initTable As Boolean)
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Private Sub InitClass()
|
||||
Me.DataSetName = "CrecheDataSet"
|
||||
Me.Prefix = ""
|
||||
Me.Namespace = "http://tempuri.org/CrecheDataSet.xsd"
|
||||
Me.EnforceConstraints = true
|
||||
Me.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Private Sub SchemaChanged(ByVal sender As Object, ByVal e As Global.System.ComponentModel.CollectionChangeEventArgs)
|
||||
If (e.Action = Global.System.ComponentModel.CollectionChangeAction.Remove) Then
|
||||
Me.InitVars
|
||||
End If
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Shared Function GetTypedDataSetSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
|
||||
Dim ds As CrecheDataSet = New CrecheDataSet()
|
||||
Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
|
||||
Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
|
||||
Dim any As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
|
||||
any.Namespace = ds.Namespace
|
||||
sequence.Items.Add(any)
|
||||
type.Particle = sequence
|
||||
Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
|
||||
If xs.Contains(dsSchema.TargetNamespace) Then
|
||||
Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
|
||||
Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
|
||||
Try
|
||||
Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
|
||||
dsSchema.Write(s1)
|
||||
Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
|
||||
Do While schemas.MoveNext
|
||||
schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
|
||||
s2.SetLength(0)
|
||||
schema.Write(s2)
|
||||
If (s1.Length = s2.Length) Then
|
||||
s1.Position = 0
|
||||
s2.Position = 0
|
||||
|
||||
Do While ((s1.Position <> s1.Length) _
|
||||
AndAlso (s1.ReadByte = s2.ReadByte))
|
||||
|
||||
|
||||
Loop
|
||||
If (s1.Position = s1.Length) Then
|
||||
Return type
|
||||
End If
|
||||
End If
|
||||
|
||||
Loop
|
||||
Finally
|
||||
If (Not (s1) Is Nothing) Then
|
||||
s1.Close
|
||||
End If
|
||||
If (Not (s2) Is Nothing) Then
|
||||
s2.Close
|
||||
End If
|
||||
End Try
|
||||
End If
|
||||
xs.Add(dsSchema)
|
||||
Return type
|
||||
End Function
|
||||
End Class
|
1
ApplicationCrèche 1/Database/CrecheDataSet.xsc
Normal file
@ -0,0 +1 @@
|
||||
|
19
ApplicationCrèche 1/Database/CrecheDataSet.xsd
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema id="CrecheDataSet" targetNamespace="http://tempuri.org/CrecheDataSet.xsd" xmlns:mstns="http://tempuri.org/CrecheDataSet.xsd" xmlns="http://tempuri.org/CrecheDataSet.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
|
||||
<xs:annotation>
|
||||
<xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<Connections>
|
||||
<Connection AppSettingsObjectName="MySettings" AppSettingsPropertyName="CrecheConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="CrecheConnectionString (MySettings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.ApplicationCrèche_1.My.MySettings.GlobalReference.Default.CrecheConnectionString" Provider="System.Data.SqlClient" />
|
||||
</Connections>
|
||||
<Tables />
|
||||
<Sources />
|
||||
</DataSource>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:element name="CrecheDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="True" msprop:Generator_DataSetName="CrecheDataSet" msprop:Generator_UserDSName="CrecheDataSet">
|
||||
<xs:complexType>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
1
ApplicationCrèche 1/Database/CrecheDataSet.xss
Normal file
@ -0,0 +1 @@
|
||||
|
218
ApplicationCrèche 1/Forms/FormAddBS.Designer.vb
generated
Normal file
@ -0,0 +1,218 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class FormAddBS
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form remplace la méthode Dispose pour nettoyer la liste des composants.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Requise par le Concepteur Windows Form
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'REMARQUE : la procédure suivante est requise par le Concepteur Windows Form
|
||||
'Elle peut être modifiée à l'aide du Concepteur Windows Form.
|
||||
'Ne la modifiez pas à l'aide de l'éditeur de code.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.RBFemale = New System.Windows.Forms.RadioButton()
|
||||
Me.RBMale = New System.Windows.Forms.RadioButton()
|
||||
Me.LabelGender = New System.Windows.Forms.Label()
|
||||
Me.TBAddress = New System.Windows.Forms.TextBox()
|
||||
Me.TBLastName = New System.Windows.Forms.TextBox()
|
||||
Me.TBFirstName = New System.Windows.Forms.TextBox()
|
||||
Me.LabelLastName = New System.Windows.Forms.Label()
|
||||
Me.LabelFirstName = New System.Windows.Forms.Label()
|
||||
Me.TBPhone2 = New System.Windows.Forms.TextBox()
|
||||
Me.TBPhone1 = New System.Windows.Forms.TextBox()
|
||||
Me.LabelPhone2 = New System.Windows.Forms.Label()
|
||||
Me.LabelPhone1 = New System.Windows.Forms.Label()
|
||||
Me.LabelAddress = New System.Windows.Forms.Label()
|
||||
Me.ButtonCancel = New System.Windows.Forms.Button()
|
||||
Me.ButtonAdd = New System.Windows.Forms.Button()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'RBFemale
|
||||
'
|
||||
Me.RBFemale.AutoSize = True
|
||||
Me.RBFemale.Location = New System.Drawing.Point(171, 68)
|
||||
Me.RBFemale.Name = "RBFemale"
|
||||
Me.RBFemale.Size = New System.Drawing.Size(61, 17)
|
||||
Me.RBFemale.TabIndex = 3
|
||||
Me.RBFemale.TabStop = True
|
||||
Me.RBFemale.Text = "Female"
|
||||
Me.RBFemale.UseVisualStyleBackColor = True
|
||||
'
|
||||
'RBMale
|
||||
'
|
||||
Me.RBMale.AutoSize = True
|
||||
Me.RBMale.Location = New System.Drawing.Point(80, 68)
|
||||
Me.RBMale.Name = "RBMale"
|
||||
Me.RBMale.Size = New System.Drawing.Size(50, 17)
|
||||
Me.RBMale.TabIndex = 2
|
||||
Me.RBMale.TabStop = True
|
||||
Me.RBMale.Text = "Male"
|
||||
Me.RBMale.UseVisualStyleBackColor = True
|
||||
'
|
||||
'LabelGender
|
||||
'
|
||||
Me.LabelGender.AutoSize = True
|
||||
Me.LabelGender.Location = New System.Drawing.Point(12, 70)
|
||||
Me.LabelGender.Name = "LabelGender"
|
||||
Me.LabelGender.Size = New System.Drawing.Size(48, 13)
|
||||
Me.LabelGender.TabIndex = 20
|
||||
Me.LabelGender.Text = "Gender:"
|
||||
'
|
||||
'TBAddress
|
||||
'
|
||||
Me.TBAddress.Location = New System.Drawing.Point(12, 111)
|
||||
Me.TBAddress.Multiline = True
|
||||
Me.TBAddress.Name = "TBAddress"
|
||||
Me.TBAddress.Size = New System.Drawing.Size(258, 87)
|
||||
Me.TBAddress.TabIndex = 4
|
||||
'
|
||||
'TBLastName
|
||||
'
|
||||
Me.TBLastName.Location = New System.Drawing.Point(80, 40)
|
||||
Me.TBLastName.Name = "TBLastName"
|
||||
Me.TBLastName.Size = New System.Drawing.Size(190, 22)
|
||||
Me.TBLastName.TabIndex = 1
|
||||
'
|
||||
'TBFirstName
|
||||
'
|
||||
Me.TBFirstName.Location = New System.Drawing.Point(80, 12)
|
||||
Me.TBFirstName.Name = "TBFirstName"
|
||||
Me.TBFirstName.Size = New System.Drawing.Size(190, 22)
|
||||
Me.TBFirstName.TabIndex = 0
|
||||
'
|
||||
'LabelLastName
|
||||
'
|
||||
Me.LabelLastName.AutoSize = True
|
||||
Me.LabelLastName.Location = New System.Drawing.Point(12, 43)
|
||||
Me.LabelLastName.Name = "LabelLastName"
|
||||
Me.LabelLastName.Size = New System.Drawing.Size(62, 13)
|
||||
Me.LabelLastName.TabIndex = 16
|
||||
Me.LabelLastName.Text = "Last Name:"
|
||||
'
|
||||
'LabelFirstName
|
||||
'
|
||||
Me.LabelFirstName.AutoSize = True
|
||||
Me.LabelFirstName.Location = New System.Drawing.Point(12, 15)
|
||||
Me.LabelFirstName.Name = "LabelFirstName"
|
||||
Me.LabelFirstName.Size = New System.Drawing.Size(63, 13)
|
||||
Me.LabelFirstName.TabIndex = 15
|
||||
Me.LabelFirstName.Text = "First name:"
|
||||
'
|
||||
'TBPhone2
|
||||
'
|
||||
Me.TBPhone2.Location = New System.Drawing.Point(67, 239)
|
||||
Me.TBPhone2.Name = "TBPhone2"
|
||||
Me.TBPhone2.Size = New System.Drawing.Size(203, 22)
|
||||
Me.TBPhone2.TabIndex = 6
|
||||
'
|
||||
'TBPhone1
|
||||
'
|
||||
Me.TBPhone1.Location = New System.Drawing.Point(67, 211)
|
||||
Me.TBPhone1.Name = "TBPhone1"
|
||||
Me.TBPhone1.Size = New System.Drawing.Size(203, 22)
|
||||
Me.TBPhone1.TabIndex = 5
|
||||
'
|
||||
'LabelPhone2
|
||||
'
|
||||
Me.LabelPhone2.AutoSize = True
|
||||
Me.LabelPhone2.Location = New System.Drawing.Point(12, 242)
|
||||
Me.LabelPhone2.Name = "LabelPhone2"
|
||||
Me.LabelPhone2.Size = New System.Drawing.Size(52, 13)
|
||||
Me.LabelPhone2.TabIndex = 25
|
||||
Me.LabelPhone2.Text = "Phone 2:"
|
||||
'
|
||||
'LabelPhone1
|
||||
'
|
||||
Me.LabelPhone1.AutoSize = True
|
||||
Me.LabelPhone1.Location = New System.Drawing.Point(12, 214)
|
||||
Me.LabelPhone1.Name = "LabelPhone1"
|
||||
Me.LabelPhone1.Size = New System.Drawing.Size(52, 13)
|
||||
Me.LabelPhone1.TabIndex = 24
|
||||
Me.LabelPhone1.Text = "Phone 1:"
|
||||
'
|
||||
'LabelAddress
|
||||
'
|
||||
Me.LabelAddress.AutoSize = True
|
||||
Me.LabelAddress.Location = New System.Drawing.Point(12, 95)
|
||||
Me.LabelAddress.Name = "LabelAddress"
|
||||
Me.LabelAddress.Size = New System.Drawing.Size(51, 13)
|
||||
Me.LabelAddress.TabIndex = 23
|
||||
Me.LabelAddress.Text = "Address:"
|
||||
'
|
||||
'ButtonCancel
|
||||
'
|
||||
Me.ButtonCancel.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.ButtonCancel.Location = New System.Drawing.Point(196, 282)
|
||||
Me.ButtonCancel.Name = "ButtonCancel"
|
||||
Me.ButtonCancel.Size = New System.Drawing.Size(75, 23)
|
||||
Me.ButtonCancel.TabIndex = 8
|
||||
Me.ButtonCancel.Text = "Cancel"
|
||||
Me.ButtonCancel.UseVisualStyleBackColor = True
|
||||
'
|
||||
'ButtonAdd
|
||||
'
|
||||
Me.ButtonAdd.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.ButtonAdd.Location = New System.Drawing.Point(115, 282)
|
||||
Me.ButtonAdd.Name = "ButtonAdd"
|
||||
Me.ButtonAdd.Size = New System.Drawing.Size(75, 23)
|
||||
Me.ButtonAdd.TabIndex = 7
|
||||
Me.ButtonAdd.Text = "Add"
|
||||
Me.ButtonAdd.UseVisualStyleBackColor = True
|
||||
'
|
||||
'FormAddBS
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(283, 317)
|
||||
Me.Controls.Add(Me.ButtonAdd)
|
||||
Me.Controls.Add(Me.ButtonCancel)
|
||||
Me.Controls.Add(Me.TBPhone2)
|
||||
Me.Controls.Add(Me.TBPhone1)
|
||||
Me.Controls.Add(Me.LabelPhone2)
|
||||
Me.Controls.Add(Me.LabelPhone1)
|
||||
Me.Controls.Add(Me.LabelAddress)
|
||||
Me.Controls.Add(Me.RBFemale)
|
||||
Me.Controls.Add(Me.RBMale)
|
||||
Me.Controls.Add(Me.LabelGender)
|
||||
Me.Controls.Add(Me.TBAddress)
|
||||
Me.Controls.Add(Me.TBLastName)
|
||||
Me.Controls.Add(Me.TBFirstName)
|
||||
Me.Controls.Add(Me.LabelLastName)
|
||||
Me.Controls.Add(Me.LabelFirstName)
|
||||
Me.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
Me.MaximizeBox = False
|
||||
Me.Name = "FormAddBS"
|
||||
Me.Text = "FormAddBS"
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents RBFemale As System.Windows.Forms.RadioButton
|
||||
Friend WithEvents RBMale As System.Windows.Forms.RadioButton
|
||||
Friend WithEvents LabelGender As System.Windows.Forms.Label
|
||||
Friend WithEvents TBAddress As System.Windows.Forms.TextBox
|
||||
Friend WithEvents TBLastName As System.Windows.Forms.TextBox
|
||||
Friend WithEvents TBFirstName As System.Windows.Forms.TextBox
|
||||
Friend WithEvents LabelLastName As System.Windows.Forms.Label
|
||||
Friend WithEvents LabelFirstName As System.Windows.Forms.Label
|
||||
Friend WithEvents TBPhone2 As System.Windows.Forms.TextBox
|
||||
Friend WithEvents TBPhone1 As System.Windows.Forms.TextBox
|
||||
Friend WithEvents LabelPhone2 As System.Windows.Forms.Label
|
||||
Friend WithEvents LabelPhone1 As System.Windows.Forms.Label
|
||||
Friend WithEvents LabelAddress As System.Windows.Forms.Label
|
||||
Friend WithEvents ButtonCancel As System.Windows.Forms.Button
|
||||
Friend WithEvents ButtonAdd As System.Windows.Forms.Button
|
||||
End Class
|
120
ApplicationCrèche 1/Forms/FormAddBS.resx
Normal file
@ -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>
|
3
ApplicationCrèche 1/Forms/FormAddBS.vb
Normal file
@ -0,0 +1,3 @@
|
||||
Public Class FormAddBS
|
||||
|
||||
End Class
|
240
ApplicationCrèche 1/Forms/FormBabySitterID.Designer.vb
generated
Normal file
@ -0,0 +1,240 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class FormBabySitterID
|
||||
Inherits ApplicationCrèche_1.FormID
|
||||
|
||||
'Form remplace la méthode Dispose pour nettoyer la liste des composants.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Requise par le Concepteur Windows Form
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'REMARQUE : la procédure suivante est requise par le Concepteur Windows Form
|
||||
'Elle peut être modifiée à l'aide du Concepteur Windows Form.
|
||||
'Ne la modifiez pas à l'aide de l'éditeur de code.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FormBabySitterID))
|
||||
Me.LabelAddress = New System.Windows.Forms.Label()
|
||||
Me.LabelPhone1 = New System.Windows.Forms.Label()
|
||||
Me.LabelPhone2 = New System.Windows.Forms.Label()
|
||||
Me.TBPhone1 = New System.Windows.Forms.TextBox()
|
||||
Me.TBPhone2 = New System.Windows.Forms.TextBox()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.Label5 = New System.Windows.Forms.Label()
|
||||
Me.Keep3 = New System.Windows.Forms.Label()
|
||||
Me.Keep2 = New System.Windows.Forms.Label()
|
||||
Me.Keep1 = New System.Windows.Forms.Label()
|
||||
Me.Keep4 = New System.Windows.Forms.Label()
|
||||
Me.Keep7 = New System.Windows.Forms.Label()
|
||||
Me.Keep6 = New System.Windows.Forms.Label()
|
||||
Me.Keep5 = New System.Windows.Forms.Label()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'ButtonEdit
|
||||
'
|
||||
Me.ButtonEdit.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText
|
||||
'
|
||||
'ButtonClose
|
||||
'
|
||||
'
|
||||
'LabelAddress
|
||||
'
|
||||
Me.LabelAddress.AutoSize = True
|
||||
Me.LabelAddress.Location = New System.Drawing.Point(12, 166)
|
||||
Me.LabelAddress.Name = "LabelAddress"
|
||||
Me.LabelAddress.Size = New System.Drawing.Size(51, 13)
|
||||
Me.LabelAddress.TabIndex = 15
|
||||
Me.LabelAddress.Text = "Address:"
|
||||
'
|
||||
'LabelPhone1
|
||||
'
|
||||
Me.LabelPhone1.AutoSize = True
|
||||
Me.LabelPhone1.Location = New System.Drawing.Point(12, 285)
|
||||
Me.LabelPhone1.Name = "LabelPhone1"
|
||||
Me.LabelPhone1.Size = New System.Drawing.Size(52, 13)
|
||||
Me.LabelPhone1.TabIndex = 16
|
||||
Me.LabelPhone1.Text = "Phone 1:"
|
||||
'
|
||||
'LabelPhone2
|
||||
'
|
||||
Me.LabelPhone2.AutoSize = True
|
||||
Me.LabelPhone2.Location = New System.Drawing.Point(12, 313)
|
||||
Me.LabelPhone2.Name = "LabelPhone2"
|
||||
Me.LabelPhone2.Size = New System.Drawing.Size(52, 13)
|
||||
Me.LabelPhone2.TabIndex = 0
|
||||
Me.LabelPhone2.Text = "Phone 2:"
|
||||
'
|
||||
'TBPhone1
|
||||
'
|
||||
Me.TBPhone1.Location = New System.Drawing.Point(67, 282)
|
||||
Me.TBPhone1.Name = "TBPhone1"
|
||||
Me.TBPhone1.Size = New System.Drawing.Size(203, 22)
|
||||
Me.TBPhone1.TabIndex = 5
|
||||
'
|
||||
'TBPhone2
|
||||
'
|
||||
Me.TBPhone2.Location = New System.Drawing.Point(67, 310)
|
||||
Me.TBPhone2.Name = "TBPhone2"
|
||||
Me.TBPhone2.Size = New System.Drawing.Size(203, 22)
|
||||
Me.TBPhone2.TabIndex = 6
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.AutoSize = True
|
||||
Me.Label4.Font = New System.Drawing.Font("Segoe UI", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label4.Location = New System.Drawing.Point(12, 9)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(83, 30)
|
||||
Me.Label4.TabIndex = 2
|
||||
Me.Label4.Text = "Identity"
|
||||
'
|
||||
'Label5
|
||||
'
|
||||
Me.Label5.AutoSize = True
|
||||
Me.Label5.Font = New System.Drawing.Font("Segoe UI", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label5.Location = New System.Drawing.Point(276, 9)
|
||||
Me.Label5.Name = "Label5"
|
||||
Me.Label5.Size = New System.Drawing.Size(94, 30)
|
||||
Me.Label5.TabIndex = 1
|
||||
Me.Label5.Text = "Planning"
|
||||
'
|
||||
'Keep3
|
||||
'
|
||||
Me.Keep3.AutoSize = True
|
||||
Me.Keep3.Enabled = False
|
||||
Me.Keep3.Location = New System.Drawing.Point(293, 121)
|
||||
Me.Keep3.Name = "Keep3"
|
||||
Me.Keep3.Size = New System.Drawing.Size(67, 13)
|
||||
Me.Keep3.TabIndex = 22
|
||||
Me.Keep3.Text = "Wednesday"
|
||||
'
|
||||
'Keep2
|
||||
'
|
||||
Me.Keep2.AutoSize = True
|
||||
Me.Keep2.Enabled = False
|
||||
Me.Keep2.Location = New System.Drawing.Point(293, 89)
|
||||
Me.Keep2.Name = "Keep2"
|
||||
Me.Keep2.Size = New System.Drawing.Size(48, 13)
|
||||
Me.Keep2.TabIndex = 23
|
||||
Me.Keep2.Text = "Tuesday"
|
||||
'
|
||||
'Keep1
|
||||
'
|
||||
Me.Keep1.AutoSize = True
|
||||
Me.Keep1.Enabled = False
|
||||
Me.Keep1.Location = New System.Drawing.Point(293, 57)
|
||||
Me.Keep1.Name = "Keep1"
|
||||
Me.Keep1.Size = New System.Drawing.Size(49, 13)
|
||||
Me.Keep1.TabIndex = 24
|
||||
Me.Keep1.Text = "Monday"
|
||||
'
|
||||
'Keep4
|
||||
'
|
||||
Me.Keep4.AutoSize = True
|
||||
Me.Keep4.Enabled = False
|
||||
Me.Keep4.Location = New System.Drawing.Point(293, 153)
|
||||
Me.Keep4.Name = "Keep4"
|
||||
Me.Keep4.Size = New System.Drawing.Size(53, 13)
|
||||
Me.Keep4.TabIndex = 25
|
||||
Me.Keep4.Text = "Thursday"
|
||||
'
|
||||
'Keep7
|
||||
'
|
||||
Me.Keep7.AutoSize = True
|
||||
Me.Keep7.Enabled = False
|
||||
Me.Keep7.Location = New System.Drawing.Point(293, 249)
|
||||
Me.Keep7.Name = "Keep7"
|
||||
Me.Keep7.Size = New System.Drawing.Size(45, 13)
|
||||
Me.Keep7.TabIndex = 26
|
||||
Me.Keep7.Text = "Sunday"
|
||||
'
|
||||
'Keep6
|
||||
'
|
||||
Me.Keep6.AutoSize = True
|
||||
Me.Keep6.Enabled = False
|
||||
Me.Keep6.Location = New System.Drawing.Point(293, 217)
|
||||
Me.Keep6.Name = "Keep6"
|
||||
Me.Keep6.Size = New System.Drawing.Size(52, 13)
|
||||
Me.Keep6.TabIndex = 27
|
||||
Me.Keep6.Text = "Saturday"
|
||||
'
|
||||
'Keep5
|
||||
'
|
||||
Me.Keep5.AutoSize = True
|
||||
Me.Keep5.Enabled = False
|
||||
Me.Keep5.Location = New System.Drawing.Point(293, 185)
|
||||
Me.Keep5.Name = "Keep5"
|
||||
Me.Keep5.Size = New System.Drawing.Size(38, 13)
|
||||
Me.Keep5.TabIndex = 28
|
||||
Me.Keep5.Text = "Friday"
|
||||
'
|
||||
'FormBabySitterID
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.ClientSize = New System.Drawing.Size(544, 381)
|
||||
Me.Controls.Add(Me.Keep1)
|
||||
Me.Controls.Add(Me.Keep2)
|
||||
Me.Controls.Add(Me.Keep3)
|
||||
Me.Controls.Add(Me.Keep4)
|
||||
Me.Controls.Add(Me.Keep5)
|
||||
Me.Controls.Add(Me.Keep6)
|
||||
Me.Controls.Add(Me.Keep7)
|
||||
Me.Controls.Add(Me.Label5)
|
||||
Me.Controls.Add(Me.Label4)
|
||||
Me.Controls.Add(Me.TBPhone2)
|
||||
Me.Controls.Add(Me.TBPhone1)
|
||||
Me.Controls.Add(Me.LabelPhone2)
|
||||
Me.Controls.Add(Me.LabelPhone1)
|
||||
Me.Controls.Add(Me.LabelAddress)
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.MinimumSize = New System.Drawing.Size(550, 410)
|
||||
Me.Name = "FormBabySitterID"
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
||||
Me.Text = "BabySitter ID"
|
||||
Me.Controls.SetChildIndex(Me.ButtonEdit, 0)
|
||||
Me.Controls.SetChildIndex(Me.ButtonClose, 0)
|
||||
Me.Controls.SetChildIndex(Me.TBFirstName, 0)
|
||||
Me.Controls.SetChildIndex(Me.TBLastName, 0)
|
||||
Me.Controls.SetChildIndex(Me.TBAddress, 0)
|
||||
Me.Controls.SetChildIndex(Me.RBMale, 0)
|
||||
Me.Controls.SetChildIndex(Me.RBFemale, 0)
|
||||
Me.Controls.SetChildIndex(Me.LabelAddress, 0)
|
||||
Me.Controls.SetChildIndex(Me.LabelPhone1, 0)
|
||||
Me.Controls.SetChildIndex(Me.LabelPhone2, 0)
|
||||
Me.Controls.SetChildIndex(Me.TBPhone1, 0)
|
||||
Me.Controls.SetChildIndex(Me.TBPhone2, 0)
|
||||
Me.Controls.SetChildIndex(Me.Label4, 0)
|
||||
Me.Controls.SetChildIndex(Me.Label5, 0)
|
||||
Me.Controls.SetChildIndex(Me.Keep7, 0)
|
||||
Me.Controls.SetChildIndex(Me.Keep6, 0)
|
||||
Me.Controls.SetChildIndex(Me.Keep5, 0)
|
||||
Me.Controls.SetChildIndex(Me.Keep4, 0)
|
||||
Me.Controls.SetChildIndex(Me.Keep3, 0)
|
||||
Me.Controls.SetChildIndex(Me.Keep2, 0)
|
||||
Me.Controls.SetChildIndex(Me.Keep1, 0)
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents LabelAddress As System.Windows.Forms.Label
|
||||
Friend WithEvents LabelPhone1 As System.Windows.Forms.Label
|
||||
Friend WithEvents LabelPhone2 As System.Windows.Forms.Label
|
||||
Friend WithEvents TBPhone1 As System.Windows.Forms.TextBox
|
||||
Friend WithEvents TBPhone2 As System.Windows.Forms.TextBox
|
||||
Friend WithEvents Label4 As System.Windows.Forms.Label
|
||||
Friend WithEvents Label5 As System.Windows.Forms.Label
|
||||
Friend WithEvents Keep3 As System.Windows.Forms.Label
|
||||
Friend WithEvents Keep2 As System.Windows.Forms.Label
|
||||
Friend WithEvents Keep1 As System.Windows.Forms.Label
|
||||
Friend WithEvents Keep4 As System.Windows.Forms.Label
|
||||
Friend WithEvents Keep7 As System.Windows.Forms.Label
|
||||
Friend WithEvents Keep6 As System.Windows.Forms.Label
|
||||
Friend WithEvents Keep5 As System.Windows.Forms.Label
|
||||
|
||||
End Class
|
132
ApplicationCrèche 1/Forms/FormBabySitterID.resx
Normal file
@ -0,0 +1,132 @@
|
||||
<?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>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAEBAAAAEAIAB+AQAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAQAAAAEAgGAAAAH/P/YQAAAAlw
|
||||
SFlzAAALEwAACxMBAJqcGAAAATBJREFUOI2dkz1Ow0AQRp+Do5QcgxZxAFquQMMB0nIBGpo0tJEQB0Di
|
||||
EIgL0CPR0SChQBA4/tnMNxS7mCDHJMLSalce7/Ob2dkMGAA7QJZG3+NpGODu7gA5MARGaR78ARAQgDrN
|
||||
LWD0cH/17jJwEcEeVdIaNxRKqsWcg6PJboKpNXAZe/uHPxvW2Msabm8uSabVdyQHBrjAnfFw0ut//nTC
|
||||
4qMipdnWKo+m8c/TcLrWINQNs+cZZtaJ5QBZ2jQeXvQanD0ek3kXnscUY2CTAb2ArQ2673+lsNEgnlx/
|
||||
CpsM+lPYsgbZmlgEyADHXSyb0PmoqQOSpePuAmTLBbKGt5dXQt0FSEZZlMgcYiF8FRCaYs7d9ZTis0RL
|
||||
tS0d281xOZKQCVYuEsSWHPGP2+juAvgCwODN5kOjKQoAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
242
ApplicationCrèche 1/Forms/FormBabySitterID.vb
Normal file
@ -0,0 +1,242 @@
|
||||
Imports ApplicationCrèche_1.IDFormMode
|
||||
|
||||
Public Class FormBabySitterID
|
||||
' ----- Attributes -----
|
||||
Private actualFormMode As IDFormMode
|
||||
|
||||
' ----- Initialisators -----
|
||||
Private Sub FormBabySitterID_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub New(aFormMode As IDFormMode, Optional aBS As BabySitter = Nothing)
|
||||
Console.WriteLine("FormBabySitterID : Begining of a new instance")
|
||||
' Cet appel est requis par le concepteur.
|
||||
InitializeComponent()
|
||||
|
||||
' Ajoutez une initialisation quelconque après l'appel InitializeComponent().
|
||||
If aFormMode = CREATOR Or aBS Is Nothing Then
|
||||
ChangeMode(CREATOR)
|
||||
Else
|
||||
ChangeMode(aFormMode, aBS)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' ----- Methodes -----
|
||||
Private Function getBSFromIntern() As BabySitter
|
||||
Dim newBS As BabySitter = New BabySitter(Me.Tag)
|
||||
newBS.firstname = TBFirstName.Text
|
||||
newBS.lastname = TBLastName.Text
|
||||
newBS.gender = RBMale.Checked
|
||||
newBS.address = TBAddress.Text
|
||||
newBS.phone1 = TBPhone1.Text
|
||||
If Not String.IsNullOrEmpty(TBPhone2.Text) Then
|
||||
newBS.phone2 = TBPhone2.Text
|
||||
End If
|
||||
|
||||
Return newBS
|
||||
End Function
|
||||
|
||||
Private Function updateBSFromExtern(aBS As BabySitter) As Boolean
|
||||
If Not aBS Is Nothing Then
|
||||
' Fill up controls with all the data we have.
|
||||
Me.TBFirstName.Text = aBS.firstname 'Firstname
|
||||
Me.TBLastName.Text = aBS.lastname 'Lastname
|
||||
If aBS.gender Then 'Gender
|
||||
Me.RBMale.Checked = True
|
||||
Else
|
||||
Me.RBFemale.Checked = True
|
||||
End If
|
||||
Me.TBAddress.Text = aBS.address
|
||||
Me.TBPhone1.Text = aBS.phone1
|
||||
Me.TBPhone2.Text = aBS.phone2
|
||||
Me.Tag = aBS.id
|
||||
If Not aBS.meet1 Is Nothing Then
|
||||
Dim child1 As Child = dbdata.getChildByMeetID(aBS.meet1.id)
|
||||
updateMeet(child1)
|
||||
End If
|
||||
If Not aBS.meet2 Is Nothing Then
|
||||
Dim child2 As Child = dbdata.getChildByMeetID(aBS.meet2.id)
|
||||
updateMeet(child2)
|
||||
End If
|
||||
If Not aBS.meet3 Is Nothing Then
|
||||
Dim child3 As Child = dbdata.getChildByMeetID(aBS.meet3.id)
|
||||
updateMeet(child3)
|
||||
End If
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Sub updateMeet(aChild As Child)
|
||||
|
||||
If aChild.meet.monday Then
|
||||
Keep1.Enabled = aChild.meet.monday
|
||||
Keep1.Text &= " : " & aChild.firstname & " " & aChild.lastname
|
||||
End If
|
||||
|
||||
If aChild.meet.tuesday Then
|
||||
Keep2.Enabled = aChild.meet.tuesday
|
||||
Keep2.Text &= " : " & aChild.firstname & " " & aChild.lastname
|
||||
End If
|
||||
|
||||
If aChild.meet.wednesday Then
|
||||
Keep3.Enabled = aChild.meet.wednesday
|
||||
Keep3.Text &= " : " & aChild.firstname & " " & aChild.lastname
|
||||
End If
|
||||
|
||||
If aChild.meet.thursday Then
|
||||
Keep4.Enabled = aChild.meet.thursday
|
||||
Keep4.Text &= " : " & aChild.firstname & " " & aChild.lastname
|
||||
End If
|
||||
|
||||
If aChild.meet.friday Then
|
||||
Keep5.Enabled = aChild.meet.friday
|
||||
Keep5.Text &= " : " & aChild.firstname & " " & aChild.lastname
|
||||
End If
|
||||
|
||||
If aChild.meet.saturday Then
|
||||
Keep6.Enabled = aChild.meet.saturday
|
||||
Keep6.Text &= " : " & aChild.firstname & " " & aChild.lastname
|
||||
End If
|
||||
|
||||
If aChild.meet.sunday Then
|
||||
Keep7.Enabled = aChild.meet.sunday
|
||||
Keep7.Text &= " : " & aChild.firstname & " " & aChild.lastname
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ChangeMode(aFormMode As IDFormMode, Optional aBS As BabySitter = Nothing)
|
||||
updateBSFromExtern(aBS)
|
||||
If aFormMode = IDFormMode.CREATOR Then ' CREATOR MODE
|
||||
Me.actualFormMode = CREATOR
|
||||
Console.WriteLine("FormBabySitterID : Switch to CREATOR Mode")
|
||||
|
||||
'Change of the main triggers labels + title
|
||||
Me.Text = "New babysitter"
|
||||
Me.ButtonClose.Text = "Cancel"
|
||||
Me.ButtonEdit.Text = "Save"
|
||||
Me.RBMale.Checked = True
|
||||
Me.Tag = 0
|
||||
Me.ButtonEdit.Image = My.Resources.AddSheet2
|
||||
|
||||
ElseIf aFormMode = IDFormMode.VIEWER And Not aBS Is Nothing Then ' VIEW MODE
|
||||
Me.actualFormMode = VIEWER
|
||||
Console.WriteLine("FormBabySitterID : Switch to VIEWER Mode")
|
||||
|
||||
'We change the main triggers labels + title
|
||||
Me.Text = aBS.firstname + " " + aBS.lastname
|
||||
Me.ButtonClose.Text = "Close"
|
||||
Me.ButtonEdit.Text = "Edit"
|
||||
Me.ButtonEdit.Image = My.Resources.EditSheet2
|
||||
|
||||
'Activate most important security aspect (not show a window that can mat a save somewhere else)
|
||||
TBAddress.Enabled = False
|
||||
TBFirstName.Enabled = False
|
||||
TBLastName.Enabled = False
|
||||
TBPhone1.Enabled = False
|
||||
TBPhone2.Enabled = False
|
||||
RBFemale.Enabled = False
|
||||
RBMale.Enabled = False
|
||||
|
||||
ElseIf aFormMode = IDFormMode.EDITOR Then ' EDITOR MODE WITH THE CURRENT BS
|
||||
Console.WriteLine("FormBabySitterID : Switch to Editor Mode")
|
||||
Me.actualFormMode = EDITOR
|
||||
|
||||
'We change the main triggers labels + title
|
||||
Me.Text = Me.TBFirstName.Text + " " + Me.TBLastName.Text + " (Edit)"
|
||||
Me.ButtonClose.Text = "Cancel"
|
||||
Me.ButtonEdit.Text = "Update"
|
||||
Me.ButtonEdit.Image = My.Resources.ValidedSheet
|
||||
|
||||
'Turn off anti edit security
|
||||
TBAddress.Enabled = True
|
||||
TBFirstName.Enabled = True
|
||||
TBLastName.Enabled = True
|
||||
TBPhone1.Enabled = True
|
||||
TBPhone2.Enabled = True
|
||||
RBFemale.Enabled = True
|
||||
RBMale.Enabled = True
|
||||
|
||||
Else
|
||||
Console.WriteLine("FormChildId : No correct mode has been found.")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
' ----- Handles and Listeners -----
|
||||
Protected Overrides Sub ButtonEdit_Click(sender As System.Object, e As System.EventArgs)
|
||||
Dim Validated As Boolean = True
|
||||
If Me.actualFormMode = VIEWER Then 'EDIT'
|
||||
Me.ChangeMode(EDITOR)
|
||||
ElseIf Me.actualFormMode = CREATOR Then 'SAVE'
|
||||
' Error Provider
|
||||
If String.IsNullOrEmpty(TBFirstName.Text) Then
|
||||
ErrorProvider1.SetError(TBFirstName, "The first name field could not be empty." & vbNewLine & "Please fill this field.")
|
||||
Validated = False
|
||||
End If
|
||||
If String.IsNullOrEmpty(TBLastName.Text) Then
|
||||
ErrorProvider1.SetError(TBLastName, "The last name field could not be empty." & vbNewLine & "Please fill this field.")
|
||||
Validated = False
|
||||
End If
|
||||
If String.IsNullOrEmpty(TBPhone1.Text) Then
|
||||
ErrorProvider1.SetError(TBPhone1, "At least on phone number is required." & vbNewLine & "Please put a phone number here.")
|
||||
Validated = False
|
||||
End If
|
||||
If String.IsNullOrEmpty(TBAddress.Text) Then
|
||||
ErrorProvider1.SetError(LabelAddress, "The address field could not be empty." & vbNewLine & "Please fill this field.")
|
||||
Validated = False
|
||||
End If
|
||||
|
||||
If Not Validated Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'Validation
|
||||
Dim aBS As BabySitter = getBSFromIntern()
|
||||
dbdata.addBabysitter(aBS)
|
||||
Me.DialogResult = Windows.Forms.DialogResult.OK
|
||||
Me.Hide()
|
||||
|
||||
ElseIf Me.actualFormMode = EDITOR Then 'UPDATE'
|
||||
' Error Provider
|
||||
If String.IsNullOrEmpty(TBFirstName.Text) Then
|
||||
ErrorProvider1.SetError(TBFirstName, "The first name field could not be empty." & vbNewLine & "Please fill this field.")
|
||||
Validated = False
|
||||
End If
|
||||
If String.IsNullOrEmpty(TBLastName.Text) Then
|
||||
ErrorProvider1.SetError(TBLastName, "The last name field could not be empty." & vbNewLine & "Please fill this field.")
|
||||
Validated = False
|
||||
End If
|
||||
If String.IsNullOrEmpty(TBPhone1.Text) Then
|
||||
ErrorProvider1.SetError(TBPhone1, "At least on phone number is required." & vbNewLine & "Please put a phone number here.")
|
||||
Validated = False
|
||||
End If
|
||||
If String.IsNullOrEmpty(TBAddress.Text) Then
|
||||
ErrorProvider1.SetError(LabelAddress, "The address field could not be empty." & vbNewLine & "Please fill this field.")
|
||||
Validated = False
|
||||
End If
|
||||
|
||||
|
||||
If Not Validated Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
'Validation
|
||||
Dim aBS As BabySitter = getBSFromIntern()
|
||||
dbdata.editBabysitter(aBS)
|
||||
Me.DialogResult = Windows.Forms.DialogResult.OK
|
||||
Me.Hide()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ButtonClose_Click_1(sender As System.Object, e As System.EventArgs) Handles ButtonClose.Click
|
||||
Console.WriteLine("FormBabySitterID : Closing instance")
|
||||
Me.Close()
|
||||
Me.Finalize()
|
||||
End Sub
|
||||
|
||||
End Class
|
350
ApplicationCrèche 1/Forms/FormChildID.Designer.vb
generated
Normal file
@ -0,0 +1,350 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class FormChildID
|
||||
Inherits ApplicationCrèche_1.FormID
|
||||
|
||||
'Form remplace la méthode Dispose pour nettoyer la liste des composants.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Requise par le Concepteur Windows Form
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'REMARQUE : la procédure suivante est requise par le Concepteur Windows Form
|
||||
'Elle peut être modifiée à l'aide du Concepteur Windows Form.
|
||||
'Ne la modifiez pas à l'aide de l'éditeur de code.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FormChildID))
|
||||
Me.GroupBox2 = New System.Windows.Forms.GroupBox()
|
||||
Me.LabelBS = New System.Windows.Forms.LinkLabel()
|
||||
Me.ButtonBS = New System.Windows.Forms.Button()
|
||||
Me.CBSunday = New System.Windows.Forms.CheckBox()
|
||||
Me.CBSaturday = New System.Windows.Forms.CheckBox()
|
||||
Me.CBFriday = New System.Windows.Forms.CheckBox()
|
||||
Me.CBThursday = New System.Windows.Forms.CheckBox()
|
||||
Me.CBWednesday = New System.Windows.Forms.CheckBox()
|
||||
Me.CBTuesday = New System.Windows.Forms.CheckBox()
|
||||
Me.CBMonday = New System.Windows.Forms.CheckBox()
|
||||
Me.ButtonParent1 = New System.Windows.Forms.Button()
|
||||
Me.ButtonParent2 = New System.Windows.Forms.Button()
|
||||
Me.LabelAddress = New System.Windows.Forms.Label()
|
||||
Me.LabelIdentity = New System.Windows.Forms.Label()
|
||||
Me.LabelPlanning = New System.Windows.Forms.Label()
|
||||
Me.LabelAge = New System.Windows.Forms.Label()
|
||||
Me.DTPBord = New System.Windows.Forms.DateTimePicker()
|
||||
Me.LabelBornDate = New System.Windows.Forms.Label()
|
||||
Me.LabelParent1 = New System.Windows.Forms.LinkLabel()
|
||||
Me.LabelParent2 = New System.Windows.Forms.LinkLabel()
|
||||
Me.GroupBox2.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'ButtonEdit
|
||||
'
|
||||
Me.ButtonEdit.Image = Global.ApplicationCrèche_1.My.Resources.Resources.EditSheet2
|
||||
Me.ButtonEdit.TabIndex = 11
|
||||
Me.ButtonEdit.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText
|
||||
'
|
||||
'ButtonClose
|
||||
'
|
||||
Me.ButtonClose.TabIndex = 12
|
||||
'
|
||||
'TBAddress
|
||||
'
|
||||
Me.TBAddress.TabIndex = 5
|
||||
'
|
||||
'GroupBox2
|
||||
'
|
||||
Me.GroupBox2.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.GroupBox2.Controls.Add(Me.LabelBS)
|
||||
Me.GroupBox2.Controls.Add(Me.ButtonBS)
|
||||
Me.GroupBox2.Controls.Add(Me.CBSunday)
|
||||
Me.GroupBox2.Controls.Add(Me.CBSaturday)
|
||||
Me.GroupBox2.Controls.Add(Me.CBFriday)
|
||||
Me.GroupBox2.Controls.Add(Me.CBThursday)
|
||||
Me.GroupBox2.Controls.Add(Me.CBWednesday)
|
||||
Me.GroupBox2.Controls.Add(Me.CBTuesday)
|
||||
Me.GroupBox2.Controls.Add(Me.CBMonday)
|
||||
Me.GroupBox2.Location = New System.Drawing.Point(280, 46)
|
||||
Me.GroupBox2.Name = "GroupBox2"
|
||||
Me.GroupBox2.Size = New System.Drawing.Size(252, 223)
|
||||
Me.GroupBox2.TabIndex = 10
|
||||
Me.GroupBox2.TabStop = False
|
||||
Me.GroupBox2.Text = "Day of week"
|
||||
'
|
||||
'LabelBS
|
||||
'
|
||||
Me.LabelBS.ActiveLinkColor = System.Drawing.SystemColors.Highlight
|
||||
Me.LabelBS.DisabledLinkColor = System.Drawing.Color.Black
|
||||
Me.LabelBS.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline
|
||||
Me.LabelBS.LinkColor = System.Drawing.SystemColors.HotTrack
|
||||
Me.LabelBS.Location = New System.Drawing.Point(6, 139)
|
||||
Me.LabelBS.Name = "LabelBS"
|
||||
Me.LabelBS.Size = New System.Drawing.Size(240, 37)
|
||||
Me.LabelBS.TabIndex = 7
|
||||
Me.LabelBS.TabStop = True
|
||||
Me.LabelBS.Text = "Select a babysitter below"
|
||||
Me.LabelBS.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'ButtonBS
|
||||
'
|
||||
Me.ButtonBS.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.ButtonBS.Image = Global.ApplicationCrèche_1.My.Resources.Resources.OpenFolder2
|
||||
Me.ButtonBS.Location = New System.Drawing.Point(63, 186)
|
||||
Me.ButtonBS.Name = "ButtonBS"
|
||||
Me.ButtonBS.Size = New System.Drawing.Size(126, 23)
|
||||
Me.ButtonBS.TabIndex = 8
|
||||
Me.ButtonBS.Text = "Browse..."
|
||||
Me.ButtonBS.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText
|
||||
Me.ButtonBS.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CBSunday
|
||||
'
|
||||
Me.CBSunday.AutoSize = True
|
||||
Me.CBSunday.Location = New System.Drawing.Point(137, 79)
|
||||
Me.CBSunday.Name = "CBSunday"
|
||||
Me.CBSunday.Size = New System.Drawing.Size(64, 17)
|
||||
Me.CBSunday.TabIndex = 5
|
||||
Me.CBSunday.Text = "Sunday"
|
||||
Me.CBSunday.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CBSaturday
|
||||
'
|
||||
Me.CBSaturday.AutoSize = True
|
||||
Me.CBSaturday.Location = New System.Drawing.Point(137, 50)
|
||||
Me.CBSaturday.Name = "CBSaturday"
|
||||
Me.CBSaturday.Size = New System.Drawing.Size(71, 17)
|
||||
Me.CBSaturday.TabIndex = 3
|
||||
Me.CBSaturday.Text = "Saturday"
|
||||
Me.CBSaturday.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CBFriday
|
||||
'
|
||||
Me.CBFriday.AutoSize = True
|
||||
Me.CBFriday.Location = New System.Drawing.Point(137, 21)
|
||||
Me.CBFriday.Name = "CBFriday"
|
||||
Me.CBFriday.Size = New System.Drawing.Size(57, 17)
|
||||
Me.CBFriday.TabIndex = 1
|
||||
Me.CBFriday.Text = "Friday"
|
||||
Me.CBFriday.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CBThursday
|
||||
'
|
||||
Me.CBThursday.AutoSize = True
|
||||
Me.CBThursday.Location = New System.Drawing.Point(6, 108)
|
||||
Me.CBThursday.Name = "CBThursday"
|
||||
Me.CBThursday.Size = New System.Drawing.Size(72, 17)
|
||||
Me.CBThursday.TabIndex = 6
|
||||
Me.CBThursday.Text = "Thursday"
|
||||
Me.CBThursday.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CBWednesday
|
||||
'
|
||||
Me.CBWednesday.AutoSize = True
|
||||
Me.CBWednesday.Location = New System.Drawing.Point(6, 79)
|
||||
Me.CBWednesday.Name = "CBWednesday"
|
||||
Me.CBWednesday.Size = New System.Drawing.Size(86, 17)
|
||||
Me.CBWednesday.TabIndex = 4
|
||||
Me.CBWednesday.Text = "Wednesday"
|
||||
Me.CBWednesday.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CBTuesday
|
||||
'
|
||||
Me.CBTuesday.AutoSize = True
|
||||
Me.CBTuesday.Location = New System.Drawing.Point(6, 50)
|
||||
Me.CBTuesday.Name = "CBTuesday"
|
||||
Me.CBTuesday.Size = New System.Drawing.Size(67, 17)
|
||||
Me.CBTuesday.TabIndex = 2
|
||||
Me.CBTuesday.Text = "Tuesday"
|
||||
Me.CBTuesday.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CBMonday
|
||||
'
|
||||
Me.CBMonday.AutoSize = True
|
||||
Me.CBMonday.Location = New System.Drawing.Point(6, 21)
|
||||
Me.CBMonday.Name = "CBMonday"
|
||||
Me.CBMonday.Size = New System.Drawing.Size(68, 17)
|
||||
Me.CBMonday.TabIndex = 0
|
||||
Me.CBMonday.Text = "Monday"
|
||||
Me.CBMonday.UseVisualStyleBackColor = True
|
||||
'
|
||||
'ButtonParent1
|
||||
'
|
||||
Me.ButtonParent1.Image = Global.ApplicationCrèche_1.My.Resources.Resources.OpenFolder2
|
||||
Me.ButtonParent1.Location = New System.Drawing.Point(12, 282)
|
||||
Me.ButtonParent1.Name = "ButtonParent1"
|
||||
Me.ButtonParent1.Size = New System.Drawing.Size(125, 23)
|
||||
Me.ButtonParent1.TabIndex = 6
|
||||
Me.ButtonParent1.Text = "Browse parent 1..."
|
||||
Me.ButtonParent1.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText
|
||||
Me.ButtonParent1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'ButtonParent2
|
||||
'
|
||||
Me.ButtonParent2.Image = Global.ApplicationCrèche_1.My.Resources.Resources.OpenFolder2
|
||||
Me.ButtonParent2.Location = New System.Drawing.Point(12, 311)
|
||||
Me.ButtonParent2.Name = "ButtonParent2"
|
||||
Me.ButtonParent2.Size = New System.Drawing.Size(125, 23)
|
||||
Me.ButtonParent2.TabIndex = 8
|
||||
Me.ButtonParent2.Text = "Browse parent 2..."
|
||||
Me.ButtonParent2.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText
|
||||
Me.ButtonParent2.UseVisualStyleBackColor = True
|
||||
'
|
||||
'LabelAddress
|
||||
'
|
||||
Me.LabelAddress.AutoSize = True
|
||||
Me.LabelAddress.Location = New System.Drawing.Point(12, 166)
|
||||
Me.LabelAddress.Name = "LabelAddress"
|
||||
Me.LabelAddress.Size = New System.Drawing.Size(107, 13)
|
||||
Me.LabelAddress.TabIndex = 14
|
||||
Me.LabelAddress.Text = "Adress of childcare:"
|
||||
'
|
||||
'LabelIdentity
|
||||
'
|
||||
Me.LabelIdentity.AutoSize = True
|
||||
Me.LabelIdentity.Font = New System.Drawing.Font("Segoe UI", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.LabelIdentity.Location = New System.Drawing.Point(12, 9)
|
||||
Me.LabelIdentity.Name = "LabelIdentity"
|
||||
Me.LabelIdentity.Size = New System.Drawing.Size(83, 30)
|
||||
Me.LabelIdentity.TabIndex = 15
|
||||
Me.LabelIdentity.Text = "Identity"
|
||||
'
|
||||
'LabelPlanning
|
||||
'
|
||||
Me.LabelPlanning.AutoSize = True
|
||||
Me.LabelPlanning.Font = New System.Drawing.Font("Segoe UI", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.LabelPlanning.Location = New System.Drawing.Point(275, 9)
|
||||
Me.LabelPlanning.Name = "LabelPlanning"
|
||||
Me.LabelPlanning.Size = New System.Drawing.Size(94, 30)
|
||||
Me.LabelPlanning.TabIndex = 16
|
||||
Me.LabelPlanning.Text = "Planning"
|
||||
'
|
||||
'LabelAge
|
||||
'
|
||||
Me.LabelAge.AutoSize = True
|
||||
Me.LabelAge.Location = New System.Drawing.Point(197, 140)
|
||||
Me.LabelAge.Name = "LabelAge"
|
||||
Me.LabelAge.Size = New System.Drawing.Size(54, 13)
|
||||
Me.LabelAge.TabIndex = 5
|
||||
Me.LabelAge.Text = "AgeLabel"
|
||||
'
|
||||
'DTPBord
|
||||
'
|
||||
Me.DTPBord.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
|
||||
Me.DTPBord.Location = New System.Drawing.Point(80, 136)
|
||||
Me.DTPBord.Name = "DTPBord"
|
||||
Me.DTPBord.Size = New System.Drawing.Size(96, 22)
|
||||
Me.DTPBord.TabIndex = 4
|
||||
'
|
||||
'LabelBornDate
|
||||
'
|
||||
Me.LabelBornDate.AutoSize = True
|
||||
Me.LabelBornDate.Location = New System.Drawing.Point(12, 140)
|
||||
Me.LabelBornDate.Name = "LabelBornDate"
|
||||
Me.LabelBornDate.Size = New System.Drawing.Size(58, 13)
|
||||
Me.LabelBornDate.TabIndex = 17
|
||||
Me.LabelBornDate.Text = "Borndate:"
|
||||
'
|
||||
'LabelParent1
|
||||
'
|
||||
Me.LabelParent1.ActiveLinkColor = System.Drawing.SystemColors.Highlight
|
||||
Me.LabelParent1.DisabledLinkColor = System.Drawing.Color.Black
|
||||
Me.LabelParent1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.LabelParent1.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline
|
||||
Me.LabelParent1.LinkColor = System.Drawing.SystemColors.HotTrack
|
||||
Me.LabelParent1.Location = New System.Drawing.Point(143, 282)
|
||||
Me.LabelParent1.Name = "LabelParent1"
|
||||
Me.LabelParent1.Size = New System.Drawing.Size(389, 23)
|
||||
Me.LabelParent1.TabIndex = 7
|
||||
Me.LabelParent1.TabStop = True
|
||||
Me.LabelParent1.Text = "subscrib a new parent"
|
||||
Me.LabelParent1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.LabelParent1.VisitedLinkColor = System.Drawing.SystemColors.HotTrack
|
||||
'
|
||||
'LabelParent2
|
||||
'
|
||||
Me.LabelParent2.ActiveLinkColor = System.Drawing.SystemColors.Highlight
|
||||
Me.LabelParent2.DisabledLinkColor = System.Drawing.Color.Black
|
||||
Me.LabelParent2.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline
|
||||
Me.LabelParent2.LinkColor = System.Drawing.SystemColors.HotTrack
|
||||
Me.LabelParent2.Location = New System.Drawing.Point(143, 311)
|
||||
Me.LabelParent2.Name = "LabelParent2"
|
||||
Me.LabelParent2.Size = New System.Drawing.Size(389, 23)
|
||||
Me.LabelParent2.TabIndex = 9
|
||||
Me.LabelParent2.TabStop = True
|
||||
Me.LabelParent2.Text = "subscrib a new parent"
|
||||
Me.LabelParent2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.LabelParent2.VisitedLinkColor = System.Drawing.SystemColors.HotTrack
|
||||
'
|
||||
'FormChildID
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.ClientSize = New System.Drawing.Size(544, 381)
|
||||
Me.Controls.Add(Me.LabelParent2)
|
||||
Me.Controls.Add(Me.LabelParent1)
|
||||
Me.Controls.Add(Me.DTPBord)
|
||||
Me.Controls.Add(Me.LabelAge)
|
||||
Me.Controls.Add(Me.LabelPlanning)
|
||||
Me.Controls.Add(Me.LabelIdentity)
|
||||
Me.Controls.Add(Me.LabelAddress)
|
||||
Me.Controls.Add(Me.LabelBornDate)
|
||||
Me.Controls.Add(Me.ButtonParent2)
|
||||
Me.Controls.Add(Me.ButtonParent1)
|
||||
Me.Controls.Add(Me.GroupBox2)
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.MinimumSize = New System.Drawing.Size(550, 410)
|
||||
Me.Name = "FormChildID"
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
||||
Me.Text = "Child ID"
|
||||
Me.Controls.SetChildIndex(Me.ButtonEdit, 0)
|
||||
Me.Controls.SetChildIndex(Me.ButtonClose, 0)
|
||||
Me.Controls.SetChildIndex(Me.TBFirstName, 0)
|
||||
Me.Controls.SetChildIndex(Me.TBLastName, 0)
|
||||
Me.Controls.SetChildIndex(Me.TBAddress, 0)
|
||||
Me.Controls.SetChildIndex(Me.RBMale, 0)
|
||||
Me.Controls.SetChildIndex(Me.RBFemale, 0)
|
||||
Me.Controls.SetChildIndex(Me.GroupBox2, 0)
|
||||
Me.Controls.SetChildIndex(Me.ButtonParent1, 0)
|
||||
Me.Controls.SetChildIndex(Me.ButtonParent2, 0)
|
||||
Me.Controls.SetChildIndex(Me.LabelBornDate, 0)
|
||||
Me.Controls.SetChildIndex(Me.LabelAddress, 0)
|
||||
Me.Controls.SetChildIndex(Me.LabelIdentity, 0)
|
||||
Me.Controls.SetChildIndex(Me.LabelPlanning, 0)
|
||||
Me.Controls.SetChildIndex(Me.LabelAge, 0)
|
||||
Me.Controls.SetChildIndex(Me.DTPBord, 0)
|
||||
Me.Controls.SetChildIndex(Me.LabelParent1, 0)
|
||||
Me.Controls.SetChildIndex(Me.LabelParent2, 0)
|
||||
Me.GroupBox2.ResumeLayout(False)
|
||||
Me.GroupBox2.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
|
||||
Friend WithEvents CBMonday As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents CBSunday As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents CBSaturday As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents CBFriday As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents CBThursday As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents CBWednesday As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents CBTuesday As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents ButtonParent1 As System.Windows.Forms.Button
|
||||
Friend WithEvents ButtonParent2 As System.Windows.Forms.Button
|
||||
Friend WithEvents ButtonBS As System.Windows.Forms.Button
|
||||
Friend WithEvents LabelAddress As System.Windows.Forms.Label
|
||||
Friend WithEvents LabelIdentity As System.Windows.Forms.Label
|
||||
Friend WithEvents LabelPlanning As System.Windows.Forms.Label
|
||||
Friend WithEvents LabelAge As System.Windows.Forms.Label
|
||||
Friend WithEvents DTPBord As System.Windows.Forms.DateTimePicker
|
||||
Friend WithEvents LabelBornDate As System.Windows.Forms.Label
|
||||
Friend WithEvents LabelParent1 As System.Windows.Forms.LinkLabel
|
||||
Friend WithEvents LabelParent2 As System.Windows.Forms.LinkLabel
|
||||
Friend WithEvents LabelBS As System.Windows.Forms.LinkLabel
|
||||
|
||||
End Class
|
132
ApplicationCrèche 1/Forms/FormChildID.resx
Normal file
@ -0,0 +1,132 @@
|
||||
<?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>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAEBAAAAEAIAB+AQAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAQAAAAEAgGAAAAH/P/YQAAAAlw
|
||||
SFlzAAALEwAACxMBAJqcGAAAATBJREFUOI2dkz1Ow0AQRp+Do5QcgxZxAFquQMMB0nIBGpo0tJEQB0Di
|
||||
EIgL0CPR0SChQBA4/tnMNxS7mCDHJMLSalce7/Ob2dkMGAA7QJZG3+NpGODu7gA5MARGaR78ARAQgDrN
|
||||
LWD0cH/17jJwEcEeVdIaNxRKqsWcg6PJboKpNXAZe/uHPxvW2Msabm8uSabVdyQHBrjAnfFw0ut//nTC
|
||||
4qMipdnWKo+m8c/TcLrWINQNs+cZZtaJ5QBZ2jQeXvQanD0ek3kXnscUY2CTAb2ArQ2673+lsNEgnlx/
|
||||
CpsM+lPYsgbZmlgEyADHXSyb0PmoqQOSpePuAmTLBbKGt5dXQt0FSEZZlMgcYiF8FRCaYs7d9ZTis0RL
|
||||
tS0d281xOZKQCVYuEsSWHPGP2+juAvgCwODN5kOjKQoAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
517
ApplicationCrèche 1/Forms/FormChildID.vb
Normal file
@ -0,0 +1,517 @@
|
||||
Imports ApplicationCrèche_1.IDFormMode
|
||||
|
||||
Public Class FormChildID
|
||||
Inherits FormID
|
||||
' ----- Private Attributes -----
|
||||
Private actualFormMode As IDFormMode
|
||||
Private meetID As Integer
|
||||
Private oldBSID As Integer
|
||||
Private newBSID As Integer
|
||||
|
||||
' ----- Initialisators -----
|
||||
|
||||
Private Sub FormChildID_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub New(aFormMode As IDFormMode, Optional aChild As Child = Nothing)
|
||||
Console.WriteLine("FormChildID : Begining of a new instance")
|
||||
' Cet appel est requis par le concepteur.
|
||||
InitializeComponent()
|
||||
|
||||
' Ajoutez une initialisation quelconque après l'appel InitializeComponent().
|
||||
If aFormMode = CREATOR Or aChild Is Nothing Then
|
||||
ChangeMode(CREATOR)
|
||||
oldBSID = 0
|
||||
meetID = 0
|
||||
Else
|
||||
ChangeMode(aFormMode, aChild)
|
||||
If Not aChild.meet Is Nothing Then
|
||||
oldBSID = dbdata.getBabysitterByMeetID(aChild.meet.id).id
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' ----- Methods ------
|
||||
Private Function refreshBS(aBS As BabySitter)
|
||||
If Not aBS Is Nothing Then
|
||||
Me.LabelBS.Text = aBS.firstname + " " + aBS.lastname + " | " + aBS.phone1
|
||||
newBSID = aBS.id
|
||||
Return True
|
||||
Else
|
||||
LabelBS.Text = ""
|
||||
newBSID = Nothing
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Function refreshParent1(aParent As Parent) As Boolean
|
||||
If Not aParent Is Nothing Then
|
||||
Me.LabelParent1.Text = aParent.firstname + " " + aParent.lastname + " | " + aParent.phone
|
||||
Me.LabelParent1.Tag = aParent.id
|
||||
Return True
|
||||
Else
|
||||
Me.LabelParent2.Tag = 0
|
||||
Me.LabelParent2.Text = "subscrib a new parent"
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Function refreshParent2(aParent As Parent) As Boolean
|
||||
If Not aParent Is Nothing Then
|
||||
Me.LabelParent2.Text = aParent.firstname + " " + aParent.lastname + " | " + aParent.phone
|
||||
Me.LabelParent2.Tag = aParent.id
|
||||
Return True
|
||||
Else
|
||||
Me.LabelParent2.Tag = 0
|
||||
Me.LabelParent2.Text = "subscrib a new parent"
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Sub setupCheckboxes(aMeet As Meet)
|
||||
CBFriday.Checked = aMeet.friday
|
||||
CBMonday.Checked = aMeet.monday
|
||||
CBWednesday.Checked = aMeet.wednesday
|
||||
CBSaturday.Checked = aMeet.saturday
|
||||
CBSunday.Checked = aMeet.sunday
|
||||
CBThursday.Checked = aMeet.thursday
|
||||
CBTuesday.Checked = aMeet.tuesday
|
||||
meetID = aMeet.id
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Get the meet from the form. If the meet is loaded from the database, his ID is added. Else the meet have an id = to 0
|
||||
''' </summary>
|
||||
''' <returns>The current meet</returns>
|
||||
''' <remarks>The meet number is based on the old recorded BabySitter ID (oldBSID)</remarks>
|
||||
Private Function getMeet() As Meet
|
||||
Dim aMeet As Meet = Nothing
|
||||
If oldBSID = 0 Then
|
||||
aMeet = New Meet(0)
|
||||
Else
|
||||
aMeet = New Meet(CInt(meetID))
|
||||
End If
|
||||
aMeet.monday = CBMonday.Checked
|
||||
aMeet.tuesday = CBTuesday.Checked
|
||||
aMeet.wednesday = CBWednesday.Checked
|
||||
aMeet.thursday = CBThursday.Checked
|
||||
aMeet.friday = CBFriday.Checked
|
||||
aMeet.saturday = CBSaturday.Checked
|
||||
aMeet.sunday = CBSunday.Checked
|
||||
Return aMeet
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Get the Child with all informations that the user have filled up.
|
||||
''' </summary>
|
||||
''' <returns>a Child with the ID 0 if it is a new child or this current ID.</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function getChildFromIntern() As Child
|
||||
Dim newChild As Child = New Child(Me.Tag)
|
||||
newChild.firstname = TBFirstName.Text
|
||||
newChild.lastname = TBLastName.Text
|
||||
newChild.gender = RBMale.Checked
|
||||
newChild.address = TBAddress.Text
|
||||
newChild.bornDate = DTPBord.Value
|
||||
If Not LabelParent1.Tag Is Nothing Then
|
||||
newChild.parent1 = dbdata.getParentByID(LabelParent1.Tag)
|
||||
End If
|
||||
If Not LabelParent2.Tag Is Nothing Then
|
||||
newChild.parent2 = dbdata.getParentByID(LabelParent2.Tag)
|
||||
End If
|
||||
|
||||
newChild.meet = getMeet()
|
||||
|
||||
Return (newChild)
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Fill all controls with information given as a Child
|
||||
''' </summary>
|
||||
''' <param name="aChild">The child to load</param>
|
||||
''' <returns>false is the parameter is nothing else true.</returns>
|
||||
''' <remarks></remarks>
|
||||
Private Function updateChildFromExtern(aChild As Child) As Boolean
|
||||
' Fill up controls with all the data we have.
|
||||
If Not aChild Is Nothing Then
|
||||
Me.Tag = aChild.id
|
||||
'Me.Text = aChild.firstname + " " + aChild.lastname
|
||||
Me.TBFirstName.Text = aChild.firstname 'Firstname
|
||||
Me.TBLastName.Text = aChild.lastname 'Lastname
|
||||
If aChild.gender Then 'Gender
|
||||
Me.RBMale.Checked = True
|
||||
Else
|
||||
Me.RBFemale.Checked = True
|
||||
End If
|
||||
Me.DTPBord.Value = aChild.bornDate 'BornDate
|
||||
Me.LabelAge.Text = DateDiff(DateInterval.Year, aChild.bornDate, Date.Now).ToString + " year(s) old" 'Age
|
||||
Me.TBAddress.Text = aChild.address 'Address
|
||||
If Not aChild.parent1 Is Nothing Then 'Parent1 Info
|
||||
Me.LabelParent1.Text = aChild.parent1.firstname + " " + aChild.parent1.lastname + " | " + aChild.parent1.phone
|
||||
Me.LabelParent1.Tag = aChild.parent1.id
|
||||
Else
|
||||
Me.LabelParent1.Text = "subscrib a new parent"
|
||||
End If
|
||||
If Not aChild.parent2 Is Nothing Then 'Parent2 Info
|
||||
Me.LabelParent2.Text = aChild.parent2.firstname + " " + aChild.parent2.lastname + " | " + aChild.parent2.phone
|
||||
Me.LabelParent2.Tag = aChild.parent2.id
|
||||
Else
|
||||
Me.LabelParent2.Text = "subscrib a new parent"
|
||||
End If
|
||||
'Title
|
||||
If actualFormMode = VIEWER Then
|
||||
Me.Text = aChild.firstname + " " + aChild.lastname
|
||||
Else
|
||||
Me.Text = aChild.firstname + " " + aChild.lastname + " (Edit)"
|
||||
End If
|
||||
' A babysitter is loader only if the child have a meet
|
||||
If Not aChild.meet Is Nothing Then
|
||||
Dim aBS As BabySitter = dbdata.getBabysitterByMeetID(aChild.meet.id)
|
||||
refreshBS(aBS) 'The babysitter id is stored with data
|
||||
setupCheckboxes(aChild.meet) 'The meet id is stored with data
|
||||
End If
|
||||
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Polyvalence Mechanism. Change the 'MODE' of the windows
|
||||
''' </summary>
|
||||
''' <param name="aFormMode">The new mode like EDITOR or CREATOR</param>
|
||||
''' <param name="aChild">Some new info about the child.</param>
|
||||
''' <remarks></remarks>
|
||||
Private Sub ChangeMode(aFormMode As IDFormMode, Optional aChild As Child = Nothing)
|
||||
If aFormMode = IDFormMode.CREATOR Then ' CREATOR MODE
|
||||
Me.actualFormMode = CREATOR
|
||||
Console.WriteLine("FormChildID : Switch to CREATOR Mode")
|
||||
|
||||
'Change of the main triggers labels + title
|
||||
'Me.Icon
|
||||
Me.Text = "New child"
|
||||
Me.ButtonClose.Text = "Cancel"
|
||||
Me.ButtonEdit.Text = "Save"
|
||||
Me.RBMale.Checked = True
|
||||
Me.LabelAge.Text = ""
|
||||
Me.ButtonEdit.Image = My.Resources.AddSheet2
|
||||
|
||||
Me.Tag = 0
|
||||
ElseIf aFormMode = IDFormMode.VIEWER And Not aChild Is Nothing Then ' VIEW MODE
|
||||
Me.actualFormMode = VIEWER
|
||||
Console.WriteLine("FormChildID : Switch to VIEWER Mode")
|
||||
|
||||
'We change the main triggers labels + title
|
||||
Me.ButtonClose.Text = "Close"
|
||||
Me.ButtonEdit.Text = "Edit"
|
||||
Me.ButtonEdit.Image = My.Resources.EditSheet2
|
||||
|
||||
'Activate most important security aspect (not show a window that can mat a save somewhere else)
|
||||
ButtonParent1.Enabled = False
|
||||
ButtonParent2.Enabled = False
|
||||
ButtonBS.Enabled = False
|
||||
LabelParent1.Enabled = False
|
||||
LabelParent2.Enabled = False
|
||||
TBFirstName.Enabled = False
|
||||
TBLastName.Enabled = False
|
||||
DTPBord.Enabled = False
|
||||
RBFemale.Enabled = False
|
||||
RBMale.Enabled = False
|
||||
TBAddress.Enabled = False
|
||||
CBFriday.Enabled = False
|
||||
CBMonday.Enabled = False
|
||||
CBSaturday.Enabled = False
|
||||
CBSunday.Enabled = False
|
||||
CBThursday.Enabled = False
|
||||
CBTuesday.Enabled = False
|
||||
CBWednesday.Enabled = False
|
||||
LabelBS.Enabled = False
|
||||
ButtonBS.Enabled = False
|
||||
|
||||
ElseIf aFormMode = IDFormMode.EDITOR Then ' EDITOR MODE WITH THE CURRENT CHILD
|
||||
Console.WriteLine("FormChildID : Switch to Editor Mode")
|
||||
Me.actualFormMode = EDITOR
|
||||
|
||||
''We change the main triggers labels + title
|
||||
Me.ButtonClose.Text = "Cancel"
|
||||
Me.ButtonEdit.Text = "Update"
|
||||
Me.ButtonEdit.Image = My.Resources.ValidedSheet
|
||||
Me.Text = TBFirstName.Text + " " + TBLastName.Text + " (Edit)"
|
||||
|
||||
'Turn off anti edit security
|
||||
ButtonParent1.Enabled = True
|
||||
ButtonParent2.Enabled = True
|
||||
ButtonBS.Enabled = True
|
||||
LabelParent1.Enabled = True
|
||||
LabelParent2.Enabled = True
|
||||
TBFirstName.Enabled = True
|
||||
TBLastName.Enabled = True
|
||||
DTPBord.Enabled = True
|
||||
RBFemale.Enabled = True
|
||||
RBMale.Enabled = True
|
||||
TBAddress.Enabled = True
|
||||
CBFriday.Enabled = True
|
||||
CBMonday.Enabled = True
|
||||
CBSaturday.Enabled = True
|
||||
CBSunday.Enabled = True
|
||||
CBThursday.Enabled = True
|
||||
CBTuesday.Enabled = True
|
||||
CBWednesday.Enabled = True
|
||||
LabelBS.Enabled = True
|
||||
ButtonBS.Enabled = True
|
||||
|
||||
Else
|
||||
Console.WriteLine("FormChildId : No correct mode has been found.")
|
||||
End If
|
||||
' Fill up controls with all the data we have.
|
||||
updateChildFromExtern(aChild)
|
||||
End Sub
|
||||
|
||||
' ----- Handles and Listerners -----
|
||||
'Edit and click
|
||||
Protected Overrides Sub ButtonEdit_Click(sender As System.Object, e As System.EventArgs)
|
||||
Dim Validated As Boolean = True
|
||||
If Me.actualFormMode = VIEWER Then 'EDIT'
|
||||
Me.ChangeMode(EDITOR)
|
||||
ElseIf Me.actualFormMode = CREATOR Then 'SAVE'
|
||||
' Error Provider
|
||||
If String.IsNullOrEmpty(TBFirstName.Text) Then
|
||||
ErrorProvider1.SetError(TBFirstName, "The first name field could not be empty." & vbNewLine & "Please fill this field.")
|
||||
Validated = False
|
||||
End If
|
||||
If String.IsNullOrEmpty(TBLastName.Text) Then
|
||||
ErrorProvider1.SetError(TBLastName, "The last name field could not be empty." & vbNewLine & "Please fill this field.")
|
||||
Validated = False
|
||||
End If
|
||||
If Date.Compare(DTPBord.Value, Today) > 0 Then
|
||||
ErrorProvider1.SetError(DTPBord, "The date of born is in the futur." & vbNewLine & "Please insert a valid born date.")
|
||||
Validated = False
|
||||
End If
|
||||
'If Date.Compare(Today, DTPBord.Value) = 0 Then
|
||||
' ErrorProvider1.SetError(DTPBord, "The date of born could not be today" & vbNewLine & "Please insert a born date in the past")
|
||||
' Validated = False
|
||||
'End If
|
||||
If String.IsNullOrEmpty(TBAddress.Text) Then
|
||||
ErrorProvider1.SetError(LabelAddress, "The address field could not be empty." & vbNewLine & "Please fill this field.")
|
||||
Validated = False
|
||||
End If
|
||||
If (CBMonday.Checked = True Or
|
||||
CBTuesday.Checked = True Or
|
||||
CBWednesday.Checked = True Or
|
||||
CBThursday.Checked = True Or
|
||||
CBFriday.Checked = True Or
|
||||
CBSunday.Checked = True Or
|
||||
CBSunday.Checked = True) And
|
||||
newBSID = 0 Then
|
||||
|
||||
ErrorProvider1.SetError(ButtonBS, "There is no babysitter for the current planning" & vbNewLine & "Please select a baysitter on the list or uncheck all the days.")
|
||||
Validated = False
|
||||
End If
|
||||
|
||||
If Not Validated Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
' Record
|
||||
|
||||
|
||||
Dim aChild As Child = getChildFromIntern() ' We save the child on the database
|
||||
Me.Tag = dbdata.addChild(aChild) ' The new ID of the child is stored in the Me.tag
|
||||
If newBSID <> 0 Then
|
||||
' save of the child
|
||||
meetID = dbdata.addMeet(aChild.meet, Me.Tag)
|
||||
' then update of the babysitter
|
||||
dbdata.updateBabysitterMeets(meetID, newBSID, getFirstFreeMeetOf(newBSID))
|
||||
End If
|
||||
|
||||
Me.DialogResult = Windows.Forms.DialogResult.OK
|
||||
Me.Hide()
|
||||
|
||||
ElseIf Me.actualFormMode = EDITOR Then 'UPDATE'
|
||||
' Error Provider
|
||||
If String.IsNullOrEmpty(TBFirstName.Text) Then
|
||||
ErrorProvider1.SetError(TBFirstName, "The first name field could not be empty." & vbNewLine & "Please fill this field.")
|
||||
Validated = False
|
||||
End If
|
||||
If String.IsNullOrEmpty(TBLastName.Text) Then
|
||||
ErrorProvider1.SetError(TBLastName, "The last name field could not be empty." & vbNewLine & "Please fill this field.")
|
||||
Validated = False
|
||||
End If
|
||||
If Date.Compare(DTPBord.Value, Today) > 0 Then
|
||||
ErrorProvider1.SetError(DTPBord, "The date of born is in the futur." & vbNewLine & "Please insert a valid born date.")
|
||||
Validated = False
|
||||
End If
|
||||
'If Date.Compare(Today, DTPBord.Value) = 0 Then
|
||||
' ErrorProvider1.SetError(DTPBord, "The date of born could not be today" & vbNewLine & "Please insert a born date in the past")
|
||||
' Validated = False
|
||||
'End If
|
||||
If String.IsNullOrEmpty(TBAddress.Text) Then
|
||||
ErrorProvider1.SetError(LabelAddress, "The address field could not be empty." & vbNewLine & "Please fill this field.")
|
||||
Validated = False
|
||||
End If
|
||||
If (CBMonday.Checked = True Or
|
||||
CBTuesday.Checked = True Or
|
||||
CBWednesday.Checked = True Or
|
||||
CBThursday.Checked = True Or
|
||||
CBFriday.Checked = True Or
|
||||
CBSunday.Checked = True Or
|
||||
CBSunday.Checked = True) And
|
||||
newBSID = 0 Then
|
||||
|
||||
ErrorProvider1.SetError(ButtonBS, "There is no babysitter for the current planning" & vbNewLine & "Please select a baysitter on the list or uncheck all the days.")
|
||||
Validated = False
|
||||
End If
|
||||
|
||||
If Not Validated Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
' Record
|
||||
Dim aChild As Child = getChildFromIntern()
|
||||
dbdata.editChild(aChild) 'Update of the child data
|
||||
'Case 1, there is no choosen BS
|
||||
If newBSID <> oldBSID And newBSID = 0 Then
|
||||
dbdata.updateBabysitterMeets(0, , , oldBSID, getFirstFreeMeetOf(oldBSID)) 'The babysitter gain a free meet space
|
||||
dbdata.deleteMeet(meetID) ' No BS, no keep
|
||||
|
||||
ElseIf newBSID = oldBSID And oldBSID <> 0 Then
|
||||
'Case 2 : The same BS is here
|
||||
Dim aMeet As Meet = aChild.meet 'The meet could have change or not between the database and the form, no problem. The Id stay the same.
|
||||
dbdata.editMeet(aMeet)
|
||||
' No neet to update the BS, because the meet ID stay the same.
|
||||
ElseIf newBSID <> oldBSID And newBSID <> 0 And oldBSID <> 0 Then
|
||||
' Case 3 : There is a change between old BS and new BS
|
||||
Dim aMeet As Meet = aChild.meet 'The meet have change between the database and the form but the Id stay the same.
|
||||
dbdata.editMeet(aMeet)
|
||||
dbdata.updateBabysitterMeets(meetID, newBSID, getFirstFreeMeetOf(newBSID), oldBSID, getFirstFreeMeetOf(oldBSID)) 'So we need to remove the id from the old BS and add it to the new BS
|
||||
ElseIf newBSID <> 0 And oldBSID = 0 Then
|
||||
' Case 4 : add a new BS on a existing child
|
||||
Dim aMeet As Meet = aChild.meet
|
||||
meetID = dbdata.addMeet(aMeet, aChild.id)
|
||||
Dim aBS As BabySitter = dbdata.getBabysitterByID(newBSID)
|
||||
dbdata.updateBabysitterMeets(meetID, newBSID, getFirstFreeMeetOf(newBSID))
|
||||
End If
|
||||
|
||||
|
||||
Me.DialogResult = Windows.Forms.DialogResult.OK
|
||||
Me.Hide()
|
||||
Else
|
||||
'Don't know how to go here...
|
||||
Console.WriteLine("FormChildID : Is in standart mode !")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Cancel
|
||||
Protected Overrides Sub ButtonClose_Click(sender As System.Object, e As System.EventArgs)
|
||||
Console.WriteLine("FormChildID : Closing instance")
|
||||
Me.DialogResult = Windows.Forms.DialogResult.Cancel
|
||||
Me.Hide()
|
||||
End Sub
|
||||
|
||||
' Parents selector
|
||||
Private Sub ButtonParent1_Click(sender As System.Object, e As System.EventArgs) Handles ButtonParent1.Click
|
||||
Dim listofParentForm As FormList = New FormList(PersonType.Parent, ListFormMode.Selector)
|
||||
Dim conclusion As DialogResult = listofParentForm.ShowDialog()
|
||||
Console.WriteLine("Returned in : " + conclusion.ToString)
|
||||
If (conclusion = Windows.Forms.DialogResult.OK) Then
|
||||
Dim aParent As Parent = dbdata.getParentByID(listofParentForm.Tag)
|
||||
Console.WriteLine("FormChildID : receving " + aParent.toString)
|
||||
refreshParent1(aParent)
|
||||
Else
|
||||
If dbdata.getParentByID(listofParentForm.Tag) Is Nothing Then
|
||||
refreshParent2(Nothing)
|
||||
End If
|
||||
End If
|
||||
listofParentForm.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub LabelParent1_LinkClicked(sender As System.Object, e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LabelParent1.LinkClicked
|
||||
Dim aParentForm As FormParentID
|
||||
If Me.LabelParent1.Tag <> 0 Then
|
||||
Dim theParent As Parent = dbdata.getParentByID(Me.LabelParent1.Tag)
|
||||
aParentForm = New FormParentID(EDITOR, theParent)
|
||||
Else
|
||||
aParentForm = New FormParentID(CREATOR)
|
||||
End If
|
||||
|
||||
Dim conclusion As DialogResult = aParentForm.ShowDialog()
|
||||
If (conclusion = Windows.Forms.DialogResult.OK) Then
|
||||
Dim aParent As Parent = dbdata.getParentByID(aParentForm.Tag)
|
||||
Console.WriteLine("FormChildID : receving " + aParent.toString)
|
||||
refreshParent1(aParent)
|
||||
End If
|
||||
aParentForm.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub ButtonParent2_Click(sender As System.Object, e As System.EventArgs) Handles ButtonParent2.Click
|
||||
Dim listofParentForm As FormList = New FormList(PersonType.Parent, ListFormMode.Selector)
|
||||
Dim conclusion As DialogResult = listofParentForm.ShowDialog()
|
||||
Console.WriteLine("Returned in : " + conclusion.ToString)
|
||||
If (conclusion = Windows.Forms.DialogResult.OK) Then
|
||||
Dim aParent As Parent = dbdata.getParentByID(listofParentForm.Tag)
|
||||
Console.WriteLine("FormChildID : receving " + aParent.toString)
|
||||
refreshParent2(aParent)
|
||||
Else
|
||||
If dbdata.getParentByID(listofParentForm.Tag) Is Nothing Then
|
||||
refreshParent2(Nothing)
|
||||
End If
|
||||
End If
|
||||
listofParentForm.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub LabelParent2_LinkClicked(sender As System.Object, e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LabelParent2.LinkClicked
|
||||
Dim aParentForm As FormParentID
|
||||
If Me.LabelParent1.Tag <> 0 Then
|
||||
Dim theParent As Parent = dbdata.getParentByID(Me.LabelParent2.Tag)
|
||||
aParentForm = New FormParentID(EDITOR, theParent)
|
||||
Else
|
||||
aParentForm = New FormParentID(CREATOR)
|
||||
End If
|
||||
Dim conclusion As DialogResult = aParentForm.ShowDialog()
|
||||
Console.WriteLine("Returned in : " + conclusion.ToString)
|
||||
If (conclusion = Windows.Forms.DialogResult.OK) Then
|
||||
Dim aParent As Parent = dbdata.getParentByID(aParentForm.Tag)
|
||||
Console.WriteLine("FormChildID : receving " + aParent.toString)
|
||||
refreshParent2(aParent)
|
||||
End If
|
||||
aParentForm.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ButtonBS_Click(sender As System.Object, e As System.EventArgs) Handles ButtonBS.Click
|
||||
Dim aMeet As Meet = getMeet()
|
||||
|
||||
Dim listBD As FormList = New FormList(PersonType.BabySitter, ListFormMode.SelectFiltered, aMeet)
|
||||
Dim conclusion As DialogResult = listBD.ShowDialog()
|
||||
If conclusion = Windows.Forms.DialogResult.OK Then
|
||||
Dim aBS As BabySitter = dbdata.getBabysitterByID(listBD.Tag)
|
||||
Console.WriteLine("FormChildID : receving " + aBS.toString)
|
||||
refreshBS(aBS)
|
||||
End If
|
||||
listBD.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub LinkLabelBS_LinkClicked(sender As System.Object, e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LabelBS.LinkClicked
|
||||
If newBSID <> 0 Then
|
||||
Dim aBS As BabySitter = dbdata.getBabysitterByID(newBSID)
|
||||
Dim bsForm As FormBabySitterID = New FormBabySitterID(VIEWER, aBS)
|
||||
Dim conclusion As DialogResult = bsForm.ShowDialog()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub DTPBord_ValueChanged(sender As System.Object, e As System.EventArgs) Handles DTPBord.ValueChanged
|
||||
Me.LabelAge.Text = DateDiff(DateInterval.Year, DTPBord.Value, Date.Now).ToString + " year(s) old" 'Age
|
||||
ErrorProvider1.SetError(DTPBord, "")
|
||||
End Sub
|
||||
|
||||
Private Sub CBWednesday_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles CBMonday.CheckedChanged, CBTuesday.CheckedChanged, CBWednesday.CheckedChanged, CBThursday.CheckedChanged, CBFriday.CheckedChanged, CBSaturday.CheckedChanged, CBSunday.CheckedChanged
|
||||
|
||||
If Me.Visible = True Then
|
||||
'On réintialise la babysitter
|
||||
refreshBS(Nothing)
|
||||
End If
|
||||
ErrorProvider1.SetError(ButtonBS, "")
|
||||
End Sub
|
||||
|
||||
End Class
|
173
ApplicationCrèche 1/Forms/FormID.Designer.vb
generated
Normal file
@ -0,0 +1,173 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class FormID
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form remplace la méthode Dispose pour nettoyer la liste des composants.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Requise par le Concepteur Windows Form
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'REMARQUE : la procédure suivante est requise par le Concepteur Windows Form
|
||||
'Elle peut être modifiée à l'aide du Concepteur Windows Form.
|
||||
'Ne la modifiez pas à l'aide de l'éditeur de code.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.ButtonEdit = New System.Windows.Forms.Button()
|
||||
Me.ButtonClose = New System.Windows.Forms.Button()
|
||||
Me.LabelFirstName = New System.Windows.Forms.Label()
|
||||
Me.LabelLastName = New System.Windows.Forms.Label()
|
||||
Me.TBFirstName = New System.Windows.Forms.TextBox()
|
||||
Me.TBLastName = New System.Windows.Forms.TextBox()
|
||||
Me.TBAddress = New System.Windows.Forms.TextBox()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.RBMale = New System.Windows.Forms.RadioButton()
|
||||
Me.RBFemale = New System.Windows.Forms.RadioButton()
|
||||
Me.ErrorProvider1 = New System.Windows.Forms.ErrorProvider(Me.components)
|
||||
CType(Me.ErrorProvider1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'ButtonEdit
|
||||
'
|
||||
Me.ButtonEdit.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.ButtonEdit.Location = New System.Drawing.Point(376, 346)
|
||||
Me.ButtonEdit.Name = "ButtonEdit"
|
||||
Me.ButtonEdit.Size = New System.Drawing.Size(75, 23)
|
||||
Me.ButtonEdit.TabIndex = 20
|
||||
Me.ButtonEdit.Text = "Edit"
|
||||
Me.ButtonEdit.UseVisualStyleBackColor = True
|
||||
'
|
||||
'ButtonClose
|
||||
'
|
||||
Me.ButtonClose.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.ButtonClose.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
||||
Me.ButtonClose.Location = New System.Drawing.Point(457, 346)
|
||||
Me.ButtonClose.Name = "ButtonClose"
|
||||
Me.ButtonClose.Size = New System.Drawing.Size(75, 23)
|
||||
Me.ButtonClose.TabIndex = 21
|
||||
Me.ButtonClose.Text = "Close"
|
||||
Me.ButtonClose.UseVisualStyleBackColor = True
|
||||
'
|
||||
'LabelFirstName
|
||||
'
|
||||
Me.LabelFirstName.AutoSize = True
|
||||
Me.LabelFirstName.Location = New System.Drawing.Point(12, 60)
|
||||
Me.LabelFirstName.Name = "LabelFirstName"
|
||||
Me.LabelFirstName.Size = New System.Drawing.Size(63, 13)
|
||||
Me.LabelFirstName.TabIndex = 7
|
||||
Me.LabelFirstName.Text = "First name:"
|
||||
'
|
||||
'LabelLastName
|
||||
'
|
||||
Me.LabelLastName.AutoSize = True
|
||||
Me.LabelLastName.Location = New System.Drawing.Point(12, 88)
|
||||
Me.LabelLastName.Name = "LabelLastName"
|
||||
Me.LabelLastName.Size = New System.Drawing.Size(61, 13)
|
||||
Me.LabelLastName.TabIndex = 8
|
||||
Me.LabelLastName.Text = "Last name:"
|
||||
'
|
||||
'TBFirstName
|
||||
'
|
||||
Me.TBFirstName.Location = New System.Drawing.Point(80, 57)
|
||||
Me.TBFirstName.Name = "TBFirstName"
|
||||
Me.TBFirstName.Size = New System.Drawing.Size(165, 22)
|
||||
Me.TBFirstName.TabIndex = 0
|
||||
'
|
||||
'TBLastName
|
||||
'
|
||||
Me.TBLastName.Location = New System.Drawing.Point(80, 85)
|
||||
Me.TBLastName.Name = "TBLastName"
|
||||
Me.TBLastName.Size = New System.Drawing.Size(165, 22)
|
||||
Me.TBLastName.TabIndex = 1
|
||||
'
|
||||
'TBAddress
|
||||
'
|
||||
Me.TBAddress.Location = New System.Drawing.Point(12, 182)
|
||||
Me.TBAddress.Multiline = True
|
||||
Me.TBAddress.Name = "TBAddress"
|
||||
Me.TBAddress.Size = New System.Drawing.Size(258, 87)
|
||||
Me.TBAddress.TabIndex = 4
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.AutoSize = True
|
||||
Me.Label3.Location = New System.Drawing.Point(12, 115)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(48, 13)
|
||||
Me.Label3.TabIndex = 9
|
||||
Me.Label3.Text = "Gender:"
|
||||
'
|
||||
'RBMale
|
||||
'
|
||||
Me.RBMale.AutoSize = True
|
||||
Me.RBMale.Location = New System.Drawing.Point(80, 113)
|
||||
Me.RBMale.Name = "RBMale"
|
||||
Me.RBMale.Size = New System.Drawing.Size(50, 17)
|
||||
Me.RBMale.TabIndex = 2
|
||||
Me.RBMale.TabStop = True
|
||||
Me.RBMale.Text = "Male"
|
||||
Me.RBMale.UseVisualStyleBackColor = True
|
||||
'
|
||||
'RBFemale
|
||||
'
|
||||
Me.RBFemale.AutoSize = True
|
||||
Me.RBFemale.Location = New System.Drawing.Point(171, 113)
|
||||
Me.RBFemale.Name = "RBFemale"
|
||||
Me.RBFemale.Size = New System.Drawing.Size(61, 17)
|
||||
Me.RBFemale.TabIndex = 3
|
||||
Me.RBFemale.TabStop = True
|
||||
Me.RBFemale.Text = "Female"
|
||||
Me.RBFemale.UseVisualStyleBackColor = True
|
||||
'
|
||||
'ErrorProvider1
|
||||
'
|
||||
Me.ErrorProvider1.ContainerControl = Me
|
||||
'
|
||||
'FormID
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.CancelButton = Me.ButtonClose
|
||||
Me.ClientSize = New System.Drawing.Size(544, 381)
|
||||
Me.Controls.Add(Me.RBFemale)
|
||||
Me.Controls.Add(Me.RBMale)
|
||||
Me.Controls.Add(Me.Label3)
|
||||
Me.Controls.Add(Me.TBAddress)
|
||||
Me.Controls.Add(Me.TBLastName)
|
||||
Me.Controls.Add(Me.TBFirstName)
|
||||
Me.Controls.Add(Me.LabelLastName)
|
||||
Me.Controls.Add(Me.LabelFirstName)
|
||||
Me.Controls.Add(Me.ButtonClose)
|
||||
Me.Controls.Add(Me.ButtonEdit)
|
||||
Me.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
Me.MaximizeBox = False
|
||||
Me.Name = "FormID"
|
||||
Me.Text = "FormID"
|
||||
CType(Me.ErrorProvider1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents LabelFirstName As System.Windows.Forms.Label
|
||||
Friend WithEvents LabelLastName As System.Windows.Forms.Label
|
||||
Friend WithEvents Label3 As System.Windows.Forms.Label
|
||||
Protected WithEvents ButtonEdit As System.Windows.Forms.Button
|
||||
Protected WithEvents ButtonClose As System.Windows.Forms.Button
|
||||
Protected WithEvents TBFirstName As System.Windows.Forms.TextBox
|
||||
Protected WithEvents TBLastName As System.Windows.Forms.TextBox
|
||||
Protected WithEvents TBAddress As System.Windows.Forms.TextBox
|
||||
Protected WithEvents RBMale As System.Windows.Forms.RadioButton
|
||||
Protected WithEvents RBFemale As System.Windows.Forms.RadioButton
|
||||
Friend WithEvents ErrorProvider1 As System.Windows.Forms.ErrorProvider
|
||||
End Class
|
123
ApplicationCrèche 1/Forms/FormID.resx
Normal file
@ -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>
|
||||
<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>
|
||||
<metadata name="ErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
26
ApplicationCrèche 1/Forms/FormID.vb
Normal file
@ -0,0 +1,26 @@
|
||||
Public Class FormID
|
||||
|
||||
Protected Overridable Sub ButtonEdit_Click(sender As System.Object, e As System.EventArgs) Handles ButtonEdit.Click
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Overridable Sub ButtonClose_Click(sender As System.Object, e As System.EventArgs) Handles ButtonClose.Click
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub FormID_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Overridable Sub TBFirstName_TextChanged(sender As System.Object, e As System.EventArgs) Handles TBFirstName.TextChanged
|
||||
ErrorProvider1.SetError(TBAddress, "")
|
||||
End Sub
|
||||
|
||||
Protected Overridable Sub TBLastName_TextChanged(sender As System.Object, e As System.EventArgs) Handles TBLastName.TextChanged
|
||||
ErrorProvider1.SetError(TBLastName, "")
|
||||
End Sub
|
||||
|
||||
Protected Overridable Sub TBAddress_TextChanged(sender As System.Object, e As System.EventArgs) Handles TBAddress.TextChanged
|
||||
ErrorProvider1.SetError(TBAddress, "")
|
||||
End Sub
|
||||
End Class
|
245
ApplicationCrèche 1/Forms/FormList.Designer.vb
generated
Normal file
@ -0,0 +1,245 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class FormList
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form remplace la méthode Dispose pour nettoyer la liste des composants.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Requise par le Concepteur Windows Form
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'REMARQUE : la procédure suivante est requise par le Concepteur Windows Form
|
||||
'Elle peut être modifiée à l'aide du Concepteur Windows Form.
|
||||
'Ne la modifiez pas à l'aide de l'éditeur de code.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FormList))
|
||||
Me.ToolStrip = New System.Windows.Forms.ToolStrip()
|
||||
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.ListView = New System.Windows.Forms.ListView()
|
||||
Me.ColumnHeader = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
|
||||
Me.ColumnHeader1 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
|
||||
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.CMSSep = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.CMSSelect = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.CMSShow = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.CMSEdit = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.CMSDelete = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.TSButtonAdd = New System.Windows.Forms.ToolStripButton()
|
||||
Me.TSButtonSelect = New System.Windows.Forms.ToolStripButton()
|
||||
Me.TSButtonShow = New System.Windows.Forms.ToolStripButton()
|
||||
Me.TSButtonEdit = New System.Windows.Forms.ToolStripButton()
|
||||
Me.TSButtonDelete = New System.Windows.Forms.ToolStripButton()
|
||||
Me.TSButtonClose = New System.Windows.Forms.ToolStripButton()
|
||||
Me.TSPin = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStrip.SuspendLayout()
|
||||
Me.ContextMenuStrip1.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'ToolStrip
|
||||
'
|
||||
Me.ToolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden
|
||||
Me.ToolStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.TSButtonAdd, Me.ToolStripSeparator1, Me.TSButtonSelect, Me.TSButtonShow, Me.TSButtonEdit, Me.TSButtonDelete, Me.TSButtonClose, Me.ToolStripSeparator2, Me.TSPin})
|
||||
Me.ToolStrip.Location = New System.Drawing.Point(0, 0)
|
||||
Me.ToolStrip.Name = "ToolStrip"
|
||||
Me.ToolStrip.Size = New System.Drawing.Size(309, 25)
|
||||
Me.ToolStrip.TabIndex = 0
|
||||
Me.ToolStrip.Text = "ToolStrip1"
|
||||
'
|
||||
'ToolStripSeparator1
|
||||
'
|
||||
Me.ToolStripSeparator1.Name = "ToolStripSeparator1"
|
||||
Me.ToolStripSeparator1.Size = New System.Drawing.Size(6, 25)
|
||||
'
|
||||
'ListView
|
||||
'
|
||||
Me.ListView.AllowColumnReorder = True
|
||||
Me.ListView.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader, Me.ColumnHeader1})
|
||||
Me.ListView.ContextMenuStrip = Me.ContextMenuStrip1
|
||||
Me.ListView.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.ListView.FullRowSelect = True
|
||||
Me.ListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable
|
||||
Me.ListView.Location = New System.Drawing.Point(0, 25)
|
||||
Me.ListView.MultiSelect = False
|
||||
Me.ListView.Name = "ListView"
|
||||
Me.ListView.Size = New System.Drawing.Size(309, 386)
|
||||
Me.ListView.TabIndex = 1
|
||||
Me.ListView.UseCompatibleStateImageBehavior = False
|
||||
Me.ListView.View = System.Windows.Forms.View.Details
|
||||
'
|
||||
'ColumnHeader
|
||||
'
|
||||
Me.ColumnHeader.Text = "Name"
|
||||
Me.ColumnHeader.Width = 300
|
||||
'
|
||||
'ColumnHeader1
|
||||
'
|
||||
Me.ColumnHeader1.Text = "Address"
|
||||
Me.ColumnHeader1.Width = 161
|
||||
'
|
||||
'ContextMenuStrip1
|
||||
'
|
||||
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.CMSSelect, Me.CMSSep, Me.CMSShow, Me.CMSEdit, Me.CMSDelete})
|
||||
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
|
||||
Me.ContextMenuStrip1.Size = New System.Drawing.Size(167, 98)
|
||||
'
|
||||
'CMSSep
|
||||
'
|
||||
Me.CMSSep.Name = "CMSSep"
|
||||
Me.CMSSep.Size = New System.Drawing.Size(163, 6)
|
||||
'
|
||||
'ToolStripSeparator2
|
||||
'
|
||||
Me.ToolStripSeparator2.Name = "ToolStripSeparator2"
|
||||
Me.ToolStripSeparator2.Size = New System.Drawing.Size(6, 25)
|
||||
'
|
||||
'CMSSelect
|
||||
'
|
||||
Me.CMSSelect.Enabled = False
|
||||
Me.CMSSelect.Image = Global.ApplicationCrèche_1.My.Resources.Resources.SelectSheet
|
||||
Me.CMSSelect.Name = "CMSSelect"
|
||||
Me.CMSSelect.Size = New System.Drawing.Size(166, 22)
|
||||
Me.CMSSelect.Text = "Select"
|
||||
'
|
||||
'CMSShow
|
||||
'
|
||||
Me.CMSShow.Enabled = False
|
||||
Me.CMSShow.Image = Global.ApplicationCrèche_1.My.Resources.Resources.NormalSheetLight
|
||||
Me.CMSShow.Name = "CMSShow"
|
||||
Me.CMSShow.Size = New System.Drawing.Size(166, 22)
|
||||
Me.CMSShow.Text = "Show selection..."
|
||||
'
|
||||
'CMSEdit
|
||||
'
|
||||
Me.CMSEdit.Enabled = False
|
||||
Me.CMSEdit.Image = Global.ApplicationCrèche_1.My.Resources.Resources.EditSheet2
|
||||
Me.CMSEdit.Name = "CMSEdit"
|
||||
Me.CMSEdit.Size = New System.Drawing.Size(166, 22)
|
||||
Me.CMSEdit.Text = "Edit selection..."
|
||||
'
|
||||
'CMSDelete
|
||||
'
|
||||
Me.CMSDelete.Enabled = False
|
||||
Me.CMSDelete.Image = Global.ApplicationCrèche_1.My.Resources.Resources.DeleteSheet2
|
||||
Me.CMSDelete.Name = "CMSDelete"
|
||||
Me.CMSDelete.Size = New System.Drawing.Size(166, 22)
|
||||
Me.CMSDelete.Text = "Delete selection..."
|
||||
'
|
||||
'TSButtonAdd
|
||||
'
|
||||
Me.TSButtonAdd.Image = Global.ApplicationCrèche_1.My.Resources.Resources.AddSheet2
|
||||
Me.TSButtonAdd.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.TSButtonAdd.Name = "TSButtonAdd"
|
||||
Me.TSButtonAdd.Size = New System.Drawing.Size(49, 22)
|
||||
Me.TSButtonAdd.Text = "Add"
|
||||
'
|
||||
'TSButtonSelect
|
||||
'
|
||||
Me.TSButtonSelect.Enabled = False
|
||||
Me.TSButtonSelect.Image = Global.ApplicationCrèche_1.My.Resources.Resources.SelectSheet
|
||||
Me.TSButtonSelect.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.TSButtonSelect.Name = "TSButtonSelect"
|
||||
Me.TSButtonSelect.Size = New System.Drawing.Size(58, 22)
|
||||
Me.TSButtonSelect.Text = "Select"
|
||||
'
|
||||
'TSButtonShow
|
||||
'
|
||||
Me.TSButtonShow.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.TSButtonShow.Enabled = False
|
||||
Me.TSButtonShow.Image = Global.ApplicationCrèche_1.My.Resources.Resources.NormalSheetLight
|
||||
Me.TSButtonShow.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.TSButtonShow.Name = "TSButtonShow"
|
||||
Me.TSButtonShow.Size = New System.Drawing.Size(23, 22)
|
||||
Me.TSButtonShow.Text = "Show"
|
||||
'
|
||||
'TSButtonEdit
|
||||
'
|
||||
Me.TSButtonEdit.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.TSButtonEdit.Enabled = False
|
||||
Me.TSButtonEdit.Image = Global.ApplicationCrèche_1.My.Resources.Resources.EditSheet2
|
||||
Me.TSButtonEdit.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.TSButtonEdit.Name = "TSButtonEdit"
|
||||
Me.TSButtonEdit.Size = New System.Drawing.Size(23, 22)
|
||||
Me.TSButtonEdit.Text = "Edit"
|
||||
'
|
||||
'TSButtonDelete
|
||||
'
|
||||
Me.TSButtonDelete.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.TSButtonDelete.Enabled = False
|
||||
Me.TSButtonDelete.Image = Global.ApplicationCrèche_1.My.Resources.Resources.DeleteSheet2
|
||||
Me.TSButtonDelete.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.TSButtonDelete.Name = "TSButtonDelete"
|
||||
Me.TSButtonDelete.Size = New System.Drawing.Size(23, 22)
|
||||
Me.TSButtonDelete.Text = "Delete"
|
||||
'
|
||||
'TSButtonClose
|
||||
'
|
||||
Me.TSButtonClose.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right
|
||||
Me.TSButtonClose.Image = Global.ApplicationCrèche_1.My.Resources.Resources.CloseWindow
|
||||
Me.TSButtonClose.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.TSButtonClose.Name = "TSButtonClose"
|
||||
Me.TSButtonClose.Size = New System.Drawing.Size(56, 22)
|
||||
Me.TSButtonClose.Text = "Close"
|
||||
'
|
||||
'TSPin
|
||||
'
|
||||
Me.TSPin.Checked = True
|
||||
Me.TSPin.CheckState = System.Windows.Forms.CheckState.Checked
|
||||
Me.TSPin.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.TSPin.Image = Global.ApplicationCrèche_1.My.Resources.Resources.PingedWindows
|
||||
Me.TSPin.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.TSPin.Name = "TSPin"
|
||||
Me.TSPin.Size = New System.Drawing.Size(23, 22)
|
||||
Me.TSPin.Text = "Pin"
|
||||
'
|
||||
'FormList
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(309, 411)
|
||||
Me.Controls.Add(Me.ListView)
|
||||
Me.Controls.Add(Me.ToolStrip)
|
||||
Me.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.MinimumSize = New System.Drawing.Size(325, 450)
|
||||
Me.Name = "FormList"
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
||||
Me.Text = "List window"
|
||||
Me.ToolStrip.ResumeLayout(False)
|
||||
Me.ToolStrip.PerformLayout()
|
||||
Me.ContextMenuStrip1.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents ToolStrip As System.Windows.Forms.ToolStrip
|
||||
Friend WithEvents ListView As System.Windows.Forms.ListView
|
||||
Friend WithEvents TSButtonAdd As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents TSButtonEdit As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents TSButtonClose As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents TSButtonDelete As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents ColumnHeader As System.Windows.Forms.ColumnHeader
|
||||
Friend WithEvents TSButtonSelect As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents ToolStripSeparator1 As System.Windows.Forms.ToolStripSeparator
|
||||
Friend WithEvents ContextMenuStrip1 As System.Windows.Forms.ContextMenuStrip
|
||||
Friend WithEvents CMSSelect As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents CMSEdit As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents CMSDelete As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents CMSShow As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents TSButtonShow As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents CMSSep As System.Windows.Forms.ToolStripSeparator
|
||||
Friend WithEvents ColumnHeader1 As System.Windows.Forms.ColumnHeader
|
||||
Friend WithEvents TSPin As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents ToolStripSeparator2 As System.Windows.Forms.ToolStripSeparator
|
||||
End Class
|
135
ApplicationCrèche 1/Forms/FormList.resx
Normal file
@ -0,0 +1,135 @@
|
||||
<?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>
|
||||
<metadata name="ToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="ContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>118, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAEBAAAAEAIADWAAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAQAAAAEAgGAAAAH/P/YQAAAAlw
|
||||
SFlzAAALEwAACxMBAJqcGAAAAIhJREFUOI3tkz0Lg0AMhp+TG1wEf6LQSRyu3Tu6i8O1k3D+RpcOB+nS
|
||||
HlYUP27o4rPkheQlCSRKRIghiXIDCtBA+ol78MBLA6mxbtjiuDR10N3tTlsVWXKg8xgNkBvrZC/GOgHy
|
||||
n+6lKniKC3qJb00YYS4x1qs7nBPgAa6PfpNhgo8+ZfX3b3wDHqZpVv32WD4AAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
320
ApplicationCrèche 1/Forms/FormList.vb
Normal file
@ -0,0 +1,320 @@
|
||||
Public Class FormList
|
||||
|
||||
' ----- Privates Attributes -----
|
||||
Private aTypeofPerson As PersonType
|
||||
Private aFormMode As ListFormMode
|
||||
|
||||
' ----- Initialisators ------
|
||||
Private Sub FormList_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub New(aTypeOfPerson As PersonType, aFormMode As ListFormMode, Optional aMeet As Meet = Nothing)
|
||||
Console.WriteLine("FormList : Begining of a new instance")
|
||||
' Cet appel est requis par le concepteur.
|
||||
InitializeComponent()
|
||||
|
||||
' Ajoutez une initialisation quelconque après l'appel InitializeComponent().
|
||||
Me.aTypeofPerson = aTypeOfPerson
|
||||
Me.aFormMode = aFormMode
|
||||
' If we show the list to pick up someone and return him back to the calling window
|
||||
If aFormMode = ListFormMode.Selector Then
|
||||
TSButtonClose.Text = "Cancel"
|
||||
TSButtonSelect.Visible = True
|
||||
TSPin.Visible = False
|
||||
CMSSelect.Visible = True
|
||||
CMSSep.Visible = True
|
||||
ListView.HeaderStyle = ColumnHeaderStyle.None
|
||||
ListView.Columns(0).Width = 300
|
||||
ListView.Columns(1).Width = 1
|
||||
ElseIf aFormMode = ListFormMode.Viewer Then ' If we show the list to manage peoples inside
|
||||
TSButtonClose.Text = "Close"
|
||||
TSButtonSelect.Visible = False
|
||||
CMSSelect.Visible = False
|
||||
CMSSep.Visible = False
|
||||
If aTypeOfPerson = PersonType.BabySitter Then TSPin.Visible = True
|
||||
ListView.HeaderStyle = ColumnHeaderStyle.None
|
||||
ListView.Columns(0).Width = 300
|
||||
ListView.Columns(1).Width = 1
|
||||
ElseIf aFormMode = ListFormMode.SelectFiltered Then ' Special mode to pick up a babysitter, without the possibility to add or delete one.
|
||||
TSButtonClose.Text = "Cancel"
|
||||
TSButtonAdd.Visible = False
|
||||
TSButtonSelect.Visible = True
|
||||
TSButtonDelete.Visible = False
|
||||
TSPin.Visible = False
|
||||
CMSDelete.Visible = False
|
||||
ListView.HeaderStyle = ColumnHeaderStyle.None
|
||||
ListView.Columns(0).Width = 300
|
||||
ListView.Columns(1).Width = 1
|
||||
ElseIf aFormMode = ListFormMode.SelectWithAdress Then ' Special mode to pick up a parent address
|
||||
TSButtonClose.Text = "Cancel"
|
||||
TSButtonAdd.Visible = False
|
||||
TSButtonSelect.Visible = True
|
||||
TSButtonDelete.Visible = False
|
||||
TSPin.Visible = False
|
||||
ListView.HeaderStyle = ColumnHeaderStyle.Nonclickable
|
||||
ListView.Columns(0).Width = 140
|
||||
ListView.Columns(1).Width = 160
|
||||
CMSDelete.Visible = False
|
||||
End If
|
||||
loadList(aMeet)
|
||||
|
||||
If aTypeOfPerson = PersonType.BabySitter Then
|
||||
Me.Text = "List of babysitters"
|
||||
Me.TSButtonAdd.Text = "Add a babysitter"
|
||||
ElseIf aTypeOfPerson = PersonType.Parent Then
|
||||
Me.Text = "List of parent"
|
||||
Me.TSButtonAdd.Text = "Add a parent"
|
||||
Else
|
||||
Console.WriteLine("FormList : " + aTypeOfPerson)
|
||||
Me.Text = "List of " + aTypeOfPerson.ToString
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
' ----- Methodes -----
|
||||
|
||||
Private Sub ViewSelected()
|
||||
If Me.aTypeofPerson = PersonType.BabySitter Then
|
||||
Dim aBS As BabySitter = dbdata.getBabysitterByID(ListView.SelectedItems(0).Tag)
|
||||
Dim aFormBS As FormBabySitterID = New FormBabySitterID(IDFormMode.VIEWER, aBS)
|
||||
Dim conclusion As DialogResult = aFormBS.ShowDialog()
|
||||
If conclusion = Windows.Forms.DialogResult.OK Then
|
||||
reloadList()
|
||||
End If
|
||||
aFormBS.Dispose()
|
||||
ElseIf Me.aTypeofPerson = PersonType.Parent Then
|
||||
Dim aParent As Parent = dbdata.getParentByID(ListView.SelectedItems(0).Tag)
|
||||
Dim aFormParent As FormParentID = New FormParentID(IDFormMode.VIEWER, aParent)
|
||||
Dim conclusion As DialogResult = aFormParent.ShowDialog
|
||||
If conclusion = Windows.Forms.DialogResult.OK Then
|
||||
reloadList()
|
||||
End If
|
||||
aFormParent.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Show a window to edit the element
|
||||
''' </summary>
|
||||
''' <remarks></remarks>
|
||||
Private Sub EditSelected()
|
||||
If Me.aTypeofPerson = PersonType.BabySitter Then
|
||||
Dim aBS As BabySitter = dbdata.getBabysitterByID(ListView.SelectedItems(0).Tag)
|
||||
Dim aFormBS As FormBabySitterID = New FormBabySitterID(IDFormMode.EDITOR, aBS)
|
||||
Dim conclusion As DialogResult = aFormBS.ShowDialog()
|
||||
If conclusion = Windows.Forms.DialogResult.OK Then
|
||||
reloadList()
|
||||
End If
|
||||
aFormBS.Dispose()
|
||||
ElseIf Me.aTypeofPerson = PersonType.Parent Then
|
||||
Dim aParent As Parent = dbdata.getParentByID(ListView.SelectedItems(0).Tag)
|
||||
Dim aFormParent As FormParentID = New FormParentID(IDFormMode.EDITOR, aParent)
|
||||
Dim conclusion As DialogResult = aFormParent.ShowDialog
|
||||
If conclusion = Windows.Forms.DialogResult.OK Then
|
||||
reloadList()
|
||||
End If
|
||||
aFormParent.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Return the selected element to the calling window
|
||||
''' </summary>
|
||||
''' <remarks></remarks>
|
||||
Private Sub ReturnSelected()
|
||||
If PrepareSelected() Then
|
||||
Console.WriteLine("FormList : Closing instance")
|
||||
Me.DialogResult = Windows.Forms.DialogResult.OK
|
||||
Me.Hide()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function PrepareSelected() As Boolean
|
||||
If ListView.SelectedItems.Count > 0 Then
|
||||
Me.Tag = ListView.SelectedItems(0).Tag
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Sub reloadList()
|
||||
ListView.Items.Clear()
|
||||
loadList(Nothing)
|
||||
End Sub
|
||||
|
||||
Private Sub loadList(aMeet As Meet)
|
||||
' Babysitter
|
||||
If aTypeofPerson = PersonType.BabySitter Then
|
||||
' Getting back babysitters
|
||||
Dim BSList As List(Of BabySitter) = FilterList(aMeet)
|
||||
|
||||
For Each aBS As BabySitter In BSList
|
||||
ListView.Items.Add(aBS.firstname + " " + aBS.lastname).Tag = aBS.id
|
||||
Next
|
||||
' Parent
|
||||
ElseIf aTypeofPerson = PersonType.Parent Then
|
||||
Dim ParentList As List(Of Parent) = dbdata.getParents()
|
||||
|
||||
For Each aParent As Parent In ParentList
|
||||
Dim itemChild As ListViewItem = ListView.Items.Add(aParent.firstname + " " + aParent.lastname)
|
||||
If aFormMode = ListFormMode.SelectWithAdress Then itemChild.SubItems.Add(aParent.address)
|
||||
itemChild.Tag = aParent.id
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function FilterList(wishedMeet As Meet) As List(Of BabySitter)
|
||||
If wishedMeet Is Nothing Then
|
||||
Return dbdata.getBabysitters()
|
||||
End If
|
||||
|
||||
Dim ABSList As List(Of BabySitter) = dbdata.getAvailableBabysitters()
|
||||
Dim FilteredBSList As List(Of BabySitter) = New List(Of BabySitter)
|
||||
For Each aBS As BabySitter In ABSList
|
||||
If Not (wishedMeet.overlap(aBS.meet1) Or
|
||||
wishedMeet.overlap(aBS.meet2) Or
|
||||
wishedMeet.overlap(aBS.meet3)) Then
|
||||
FilteredBSList.Add(aBS)
|
||||
End If
|
||||
Next
|
||||
Return FilteredBSList
|
||||
End Function
|
||||
|
||||
' ----- Handles and Listerners -----
|
||||
Private Sub DeleteSelected()
|
||||
Dim msgResult As DialogResult = MsgBox("You are about to remove " & ListView.SelectedItems(0).Text & " from the software. Would you continue ?", MsgBoxStyle.YesNo, "Confirm deletion")
|
||||
If msgResult = vbYes Then
|
||||
If Me.aTypeofPerson = PersonType.BabySitter Then
|
||||
dbdata.deleteBabysitterByID(ListView.SelectedItems(0).Tag)
|
||||
ElseIf Me.aTypeofPerson = PersonType.Parent Then
|
||||
dbdata.deleteParentByID(ListView.SelectedItems(0).Tag)
|
||||
End If
|
||||
reloadList()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CMSDelete_Click(sender As System.Object, e As System.EventArgs) Handles CMSDelete.Click
|
||||
DeleteSelected()
|
||||
End Sub
|
||||
|
||||
Private Sub TSButtonDelete_Click(sender As System.Object, e As System.EventArgs) Handles TSButtonDelete.Click
|
||||
DeleteSelected()
|
||||
End Sub
|
||||
|
||||
Private Sub TSButtonAdd_Click(sender As System.Object, e As System.EventArgs) Handles TSButtonAdd.Click
|
||||
If (aTypeofPerson = PersonType.Parent) Then
|
||||
Dim createParent As FormParentID = New FormParentID(IDFormMode.CREATOR)
|
||||
Dim conclusion As DialogResult = createParent.ShowDialog
|
||||
If conclusion = Windows.Forms.DialogResult.OK Then
|
||||
reloadList()
|
||||
End If
|
||||
createParent.Dispose()
|
||||
ElseIf aTypeofPerson = PersonType.BabySitter Then
|
||||
Dim createBD As FormBabySitterID = New FormBabySitterID(IDFormMode.CREATOR)
|
||||
Dim conclusion As DialogResult = createBD.ShowDialog
|
||||
If conclusion = Windows.Forms.DialogResult.OK Then
|
||||
reloadList()
|
||||
End If
|
||||
createBD.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub TSButtonEdit_Click(sender As System.Object, e As System.EventArgs) Handles TSButtonEdit.Click
|
||||
EditSelected()
|
||||
End Sub
|
||||
Private Sub CMSEdit_Click(sender As System.Object, e As System.EventArgs) Handles CMSEdit.Click
|
||||
EditSelected()
|
||||
End Sub
|
||||
|
||||
Private Sub TSButtonSelect_Click(sender As System.Object, e As System.EventArgs) Handles TSButtonSelect.Click
|
||||
ReturnSelected()
|
||||
End Sub
|
||||
Private Sub CMSSelect_Click(sender As System.Object, e As System.EventArgs) Handles CMSSelect.Click
|
||||
ReturnSelected()
|
||||
End Sub
|
||||
|
||||
Private Sub CMSShow_Click(sender As System.Object, e As System.EventArgs) Handles CMSShow.Click
|
||||
ViewSelected()
|
||||
End Sub
|
||||
|
||||
Private Sub TSButtonShow_Click(sender As System.Object, e As System.EventArgs) Handles TSButtonShow.Click
|
||||
ViewSelected()
|
||||
End Sub
|
||||
|
||||
Private Sub ListView_DoubleClick(sender As System.Object, e As System.EventArgs) Handles ListView.DoubleClick
|
||||
If ListView.SelectedIndices.Count > 0 Then
|
||||
If aFormMode = ListFormMode.Viewer Then
|
||||
ViewSelected()
|
||||
Else
|
||||
ReturnSelected()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BeforeClose()
|
||||
Console.WriteLine("FormList : Closing instance")
|
||||
If aFormMode = ListFormMode.Viewer Then
|
||||
Me.Dispose()
|
||||
Else
|
||||
Me.DialogResult = Windows.Forms.DialogResult.Cancel
|
||||
Me.Hide()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Private Sub FormList_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
|
||||
' BeforeClose()
|
||||
'End Sub
|
||||
|
||||
Private Sub TSButtonClose_Click(sender As System.Object, e As System.EventArgs) Handles TSButtonClose.Click
|
||||
BeforeClose()
|
||||
End Sub
|
||||
|
||||
Private Sub ListView_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles ListView.SelectedIndexChanged
|
||||
If ListView.SelectedItems.Count <= 0 Then
|
||||
TSButtonDelete.Enabled = False
|
||||
TSButtonEdit.Enabled = False
|
||||
TSButtonSelect.Enabled = False
|
||||
TSButtonShow.Enabled = False
|
||||
CMSDelete.Enabled = False
|
||||
CMSEdit.Enabled = False
|
||||
CMSSelect.Enabled = False
|
||||
CMSShow.Enabled = False
|
||||
|
||||
CMSDelete.Text = "Delete selection"
|
||||
CMSEdit.Text = "Edit selection..."
|
||||
CMSShow.Text = "Show selection..."
|
||||
CMSSelect.Text = "Select"
|
||||
Else
|
||||
TSButtonDelete.Enabled = True
|
||||
TSButtonEdit.Enabled = True
|
||||
TSButtonSelect.Enabled = True
|
||||
TSButtonShow.Enabled = True
|
||||
CMSDelete.Enabled = True
|
||||
CMSEdit.Enabled = True
|
||||
CMSSelect.Enabled = True
|
||||
CMSShow.Enabled = True
|
||||
|
||||
CMSDelete.Text = "Delete " + ListView.SelectedItems(0).Text
|
||||
CMSEdit.Text = "Edit " + ListView.SelectedItems(0).Text + "..."
|
||||
CMSShow.Text = "Show " + ListView.SelectedItems(0).Text + "..."
|
||||
CMSSelect.Text = "Select " + ListView.SelectedItems(0).Text
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ToolStripButton1_Click(sender As System.Object, e As System.EventArgs) Handles TSPin.Click
|
||||
If TSPin.Checked Then
|
||||
TSPin.Text = "Pin windows"
|
||||
TSPin.Image = My.Resources.UnpingedWindows
|
||||
TSPin.Checked = False
|
||||
Else
|
||||
TSPin.Text = "Unpin windows"
|
||||
TSPin.Image = My.Resources.PingedWindows
|
||||
TSPin.Checked = True
|
||||
Me.Top = FormMain.Top
|
||||
Me.Left = FormMain.Right
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
338
ApplicationCrèche 1/Forms/FormMain.Designer.vb
generated
Normal file
@ -0,0 +1,338 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class FormMain
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form remplace la méthode Dispose pour nettoyer la liste des composants.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Requise par le Concepteur Windows Form
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'REMARQUE : la procédure suivante est requise par le Concepteur Windows Form
|
||||
'Elle peut être modifiée à l'aide du Concepteur Windows Form.
|
||||
'Ne la modifiez pas à l'aide de l'éditeur de code.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.MenuStrip1 = New System.Windows.Forms.MenuStrip()
|
||||
Me.FileToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.QuitToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.EditionToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.TSNewChild = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.TSShowChild = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.TSEditChild = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.TSDeleteChild = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ShowToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.TSBSList = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ToolStripSeparator3 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.DetailToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.SmallIconsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
|
||||
Me.NewSubButton = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BSListButton = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.EditChildButton = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ListViewMain = New System.Windows.Forms.ListView()
|
||||
Me.ColumnHeaderChild = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
|
||||
Me.ColumnHeaderPlanning = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
|
||||
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.CMSShowChild = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.CMSEditChild = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.CMSDeleteChild = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ToolStripSeparator4 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.DetailToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ListToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.SmallIconsToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.MenuStrip1.SuspendLayout()
|
||||
Me.ToolStrip1.SuspendLayout()
|
||||
Me.ContextMenuStrip1.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'MenuStrip1
|
||||
'
|
||||
Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.FileToolStripMenuItem, Me.EditionToolStripMenuItem, Me.ShowToolStripMenuItem})
|
||||
Me.MenuStrip1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.MenuStrip1.Name = "MenuStrip1"
|
||||
Me.MenuStrip1.Size = New System.Drawing.Size(594, 24)
|
||||
Me.MenuStrip1.TabIndex = 0
|
||||
Me.MenuStrip1.Text = "MenuStrip1"
|
||||
'
|
||||
'FileToolStripMenuItem
|
||||
'
|
||||
Me.FileToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.QuitToolStripMenuItem})
|
||||
Me.FileToolStripMenuItem.Name = "FileToolStripMenuItem"
|
||||
Me.FileToolStripMenuItem.Size = New System.Drawing.Size(80, 20)
|
||||
Me.FileToolStripMenuItem.Text = "Application"
|
||||
'
|
||||
'QuitToolStripMenuItem
|
||||
'
|
||||
Me.QuitToolStripMenuItem.Name = "QuitToolStripMenuItem"
|
||||
Me.QuitToolStripMenuItem.Size = New System.Drawing.Size(97, 22)
|
||||
Me.QuitToolStripMenuItem.Text = "Quit"
|
||||
'
|
||||
'EditionToolStripMenuItem
|
||||
'
|
||||
Me.EditionToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.TSNewChild, Me.ToolStripSeparator2, Me.TSShowChild, Me.TSEditChild, Me.TSDeleteChild})
|
||||
Me.EditionToolStripMenuItem.Name = "EditionToolStripMenuItem"
|
||||
Me.EditionToolStripMenuItem.Size = New System.Drawing.Size(56, 20)
|
||||
Me.EditionToolStripMenuItem.Text = "Edition"
|
||||
'
|
||||
'TSNewChild
|
||||
'
|
||||
Me.TSNewChild.Image = Global.ApplicationCrèche_1.My.Resources.Resources.AddSheet2
|
||||
Me.TSNewChild.Name = "TSNewChild"
|
||||
Me.TSNewChild.Size = New System.Drawing.Size(197, 22)
|
||||
Me.TSNewChild.Text = "Subscribe a new child..."
|
||||
'
|
||||
'ToolStripSeparator2
|
||||
'
|
||||
Me.ToolStripSeparator2.Name = "ToolStripSeparator2"
|
||||
Me.ToolStripSeparator2.Size = New System.Drawing.Size(194, 6)
|
||||
'
|
||||
'TSShowChild
|
||||
'
|
||||
Me.TSShowChild.Enabled = False
|
||||
Me.TSShowChild.Image = Global.ApplicationCrèche_1.My.Resources.Resources.NormalSheetLight
|
||||
Me.TSShowChild.Name = "TSShowChild"
|
||||
Me.TSShowChild.Size = New System.Drawing.Size(197, 22)
|
||||
Me.TSShowChild.Text = "Show selected child..."
|
||||
'
|
||||
'TSEditChild
|
||||
'
|
||||
Me.TSEditChild.Enabled = False
|
||||
Me.TSEditChild.Image = Global.ApplicationCrèche_1.My.Resources.Resources.EditSheet2
|
||||
Me.TSEditChild.Name = "TSEditChild"
|
||||
Me.TSEditChild.Size = New System.Drawing.Size(197, 22)
|
||||
Me.TSEditChild.Text = "Edit selected child..."
|
||||
'
|
||||
'TSDeleteChild
|
||||
'
|
||||
Me.TSDeleteChild.Enabled = False
|
||||
Me.TSDeleteChild.Image = Global.ApplicationCrèche_1.My.Resources.Resources.DeleteSheet2
|
||||
Me.TSDeleteChild.Name = "TSDeleteChild"
|
||||
Me.TSDeleteChild.Size = New System.Drawing.Size(197, 22)
|
||||
Me.TSDeleteChild.Text = "Delete selected child..."
|
||||
'
|
||||
'ShowToolStripMenuItem
|
||||
'
|
||||
Me.ShowToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.TSBSList, Me.ToolStripSeparator3, Me.DetailToolStripMenuItem, Me.ListToolStripMenuItem, Me.SmallIconsToolStripMenuItem})
|
||||
Me.ShowToolStripMenuItem.Name = "ShowToolStripMenuItem"
|
||||
Me.ShowToolStripMenuItem.Size = New System.Drawing.Size(48, 20)
|
||||
Me.ShowToolStripMenuItem.Text = "Show"
|
||||
'
|
||||
'TSBSList
|
||||
'
|
||||
Me.TSBSList.Image = Global.ApplicationCrèche_1.My.Resources.Resources.WindowList1
|
||||
Me.TSBSList.Name = "TSBSList"
|
||||
Me.TSBSList.Size = New System.Drawing.Size(144, 22)
|
||||
Me.TSBSList.Text = "Babysitter list"
|
||||
'
|
||||
'ToolStripSeparator3
|
||||
'
|
||||
Me.ToolStripSeparator3.Name = "ToolStripSeparator3"
|
||||
Me.ToolStripSeparator3.Size = New System.Drawing.Size(141, 6)
|
||||
'
|
||||
'DetailToolStripMenuItem
|
||||
'
|
||||
Me.DetailToolStripMenuItem.Name = "DetailToolStripMenuItem"
|
||||
Me.DetailToolStripMenuItem.Size = New System.Drawing.Size(144, 22)
|
||||
Me.DetailToolStripMenuItem.Text = "Detail"
|
||||
'
|
||||
'ListToolStripMenuItem
|
||||
'
|
||||
Me.ListToolStripMenuItem.Name = "ListToolStripMenuItem"
|
||||
Me.ListToolStripMenuItem.Size = New System.Drawing.Size(144, 22)
|
||||
Me.ListToolStripMenuItem.Text = "List"
|
||||
'
|
||||
'SmallIconsToolStripMenuItem
|
||||
'
|
||||
Me.SmallIconsToolStripMenuItem.Name = "SmallIconsToolStripMenuItem"
|
||||
Me.SmallIconsToolStripMenuItem.Size = New System.Drawing.Size(144, 22)
|
||||
Me.SmallIconsToolStripMenuItem.Text = "Small icons"
|
||||
'
|
||||
'ToolStrip1
|
||||
'
|
||||
Me.ToolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden
|
||||
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.NewSubButton, Me.BSListButton, Me.ToolStripSeparator1, Me.EditChildButton})
|
||||
Me.ToolStrip1.Location = New System.Drawing.Point(0, 24)
|
||||
Me.ToolStrip1.Name = "ToolStrip1"
|
||||
Me.ToolStrip1.Size = New System.Drawing.Size(594, 25)
|
||||
Me.ToolStrip1.TabIndex = 1
|
||||
Me.ToolStrip1.Text = "ToolStrip1"
|
||||
'
|
||||
'NewSubButton
|
||||
'
|
||||
Me.NewSubButton.Image = Global.ApplicationCrèche_1.My.Resources.Resources.AddSheet2
|
||||
Me.NewSubButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.NewSubButton.Name = "NewSubButton"
|
||||
Me.NewSubButton.Size = New System.Drawing.Size(119, 22)
|
||||
Me.NewSubButton.Text = "New subscription"
|
||||
'
|
||||
'BSListButton
|
||||
'
|
||||
Me.BSListButton.Image = Global.ApplicationCrèche_1.My.Resources.Resources.WindowList1
|
||||
Me.BSListButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.BSListButton.Name = "BSListButton"
|
||||
Me.BSListButton.Size = New System.Drawing.Size(97, 22)
|
||||
Me.BSListButton.Text = "Babysitter list"
|
||||
'
|
||||
'ToolStripSeparator1
|
||||
'
|
||||
Me.ToolStripSeparator1.Name = "ToolStripSeparator1"
|
||||
Me.ToolStripSeparator1.Size = New System.Drawing.Size(6, 25)
|
||||
'
|
||||
'EditChildButton
|
||||
'
|
||||
Me.EditChildButton.Enabled = False
|
||||
Me.EditChildButton.Image = Global.ApplicationCrèche_1.My.Resources.Resources.EditSheet2
|
||||
Me.EditChildButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.EditChildButton.Name = "EditChildButton"
|
||||
Me.EditChildButton.Size = New System.Drawing.Size(122, 22)
|
||||
Me.EditChildButton.Text = "Edit selected child"
|
||||
'
|
||||
'ListViewMain
|
||||
'
|
||||
Me.ListViewMain.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.ListViewMain.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeaderChild, Me.ColumnHeaderPlanning})
|
||||
Me.ListViewMain.ContextMenuStrip = Me.ContextMenuStrip1
|
||||
Me.ListViewMain.FullRowSelect = True
|
||||
Me.ListViewMain.GridLines = True
|
||||
Me.ListViewMain.Location = New System.Drawing.Point(12, 52)
|
||||
Me.ListViewMain.MultiSelect = False
|
||||
Me.ListViewMain.Name = "ListViewMain"
|
||||
Me.ListViewMain.Size = New System.Drawing.Size(570, 397)
|
||||
Me.ListViewMain.TabIndex = 2
|
||||
Me.ListViewMain.UseCompatibleStateImageBehavior = False
|
||||
Me.ListViewMain.View = System.Windows.Forms.View.Details
|
||||
'
|
||||
'ColumnHeaderChild
|
||||
'
|
||||
Me.ColumnHeaderChild.Text = "Children"
|
||||
Me.ColumnHeaderChild.Width = 199
|
||||
'
|
||||
'ColumnHeaderPlanning
|
||||
'
|
||||
Me.ColumnHeaderPlanning.Text = "Planning"
|
||||
Me.ColumnHeaderPlanning.Width = 364
|
||||
'
|
||||
'ContextMenuStrip1
|
||||
'
|
||||
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.CMSShowChild, Me.CMSEditChild, Me.CMSDeleteChild, Me.ToolStripSeparator4, Me.DetailToolStripMenuItem1, Me.ListToolStripMenuItem1, Me.SmallIconsToolStripMenuItem1})
|
||||
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
|
||||
Me.ContextMenuStrip1.Size = New System.Drawing.Size(168, 142)
|
||||
'
|
||||
'CMSShowChild
|
||||
'
|
||||
Me.CMSShowChild.Enabled = False
|
||||
Me.CMSShowChild.Image = Global.ApplicationCrèche_1.My.Resources.Resources.NormalSheetLight
|
||||
Me.CMSShowChild.Name = "CMSShowChild"
|
||||
Me.CMSShowChild.Size = New System.Drawing.Size(167, 22)
|
||||
Me.CMSShowChild.Text = "Show this child..."
|
||||
'
|
||||
'CMSEditChild
|
||||
'
|
||||
Me.CMSEditChild.Enabled = False
|
||||
Me.CMSEditChild.Image = Global.ApplicationCrèche_1.My.Resources.Resources.EditSheet2
|
||||
Me.CMSEditChild.Name = "CMSEditChild"
|
||||
Me.CMSEditChild.Size = New System.Drawing.Size(167, 22)
|
||||
Me.CMSEditChild.Text = "Edit this child..."
|
||||
'
|
||||
'CMSDeleteChild
|
||||
'
|
||||
Me.CMSDeleteChild.Enabled = False
|
||||
Me.CMSDeleteChild.Image = Global.ApplicationCrèche_1.My.Resources.Resources.DeleteSheet2
|
||||
Me.CMSDeleteChild.Name = "CMSDeleteChild"
|
||||
Me.CMSDeleteChild.Size = New System.Drawing.Size(167, 22)
|
||||
Me.CMSDeleteChild.Text = "Delete this child..."
|
||||
'
|
||||
'ToolStripSeparator4
|
||||
'
|
||||
Me.ToolStripSeparator4.Name = "ToolStripSeparator4"
|
||||
Me.ToolStripSeparator4.Size = New System.Drawing.Size(164, 6)
|
||||
'
|
||||
'DetailToolStripMenuItem1
|
||||
'
|
||||
Me.DetailToolStripMenuItem1.Name = "DetailToolStripMenuItem1"
|
||||
Me.DetailToolStripMenuItem1.Size = New System.Drawing.Size(167, 22)
|
||||
Me.DetailToolStripMenuItem1.Text = "Detail"
|
||||
'
|
||||
'ListToolStripMenuItem1
|
||||
'
|
||||
Me.ListToolStripMenuItem1.Name = "ListToolStripMenuItem1"
|
||||
Me.ListToolStripMenuItem1.Size = New System.Drawing.Size(167, 22)
|
||||
Me.ListToolStripMenuItem1.Text = "List"
|
||||
'
|
||||
'SmallIconsToolStripMenuItem1
|
||||
'
|
||||
Me.SmallIconsToolStripMenuItem1.Name = "SmallIconsToolStripMenuItem1"
|
||||
Me.SmallIconsToolStripMenuItem1.Size = New System.Drawing.Size(167, 22)
|
||||
Me.SmallIconsToolStripMenuItem1.Text = "Small icons"
|
||||
'
|
||||
'FormMain
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(594, 461)
|
||||
Me.Controls.Add(Me.ListViewMain)
|
||||
Me.Controls.Add(Me.ToolStrip1)
|
||||
Me.Controls.Add(Me.MenuStrip1)
|
||||
Me.Font = New System.Drawing.Font("Segoe UI", 8.25!)
|
||||
Me.MainMenuStrip = Me.MenuStrip1
|
||||
Me.MinimumSize = New System.Drawing.Size(500, 500)
|
||||
Me.Name = "FormMain"
|
||||
Me.Text = "Main Window"
|
||||
Me.MenuStrip1.ResumeLayout(False)
|
||||
Me.MenuStrip1.PerformLayout()
|
||||
Me.ToolStrip1.ResumeLayout(False)
|
||||
Me.ToolStrip1.PerformLayout()
|
||||
Me.ContextMenuStrip1.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents MenuStrip1 As System.Windows.Forms.MenuStrip
|
||||
Friend WithEvents FileToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents EditionToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents ToolStrip1 As System.Windows.Forms.ToolStrip
|
||||
Friend WithEvents NewSubButton As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents BSListButton As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents ToolStripSeparator1 As System.Windows.Forms.ToolStripSeparator
|
||||
Friend WithEvents EditChildButton As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents ListViewMain As System.Windows.Forms.ListView
|
||||
Friend WithEvents ShowToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents QuitToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents ColumnHeaderChild As System.Windows.Forms.ColumnHeader
|
||||
Friend WithEvents ColumnHeaderPlanning As System.Windows.Forms.ColumnHeader
|
||||
Friend WithEvents TSEditChild As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents TSDeleteChild As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents TSNewChild As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents ToolStripSeparator2 As System.Windows.Forms.ToolStripSeparator
|
||||
Friend WithEvents TSBSList As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents TSShowChild As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents ContextMenuStrip1 As System.Windows.Forms.ContextMenuStrip
|
||||
Friend WithEvents CMSEditChild As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents CMSShowChild As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents CMSDeleteChild As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents ToolStripSeparator3 As System.Windows.Forms.ToolStripSeparator
|
||||
Friend WithEvents DetailToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents ListToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents SmallIconsToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents ToolStripSeparator4 As System.Windows.Forms.ToolStripSeparator
|
||||
Friend WithEvents DetailToolStripMenuItem1 As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents ListToolStripMenuItem1 As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents SmallIconsToolStripMenuItem1 As System.Windows.Forms.ToolStripMenuItem
|
||||
|
||||
End Class
|
123
ApplicationCrèche 1/Forms/FormMain.en.resx
Normal file
@ -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>
|
||||
<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>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Main window</value>
|
||||
</data>
|
||||
</root>
|
136
ApplicationCrèche 1/Forms/FormMain.fr-FR.resx
Normal file
@ -0,0 +1,136 @@
|
||||
<?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>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="TSBSList.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>144, 22</value>
|
||||
</data>
|
||||
<data name="ToolStripSeparator3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>141, 6</value>
|
||||
</data>
|
||||
<data name="DetailToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>144, 22</value>
|
||||
</data>
|
||||
<data name="ListToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>144, 22</value>
|
||||
</data>
|
||||
<data name="SmallIconsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>144, 22</value>
|
||||
</data>
|
||||
</root>
|
132
ApplicationCrèche 1/Forms/FormMain.resx
Normal file
@ -0,0 +1,132 @@
|
||||
<?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>
|
||||
<metadata name="MenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="ToolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>132, 17</value>
|
||||
</metadata>
|
||||
<metadata name="ContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>239, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>39</value>
|
||||
</metadata>
|
||||
</root>
|
221
ApplicationCrèche 1/Forms/FormMain.vb
Normal file
@ -0,0 +1,221 @@
|
||||
Imports System.IO
|
||||
Public Class FormMain
|
||||
' ----- Attributes -----
|
||||
Private BSlist As FormList
|
||||
|
||||
' ----- Initialising window -----
|
||||
Private Sub FormMain_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
||||
|
||||
|
||||
'Try
|
||||
|
||||
'Catch ex As Exception
|
||||
|
||||
'End Try
|
||||
|
||||
reloadChildList()
|
||||
End Sub
|
||||
|
||||
' ----- Methodes ------
|
||||
Private Sub reloadChildList()
|
||||
Dim allChildren As List(Of Child) = New List(Of Child)
|
||||
allChildren = dbdata.getChildren()
|
||||
|
||||
'Fill ListViewMain
|
||||
ListViewMain.Items.Clear()
|
||||
For Each aChild As Child In allChildren
|
||||
Dim childName As String
|
||||
childName = aChild.firstname & " " & aChild.lastname
|
||||
|
||||
Dim planning As String = ""
|
||||
If Not aChild.meet Is Nothing Then
|
||||
For Each dico As KeyValuePair(Of String, Boolean) In aChild.meet.weekdays
|
||||
If dico.Value Then
|
||||
planning += dico.Key & " "
|
||||
End If
|
||||
planning = StrConv(planning, VbStrConv.ProperCase)
|
||||
Next
|
||||
End If
|
||||
|
||||
Dim itemChild As ListViewItem = ListViewMain.Items.Add(childName)
|
||||
itemChild.SubItems.Add(planning)
|
||||
itemChild.Tag = aChild.id
|
||||
Next
|
||||
End Sub
|
||||
|
||||
' ----- Handlers and Listerners -----
|
||||
Private Sub ShowBSList()
|
||||
If BSlist Is Nothing Then
|
||||
BSlist = New FormList(PersonType.BabySitter, ListFormMode.Viewer)
|
||||
BSlist.Show()
|
||||
BSlist.Height = Me.Height
|
||||
BSlist.Top = Me.Top
|
||||
BSlist.Left = Me.Right
|
||||
ElseIf BSlist.Visible = False Then
|
||||
BSlist.Dispose()
|
||||
BSlist = Nothing
|
||||
ShowBSList()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub BSListButton_Click(sender As System.Object, e As System.EventArgs) Handles BSListButton.Click
|
||||
ShowBSList()
|
||||
End Sub
|
||||
Private Sub TSBSList_Click(sender As System.Object, e As System.EventArgs) Handles TSBSList.Click
|
||||
ShowBSList()
|
||||
End Sub
|
||||
|
||||
' add a new child
|
||||
Private Sub NewChild()
|
||||
' Instanciation of a new FormChildID
|
||||
Dim formAddChild As FormChildID = New FormChildID(IDFormMode.CREATOR)
|
||||
' Show of the form and retrivement of the way the form close.
|
||||
Dim conclusion As DialogResult = formAddChild.ShowDialog()
|
||||
' If the user decide to abort the creation of a child, then we do nothing.
|
||||
' But if the user validate it, we manage it
|
||||
If conclusion = Windows.Forms.DialogResult.OK Then
|
||||
reloadChildList()
|
||||
End If
|
||||
|
||||
' Dispose call the garbage collector in order to free the RAM.
|
||||
'The form don't have any existance anymore.
|
||||
formAddChild.Dispose()
|
||||
End Sub
|
||||
Private Sub ToolStripButton1_Click(sender As System.Object, e As System.EventArgs) Handles NewSubButton.Click
|
||||
NewChild()
|
||||
End Sub
|
||||
|
||||
' Edit a listed child
|
||||
Private Sub EditChild(Optional theFormMode As IDFormMode = IDFormMode.VIEWER)
|
||||
If ListViewMain.SelectedItems.Count > 0 Then
|
||||
Dim theChild As Child = dbdata.getChildByID(ListViewMain.SelectedItems(0).Tag)
|
||||
Dim aFormChildID As FormChildID = New FormChildID(theFormMode, theChild)
|
||||
Dim conclusion As DialogResult = aFormChildID.ShowDialog()
|
||||
If conclusion = Windows.Forms.DialogResult.OK Then
|
||||
reloadChildList()
|
||||
End If
|
||||
aFormChildID.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub TSEditChild_Click(sender As System.Object, e As System.EventArgs) Handles TSEditChild.Click
|
||||
EditChild(IDFormMode.EDITOR)
|
||||
End Sub
|
||||
Private Sub EditChildButton_Click(sender As System.Object, e As System.EventArgs) Handles EditChildButton.Click
|
||||
EditChild(IDFormMode.EDITOR)
|
||||
End Sub
|
||||
Private Sub ListViewMain_DoubleClick(sender As System.Object, e As System.EventArgs) Handles ListViewMain.DoubleClick
|
||||
EditChild(IDFormMode.VIEWER)
|
||||
End Sub
|
||||
Private Sub TSShowChild_Click(sender As System.Object, e As System.EventArgs) Handles TSShowChild.Click
|
||||
EditChild(IDFormMode.VIEWER)
|
||||
End Sub
|
||||
Private Sub CMSEditChild_Click(sender As System.Object, e As System.EventArgs) Handles CMSEditChild.Click
|
||||
EditChild(IDFormMode.EDITOR)
|
||||
End Sub
|
||||
Private Sub CMSShowChild_Click(sender As System.Object, e As System.EventArgs) Handles CMSShowChild.Click
|
||||
EditChild(IDFormMode.VIEWER)
|
||||
End Sub
|
||||
|
||||
Public Sub DeleteChild()
|
||||
Dim msgResult As DialogResult = MsgBox("You are about to remove " & ListViewMain.SelectedItems(0).Text & " from the software. Would you continue ?", MsgBoxStyle.YesNo, "Confirm deletion")
|
||||
If msgResult = vbYes Then
|
||||
dbdata.deleteChildByID(ListViewMain.SelectedItems(0).Tag)
|
||||
reloadChildList()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CMSDeleteChild_Click(sender As System.Object, e As System.EventArgs) Handles CMSDeleteChild.Click
|
||||
DeleteChild()
|
||||
End Sub
|
||||
Private Sub TSDeleteChild_Click(sender As System.Object, e As System.EventArgs) Handles TSDeleteChild.Click
|
||||
DeleteChild()
|
||||
End Sub
|
||||
Private Sub FormMain_Move(sender As Object, e As System.EventArgs) Handles Me.Move
|
||||
If Not BSlist Is Nothing Then
|
||||
If BSlist.TSPin.Checked Then
|
||||
BSlist.Top = Me.Top
|
||||
BSlist.Left = Me.Right
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' On selection change
|
||||
Private Sub ListViewMain_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles ListViewMain.SelectedIndexChanged
|
||||
If ListViewMain.SelectedItems.Count <= 0 Then
|
||||
CMSDeleteChild.Enabled = False
|
||||
TSDeleteChild.Enabled = False
|
||||
EditChildButton.Enabled = False
|
||||
CMSEditChild.Enabled = False
|
||||
TSEditChild.Enabled = False
|
||||
CMSShowChild.Enabled = False
|
||||
TSShowChild.Enabled = False
|
||||
|
||||
CMSShowChild.Text = "Show this child..."
|
||||
CMSEditChild.Text = "Edit this child..."
|
||||
CMSDeleteChild.Text = "Delete this child "
|
||||
Else
|
||||
CMSDeleteChild.Enabled = True
|
||||
TSDeleteChild.Enabled = True
|
||||
EditChildButton.Enabled = True
|
||||
CMSEditChild.Enabled = True
|
||||
TSEditChild.Enabled = True
|
||||
CMSShowChild.Enabled = True
|
||||
TSShowChild.Enabled = True
|
||||
|
||||
CMSShowChild.Text = "Show " + ListViewMain.SelectedItems(0).Text + "..."
|
||||
CMSEditChild.Text = "Edit " + ListViewMain.SelectedItems(0).Text + "..."
|
||||
CMSDeleteChild.Text = "Delete " + ListViewMain.SelectedItems(0).Text
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' ----- Closing programme -----
|
||||
Private Sub QuitToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles QuitToolStripMenuItem.Click
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Switch to Detail view the list of Children
|
||||
''' </summary>
|
||||
''' <remarks></remarks>
|
||||
Private Sub ViewDetail()
|
||||
ListViewMain.View = View.Details
|
||||
End Sub
|
||||
Private Sub DetailToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles DetailToolStripMenuItem.Click
|
||||
ViewDetail()
|
||||
End Sub
|
||||
Private Sub DetailToolStripMenuItem1_Click(sender As System.Object, e As System.EventArgs) Handles DetailToolStripMenuItem1.Click
|
||||
ViewDetail()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Switch to List view the list of Children
|
||||
''' </summary>
|
||||
''' <remarks></remarks>
|
||||
Private Sub ViewList()
|
||||
ListViewMain.View = View.List
|
||||
End Sub
|
||||
Private Sub ListToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ListToolStripMenuItem.Click
|
||||
ViewList()
|
||||
End Sub
|
||||
Private Sub ListToolStripMenuItem1_Click(sender As System.Object, e As System.EventArgs) Handles ListToolStripMenuItem1.Click
|
||||
ViewList()
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' Switch to Small view the list of Children
|
||||
''' </summary>
|
||||
''' <remarks></remarks>
|
||||
Private Sub ViewSmall()
|
||||
ListViewMain.View = View.SmallIcon
|
||||
End Sub
|
||||
Private Sub SmallIconsToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles SmallIconsToolStripMenuItem.Click
|
||||
ViewSmall()
|
||||
End Sub
|
||||
Private Sub SmallIconsToolStripMenuItem1_Click(sender As System.Object, e As System.EventArgs) Handles SmallIconsToolStripMenuItem1.Click
|
||||
ViewSmall()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
164
ApplicationCrèche 1/Forms/FormParentID.Designer.vb
generated
Normal file
@ -0,0 +1,164 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class FormParentID
|
||||
Inherits ApplicationCrèche_1.FormID
|
||||
|
||||
'Form remplace la méthode Dispose pour nettoyer la liste des composants.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Requise par le Concepteur Windows Form
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'REMARQUE : la procédure suivante est requise par le Concepteur Windows Form
|
||||
'Elle peut être modifiée à l'aide du Concepteur Windows Form.
|
||||
'Ne la modifiez pas à l'aide de l'éditeur de code.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FormParentID))
|
||||
Me.Label5 = New System.Windows.Forms.Label()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.TBPhone = New System.Windows.Forms.TextBox()
|
||||
Me.LabelPhone = New System.Windows.Forms.Label()
|
||||
Me.LabelAddress = New System.Windows.Forms.Label()
|
||||
Me.ListView = New System.Windows.Forms.ListView()
|
||||
Me.CHChildName = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
|
||||
Me.ButtonPick = New System.Windows.Forms.Button()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'ButtonEdit
|
||||
'
|
||||
Me.ButtonEdit.Image = Global.ApplicationCrèche_1.My.Resources.Resources.EditSheet2
|
||||
Me.ButtonEdit.TabIndex = 8
|
||||
Me.ButtonEdit.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText
|
||||
'
|
||||
'ButtonClose
|
||||
'
|
||||
Me.ButtonClose.TabIndex = 9
|
||||
'
|
||||
'TBAddress
|
||||
'
|
||||
Me.TBAddress.TabIndex = 5
|
||||
'
|
||||
'Label5
|
||||
'
|
||||
Me.Label5.AutoSize = True
|
||||
Me.Label5.Font = New System.Drawing.Font("Segoe UI", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label5.Location = New System.Drawing.Point(276, 9)
|
||||
Me.Label5.Name = "Label5"
|
||||
Me.Label5.Size = New System.Drawing.Size(102, 30)
|
||||
Me.Label5.TabIndex = 21
|
||||
Me.Label5.Text = "Child(ren)"
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.AutoSize = True
|
||||
Me.Label4.Font = New System.Drawing.Font("Segoe UI", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label4.Location = New System.Drawing.Point(12, 9)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(83, 30)
|
||||
Me.Label4.TabIndex = 20
|
||||
Me.Label4.Text = "Identity"
|
||||
'
|
||||
'TBPhone
|
||||
'
|
||||
Me.TBPhone.Location = New System.Drawing.Point(80, 136)
|
||||
Me.TBPhone.Name = "TBPhone"
|
||||
Me.TBPhone.Size = New System.Drawing.Size(165, 22)
|
||||
Me.TBPhone.TabIndex = 4
|
||||
'
|
||||
'LabelPhone
|
||||
'
|
||||
Me.LabelPhone.AutoSize = True
|
||||
Me.LabelPhone.Location = New System.Drawing.Point(12, 139)
|
||||
Me.LabelPhone.Name = "LabelPhone"
|
||||
Me.LabelPhone.Size = New System.Drawing.Size(43, 13)
|
||||
Me.LabelPhone.TabIndex = 23
|
||||
Me.LabelPhone.Text = "Phone:"
|
||||
'
|
||||
'LabelAddress
|
||||
'
|
||||
Me.LabelAddress.AutoSize = True
|
||||
Me.LabelAddress.Location = New System.Drawing.Point(12, 166)
|
||||
Me.LabelAddress.Name = "LabelAddress"
|
||||
Me.LabelAddress.Size = New System.Drawing.Size(76, 13)
|
||||
Me.LabelAddress.TabIndex = 24
|
||||
Me.LabelAddress.Text = "Living adress:"
|
||||
'
|
||||
'ListView
|
||||
'
|
||||
Me.ListView.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.CHChildName})
|
||||
Me.ListView.FullRowSelect = True
|
||||
Me.ListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None
|
||||
Me.ListView.Location = New System.Drawing.Point(281, 42)
|
||||
Me.ListView.MultiSelect = False
|
||||
Me.ListView.Name = "ListView"
|
||||
Me.ListView.Size = New System.Drawing.Size(251, 298)
|
||||
Me.ListView.TabIndex = 7
|
||||
Me.ListView.UseCompatibleStateImageBehavior = False
|
||||
Me.ListView.View = System.Windows.Forms.View.Details
|
||||
'
|
||||
'CHChildName
|
||||
'
|
||||
Me.CHChildName.Text = "Name"
|
||||
Me.CHChildName.Width = 246
|
||||
'
|
||||
'ButtonPick
|
||||
'
|
||||
Me.ButtonPick.Image = Global.ApplicationCrèche_1.My.Resources.Resources.OpenFolder
|
||||
Me.ButtonPick.Location = New System.Drawing.Point(157, 275)
|
||||
Me.ButtonPick.Name = "ButtonPick"
|
||||
Me.ButtonPick.Size = New System.Drawing.Size(113, 23)
|
||||
Me.ButtonPick.TabIndex = 6
|
||||
Me.ButtonPick.Text = "Pick adress..."
|
||||
Me.ButtonPick.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText
|
||||
Me.ButtonPick.UseVisualStyleBackColor = True
|
||||
'
|
||||
'FormParentID
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.ClientSize = New System.Drawing.Size(544, 381)
|
||||
Me.Controls.Add(Me.ButtonPick)
|
||||
Me.Controls.Add(Me.ListView)
|
||||
Me.Controls.Add(Me.LabelAddress)
|
||||
Me.Controls.Add(Me.LabelPhone)
|
||||
Me.Controls.Add(Me.TBPhone)
|
||||
Me.Controls.Add(Me.Label5)
|
||||
Me.Controls.Add(Me.Label4)
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.MinimumSize = New System.Drawing.Size(550, 410)
|
||||
Me.Name = "FormParentID"
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
||||
Me.Text = "Parent ID"
|
||||
Me.Controls.SetChildIndex(Me.ButtonEdit, 0)
|
||||
Me.Controls.SetChildIndex(Me.ButtonClose, 0)
|
||||
Me.Controls.SetChildIndex(Me.TBFirstName, 0)
|
||||
Me.Controls.SetChildIndex(Me.TBLastName, 0)
|
||||
Me.Controls.SetChildIndex(Me.TBAddress, 0)
|
||||
Me.Controls.SetChildIndex(Me.RBMale, 0)
|
||||
Me.Controls.SetChildIndex(Me.RBFemale, 0)
|
||||
Me.Controls.SetChildIndex(Me.Label4, 0)
|
||||
Me.Controls.SetChildIndex(Me.Label5, 0)
|
||||
Me.Controls.SetChildIndex(Me.TBPhone, 0)
|
||||
Me.Controls.SetChildIndex(Me.LabelPhone, 0)
|
||||
Me.Controls.SetChildIndex(Me.LabelAddress, 0)
|
||||
Me.Controls.SetChildIndex(Me.ListView, 0)
|
||||
Me.Controls.SetChildIndex(Me.ButtonPick, 0)
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents Label5 As System.Windows.Forms.Label
|
||||
Friend WithEvents Label4 As System.Windows.Forms.Label
|
||||
Friend WithEvents TBPhone As System.Windows.Forms.TextBox
|
||||
Friend WithEvents LabelPhone As System.Windows.Forms.Label
|
||||
Friend WithEvents LabelAddress As System.Windows.Forms.Label
|
||||
Friend WithEvents ListView As System.Windows.Forms.ListView
|
||||
Friend WithEvents ButtonPick As System.Windows.Forms.Button
|
||||
Friend WithEvents CHChildName As System.Windows.Forms.ColumnHeader
|
||||
|
||||
End Class
|
132
ApplicationCrèche 1/Forms/FormParentID.resx
Normal file
@ -0,0 +1,132 @@
|
||||
<?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>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAEBAAAAEAIAB+AQAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAQAAAAEAgGAAAAH/P/YQAAAAlw
|
||||
SFlzAAALEwAACxMBAJqcGAAAATBJREFUOI2dkz1Ow0AQRp+Do5QcgxZxAFquQMMB0nIBGpo0tJEQB0Di
|
||||
EIgL0CPR0SChQBA4/tnMNxS7mCDHJMLSalce7/Ob2dkMGAA7QJZG3+NpGODu7gA5MARGaR78ARAQgDrN
|
||||
LWD0cH/17jJwEcEeVdIaNxRKqsWcg6PJboKpNXAZe/uHPxvW2Msabm8uSabVdyQHBrjAnfFw0ut//nTC
|
||||
4qMipdnWKo+m8c/TcLrWINQNs+cZZtaJ5QBZ2jQeXvQanD0ek3kXnscUY2CTAb2ArQ2673+lsNEgnlx/
|
||||
CpsM+lPYsgbZmlgEyADHXSyb0PmoqQOSpePuAmTLBbKGt5dXQt0FSEZZlMgcYiF8FRCaYs7d9ZTis0RL
|
||||
tS0d281xOZKQCVYuEsSWHPGP2+juAvgCwODN5kOjKQoAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
240
ApplicationCrèche 1/Forms/FormParentID.vb
Normal file
@ -0,0 +1,240 @@
|
||||
Imports ApplicationCrèche_1.IDFormMode
|
||||
|
||||
Public Class FormParentID
|
||||
Inherits FormID
|
||||
|
||||
' ----- Private Attributes -----
|
||||
Private actualFormMode As IDFormMode
|
||||
|
||||
|
||||
' ----- Initialisators -----
|
||||
Private Sub FormParentID_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub New(theFormMode As IDFormMode, Optional aParent As Parent = Nothing)
|
||||
Console.WriteLine("FormParentID : Begining of a new instance")
|
||||
' Cet appel est requis par le concepteur.
|
||||
InitializeComponent()
|
||||
|
||||
' Ajoutez une initialisation quelconque après l'appel InitializeComponent().
|
||||
If theFormMode = CREATOR Or aParent Is Nothing Then
|
||||
ChangeMode(CREATOR)
|
||||
Else
|
||||
ChangeMode(theFormMode, aParent)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' ----- Methodes -----
|
||||
Private Function getParentFromIntern() As Parent
|
||||
Dim newParent = New Parent(Me.Tag)
|
||||
newParent.firstname = TBFirstName.Text
|
||||
newParent.lastname = TBLastName.Text
|
||||
newParent.address = TBAddress.Text
|
||||
If (RBMale.Checked) Then
|
||||
newParent.gender = True
|
||||
Else
|
||||
newParent.gender = False
|
||||
End If
|
||||
newParent.phone = TBPhone.Text
|
||||
Return newParent
|
||||
End Function
|
||||
|
||||
Private Function updateParentFromExtern(aParent As Parent) As Boolean
|
||||
If Not aParent Is Nothing Then
|
||||
|
||||
' Fill up controls with all the data we have.
|
||||
Me.Tag = aParent.id
|
||||
TBFirstName.Text = aParent.firstname 'Firstname
|
||||
TBLastName.Text = aParent.lastname 'Lastname
|
||||
If aParent.gender Then 'Gender
|
||||
RBMale.Checked = True
|
||||
Else
|
||||
RBFemale.Checked = True
|
||||
End If
|
||||
TBPhone.Text = aParent.phone
|
||||
TBAddress.Text = aParent.address
|
||||
FillListView(aParent.id)
|
||||
If ListView.Items.Count > 1 Then Label5.Text = "Children" Else Label5.Text = "Child"
|
||||
If (actualFormMode = VIEWER) Then
|
||||
Text = aParent.firstname + " " + aParent.lastname
|
||||
Else
|
||||
Text = aParent.firstname + " " + aParent.lastname + " (Edit)"
|
||||
End If
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Sub ChangeMode(aFormMode As IDFormMode, Optional aParent As Parent = Nothing)
|
||||
If aFormMode = IDFormMode.CREATOR Then ' CREATOR MODE
|
||||
actualFormMode = CREATOR
|
||||
Console.WriteLine("FormParentID : Switch to CREATOR Mode")
|
||||
|
||||
'Change of the main triggers labels + title
|
||||
Text = "New parent"
|
||||
ButtonClose.Text = "Cancel"
|
||||
ButtonEdit.Text = "Save"
|
||||
RBMale.Checked = True
|
||||
ListView.Enabled = False
|
||||
Label5.Text = ""
|
||||
|
||||
Me.Tag = 0
|
||||
ElseIf aFormMode = IDFormMode.VIEWER And Not aParent Is Nothing Then ' VIEW MODE
|
||||
actualFormMode = VIEWER
|
||||
Console.WriteLine("FormParentID : Switch to VIEWER Mode")
|
||||
|
||||
'We change the main triggers labels
|
||||
ButtonClose.Text = "Close"
|
||||
ButtonEdit.Text = "Edit"
|
||||
Text = TBFirstName.Text + " " + TBLastName.Text + " (Edit)"
|
||||
|
||||
'Activate most important security aspect (not show a window that can mat a save somewhere else)
|
||||
TBAddress.Enabled = False
|
||||
TBFirstName.Enabled = False
|
||||
TBLastName.Enabled = False
|
||||
RBFemale.Enabled = False
|
||||
RBMale.Enabled = False
|
||||
TBPhone.Enabled = False
|
||||
ButtonPick.Enabled = False
|
||||
ListView.Enabled = False
|
||||
|
||||
updateParentFromExtern(aParent)
|
||||
ElseIf aFormMode = IDFormMode.EDITOR Then ' EDITOR MODE
|
||||
Console.WriteLine("FormParentID : Switch to Editor Mode")
|
||||
actualFormMode = EDITOR
|
||||
|
||||
''We change the main triggers labels
|
||||
|
||||
ButtonClose.Text = "Cancel"
|
||||
ButtonEdit.Text = "Update"
|
||||
|
||||
'Turn off anti edit security
|
||||
TBAddress.Enabled = True
|
||||
TBFirstName.Enabled = True
|
||||
TBLastName.Enabled = True
|
||||
RBFemale.Enabled = True
|
||||
RBMale.Enabled = True
|
||||
TBPhone.Enabled = True
|
||||
ButtonPick.Enabled = True
|
||||
ListView.Enabled = True
|
||||
|
||||
updateParentFromExtern(aParent)
|
||||
Else
|
||||
Console.WriteLine("FormParentID : Return to Standart Mode !!")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Get the list of children of the actual Parent.
|
||||
''' </summary>
|
||||
''' <param name="id">The id of the Parent</param>
|
||||
''' <remarks></remarks>
|
||||
Private Sub FillListView(id As Integer)
|
||||
Dim theChildren As List(Of Child) = dbdata.getChildenOf(id)
|
||||
|
||||
For Each aChild As Child In theChildren
|
||||
ListView.Items.Add(aChild.firstname + " " + aChild.lastname).Tag = aChild.id
|
||||
Next
|
||||
' Child or Children ?
|
||||
If ListView.Items.Count <= 1 Then
|
||||
Label5.Text = "Child"
|
||||
Else
|
||||
Label5.Text = "Children"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
'Edit and click
|
||||
Protected Overrides Sub ButtonEdit_Click(sender As System.Object, e As System.EventArgs)
|
||||
Dim Validated As Boolean = True
|
||||
If actualFormMode = VIEWER Then 'EDIT'
|
||||
ChangeMode(EDITOR)
|
||||
ElseIf actualFormMode = CREATOR Then 'SAVE'
|
||||
' Error Provider
|
||||
If String.IsNullOrEmpty(TBFirstName.Text) Then
|
||||
ErrorProvider1.SetError(TBFirstName, "The first name field could not be empty." & vbNewLine & "Please fill this field.")
|
||||
Validated = False
|
||||
End If
|
||||
If String.IsNullOrEmpty(TBLastName.Text) Then
|
||||
ErrorProvider1.SetError(TBLastName, "The last name field could not be empty." & vbNewLine & "Please fill this field.")
|
||||
Validated = False
|
||||
End If
|
||||
If String.IsNullOrEmpty(TBPhone.Text) Then
|
||||
ErrorProvider1.SetError(TBPhone, "The phone number field could not be empty" & vbNewLine & "Please insert a correct phone number")
|
||||
Validated = False
|
||||
End If
|
||||
'If TBPhone. = 0 Then
|
||||
' ErrorProvider1.SetError(DTPBord, "The date of born could not be today" & vbNewLine & "Please insert a born date in the past")
|
||||
' Validated = False
|
||||
'End If
|
||||
If String.IsNullOrEmpty(TBAddress.Text) Then
|
||||
ErrorProvider1.SetError(LabelAddress, "The address field could not be empty." & vbNewLine & "Please fill this field.")
|
||||
Validated = False
|
||||
End If
|
||||
|
||||
|
||||
If Not Validated Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
' Validation
|
||||
Me.DialogResult = Windows.Forms.DialogResult.OK
|
||||
Me.Tag = dbdata.addParent(Me.getParentFromIntern())
|
||||
Hide()
|
||||
|
||||
ElseIf actualFormMode = EDITOR Then 'UPDATE'
|
||||
' Error Provider
|
||||
If String.IsNullOrEmpty(TBFirstName.Text) Then
|
||||
ErrorProvider1.SetError(TBFirstName, "The first name field could not be empty." & vbNewLine & "Please fill this field.")
|
||||
Validated = False
|
||||
End If
|
||||
If String.IsNullOrEmpty(TBLastName.Text) Then
|
||||
ErrorProvider1.SetError(TBLastName, "The last name field could not be empty." & vbNewLine & "Please fill this field.")
|
||||
Validated = False
|
||||
End If
|
||||
If String.IsNullOrEmpty(TBPhone.Text) Then
|
||||
ErrorProvider1.SetError(TBPhone, "The phone number field could not be empty" & vbNewLine & "Please insert a correct phone number")
|
||||
Validated = False
|
||||
End If
|
||||
'If TBPhone. = 0 Then
|
||||
' ErrorProvider1.SetError(DTPBord, "The date of born could not be today" & vbNewLine & "Please insert a born date in the past")
|
||||
' Validated = False
|
||||
'End If
|
||||
If String.IsNullOrEmpty(TBAddress.Text) Then
|
||||
ErrorProvider1.SetError(LabelAddress, "The address field could not be empty." & vbNewLine & "Please fill this field.")
|
||||
Validated = False
|
||||
End If
|
||||
|
||||
If Not Validated Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
' Validation
|
||||
Me.DialogResult = Windows.Forms.DialogResult.OK
|
||||
dbdata.editParent(Me.getParentFromIntern())
|
||||
Hide()
|
||||
|
||||
Else
|
||||
'Don't know how to go here...
|
||||
Console.WriteLine("FormParentID : Is in standart mode !")
|
||||
Hide()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub ButtonClose_Click(sender As System.Object, e As System.EventArgs)
|
||||
Console.WriteLine("FormParentID : Closing instance")
|
||||
Me.DialogResult = Windows.Forms.DialogResult.Cancel
|
||||
Hide()
|
||||
End Sub
|
||||
|
||||
Private Sub ButtonPick_Click(sender As System.Object, e As System.EventArgs) Handles ButtonPick.Click
|
||||
Dim FormListParent As FormList = New FormList(PersonType.Parent, ListFormMode.SelectWithAdress)
|
||||
Dim RD As DialogResult = FormListParent.ShowDialog
|
||||
If RD = Windows.Forms.DialogResult.OK Then
|
||||
Dim aParent As Parent = dbdata.getParentByID(FormListParent.Tag)
|
||||
TBAddress.Text = aParent.address
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
20
ApplicationCrèche 1/Forms/ListEnums.vb
Normal file
@ -0,0 +1,20 @@
|
||||
Public Enum IDFormMode
|
||||
CREATOR
|
||||
EDITOR
|
||||
VIEWER
|
||||
'STANDART
|
||||
End Enum
|
||||
|
||||
Public Enum ListFormMode
|
||||
Viewer
|
||||
SelectWithAdress
|
||||
SelectFiltered
|
||||
Selector
|
||||
End Enum
|
||||
|
||||
Public Enum PersonType
|
||||
BabySitter
|
||||
Child
|
||||
Parent
|
||||
Person
|
||||
End Enum
|
27
ApplicationCrèche 1/Forms/SharedRessources.vb
Normal file
@ -0,0 +1,27 @@
|
||||
Module SharedRessources
|
||||
Public dbConnexionString As String
|
||||
Public dbdata As SQLManager = New SQLManager()
|
||||
|
||||
''' <summary>
|
||||
'''
|
||||
''' </summary>
|
||||
''' <param name="id"></param>
|
||||
''' <returns></returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function getFirstFreeMeetOf(id As Integer) As Integer
|
||||
Dim abs As BabySitter = dbdata.getBabysitterByID(id)
|
||||
If abs.meet1 Is Nothing Then
|
||||
Return 1
|
||||
ElseIf abs.meet2 Is Nothing Then
|
||||
Return 2
|
||||
ElseIf abs.meet3 Is Nothing Then
|
||||
Return 3
|
||||
Else
|
||||
Return 4
|
||||
End If
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
End Module
|
97
ApplicationCrèche 1/Model/BabySitter.vb
Normal file
@ -0,0 +1,97 @@
|
||||
Public Class BabySitter
|
||||
Inherits Person
|
||||
|
||||
Private _phone1 As String
|
||||
Public Property phone1() As String
|
||||
Get
|
||||
Return _phone1
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
_phone1 = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _phone2 As String
|
||||
Public Property phone2() As String
|
||||
Get
|
||||
Return _phone2
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
_phone2 = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private _meet1 As Meet
|
||||
Public Property meet1() As Meet
|
||||
Get
|
||||
Return _meet1
|
||||
End Get
|
||||
Set(ByVal value As Meet)
|
||||
_meet1 = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _meet2 As Meet
|
||||
Public Property meet2() As Meet
|
||||
Get
|
||||
Return _meet2
|
||||
End Get
|
||||
Set(ByVal value As Meet)
|
||||
_meet2 = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _meet3 As Meet
|
||||
Public Property meet3() As Meet
|
||||
Get
|
||||
Return _meet3
|
||||
End Get
|
||||
Set(ByVal value As Meet)
|
||||
_meet3 = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Private _meet1 As Integer
|
||||
'Public Property meet1() As Integer
|
||||
' Get
|
||||
' Return _meet1
|
||||
' End Get
|
||||
' Set(ByVal value As Integer)
|
||||
' _meet1 = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Private _meet2 As Integer
|
||||
'Public Property meet2() As Integer
|
||||
' Get
|
||||
' Return _meet2
|
||||
' End Get
|
||||
' Set(ByVal value As Integer)
|
||||
' _meet2 = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Private _meet3 As Integer
|
||||
'Public Property meet3() As Integer
|
||||
' Get
|
||||
' Return _meet3
|
||||
' End Get
|
||||
' Set(ByVal value As Integer)
|
||||
' _meet3 = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
<Obsolete("This method is deprecated, use New with the id parameter insead")>
|
||||
Public Sub New(id As Integer, fname As String, lname As String, gender As Boolean, address As String, phone1 As String, Optional phone2 As String = Nothing)
|
||||
MyBase.New(id, fname, lname, gender, address)
|
||||
Me.phone1 = phone1
|
||||
Me.phone2 = phone2
|
||||
End Sub
|
||||
|
||||
Public Sub New(id As Integer)
|
||||
MyBase.New(id)
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
57
ApplicationCrèche 1/Model/Child.vb
Normal file
@ -0,0 +1,57 @@
|
||||
Public Class Child
|
||||
Inherits Person
|
||||
|
||||
Private _bornDate As Date
|
||||
Public Property bornDate() As Date
|
||||
Get
|
||||
Return _bornDate
|
||||
End Get
|
||||
Set(ByVal value As Date)
|
||||
_bornDate = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _parent1 As Parent
|
||||
Public Property parent1() As Parent
|
||||
Get
|
||||
Return _parent1
|
||||
End Get
|
||||
Set(ByVal value As Parent)
|
||||
_parent1 = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _parent2 As Parent
|
||||
Public Property parent2() As Parent
|
||||
Get
|
||||
Return _parent2
|
||||
End Get
|
||||
Set(ByVal value As Parent)
|
||||
_parent2 = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _meet As Meet
|
||||
Public Property meet() As Meet
|
||||
Get
|
||||
Return _meet
|
||||
End Get
|
||||
Set(ByVal value As Meet)
|
||||
_meet = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Obsolete("This method is deprecated, use New with the id parameter insead")>
|
||||
Public Sub New(id As Integer, fname As String, lname As String, gender As Boolean, address As String, born As Date, meet As Meet, Optional parent1 As Parent = Nothing, Optional parent2 As Parent = Nothing)
|
||||
MyBase.New(id, fname, lname, gender, address)
|
||||
Me.bornDate = born
|
||||
Me.meet = meet
|
||||
Me.parent1 = parent1
|
||||
Me.parent2 = parent2
|
||||
End Sub
|
||||
|
||||
Public Sub New(id As Integer)
|
||||
MyBase.New(id)
|
||||
End Sub
|
||||
|
||||
End Class
|
140
ApplicationCrèche 1/Model/Meet.vb
Normal file
@ -0,0 +1,140 @@
|
||||
Public Class Meet
|
||||
|
||||
Private _id As Integer
|
||||
Public ReadOnly Property id() As Integer
|
||||
Get
|
||||
Return _id
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Private _weekdays As New Dictionary(Of String, Boolean)
|
||||
Public ReadOnly Property weekdays() As Dictionary(Of String, Boolean)
|
||||
Get
|
||||
Return _weekdays
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub New(id As Integer)
|
||||
_id = id
|
||||
_weekdays.Add("monday", False)
|
||||
_weekdays.Add("tuesday", False)
|
||||
_weekdays.Add("wednesday", False)
|
||||
_weekdays.Add("thursday", False)
|
||||
_weekdays.Add("friday", False)
|
||||
_weekdays.Add("saturday", False)
|
||||
_weekdays.Add("sunday", False)
|
||||
End Sub
|
||||
|
||||
Public Sub New(weekDayName As String, Optional weekDayName2 As String = Nothing, Optional weekDayName3 As String = Nothing, Optional weekDayName4 As String = Nothing, Optional weekDayName5 As String = Nothing, Optional weekDayName6 As String = Nothing, Optional weekDayName7 As String = Nothing)
|
||||
|
||||
If Not weekDayName Is Nothing And _weekdays.ContainsKey(weekDayName.ToLower) Then
|
||||
_weekdays(weekDayName) = True
|
||||
End If
|
||||
|
||||
If Not weekDayName2 Is Nothing And _weekdays.ContainsKey(weekDayName2.ToLower) Then
|
||||
_weekdays(weekDayName2) = True
|
||||
End If
|
||||
|
||||
If Not weekDayName3 Is Nothing And _weekdays.ContainsKey(weekDayName3.ToLower) Then
|
||||
_weekdays(weekDayName3) = True
|
||||
End If
|
||||
|
||||
If Not weekDayName4 Is Nothing And _weekdays.ContainsKey(weekDayName4.ToLower) Then
|
||||
_weekdays(weekDayName4) = True
|
||||
End If
|
||||
|
||||
If Not weekDayName5 Is Nothing And _weekdays.ContainsKey(weekDayName5.ToLower) Then
|
||||
_weekdays(weekDayName5) = True
|
||||
End If
|
||||
|
||||
If Not weekDayName6 Is Nothing And _weekdays.ContainsKey(weekDayName6.ToLower) Then
|
||||
_weekdays(weekDayName6) = True
|
||||
End If
|
||||
|
||||
If Not weekDayName7 Is Nothing And _weekdays.ContainsKey(weekDayName7.ToLower) Then
|
||||
_weekdays(weekDayName7) = True
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Property monday() As Boolean
|
||||
Get
|
||||
Return _weekdays("monday")
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
_weekdays("monday") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property tuesday() As Boolean
|
||||
Get
|
||||
Return _weekdays("tuesday")
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
_weekdays("tuesday") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property wednesday() As Boolean
|
||||
Get
|
||||
Return _weekdays("wednesday")
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
_weekdays("wednesday") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property thursday() As Boolean
|
||||
Get
|
||||
Return _weekdays("thursday")
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
_weekdays("thursday") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property friday() As Boolean
|
||||
Get
|
||||
Return _weekdays("friday")
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
_weekdays("friday") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property saturday() As Boolean
|
||||
Get
|
||||
Return _weekdays("saturday")
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
_weekdays("saturday") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property sunday() As Boolean
|
||||
Get
|
||||
Return _weekdays("sunday")
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
_weekdays("sunday") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Overrides Function toString() As String
|
||||
Return Me.monday + Me.tuesday + Me.wednesday + Me.thursday + Me.friday + Me.saturday + Me.sunday
|
||||
End Function
|
||||
|
||||
Public Function overlap(anotherMeet As Meet) As Boolean
|
||||
If anotherMeet Is Nothing Then Return False
|
||||
Dim isOverlapped As Boolean = (Me.monday = True And anotherMeet.monday = True) Or
|
||||
(Me.tuesday = True And anotherMeet.tuesday = True) Or
|
||||
(Me.wednesday = True And anotherMeet.wednesday = True) Or
|
||||
(Me.thursday = True And anotherMeet.thursday = True) Or
|
||||
(Me.friday = True And anotherMeet.friday = True) Or
|
||||
(Me.saturday = True And anotherMeet.saturday = True) Or
|
||||
(Me.sunday = True And anotherMeet.sunday = True)
|
||||
Return isOverlapped
|
||||
End Function
|
||||
End Class
|
24
ApplicationCrèche 1/Model/Parent.vb
Normal file
@ -0,0 +1,24 @@
|
||||
Public Class Parent
|
||||
Inherits Person
|
||||
|
||||
Private _phone As String
|
||||
Public Property phone() As String
|
||||
Get
|
||||
Return _phone
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
_phone = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Obsolete("This method is deprecated, use New with the id parameter insead")>
|
||||
Public Sub New(id As Integer, fname As String, lname As String, gender As Boolean, phone As String, address As String)
|
||||
MyBase.New(id, fname, lname, gender, address)
|
||||
Me.phone = phone
|
||||
End Sub
|
||||
|
||||
Public Sub New(id As Integer)
|
||||
MyBase.New(id)
|
||||
End Sub
|
||||
|
||||
End Class
|
68
ApplicationCrèche 1/Model/Person.vb
Normal file
@ -0,0 +1,68 @@
|
||||
Public MustInherit Class Person
|
||||
|
||||
Private _id As Integer
|
||||
Public ReadOnly Property id() As Integer
|
||||
Get
|
||||
Return _id
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private _firstName As String
|
||||
Public Property firstname() As String
|
||||
Get
|
||||
Return _firstName
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
_firstName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _lastname As String
|
||||
Public Property lastname() As String
|
||||
Get
|
||||
Return _lastname
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
_lastname = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _gender As Boolean
|
||||
Public Property gender() As Boolean
|
||||
Get
|
||||
Return _gender
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
_gender = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _address As String
|
||||
Public Property address() As String
|
||||
Get
|
||||
Return _address
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
_address = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Sub New(id As Integer, fname As String, lname As String, gender As Boolean, address As String)
|
||||
Me._id = id
|
||||
Me.firstname = fname
|
||||
Me.lastname = lname
|
||||
Me.gender = gender
|
||||
Me.address = address
|
||||
End Sub
|
||||
|
||||
Public Sub New(id As Integer)
|
||||
Me._id = id
|
||||
End Sub
|
||||
|
||||
|
||||
Public Overrides Function toString() As String
|
||||
Return Me.id.ToString + " ) " + Me.firstname + " " + Me.lastname
|
||||
End Function
|
||||
|
||||
End Class
|
38
ApplicationCrèche 1/My Project/Application.Designer.vb
generated
Normal file
@ -0,0 +1,38 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.18033
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
'NOTE: This file is auto-generated; do not modify it directly. To make changes,
|
||||
' or if you encounter build errors in this file, go to the Project Designer
|
||||
' (go to Project Properties or double-click the My Project node in
|
||||
' Solution Explorer), and make changes on the Application tab.
|
||||
'
|
||||
Partial Friend Class MyApplication
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Public Sub New()
|
||||
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
||||
Me.IsSingleInstance = false
|
||||
Me.EnableVisualStyles = true
|
||||
Me.SaveMySettingsOnExit = true
|
||||
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Protected Overrides Sub OnCreateMainForm()
|
||||
Me.MainForm = Global.ApplicationCrèche_1.FormMain
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
10
ApplicationCrèche 1/My Project/Application.myapp
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-16"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>true</MySubMain>
|
||||
<MainForm>FormMain</MainForm>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
35
ApplicationCrèche 1/My Project/AssemblyInfo.vb
Normal file
@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' Les informations générales relatives à un assembly dépendent de
|
||||
' l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
|
||||
' associées à un assembly.
|
||||
|
||||
' Passez en revue les valeurs des attributs de l'assembly
|
||||
|
||||
<Assembly: AssemblyTitle("ApplicationCrèche 1")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("ApplicationCrèche 1")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2013")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
|
||||
<Assembly: Guid("f86f625c-de73-4a5a-a827-0aa88b378bd5")>
|
||||
|
||||
' Les informations de version pour un assembly se composent des quatre valeurs suivantes :
|
||||
'
|
||||
' Version principale
|
||||
' Version secondaire
|
||||
' Numéro de build
|
||||
' Révision
|
||||
'
|
||||
' Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
|
||||
' en utilisant '*', comme indiqué ci-dessous :
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
423
ApplicationCrèche 1/My Project/Resources.Designer.vb
generated
Normal file
@ -0,0 +1,423 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Ce code a été généré par un outil.
|
||||
' Version du runtime :4.0.30319.18046
|
||||
'
|
||||
' Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
|
||||
' le code est régénéré.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'Cette classe a été générée automatiquement par la classe StronglyTypedResourceBuilder
|
||||
'à l'aide d'un outil, tel que ResGen ou Visual Studio.
|
||||
'Pour ajouter ou supprimer un membre, modifiez votre fichier .ResX, puis réexécutez ResGen
|
||||
'avec l'option /str ou régénérez votre projet VS.
|
||||
'''<summary>
|
||||
''' Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' Retourne l'instance ResourceManager mise en cache utilisée par cette classe.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("ApplicationCrèche_1.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Remplace la propriété CurrentUICulture du thread actuel pour toutes
|
||||
''' les recherches de ressources à l'aide de cette classe de ressource fortement typée.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property AddSheet() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("AddSheet", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property AddSheet2() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("AddSheet2", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property CancelSheet() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("CancelSheet", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property CloseFolder() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("CloseFolder", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property CloseSheet2() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("CloseSheet2", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property CloseSheetbook() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("CloseSheetbook", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property CloseWindow() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("CloseWindow", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property DeleteSheet() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("DeleteSheet", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property DeleteSheet2() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("DeleteSheet2", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property DeleteSheet3() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("DeleteSheet3", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property EditSheet2() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("EditSheet2", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property GoLink() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("GoLink", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property GumSheet() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("GumSheet", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property NewCollection() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("NewCollection", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property NewSheet2() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("NewSheet2", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property NewSheetbook() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("NewSheetbook", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property NewSheetbook2() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("NewSheetbook2", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property NormalSheetLight() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("NormalSheetLight", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property OpenedSheetbook() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("OpenedSheetbook", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property OpenFolder() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("OpenFolder", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property OpenFolder2() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("OpenFolder2", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property OpenSheetbook() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("OpenSheetbook", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property PingedWindows() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("PingedWindows", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property RPNM_Save() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("RPNM Save", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property SaveAsFloppy() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("SaveAsFloppy", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property SaveFloppy() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("SaveFloppy", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property SaveMultiFloppy() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("SaveMultiFloppy", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property SelectSheet() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("SelectSheet", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property UnpingedWindows() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("UnpingedWindows", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property ValidedSheet() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("ValidedSheet", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property WarningSheet2Light() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("WarningSheet2Light", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property WarningSheetFrench() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("WarningSheetFrench", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property WarningSheetLight() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("WarningSheetLight", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property WindowList() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("WindowList", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property WindowList1() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("WindowList1", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Recherche une ressource localisée de type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property WrongSheetLight() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("WrongSheetLight", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
230
ApplicationCrèche 1/My Project/Resources.resx
Normal file
@ -0,0 +1,230 @@
|
||||
<?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>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="WarningSheetFrench" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\WarningSheetFrench.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="NewCollection" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\NewCollection.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="WarningSheet2Light" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\WarningSheet2Light.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="DeleteSheet2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\DeleteSheet2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="GoLink" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\GoLink.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="OpenFolder2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\OpenFolder2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="CloseSheet2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\CloseSheet2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="RPNM Save" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\RPNM Save.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="DeleteSheet3" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\DeleteSheet3.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="CancelSheet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\CancelSheet.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="OpenSheetbook" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\OpenSheetbook.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="EditSheet2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\EditSheet21.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValidedSheet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ValidedSheet.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="NormalSheetLight" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\NormalSheetLight.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="NewSheet2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\NewSheet2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SaveAsFloppy" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SaveAsFloppy.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="OpenedSheetbook" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\OpenedSheetbook.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SaveMultiFloppy" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SaveMultiFloppy.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="CloseSheetbook" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\CloseSheetbook.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="WindowList1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\WindowList1.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="NewSheetbook2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\NewSheetbook2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="CloseWindow" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\CloseWindow.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SelectSheet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SelectSheet.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="NewSheetbook" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\NewSheetbook.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="GumSheet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\GumSheet.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="WrongSheetLight" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\WrongSheetLight.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="AddSheet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\AddSheet1.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="WindowList" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\WindowList.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="WarningSheetLight" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\WarningSheetLight.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="OpenFolder" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\OpenFolder.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SaveFloppy" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SaveFloppy.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="CloseFolder" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\CloseFolder.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="AddSheet2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\AddSheet21.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="DeleteSheet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\DeleteSheet1.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="PingedWindows" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\PingedWindows.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="UnpingedWindows" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\UnpingedWindows.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
73
ApplicationCrèche 1/My Project/Settings.Designer.vb
generated
Normal file
@ -0,0 +1,73 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Ce code a été généré par un outil.
|
||||
' Version du runtime :4.0.30319.18046
|
||||
'
|
||||
' Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
|
||||
' le code est régénéré.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||
|
||||
#Region "Fonctionnalité Enregistrement automatique My.Settings"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.ApplicationCrèche_1.My.MySettings
|
||||
Get
|
||||
Return Global.ApplicationCrèche_1.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
5
ApplicationCrèche 1/My Project/Settings.settings
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles />
|
||||
<Settings />
|
||||
</SettingsFile>
|
BIN
ApplicationCrèche 1/Resources/AddSheet.png
Normal file
After Width: | Height: | Size: 233 B |
BIN
ApplicationCrèche 1/Resources/AddSheet1.png
Normal file
After Width: | Height: | Size: 672 B |
BIN
ApplicationCrèche 1/Resources/AddSheet2.png
Normal file
After Width: | Height: | Size: 673 B |
BIN
ApplicationCrèche 1/Resources/AddSheet21.png
Normal file
After Width: | Height: | Size: 673 B |
BIN
ApplicationCrèche 1/Resources/CancelSheet.png
Normal file
After Width: | Height: | Size: 568 B |
BIN
ApplicationCrèche 1/Resources/CloseFolder.png
Normal file
After Width: | Height: | Size: 498 B |
BIN
ApplicationCrèche 1/Resources/CloseSheet2.png
Normal file
After Width: | Height: | Size: 569 B |
BIN
ApplicationCrèche 1/Resources/CloseSheetbook.png
Normal file
After Width: | Height: | Size: 763 B |
BIN
ApplicationCrèche 1/Resources/CloseWindow.png
Normal file
After Width: | Height: | Size: 506 B |
BIN
ApplicationCrèche 1/Resources/DeleteSheet.png
Normal file
After Width: | Height: | Size: 655 B |
BIN
ApplicationCrèche 1/Resources/DeleteSheet1.png
Normal file
After Width: | Height: | Size: 655 B |
BIN
ApplicationCrèche 1/Resources/DeleteSheet2.png
Normal file
After Width: | Height: | Size: 645 B |
BIN
ApplicationCrèche 1/Resources/DeleteSheet3.png
Normal file
After Width: | Height: | Size: 625 B |
BIN
ApplicationCrèche 1/Resources/EditSheet2.ico
Normal file
After Width: | Height: | Size: 682 B |
BIN
ApplicationCrèche 1/Resources/EditSheet2.png
Normal file
After Width: | Height: | Size: 703 B |
BIN
ApplicationCrèche 1/Resources/EditSheet21.png
Normal file
After Width: | Height: | Size: 703 B |
BIN
ApplicationCrèche 1/Resources/GoLink.png
Normal file
After Width: | Height: | Size: 793 B |
BIN
ApplicationCrèche 1/Resources/GumSheet.png
Normal file
After Width: | Height: | Size: 647 B |
BIN
ApplicationCrèche 1/Resources/NewCollection.png
Normal file
After Width: | Height: | Size: 739 B |
BIN
ApplicationCrèche 1/Resources/NewSheet2.ico
Normal file
After Width: | Height: | Size: 626 B |
BIN
ApplicationCrèche 1/Resources/NewSheet2.png
Normal file
After Width: | Height: | Size: 648 B |
BIN
ApplicationCrèche 1/Resources/NewSheetbook.png
Normal file
After Width: | Height: | Size: 647 B |
BIN
ApplicationCrèche 1/Resources/NewSheetbook2.png
Normal file
After Width: | Height: | Size: 768 B |
BIN
ApplicationCrèche 1/Resources/NormalSheetLight.ico
Normal file
After Width: | Height: | Size: 404 B |
BIN
ApplicationCrèche 1/Resources/NormalSheetLight.png
Normal file
After Width: | Height: | Size: 416 B |
BIN
ApplicationCrèche 1/Resources/OpenFolder.png
Normal file
After Width: | Height: | Size: 543 B |
BIN
ApplicationCrèche 1/Resources/OpenFolder2.png
Normal file
After Width: | Height: | Size: 636 B |
BIN
ApplicationCrèche 1/Resources/OpenSheetbook.png
Normal file
After Width: | Height: | Size: 760 B |
BIN
ApplicationCrèche 1/Resources/OpenedSheetbook.png
Normal file
After Width: | Height: | Size: 645 B |
BIN
ApplicationCrèche 1/Resources/PingedWindows.png
Normal file
After Width: | Height: | Size: 518 B |
BIN
ApplicationCrèche 1/Resources/RPNM Save.png
Normal file
After Width: | Height: | Size: 518 B |
BIN
ApplicationCrèche 1/Resources/SaveAsFloppy.png
Normal file
After Width: | Height: | Size: 705 B |
BIN
ApplicationCrèche 1/Resources/SaveFloppy.png
Normal file
After Width: | Height: | Size: 469 B |
BIN
ApplicationCrèche 1/Resources/SaveMultiFloppy.png
Normal file
After Width: | Height: | Size: 552 B |
BIN
ApplicationCrèche 1/Resources/SelectSheet.png
Normal file
After Width: | Height: | Size: 567 B |
BIN
ApplicationCrèche 1/Resources/UnpingedWindows.png
Normal file
After Width: | Height: | Size: 524 B |
BIN
ApplicationCrèche 1/Resources/ValidedSheet.png
Normal file
After Width: | Height: | Size: 664 B |
BIN
ApplicationCrèche 1/Resources/WarningSheet2Light.png
Normal file
After Width: | Height: | Size: 524 B |
BIN
ApplicationCrèche 1/Resources/WarningSheetFrench.png
Normal file
After Width: | Height: | Size: 571 B |
BIN
ApplicationCrèche 1/Resources/WarningSheetLight.png
Normal file
After Width: | Height: | Size: 569 B |
BIN
ApplicationCrèche 1/Resources/WindowList.png
Normal file
After Width: | Height: | Size: 255 B |
BIN
ApplicationCrèche 1/Resources/WindowList1.png
Normal file
After Width: | Height: | Size: 257 B |
BIN
ApplicationCrèche 1/Resources/WrongSheetLight.png
Normal file
After Width: | Height: | Size: 653 B |
BIN
ApplicationCrèche 1/Ressources/AddSheet.png
Normal file
After Width: | Height: | Size: 672 B |
BIN
ApplicationCrèche 1/Ressources/AddSheet2.png
Normal file
After Width: | Height: | Size: 673 B |
BIN
ApplicationCrèche 1/Ressources/CancelSheet.png
Normal file
After Width: | Height: | Size: 568 B |
BIN
ApplicationCrèche 1/Ressources/CloseFolder.png
Normal file
After Width: | Height: | Size: 498 B |
BIN
ApplicationCrèche 1/Ressources/CloseSheet2.png
Normal file
After Width: | Height: | Size: 569 B |
BIN
ApplicationCrèche 1/Ressources/CloseSheetbook.png
Normal file
After Width: | Height: | Size: 763 B |
BIN
ApplicationCrèche 1/Ressources/DeleteSheet.png
Normal file
After Width: | Height: | Size: 655 B |
BIN
ApplicationCrèche 1/Ressources/DeleteSheet2.png
Normal file
After Width: | Height: | Size: 645 B |