crlf
This commit is contained in:
220
DayPilot.csproj
220
DayPilot.csproj
@@ -1,101 +1,121 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>10.0.20506</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{5D7983A4-CCFF-46F6-920F-F184A031D7E1}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>DayPilot</RootNamespace>
|
||||
<AssemblyName>DayPilot</AssemblyName>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Corp|AnyCPU'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Corp\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Design" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Utils\Encoder.cs" />
|
||||
<Compile Include="Utils\TimeFormatter.cs" />
|
||||
<Compile Include="Utils\Week.cs" />
|
||||
<Compile Include="Web\Ui\Block.cs" />
|
||||
<Compile Include="Web\Ui\Column.cs" />
|
||||
<Compile Include="Web\Ui\Day.cs" />
|
||||
<Compile Include="Web\Ui\DayPilotCalendar.cs" />
|
||||
<Compile Include="Web\Ui\DayPilotCalendarProperties.cs" />
|
||||
<Compile Include="Web\Ui\DayPilotScheduler.cs" />
|
||||
<Compile Include="Web\Ui\Design\DayPilotCalendarDesigner.cs" />
|
||||
<Compile Include="Web\Ui\Enums\GroupByEnum.cs" />
|
||||
<Compile Include="Web\Ui\Event.cs" />
|
||||
<Compile Include="Web\Ui\EventComparer.cs" />
|
||||
<Compile Include="Web\Ui\EventDelegates.cs" />
|
||||
<Compile Include="Web\Ui\NonBusinessHoursBehavior.cs" />
|
||||
<Compile Include="Web\Ui\Resource.cs" />
|
||||
<Compile Include="Web\Ui\ResourceCollection.cs" />
|
||||
<Compile Include="Web\Ui\Serialization\ResourceCollectionConverter.cs" />
|
||||
<Compile Include="Web\Ui\TimeFormat.cs" />
|
||||
<Compile Include="Web\Ui\UserActionHandling.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>10.0.20506</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{5D7983A4-CCFF-46F6-920F-F184A031D7E1}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>DayPilot</RootNamespace>
|
||||
<AssemblyName>DayPilot</AssemblyName>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Corp|AnyCPU'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Corp\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'sfu|AnyCPU'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\sfu\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'SFU2|AnyCPU'">
|
||||
<OutputPath>bin\SFU2\</OutputPath>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Design" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Utils\Encoder.cs" />
|
||||
<Compile Include="Utils\TimeFormatter.cs" />
|
||||
<Compile Include="Utils\Week.cs" />
|
||||
<Compile Include="Web\Ui\Block.cs" />
|
||||
<Compile Include="Web\Ui\Column.cs" />
|
||||
<Compile Include="Web\Ui\Day.cs" />
|
||||
<Compile Include="Web\Ui\DayPilotCalendar.cs" />
|
||||
<Compile Include="Web\Ui\DayPilotCalendarProperties.cs" />
|
||||
<Compile Include="Web\Ui\DayPilotScheduler.cs" />
|
||||
<Compile Include="Web\Ui\Design\DayPilotCalendarDesigner.cs" />
|
||||
<Compile Include="Web\Ui\Enums\GroupByEnum.cs" />
|
||||
<Compile Include="Web\Ui\Event.cs" />
|
||||
<Compile Include="Web\Ui\EventComparer.cs" />
|
||||
<Compile Include="Web\Ui\EventDelegates.cs" />
|
||||
<Compile Include="Web\Ui\NonBusinessHoursBehavior.cs" />
|
||||
<Compile Include="Web\Ui\Resource.cs" />
|
||||
<Compile Include="Web\Ui\ResourceCollection.cs" />
|
||||
<Compile Include="Web\Ui\Serialization\ResourceCollectionConverter.cs" />
|
||||
<Compile Include="Web\Ui\TimeFormat.cs" />
|
||||
<Compile Include="Web\Ui\UserActionHandling.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
52
DayPilot.sln
52
DayPilot.sln
@@ -1,26 +1,26 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DayPilot", "DayPilot.csproj", "{5D7983A4-CCFF-46F6-920F-F184A031D7E1}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dpMvc2", "..\..\..\Projects\dpMvc2\dpMvc2.csproj", "{2A46CBBE-6F72-433B-96ED-6B5CEA12F696}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{5D7983A4-CCFF-46F6-920F-F184A031D7E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5D7983A4-CCFF-46F6-920F-F184A031D7E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5D7983A4-CCFF-46F6-920F-F184A031D7E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5D7983A4-CCFF-46F6-920F-F184A031D7E1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2A46CBBE-6F72-433B-96ED-6B5CEA12F696}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2A46CBBE-6F72-433B-96ED-6B5CEA12F696}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2A46CBBE-6F72-433B-96ED-6B5CEA12F696}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2A46CBBE-6F72-433B-96ED-6B5CEA12F696}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DayPilot", "DayPilot.csproj", "{5D7983A4-CCFF-46F6-920F-F184A031D7E1}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dpMvc2", "..\..\..\Projects\dpMvc2\dpMvc2.csproj", "{2A46CBBE-6F72-433B-96ED-6B5CEA12F696}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{5D7983A4-CCFF-46F6-920F-F184A031D7E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5D7983A4-CCFF-46F6-920F-F184A031D7E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5D7983A4-CCFF-46F6-920F-F184A031D7E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5D7983A4-CCFF-46F6-920F-F184A031D7E1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2A46CBBE-6F72-433B-96ED-6B5CEA12F696}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2A46CBBE-6F72-433B-96ED-6B5CEA12F696}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2A46CBBE-6F72-433B-96ED-6B5CEA12F696}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2A46CBBE-6F72-433B-96ED-6B5CEA12F696}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
@@ -1,58 +1,58 @@
|
||||
/*
|
||||
Copyright © 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Web.UI;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("DayPilot")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("DayPilot")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2005 - 2008 Annpoint, s.r.o.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("e5d0e09d-0160-4c7c-a16e-374ba8867712")]
|
||||
|
||||
[assembly: TagPrefix("DayPilot.Web.Ui", "DayPilot")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("3.0.210.0")]
|
||||
[assembly: AssemblyFileVersion("3.0.210.0")]
|
||||
/*
|
||||
Copyright © 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Web.UI;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("DayPilot")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("DayPilot")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2005 - 2008 Annpoint, s.r.o.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("e5d0e09d-0160-4c7c-a16e-374ba8867712")]
|
||||
|
||||
[assembly: TagPrefix("DayPilot.Web.Ui", "DayPilot")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("3.0.210.0")]
|
||||
[assembly: AssemblyFileVersion("3.0.210.0")]
|
||||
|
||||
74
Properties/Settings.Designer.cs
generated
74
Properties/Settings.Designer.cs
generated
@@ -1,37 +1,37 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.20506.1
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace DayPilot.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\bookings.mdf;Integrated" +
|
||||
" Security=True;User Instance=True")]
|
||||
public string bookingsConnectionString {
|
||||
get {
|
||||
return ((string)(this["bookingsConnectionString"]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace DayPilot.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\bookings.mdf;Integrated" +
|
||||
" Security=True;User Instance=True")]
|
||||
public string bookingsConnectionString {
|
||||
get {
|
||||
return ((string)(this["bookingsConnectionString"]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="DayPilot.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="bookingsConnectionString" Type="(Connection string)" Scope="Application">
|
||||
<DesignTimeValue Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<ConnectionString>Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\bookings.mdf;Integrated Security=True;User Instance=True</ConnectionString>
|
||||
<ProviderName>System.Data.SqlClient</ProviderName>
|
||||
</SerializableConnectionString></DesignTimeValue>
|
||||
<Value Profile="(Default)">Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\bookings.mdf;Integrated Security=True;User Instance=True</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="DayPilot.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="bookingsConnectionString" Type="(Connection string)" Scope="Application">
|
||||
<DesignTimeValue Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<ConnectionString>Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\bookings.mdf;Integrated Security=True;User Instance=True</ConnectionString>
|
||||
<ProviderName>System.Data.SqlClient</ProviderName>
|
||||
</SerializableConnectionString></DesignTimeValue>
|
||||
<Value Profile="(Default)">Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\bookings.mdf;Integrated Security=True;User Instance=True</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
246
Utils/Encoder.cs
246
Utils/Encoder.cs
@@ -1,123 +1,123 @@
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
|
||||
namespace DayPilot.Utils
|
||||
{
|
||||
internal class Encoder
|
||||
{
|
||||
private static HttpApplication _app = null;
|
||||
private static HttpServerUtility Server
|
||||
{
|
||||
get
|
||||
{
|
||||
if (HttpContext.Current != null)
|
||||
return HttpContext.Current.Server;
|
||||
|
||||
if (_app == null)
|
||||
_app = new HttpApplication();
|
||||
return _app.Server;
|
||||
}
|
||||
}
|
||||
|
||||
internal static string HtmlEncode(string input)
|
||||
{
|
||||
if (input == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return Server.HtmlEncode(input);
|
||||
}
|
||||
|
||||
|
||||
internal static string UrlEncode(string input)
|
||||
{
|
||||
// return Server.UrlPathEncode(input);
|
||||
if (input == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return input.Replace("&", "%26");
|
||||
// return Server.UrlEncode(input);
|
||||
}
|
||||
|
||||
internal static string UrlDecode(string input)
|
||||
{
|
||||
return Server.UrlDecode(input);
|
||||
}
|
||||
|
||||
internal static DateTime UrlDecodeDateTime(string input)
|
||||
{
|
||||
CultureInfo culture = new CultureInfo("en-US");
|
||||
string decoded = Server.UrlDecode(input);
|
||||
|
||||
try
|
||||
{
|
||||
return DateTime.ParseExact(decoded, culture.DateTimeFormat.SortableDateTimePattern, culture.DateTimeFormat);
|
||||
}
|
||||
catch (FormatException e)
|
||||
{
|
||||
throw new ApplicationException("Unable to parse DateTime: '" + decoded + "'.", e);
|
||||
}
|
||||
}
|
||||
|
||||
internal static string UrlEncode(IList list)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
bool isFirst = true;
|
||||
foreach (object o in list)
|
||||
{
|
||||
string item;
|
||||
if (o is DateTime)
|
||||
{
|
||||
DateTime dt = (DateTime) o;
|
||||
item = dt.ToString("s");
|
||||
}
|
||||
else if (o == null)
|
||||
{
|
||||
item = String.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
item = o.ToString();
|
||||
}
|
||||
|
||||
if (!isFirst)
|
||||
{
|
||||
sb.Append("&");
|
||||
}
|
||||
|
||||
sb.Append(UrlEncode(item));
|
||||
|
||||
isFirst = false;
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
|
||||
namespace DayPilot.Utils
|
||||
{
|
||||
internal class Encoder
|
||||
{
|
||||
private static HttpApplication _app = null;
|
||||
private static HttpServerUtility Server
|
||||
{
|
||||
get
|
||||
{
|
||||
if (HttpContext.Current != null)
|
||||
return HttpContext.Current.Server;
|
||||
|
||||
if (_app == null)
|
||||
_app = new HttpApplication();
|
||||
return _app.Server;
|
||||
}
|
||||
}
|
||||
|
||||
internal static string HtmlEncode(string input)
|
||||
{
|
||||
if (input == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return Server.HtmlEncode(input);
|
||||
}
|
||||
|
||||
|
||||
internal static string UrlEncode(string input)
|
||||
{
|
||||
// return Server.UrlPathEncode(input);
|
||||
if (input == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return input.Replace("&", "%26");
|
||||
// return Server.UrlEncode(input);
|
||||
}
|
||||
|
||||
internal static string UrlDecode(string input)
|
||||
{
|
||||
return Server.UrlDecode(input);
|
||||
}
|
||||
|
||||
internal static DateTime UrlDecodeDateTime(string input)
|
||||
{
|
||||
CultureInfo culture = new CultureInfo("en-US");
|
||||
string decoded = Server.UrlDecode(input);
|
||||
|
||||
try
|
||||
{
|
||||
return DateTime.ParseExact(decoded, culture.DateTimeFormat.SortableDateTimePattern, culture.DateTimeFormat);
|
||||
}
|
||||
catch (FormatException e)
|
||||
{
|
||||
throw new ApplicationException("Unable to parse DateTime: '" + decoded + "'.", e);
|
||||
}
|
||||
}
|
||||
|
||||
internal static string UrlEncode(IList list)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
bool isFirst = true;
|
||||
foreach (object o in list)
|
||||
{
|
||||
string item;
|
||||
if (o is DateTime)
|
||||
{
|
||||
DateTime dt = (DateTime) o;
|
||||
item = dt.ToString("s");
|
||||
}
|
||||
else if (o == null)
|
||||
{
|
||||
item = String.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
item = o.ToString();
|
||||
}
|
||||
|
||||
if (!isFirst)
|
||||
{
|
||||
sb.Append("&");
|
||||
}
|
||||
|
||||
sb.Append(UrlEncode(item));
|
||||
|
||||
isFirst = false;
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,83 +1,83 @@
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using DayPilot.Web.Ui;
|
||||
|
||||
namespace DayPilot.Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// Helper class for hour formatting.
|
||||
/// </summary>
|
||||
public class TimeFormatter
|
||||
{
|
||||
/// <summary>
|
||||
/// Extracts hour from DateTime class and formats it for 12/24 hours clock.
|
||||
/// </summary>
|
||||
/// <param name="time"></param>
|
||||
/// <param name="clock"></param>
|
||||
/// <param name="format"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetHour(DateTime time, TimeFormat clock, string format)
|
||||
{
|
||||
return GetHour(time.Hour, clock, format);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Formats an hour number for 12/24 hours clock.
|
||||
/// </summary>
|
||||
/// <param name="hour"></param>
|
||||
/// <param name="clock"></param>
|
||||
/// <param name="format"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetHour(int hour, TimeFormat clock, string format)
|
||||
{
|
||||
bool am = (hour / 12) == 0;
|
||||
if (clock == TimeFormat.Clock12Hours)
|
||||
{
|
||||
hour = hour % 12;
|
||||
if (hour == 0)
|
||||
hour = 12;
|
||||
}
|
||||
|
||||
string suffix = String.Empty;
|
||||
if (clock == TimeFormat.Clock12Hours)
|
||||
{
|
||||
if (am)
|
||||
{
|
||||
suffix = "AM";
|
||||
}
|
||||
else
|
||||
{
|
||||
suffix = "PM";
|
||||
}
|
||||
}
|
||||
|
||||
if (String.IsNullOrEmpty(format))
|
||||
{
|
||||
format = "{0} {1}";
|
||||
}
|
||||
|
||||
return String.Format(format, hour, suffix);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using DayPilot.Web.Ui;
|
||||
|
||||
namespace DayPilot.Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// Helper class for hour formatting.
|
||||
/// </summary>
|
||||
public class TimeFormatter
|
||||
{
|
||||
/// <summary>
|
||||
/// Extracts hour from DateTime class and formats it for 12/24 hours clock.
|
||||
/// </summary>
|
||||
/// <param name="time"></param>
|
||||
/// <param name="clock"></param>
|
||||
/// <param name="format"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetHour(DateTime time, TimeFormat clock, string format)
|
||||
{
|
||||
return GetHour(time.Hour, clock, format);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Formats an hour number for 12/24 hours clock.
|
||||
/// </summary>
|
||||
/// <param name="hour"></param>
|
||||
/// <param name="clock"></param>
|
||||
/// <param name="format"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetHour(int hour, TimeFormat clock, string format)
|
||||
{
|
||||
bool am = (hour / 12) == 0;
|
||||
if (clock == TimeFormat.Clock12Hours)
|
||||
{
|
||||
hour = hour % 12;
|
||||
if (hour == 0)
|
||||
hour = 12;
|
||||
}
|
||||
|
||||
string suffix = String.Empty;
|
||||
if (clock == TimeFormat.Clock12Hours)
|
||||
{
|
||||
if (am)
|
||||
{
|
||||
suffix = "AM";
|
||||
}
|
||||
else
|
||||
{
|
||||
suffix = "PM";
|
||||
}
|
||||
}
|
||||
|
||||
if (String.IsNullOrEmpty(format))
|
||||
{
|
||||
format = "{0} {1}";
|
||||
}
|
||||
|
||||
return String.Format(format, hour, suffix);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
316
Utils/Week.cs
316
Utils/Week.cs
@@ -1,158 +1,158 @@
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Threading;
|
||||
|
||||
namespace DayPilot.Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// Helper class for week manipulation and formatting.
|
||||
/// </summary>
|
||||
public class Week
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the first day of this week. Based on current culture.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static DateTime FirstDayOfWeek()
|
||||
{
|
||||
return FirstDayOfWeek(DateTime.Today);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the first day of a week where day (parameter) belongs. Based on current culture.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static DateTime FirstDayOfWeek(DateTime day)
|
||||
{
|
||||
return FirstDayOfWeek(day, Thread.CurrentThread.CurrentCulture.DateTimeFormat.FirstDayOfWeek);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets the first day of a week where day (parameter) belongs. weekStart (parameter) specifies the starting day of week.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static DateTime FirstDayOfWeek(DateTime day, DayOfWeek weekStarts)
|
||||
{
|
||||
DateTime d = day;
|
||||
while (d.DayOfWeek != weekStarts)
|
||||
{
|
||||
d = d.AddDays(-1);
|
||||
}
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns Monday of the week where day (parameter) belongs.
|
||||
/// </summary>
|
||||
/// <param name="day"></param>
|
||||
/// <returns></returns>
|
||||
public static DateTime FirstWorkingDayOfWeek(DateTime day)
|
||||
{
|
||||
return FirstDayOfWeek(day, DayOfWeek.Monday);
|
||||
}
|
||||
|
||||
|
||||
// http://konsulent.sandelien.no/VB_help/Week/
|
||||
// just for Monday being the first day of week
|
||||
/// <summary>
|
||||
/// Calculates week number for the specified date according to ISO 8601.
|
||||
/// </summary>
|
||||
/// <param name="date"></param>
|
||||
/// <returns></returns>
|
||||
public static int WeekNrISO8601(DateTime date)
|
||||
{
|
||||
bool ThursdayFlag = false;
|
||||
int DayOfYear = date.DayOfYear;
|
||||
|
||||
int StartWeekDayOfYear =
|
||||
(int)(new DateTime(date.Year, 1, 1)).DayOfWeek;
|
||||
int EndWeekDayOfYear =
|
||||
(int)(new DateTime(date.Year, 12, 31)).DayOfWeek;
|
||||
|
||||
if (StartWeekDayOfYear == 0)
|
||||
StartWeekDayOfYear = 7;
|
||||
if (EndWeekDayOfYear == 0)
|
||||
EndWeekDayOfYear = 7;
|
||||
|
||||
int DaysInFirstWeek = 8 - (StartWeekDayOfYear);
|
||||
|
||||
if (StartWeekDayOfYear == 4 || EndWeekDayOfYear == 4)
|
||||
ThursdayFlag = true;
|
||||
|
||||
int FullWeeks = (int)Math.Ceiling((DayOfYear - (DaysInFirstWeek)) / 7.0);
|
||||
|
||||
int WeekNumber = FullWeeks;
|
||||
|
||||
if (DaysInFirstWeek >= 4)
|
||||
WeekNumber = WeekNumber + 1;
|
||||
|
||||
if (WeekNumber > 52 && !ThursdayFlag)
|
||||
WeekNumber = 1;
|
||||
|
||||
if (WeekNumber == 0)
|
||||
WeekNumber = WeekNrISO8601(new DateTime(date.Year - 1, 12, 31));
|
||||
return WeekNumber;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns day names (using current culture).
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ArrayList GetDayNames()
|
||||
{
|
||||
return GetDayNames("dddd");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns day names (using current culture).
|
||||
/// </summary>
|
||||
/// <param name="format">Corresponds to DateTime.ToString() formats. "DD" is also available (first two characters of short day name).</param>
|
||||
/// <returns></returns>
|
||||
public static ArrayList GetDayNames(string format)
|
||||
{
|
||||
ArrayList result = new ArrayList();
|
||||
DateTime start = new DateTime(2006, 12, 31); // Sunday
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
// this uses the current culture
|
||||
string name;
|
||||
if (format == "DD")
|
||||
{
|
||||
name = start.AddDays(i).ToString("ddd").Substring(0, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
name = start.AddDays(i).ToString(format);
|
||||
}
|
||||
|
||||
|
||||
result.Add(name);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Threading;
|
||||
|
||||
namespace DayPilot.Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// Helper class for week manipulation and formatting.
|
||||
/// </summary>
|
||||
public class Week
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the first day of this week. Based on current culture.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static DateTime FirstDayOfWeek()
|
||||
{
|
||||
return FirstDayOfWeek(DateTime.Today);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the first day of a week where day (parameter) belongs. Based on current culture.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static DateTime FirstDayOfWeek(DateTime day)
|
||||
{
|
||||
return FirstDayOfWeek(day, Thread.CurrentThread.CurrentCulture.DateTimeFormat.FirstDayOfWeek);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets the first day of a week where day (parameter) belongs. weekStart (parameter) specifies the starting day of week.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static DateTime FirstDayOfWeek(DateTime day, DayOfWeek weekStarts)
|
||||
{
|
||||
DateTime d = day;
|
||||
while (d.DayOfWeek != weekStarts)
|
||||
{
|
||||
d = d.AddDays(-1);
|
||||
}
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns Monday of the week where day (parameter) belongs.
|
||||
/// </summary>
|
||||
/// <param name="day"></param>
|
||||
/// <returns></returns>
|
||||
public static DateTime FirstWorkingDayOfWeek(DateTime day)
|
||||
{
|
||||
return FirstDayOfWeek(day, DayOfWeek.Monday);
|
||||
}
|
||||
|
||||
|
||||
// http://konsulent.sandelien.no/VB_help/Week/
|
||||
// just for Monday being the first day of week
|
||||
/// <summary>
|
||||
/// Calculates week number for the specified date according to ISO 8601.
|
||||
/// </summary>
|
||||
/// <param name="date"></param>
|
||||
/// <returns></returns>
|
||||
public static int WeekNrISO8601(DateTime date)
|
||||
{
|
||||
bool ThursdayFlag = false;
|
||||
int DayOfYear = date.DayOfYear;
|
||||
|
||||
int StartWeekDayOfYear =
|
||||
(int)(new DateTime(date.Year, 1, 1)).DayOfWeek;
|
||||
int EndWeekDayOfYear =
|
||||
(int)(new DateTime(date.Year, 12, 31)).DayOfWeek;
|
||||
|
||||
if (StartWeekDayOfYear == 0)
|
||||
StartWeekDayOfYear = 7;
|
||||
if (EndWeekDayOfYear == 0)
|
||||
EndWeekDayOfYear = 7;
|
||||
|
||||
int DaysInFirstWeek = 8 - (StartWeekDayOfYear);
|
||||
|
||||
if (StartWeekDayOfYear == 4 || EndWeekDayOfYear == 4)
|
||||
ThursdayFlag = true;
|
||||
|
||||
int FullWeeks = (int)Math.Ceiling((DayOfYear - (DaysInFirstWeek)) / 7.0);
|
||||
|
||||
int WeekNumber = FullWeeks;
|
||||
|
||||
if (DaysInFirstWeek >= 4)
|
||||
WeekNumber = WeekNumber + 1;
|
||||
|
||||
if (WeekNumber > 52 && !ThursdayFlag)
|
||||
WeekNumber = 1;
|
||||
|
||||
if (WeekNumber == 0)
|
||||
WeekNumber = WeekNrISO8601(new DateTime(date.Year - 1, 12, 31));
|
||||
return WeekNumber;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns day names (using current culture).
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ArrayList GetDayNames()
|
||||
{
|
||||
return GetDayNames("dddd");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns day names (using current culture).
|
||||
/// </summary>
|
||||
/// <param name="format">Corresponds to DateTime.ToString() formats. "DD" is also available (first two characters of short day name).</param>
|
||||
/// <returns></returns>
|
||||
public static ArrayList GetDayNames(string format)
|
||||
{
|
||||
ArrayList result = new ArrayList();
|
||||
DateTime start = new DateTime(2006, 12, 31); // Sunday
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
// this uses the current culture
|
||||
string name;
|
||||
if (format == "DD")
|
||||
{
|
||||
name = start.AddDays(i).ToString("ddd").Substring(0, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
name = start.AddDays(i).ToString(format);
|
||||
}
|
||||
|
||||
|
||||
result.Add(name);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
254
Web/Ui/Block.cs
254
Web/Ui/Block.cs
@@ -1,127 +1,127 @@
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
namespace DayPilot.Web.Ui
|
||||
{
|
||||
/// <summary>
|
||||
/// Block is a set of concurrent events.
|
||||
/// </summary>
|
||||
internal class Block
|
||||
{
|
||||
internal ArrayList Columns;
|
||||
private ArrayList events = new ArrayList();
|
||||
|
||||
|
||||
internal Block()
|
||||
{
|
||||
}
|
||||
|
||||
internal void Add(Event ev)
|
||||
{
|
||||
events.Add(ev);
|
||||
arrangeColumns();
|
||||
}
|
||||
|
||||
private Column createColumn()
|
||||
{
|
||||
Column col = new Column();
|
||||
this.Columns.Add(col);
|
||||
col.Block = this;
|
||||
|
||||
return col;
|
||||
}
|
||||
|
||||
|
||||
private void arrangeColumns()
|
||||
{
|
||||
// cleanup
|
||||
this.Columns = new ArrayList();
|
||||
|
||||
foreach(Event e in events)
|
||||
e.Column = null;
|
||||
|
||||
// there always will be at least one column because arrangeColumns is called only from Add()
|
||||
createColumn();
|
||||
|
||||
foreach (Event e in events)
|
||||
{
|
||||
foreach (Column col in Columns)
|
||||
{
|
||||
if (col.CanAdd(e))
|
||||
{
|
||||
col.Add(e);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// it wasn't placed
|
||||
if (e.Column == null)
|
||||
{
|
||||
Column col = createColumn();
|
||||
col.Add(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal bool OverlapsWith(Event e)
|
||||
{
|
||||
if (events.Count == 0)
|
||||
return false;
|
||||
|
||||
return (this.BoxStart < e.BoxEnd && this.BoxEnd > e.BoxStart);
|
||||
}
|
||||
|
||||
internal DateTime BoxStart
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime min = DateTime.MaxValue;
|
||||
|
||||
foreach(Event ev in events)
|
||||
{
|
||||
if (ev.BoxStart < min)
|
||||
min = ev.BoxStart;
|
||||
}
|
||||
|
||||
return min;
|
||||
}
|
||||
}
|
||||
|
||||
internal DateTime BoxEnd
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime max = DateTime.MinValue;
|
||||
|
||||
foreach(Event ev in events)
|
||||
{
|
||||
if (ev.BoxEnd > max)
|
||||
max = ev.BoxEnd;
|
||||
}
|
||||
|
||||
return max;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
namespace DayPilot.Web.Ui
|
||||
{
|
||||
/// <summary>
|
||||
/// Block is a set of concurrent events.
|
||||
/// </summary>
|
||||
internal class Block
|
||||
{
|
||||
internal ArrayList Columns;
|
||||
private ArrayList events = new ArrayList();
|
||||
|
||||
|
||||
internal Block()
|
||||
{
|
||||
}
|
||||
|
||||
internal void Add(Event ev)
|
||||
{
|
||||
events.Add(ev);
|
||||
arrangeColumns();
|
||||
}
|
||||
|
||||
private Column createColumn()
|
||||
{
|
||||
Column col = new Column();
|
||||
this.Columns.Add(col);
|
||||
col.Block = this;
|
||||
|
||||
return col;
|
||||
}
|
||||
|
||||
|
||||
private void arrangeColumns()
|
||||
{
|
||||
// cleanup
|
||||
this.Columns = new ArrayList();
|
||||
|
||||
foreach(Event e in events)
|
||||
e.Column = null;
|
||||
|
||||
// there always will be at least one column because arrangeColumns is called only from Add()
|
||||
createColumn();
|
||||
|
||||
foreach (Event e in events)
|
||||
{
|
||||
foreach (Column col in Columns)
|
||||
{
|
||||
if (col.CanAdd(e))
|
||||
{
|
||||
col.Add(e);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// it wasn't placed
|
||||
if (e.Column == null)
|
||||
{
|
||||
Column col = createColumn();
|
||||
col.Add(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal bool OverlapsWith(Event e)
|
||||
{
|
||||
if (events.Count == 0)
|
||||
return false;
|
||||
|
||||
return (this.BoxStart < e.BoxEnd && this.BoxEnd > e.BoxStart);
|
||||
}
|
||||
|
||||
internal DateTime BoxStart
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime min = DateTime.MaxValue;
|
||||
|
||||
foreach(Event ev in events)
|
||||
{
|
||||
if (ev.BoxStart < min)
|
||||
min = ev.BoxStart;
|
||||
}
|
||||
|
||||
return min;
|
||||
}
|
||||
}
|
||||
|
||||
internal DateTime BoxEnd
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime max = DateTime.MinValue;
|
||||
|
||||
foreach(Event ev in events)
|
||||
{
|
||||
if (ev.BoxEnd > max)
|
||||
max = ev.BoxEnd;
|
||||
}
|
||||
|
||||
return max;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
238
Web/Ui/Column.cs
238
Web/Ui/Column.cs
@@ -1,119 +1,119 @@
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using DayPilot.Web.Ui;
|
||||
|
||||
namespace DayPilot.Web.Ui
|
||||
{
|
||||
/// <summary>
|
||||
/// Column is a column of events in a Block.
|
||||
/// </summary>
|
||||
public class Column
|
||||
{
|
||||
private ArrayList events = new ArrayList();
|
||||
internal Block Block;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the width of the column in percent.
|
||||
/// </summary>
|
||||
public int WidthPct
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Block == null)
|
||||
throw new ApplicationException("This Column does not belong to any Block.");
|
||||
|
||||
if (Block.Columns.Count == 0)
|
||||
throw new ApplicationException("Internal error: Problem with Block.Column.Counts (it is zero).");
|
||||
|
||||
// the last block will be a bit longer to make sure the total width is 100%
|
||||
if (isLastInBlock)
|
||||
return 100 / Block.Columns.Count + 100 % Block.Columns.Count;
|
||||
else
|
||||
return 100 / Block.Columns.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the starting percent of the column.
|
||||
/// </summary>
|
||||
public int StartsAtPct
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Block == null)
|
||||
throw new ApplicationException("This Column does not belong to any Block.");
|
||||
|
||||
if (Block.Columns.Count == 0)
|
||||
throw new ApplicationException("Internal error: Problem with Block.Column.Counts (it is zero).");
|
||||
|
||||
return 100 / Block.Columns.Count * Number;
|
||||
}
|
||||
}
|
||||
|
||||
private bool isLastInBlock
|
||||
{
|
||||
get
|
||||
{
|
||||
return Block.Columns[Block.Columns.Count - 1] == this;
|
||||
}
|
||||
}
|
||||
|
||||
internal Column()
|
||||
{
|
||||
}
|
||||
|
||||
internal bool CanAdd(Event e)
|
||||
{
|
||||
foreach (Event ev in events)
|
||||
{
|
||||
if (ev.OverlapsWith(e))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
internal void Add(Event e)
|
||||
{
|
||||
if (e.Column != null)
|
||||
throw new ApplicationException("This Event was already placed into a Column.");
|
||||
|
||||
events.Add(e);
|
||||
e.Column = this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the order number of the column.
|
||||
/// </summary>
|
||||
public int Number
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Block == null)
|
||||
throw new ApplicationException("This Column doesn't belong to any Block.");
|
||||
|
||||
return Block.Columns.IndexOf(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using DayPilot.Web.Ui;
|
||||
|
||||
namespace DayPilot.Web.Ui
|
||||
{
|
||||
/// <summary>
|
||||
/// Column is a column of events in a Block.
|
||||
/// </summary>
|
||||
public class Column
|
||||
{
|
||||
private ArrayList events = new ArrayList();
|
||||
internal Block Block;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the width of the column in percent.
|
||||
/// </summary>
|
||||
public int WidthPct
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Block == null)
|
||||
throw new ApplicationException("This Column does not belong to any Block.");
|
||||
|
||||
if (Block.Columns.Count == 0)
|
||||
throw new ApplicationException("Internal error: Problem with Block.Column.Counts (it is zero).");
|
||||
|
||||
// the last block will be a bit longer to make sure the total width is 100%
|
||||
if (isLastInBlock)
|
||||
return 100 / Block.Columns.Count + 100 % Block.Columns.Count;
|
||||
else
|
||||
return 100 / Block.Columns.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the starting percent of the column.
|
||||
/// </summary>
|
||||
public int StartsAtPct
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Block == null)
|
||||
throw new ApplicationException("This Column does not belong to any Block.");
|
||||
|
||||
if (Block.Columns.Count == 0)
|
||||
throw new ApplicationException("Internal error: Problem with Block.Column.Counts (it is zero).");
|
||||
|
||||
return 100 / Block.Columns.Count * Number;
|
||||
}
|
||||
}
|
||||
|
||||
private bool isLastInBlock
|
||||
{
|
||||
get
|
||||
{
|
||||
return Block.Columns[Block.Columns.Count - 1] == this;
|
||||
}
|
||||
}
|
||||
|
||||
internal Column()
|
||||
{
|
||||
}
|
||||
|
||||
internal bool CanAdd(Event e)
|
||||
{
|
||||
foreach (Event ev in events)
|
||||
{
|
||||
if (ev.OverlapsWith(e))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
internal void Add(Event e)
|
||||
{
|
||||
if (e.Column != null)
|
||||
throw new ApplicationException("This Event was already placed into a Column.");
|
||||
|
||||
events.Add(e);
|
||||
e.Column = this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the order number of the column.
|
||||
/// </summary>
|
||||
public int Number
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Block == null)
|
||||
throw new ApplicationException("This Column doesn't belong to any Block.");
|
||||
|
||||
return Block.Columns.IndexOf(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
472
Web/Ui/Day.cs
472
Web/Ui/Day.cs
@@ -1,236 +1,236 @@
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace DayPilot.Web.Ui
|
||||
{
|
||||
/// <summary>
|
||||
/// Day handles events of a single day.
|
||||
/// </summary>
|
||||
internal class Day : ISerializable
|
||||
{
|
||||
internal List<Event> events = new List<Event>();
|
||||
private List<Block> blocks = new List<Block>();
|
||||
|
||||
internal int cellDuration; // in minutes
|
||||
|
||||
private DateTime start;
|
||||
internal DateTime end;
|
||||
|
||||
internal string Name;
|
||||
internal string Value;
|
||||
|
||||
internal DateTime Start
|
||||
{
|
||||
get { return start; }
|
||||
}
|
||||
|
||||
internal DateTime End
|
||||
{
|
||||
get { return end; }
|
||||
}
|
||||
|
||||
public Day(DateTime date)
|
||||
{
|
||||
this.start = date.Date;
|
||||
this.end = date.Date.AddDays(1);
|
||||
}
|
||||
|
||||
internal Day(DateTime start, DateTime end, string header, string id, int cellDuration)
|
||||
{
|
||||
this.start = start.Date;
|
||||
this.end = end.Date;
|
||||
this.Name = header;
|
||||
this.Value = id;
|
||||
this.cellDuration = cellDuration;
|
||||
}
|
||||
|
||||
private void stripAndAddEvent(Event e)
|
||||
{
|
||||
stripAndAddEvent(e.Start, e.End, e.PK, e.Name, e.Resource, e.Owner);
|
||||
}
|
||||
|
||||
private void stripAndAddEvent(DateTime start, DateTime end, string pk, string name, string resource, string owner)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(Value)) // this applies to resources view only
|
||||
{
|
||||
if (Value != resource) // don't add events that don't belong to this column
|
||||
return;
|
||||
}
|
||||
|
||||
// the event happens before this day
|
||||
if (end <= Start)
|
||||
return;
|
||||
|
||||
// the event happens after this day
|
||||
if (start >= End)
|
||||
return;
|
||||
|
||||
// this is invalid event that does have no duration
|
||||
if (start >= end)
|
||||
return;
|
||||
|
||||
// fix the starting time
|
||||
if (start < Start)
|
||||
start = Start;
|
||||
|
||||
|
||||
// fix the ending time
|
||||
if (end > End)
|
||||
end = End;
|
||||
|
||||
events.Add(new Event(pk, start, end, name, resource, owner));
|
||||
}
|
||||
|
||||
/*
|
||||
private void stripAndAddEvent(Event e)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(Value)) // this applies to resources view only
|
||||
{
|
||||
if (Value != e.Resource) // don't add events that don't belong to this column
|
||||
return;
|
||||
}
|
||||
|
||||
// the event happens before this day
|
||||
if (e.End <= Start)
|
||||
return;
|
||||
|
||||
// the event happens after this day
|
||||
if (e.Start >= End.AddDays(1))
|
||||
return;
|
||||
|
||||
// this is invalid event that has no duration
|
||||
if (e.Start >= e.End)
|
||||
return;
|
||||
|
||||
// Event part = new Event(this, e);
|
||||
events.Add(e);
|
||||
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
/// <summary>
|
||||
/// Loads events from ArrayList of Events.
|
||||
/// </summary>
|
||||
/// <param name="events">ArrayList that contains the Events.</param>
|
||||
public void Load(ArrayList events)
|
||||
{
|
||||
if (events == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (Event e in events)
|
||||
{
|
||||
stripAndAddEvent(e);
|
||||
}
|
||||
putIntoBlocks();
|
||||
}
|
||||
|
||||
private void putIntoBlocks()
|
||||
{
|
||||
foreach (Event e in events)
|
||||
{
|
||||
// if there is no block, create the first one
|
||||
if (lastBlock == null)
|
||||
{
|
||||
blocks.Add(new Block());
|
||||
}
|
||||
// or if the event doesn't overlap with the last block, create a new block
|
||||
else if (!lastBlock.OverlapsWith(e))
|
||||
{
|
||||
blocks.Add(new Block());
|
||||
}
|
||||
|
||||
// any case, add it to some block
|
||||
lastBlock.Add(e);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private Block lastBlock
|
||||
{
|
||||
get
|
||||
{
|
||||
if (blocks.Count == 0)
|
||||
return null;
|
||||
return blocks[blocks.Count - 1];
|
||||
}
|
||||
}
|
||||
|
||||
public void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
}
|
||||
|
||||
internal int MaxColumns()
|
||||
{
|
||||
int i = 1;
|
||||
foreach (Block b in blocks)
|
||||
{
|
||||
if (b.Columns.Count > i)
|
||||
i = b.Columns.Count;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
public DateTime BoxStart
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime min = DateTime.MaxValue;
|
||||
|
||||
foreach (Block block in blocks)
|
||||
{
|
||||
if (block.BoxStart < min)
|
||||
min = block.BoxStart;
|
||||
}
|
||||
|
||||
return min;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The end of the box of the last event.
|
||||
/// </summary>
|
||||
public DateTime BoxEnd
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime max = DateTime.MinValue;
|
||||
|
||||
foreach (Block block in blocks)
|
||||
{
|
||||
if (block.BoxEnd > max)
|
||||
max = block.BoxEnd;
|
||||
}
|
||||
|
||||
return max;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace DayPilot.Web.Ui
|
||||
{
|
||||
/// <summary>
|
||||
/// Day handles events of a single day.
|
||||
/// </summary>
|
||||
internal class Day : ISerializable
|
||||
{
|
||||
internal List<Event> events = new List<Event>();
|
||||
private List<Block> blocks = new List<Block>();
|
||||
|
||||
internal int cellDuration; // in minutes
|
||||
|
||||
private DateTime start;
|
||||
internal DateTime end;
|
||||
|
||||
internal string Name;
|
||||
internal string Value;
|
||||
|
||||
internal DateTime Start
|
||||
{
|
||||
get { return start; }
|
||||
}
|
||||
|
||||
internal DateTime End
|
||||
{
|
||||
get { return end; }
|
||||
}
|
||||
|
||||
public Day(DateTime date)
|
||||
{
|
||||
this.start = date.Date;
|
||||
this.end = date.Date.AddDays(1);
|
||||
}
|
||||
|
||||
internal Day(DateTime start, DateTime end, string header, string id, int cellDuration)
|
||||
{
|
||||
this.start = start.Date;
|
||||
this.end = end.Date;
|
||||
this.Name = header;
|
||||
this.Value = id;
|
||||
this.cellDuration = cellDuration;
|
||||
}
|
||||
|
||||
private void stripAndAddEvent(Event e)
|
||||
{
|
||||
stripAndAddEvent(e.Start, e.End, e.PK, e.Name, e.Resource, e.Owner);
|
||||
}
|
||||
|
||||
private void stripAndAddEvent(DateTime start, DateTime end, string pk, string name, string resource, string owner)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(Value)) // this applies to resources view only
|
||||
{
|
||||
if (Value != resource) // don't add events that don't belong to this column
|
||||
return;
|
||||
}
|
||||
|
||||
// the event happens before this day
|
||||
if (end <= Start)
|
||||
return;
|
||||
|
||||
// the event happens after this day
|
||||
if (start >= End)
|
||||
return;
|
||||
|
||||
// this is invalid event that does have no duration
|
||||
if (start >= end)
|
||||
return;
|
||||
|
||||
// fix the starting time
|
||||
if (start < Start)
|
||||
start = Start;
|
||||
|
||||
|
||||
// fix the ending time
|
||||
if (end > End)
|
||||
end = End;
|
||||
|
||||
events.Add(new Event(pk, start, end, name, resource, owner));
|
||||
}
|
||||
|
||||
/*
|
||||
private void stripAndAddEvent(Event e)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(Value)) // this applies to resources view only
|
||||
{
|
||||
if (Value != e.Resource) // don't add events that don't belong to this column
|
||||
return;
|
||||
}
|
||||
|
||||
// the event happens before this day
|
||||
if (e.End <= Start)
|
||||
return;
|
||||
|
||||
// the event happens after this day
|
||||
if (e.Start >= End.AddDays(1))
|
||||
return;
|
||||
|
||||
// this is invalid event that has no duration
|
||||
if (e.Start >= e.End)
|
||||
return;
|
||||
|
||||
// Event part = new Event(this, e);
|
||||
events.Add(e);
|
||||
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
/// <summary>
|
||||
/// Loads events from ArrayList of Events.
|
||||
/// </summary>
|
||||
/// <param name="events">ArrayList that contains the Events.</param>
|
||||
public void Load(ArrayList events)
|
||||
{
|
||||
if (events == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (Event e in events)
|
||||
{
|
||||
stripAndAddEvent(e);
|
||||
}
|
||||
putIntoBlocks();
|
||||
}
|
||||
|
||||
private void putIntoBlocks()
|
||||
{
|
||||
foreach (Event e in events)
|
||||
{
|
||||
// if there is no block, create the first one
|
||||
if (lastBlock == null)
|
||||
{
|
||||
blocks.Add(new Block());
|
||||
}
|
||||
// or if the event doesn't overlap with the last block, create a new block
|
||||
else if (!lastBlock.OverlapsWith(e))
|
||||
{
|
||||
blocks.Add(new Block());
|
||||
}
|
||||
|
||||
// any case, add it to some block
|
||||
lastBlock.Add(e);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private Block lastBlock
|
||||
{
|
||||
get
|
||||
{
|
||||
if (blocks.Count == 0)
|
||||
return null;
|
||||
return blocks[blocks.Count - 1];
|
||||
}
|
||||
}
|
||||
|
||||
public void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
}
|
||||
|
||||
internal int MaxColumns()
|
||||
{
|
||||
int i = 1;
|
||||
foreach (Block b in blocks)
|
||||
{
|
||||
if (b.Columns.Count > i)
|
||||
i = b.Columns.Count;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
public DateTime BoxStart
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime min = DateTime.MaxValue;
|
||||
|
||||
foreach (Block block in blocks)
|
||||
{
|
||||
if (block.BoxStart < min)
|
||||
min = block.BoxStart;
|
||||
}
|
||||
|
||||
return min;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The end of the box of the last event.
|
||||
/// </summary>
|
||||
public DateTime BoxEnd
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime max = DateTime.MinValue;
|
||||
|
||||
foreach (Block block in blocks)
|
||||
{
|
||||
if (block.BoxEnd > max)
|
||||
max = block.BoxEnd;
|
||||
}
|
||||
|
||||
return max;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,44 +1,44 @@
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
|
||||
using System.Collections;
|
||||
using System.Web.UI.Design.WebControls;
|
||||
|
||||
namespace DayPilot.Web.Ui.Design
|
||||
{
|
||||
public class DayPilotCalendarDesigner : DataBoundControlDesigner
|
||||
{
|
||||
protected override void PreFilterProperties(IDictionary properties)
|
||||
{
|
||||
base.PreFilterProperties(properties);
|
||||
|
||||
properties.Remove("Height");
|
||||
properties.Remove("BorderStyle");
|
||||
properties.Remove("BorderWidth");
|
||||
properties.Remove("CssClass");
|
||||
properties.Remove("Font");
|
||||
properties.Remove("ForeColor");
|
||||
properties.Remove("ToolTip");
|
||||
properties.Remove("EndDate");
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
|
||||
using System.Collections;
|
||||
using System.Web.UI.Design.WebControls;
|
||||
|
||||
namespace DayPilot.Web.Ui.Design
|
||||
{
|
||||
public class DayPilotCalendarDesigner : DataBoundControlDesigner
|
||||
{
|
||||
protected override void PreFilterProperties(IDictionary properties)
|
||||
{
|
||||
base.PreFilterProperties(properties);
|
||||
|
||||
properties.Remove("Height");
|
||||
properties.Remove("BorderStyle");
|
||||
properties.Remove("BorderWidth");
|
||||
properties.Remove("CssClass");
|
||||
properties.Remove("Font");
|
||||
properties.Remove("ForeColor");
|
||||
properties.Remove("ToolTip");
|
||||
properties.Remove("EndDate");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,55 +1,55 @@
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
namespace DayPilot.Web.Ui.Enums
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Header grouping units.
|
||||
/// </summary>
|
||||
public enum GroupByEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// Grouped by hour.
|
||||
/// </summary>
|
||||
Hour,
|
||||
|
||||
/// <summary>
|
||||
/// Grouped by day.
|
||||
/// </summary>
|
||||
Day,
|
||||
|
||||
/// <summary>
|
||||
/// Grouped by week.
|
||||
/// </summary>
|
||||
Week,
|
||||
|
||||
/// <summary>
|
||||
/// Grouped by month.
|
||||
/// </summary>
|
||||
Month,
|
||||
|
||||
/// <summary>
|
||||
/// No grouping.
|
||||
/// </summary>
|
||||
None
|
||||
}
|
||||
}
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
namespace DayPilot.Web.Ui.Enums
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Header grouping units.
|
||||
/// </summary>
|
||||
public enum GroupByEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// Grouped by hour.
|
||||
/// </summary>
|
||||
Hour,
|
||||
|
||||
/// <summary>
|
||||
/// Grouped by day.
|
||||
/// </summary>
|
||||
Day,
|
||||
|
||||
/// <summary>
|
||||
/// Grouped by week.
|
||||
/// </summary>
|
||||
Week,
|
||||
|
||||
/// <summary>
|
||||
/// Grouped by month.
|
||||
/// </summary>
|
||||
Month,
|
||||
|
||||
/// <summary>
|
||||
/// No grouping.
|
||||
/// </summary>
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
284
Web/Ui/Event.cs
284
Web/Ui/Event.cs
@@ -1,142 +1,142 @@
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
||||
namespace DayPilot.Web.Ui
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for Event.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class Event
|
||||
{
|
||||
/// <summary>
|
||||
/// Event start.
|
||||
/// </summary>
|
||||
public DateTime Start;
|
||||
|
||||
/// <summary>
|
||||
/// Event end;
|
||||
/// </summary>
|
||||
public DateTime End;
|
||||
|
||||
/// <summary>
|
||||
/// Event name;
|
||||
/// </summary>
|
||||
public string Name;
|
||||
|
||||
/// <summary>
|
||||
/// Event primary key.
|
||||
/// </summary>
|
||||
public string PK;
|
||||
|
||||
public string Resource;
|
||||
public string Owner;
|
||||
|
||||
/// <summary>
|
||||
/// Column to which this event belongs.
|
||||
/// </summary>
|
||||
[NonSerialized]
|
||||
public Column Column;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
public Event()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor that prefills the fields.
|
||||
/// </summary>
|
||||
/// <param name="pk"></param>
|
||||
/// <param name="start"></param>
|
||||
/// <param name="end"></param>
|
||||
/// <param name="name"></param>
|
||||
public Event(string pk, DateTime start, DateTime end, string name) : this(pk, start, end, name, null)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public Event(string pk, DateTime start, DateTime end, string name, string resource): this(pk, start, end, name, resource, null)
|
||||
{
|
||||
|
||||
}
|
||||
public Event(string pk, DateTime start, DateTime end, string name, string resource, string owner)
|
||||
{
|
||||
this.PK = pk;
|
||||
this.Start = start;
|
||||
this.End = end;
|
||||
this.Name = name;
|
||||
this.Resource = resource;
|
||||
this.Owner = owner;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the starting time of an event box.
|
||||
/// </summary>
|
||||
public DateTime BoxStart
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Start.Minute >= 30)
|
||||
return new DateTime(Start.Year, Start.Month, Start.Day, Start.Hour, 30, 0);
|
||||
else
|
||||
return new DateTime(Start.Year, Start.Month, Start.Day, Start.Hour, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the ending time of an event box.
|
||||
/// </summary>
|
||||
public DateTime BoxEnd
|
||||
{
|
||||
get
|
||||
{
|
||||
if (End.Minute > 30)
|
||||
{
|
||||
DateTime hourPlus = End.AddHours(1);
|
||||
return new DateTime(hourPlus.Year, hourPlus.Month, hourPlus.Day, hourPlus.Hour, 0, 0);
|
||||
}
|
||||
else if (End.Minute > 0)
|
||||
{
|
||||
return new DateTime(End.Year, End.Month, End.Day, End.Hour, 30, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new DateTime(End.Year, End.Month, End.Day, End.Hour, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if this box overlaps with e's box.
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
/// <returns></returns>
|
||||
public bool OverlapsWith(Event e)
|
||||
{
|
||||
return (this.BoxStart < e.BoxEnd && this.BoxEnd > e.Start);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
||||
namespace DayPilot.Web.Ui
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for Event.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class Event
|
||||
{
|
||||
/// <summary>
|
||||
/// Event start.
|
||||
/// </summary>
|
||||
public DateTime Start;
|
||||
|
||||
/// <summary>
|
||||
/// Event end;
|
||||
/// </summary>
|
||||
public DateTime End;
|
||||
|
||||
/// <summary>
|
||||
/// Event name;
|
||||
/// </summary>
|
||||
public string Name;
|
||||
|
||||
/// <summary>
|
||||
/// Event primary key.
|
||||
/// </summary>
|
||||
public string PK;
|
||||
|
||||
public string Resource;
|
||||
public string Owner;
|
||||
|
||||
/// <summary>
|
||||
/// Column to which this event belongs.
|
||||
/// </summary>
|
||||
[NonSerialized]
|
||||
public Column Column;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
public Event()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor that prefills the fields.
|
||||
/// </summary>
|
||||
/// <param name="pk"></param>
|
||||
/// <param name="start"></param>
|
||||
/// <param name="end"></param>
|
||||
/// <param name="name"></param>
|
||||
public Event(string pk, DateTime start, DateTime end, string name) : this(pk, start, end, name, null)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public Event(string pk, DateTime start, DateTime end, string name, string resource): this(pk, start, end, name, resource, null)
|
||||
{
|
||||
|
||||
}
|
||||
public Event(string pk, DateTime start, DateTime end, string name, string resource, string owner)
|
||||
{
|
||||
this.PK = pk;
|
||||
this.Start = start;
|
||||
this.End = end;
|
||||
this.Name = name;
|
||||
this.Resource = resource;
|
||||
this.Owner = owner;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the starting time of an event box.
|
||||
/// </summary>
|
||||
public DateTime BoxStart
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Start.Minute >= 30)
|
||||
return new DateTime(Start.Year, Start.Month, Start.Day, Start.Hour, 30, 0);
|
||||
else
|
||||
return new DateTime(Start.Year, Start.Month, Start.Day, Start.Hour, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the ending time of an event box.
|
||||
/// </summary>
|
||||
public DateTime BoxEnd
|
||||
{
|
||||
get
|
||||
{
|
||||
if (End.Minute > 30)
|
||||
{
|
||||
DateTime hourPlus = End.AddHours(1);
|
||||
return new DateTime(hourPlus.Year, hourPlus.Month, hourPlus.Day, hourPlus.Hour, 0, 0);
|
||||
}
|
||||
else if (End.Minute > 0)
|
||||
{
|
||||
return new DateTime(End.Year, End.Month, End.Day, End.Hour, 30, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new DateTime(End.Year, End.Month, End.Day, End.Hour, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if this box overlaps with e's box.
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
/// <returns></returns>
|
||||
public bool OverlapsWith(Event e)
|
||||
{
|
||||
return (this.BoxStart < e.BoxEnd && this.BoxEnd > e.Start);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,52 +1,52 @@
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System.Collections;
|
||||
|
||||
namespace DayPilot.Web.Ui
|
||||
{
|
||||
public class EventComparer : IComparer
|
||||
{
|
||||
|
||||
// Calls CaseInsensitiveComparer.Compare with the parameters reversed.
|
||||
public int Compare(object x, object y)
|
||||
{
|
||||
Event first = (Event) x;
|
||||
Event second = (Event) y;
|
||||
|
||||
if (first.Start < second.Start)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (first.Start > second.Start)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (first.End > second.End)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System.Collections;
|
||||
|
||||
namespace DayPilot.Web.Ui
|
||||
{
|
||||
public class EventComparer : IComparer
|
||||
{
|
||||
|
||||
// Calls CaseInsensitiveComparer.Compare with the parameters reversed.
|
||||
public int Compare(object x, object y)
|
||||
{
|
||||
Event first = (Event) x;
|
||||
Event second = (Event) y;
|
||||
|
||||
if (first.Start < second.Start)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (first.Start > second.Start)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (first.End > second.End)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,80 +1,80 @@
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
||||
namespace DayPilot.Web.Ui
|
||||
{
|
||||
/// <summary>
|
||||
/// Delegate for passing an event primary key.
|
||||
/// </summary>
|
||||
public delegate void EventClickDelegate(object sender, EventClickEventArgs e);
|
||||
|
||||
/// <summary>
|
||||
/// Delegate for passing a starting time.
|
||||
/// </summary>
|
||||
public delegate void FreeClickDelegate(object sender, FreeClickEventArgs e);
|
||||
|
||||
|
||||
public class EventClickEventArgs : EventArgs
|
||||
{
|
||||
private string value;
|
||||
|
||||
public string Value
|
||||
{
|
||||
get { return value; }
|
||||
}
|
||||
|
||||
public EventClickEventArgs(string value)
|
||||
{
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
public class FreeClickEventArgs : EventArgs
|
||||
{
|
||||
private DateTime start;
|
||||
private string resource;
|
||||
|
||||
|
||||
public DateTime Start
|
||||
{
|
||||
get { return start; }
|
||||
}
|
||||
|
||||
public string Resource
|
||||
{
|
||||
get { return resource; }
|
||||
}
|
||||
|
||||
public FreeClickEventArgs(DateTime start)
|
||||
{
|
||||
this.start = start;
|
||||
}
|
||||
|
||||
public FreeClickEventArgs(DateTime start, string resource)
|
||||
{
|
||||
this.start = start;
|
||||
this.resource = resource;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
||||
namespace DayPilot.Web.Ui
|
||||
{
|
||||
/// <summary>
|
||||
/// Delegate for passing an event primary key.
|
||||
/// </summary>
|
||||
public delegate void EventClickDelegate(object sender, EventClickEventArgs e);
|
||||
|
||||
/// <summary>
|
||||
/// Delegate for passing a starting time.
|
||||
/// </summary>
|
||||
public delegate void FreeClickDelegate(object sender, FreeClickEventArgs e);
|
||||
|
||||
|
||||
public class EventClickEventArgs : EventArgs
|
||||
{
|
||||
private string value;
|
||||
|
||||
public string Value
|
||||
{
|
||||
get { return value; }
|
||||
}
|
||||
|
||||
public EventClickEventArgs(string value)
|
||||
{
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
public class FreeClickEventArgs : EventArgs
|
||||
{
|
||||
private DateTime start;
|
||||
private string resource;
|
||||
|
||||
|
||||
public DateTime Start
|
||||
{
|
||||
get { return start; }
|
||||
}
|
||||
|
||||
public string Resource
|
||||
{
|
||||
get { return resource; }
|
||||
}
|
||||
|
||||
public FreeClickEventArgs(DateTime start)
|
||||
{
|
||||
this.start = start;
|
||||
}
|
||||
|
||||
public FreeClickEventArgs(DateTime start, string resource)
|
||||
{
|
||||
this.start = start;
|
||||
this.resource = resource;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
namespace DayPilot.Web.Ui
|
||||
{
|
||||
/// <summary>
|
||||
/// Behavior of the non-business hours.
|
||||
/// </summary>
|
||||
public enum NonBusinessHoursBehavior
|
||||
{
|
||||
/// <summary>
|
||||
/// Hides the non-business hours if there is no event in that time.
|
||||
/// </summary>
|
||||
HideIfPossible,
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Always hides the non-business hours.
|
||||
/// </summary>
|
||||
Hide,
|
||||
|
||||
/// <summary>
|
||||
/// Always shows the non-business hours.
|
||||
/// </summary>
|
||||
Show
|
||||
}
|
||||
}
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
namespace DayPilot.Web.Ui
|
||||
{
|
||||
/// <summary>
|
||||
/// Behavior of the non-business hours.
|
||||
/// </summary>
|
||||
public enum NonBusinessHoursBehavior
|
||||
{
|
||||
/// <summary>
|
||||
/// Hides the non-business hours if there is no event in that time.
|
||||
/// </summary>
|
||||
HideIfPossible,
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Always hides the non-business hours.
|
||||
/// </summary>
|
||||
Hide,
|
||||
|
||||
/// <summary>
|
||||
/// Always shows the non-business hours.
|
||||
/// </summary>
|
||||
Show
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,87 +1,87 @@
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
||||
namespace DayPilot.Web.Ui
|
||||
{
|
||||
/// <summary>
|
||||
/// Class representing a resource <see cref="DayPilotScheduler">DayPilotScheduler</see>.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class Resource
|
||||
{
|
||||
private string val;
|
||||
private string name;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor.
|
||||
/// </summary>
|
||||
public Resource()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor that sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="name">Row name (visible).</param>
|
||||
/// <param name="val">Row value (id).</param>
|
||||
public Resource(string name, string val)
|
||||
{
|
||||
this.name = name;
|
||||
this.val = val;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Row value (id).
|
||||
/// </summary>
|
||||
public string Value
|
||||
{
|
||||
get { return val; }
|
||||
set { val = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get or set the row name (<see cref="Resource.Name">Row.Name</see>).
|
||||
/// </summary>
|
||||
public string Name
|
||||
{
|
||||
get { return name; }
|
||||
set { name = value; }
|
||||
}
|
||||
|
||||
|
||||
///<summary>
|
||||
///Returns a <see cref="T:System.String"></see> that represents the current <see cref="T:System.Object"></see>.
|
||||
///</summary>
|
||||
///
|
||||
///<returns>
|
||||
///A <see cref="T:System.String"></see> that represents the current <see cref="T:System.Object"></see>.
|
||||
///</returns>
|
||||
///<filterpriority>2</filterpriority>
|
||||
public override string ToString()
|
||||
{
|
||||
return Name;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
||||
namespace DayPilot.Web.Ui
|
||||
{
|
||||
/// <summary>
|
||||
/// Class representing a resource <see cref="DayPilotScheduler">DayPilotScheduler</see>.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class Resource
|
||||
{
|
||||
private string val;
|
||||
private string name;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor.
|
||||
/// </summary>
|
||||
public Resource()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor that sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="name">Row name (visible).</param>
|
||||
/// <param name="val">Row value (id).</param>
|
||||
public Resource(string name, string val)
|
||||
{
|
||||
this.name = name;
|
||||
this.val = val;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Row value (id).
|
||||
/// </summary>
|
||||
public string Value
|
||||
{
|
||||
get { return val; }
|
||||
set { val = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get or set the row name (<see cref="Resource.Name">Row.Name</see>).
|
||||
/// </summary>
|
||||
public string Name
|
||||
{
|
||||
get { return name; }
|
||||
set { name = value; }
|
||||
}
|
||||
|
||||
|
||||
///<summary>
|
||||
///Returns a <see cref="T:System.String"></see> that represents the current <see cref="T:System.Object"></see>.
|
||||
///</summary>
|
||||
///
|
||||
///<returns>
|
||||
///A <see cref="T:System.String"></see> that represents the current <see cref="T:System.Object"></see>.
|
||||
///</returns>
|
||||
///<filterpriority>2</filterpriority>
|
||||
public override string ToString()
|
||||
{
|
||||
return Name;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,155 +1,155 @@
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using DayPilot.Web.Ui.Serialization;
|
||||
|
||||
namespace DayPilot.Web.Ui
|
||||
{
|
||||
/// <summary>
|
||||
/// Collection of resources definitions.
|
||||
/// </summary>
|
||||
|
||||
[TypeConverter(typeof(ResourceCollectionConverter))]
|
||||
public class ResourceCollection : CollectionBase
|
||||
{
|
||||
internal bool designMode;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the specified <see cref="Resource">Resource</see>.
|
||||
/// </summary>
|
||||
/// <param name="index">Item index</param>
|
||||
/// <returns>Resource at the specified position.</returns>
|
||||
public Resource this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((Resource)List[index]);
|
||||
}
|
||||
set
|
||||
{
|
||||
List[index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts ResourceCollection to ArrayList.
|
||||
/// </summary>
|
||||
/// <returns>ArrayList with ResourceCollection items.</returns>
|
||||
public ArrayList ToArrayList()
|
||||
{
|
||||
ArrayList retArray = new ArrayList();
|
||||
for (int i = 0; i < this.Count; i++)
|
||||
{
|
||||
retArray.Add(this[i]);
|
||||
}
|
||||
|
||||
return retArray;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a new <see cref="Resource">Resource</see> to the collection.
|
||||
/// </summary>
|
||||
/// <param name="value">Resource to be added.</param>
|
||||
/// <returns></returns>
|
||||
public int Add(Resource value)
|
||||
{
|
||||
return (List.Add(value));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a new <see cref="Resource">Resource</see> to the collection.
|
||||
/// </summary>
|
||||
/// <param name="name">Resource name</param>
|
||||
/// <param name="id">Resource id</param>
|
||||
/// <returns></returns>
|
||||
public int Add(string name, string id)
|
||||
{
|
||||
return Add(new Resource(name, id));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines the index of a specific item in the collection.
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public int IndexOf(Resource value)
|
||||
{
|
||||
return (List.IndexOf(value));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Inserts a new resource at the specified position.
|
||||
/// </summary>
|
||||
/// <param name="index">New resource position.</param>
|
||||
/// <param name="value">Resource to be added.</param>
|
||||
public void Insert(int index, Resource value)
|
||||
{
|
||||
List.Insert(index, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes a Resource from the collection.
|
||||
/// </summary>
|
||||
/// <param name="value">Resource to be removed.</param>
|
||||
public void Remove(Resource value)
|
||||
{
|
||||
List.Remove(value);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the collection contains a specified resource.
|
||||
/// </summary>
|
||||
/// <param name="value">Resource to be found.</param>
|
||||
/// <returns>True if the collection contains the resource</returns>
|
||||
public bool Contains(Resource value)
|
||||
{
|
||||
return (List.Contains(value));
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new collection from an ArrayList.
|
||||
/// </summary>
|
||||
/// <param name="items">ArrayList that contains the new resources.</param>
|
||||
public ResourceCollection(ArrayList items)
|
||||
: base()
|
||||
{
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
{
|
||||
if (items[i] is Resource)
|
||||
{
|
||||
this.Add((Resource)items[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new ResourceCollection.
|
||||
/// </summary>
|
||||
public ResourceCollection()
|
||||
: base()
|
||||
{ }
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using DayPilot.Web.Ui.Serialization;
|
||||
|
||||
namespace DayPilot.Web.Ui
|
||||
{
|
||||
/// <summary>
|
||||
/// Collection of resources definitions.
|
||||
/// </summary>
|
||||
|
||||
[TypeConverter(typeof(ResourceCollectionConverter))]
|
||||
public class ResourceCollection : CollectionBase
|
||||
{
|
||||
internal bool designMode;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the specified <see cref="Resource">Resource</see>.
|
||||
/// </summary>
|
||||
/// <param name="index">Item index</param>
|
||||
/// <returns>Resource at the specified position.</returns>
|
||||
public Resource this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((Resource)List[index]);
|
||||
}
|
||||
set
|
||||
{
|
||||
List[index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts ResourceCollection to ArrayList.
|
||||
/// </summary>
|
||||
/// <returns>ArrayList with ResourceCollection items.</returns>
|
||||
public ArrayList ToArrayList()
|
||||
{
|
||||
ArrayList retArray = new ArrayList();
|
||||
for (int i = 0; i < this.Count; i++)
|
||||
{
|
||||
retArray.Add(this[i]);
|
||||
}
|
||||
|
||||
return retArray;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a new <see cref="Resource">Resource</see> to the collection.
|
||||
/// </summary>
|
||||
/// <param name="value">Resource to be added.</param>
|
||||
/// <returns></returns>
|
||||
public int Add(Resource value)
|
||||
{
|
||||
return (List.Add(value));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a new <see cref="Resource">Resource</see> to the collection.
|
||||
/// </summary>
|
||||
/// <param name="name">Resource name</param>
|
||||
/// <param name="id">Resource id</param>
|
||||
/// <returns></returns>
|
||||
public int Add(string name, string id)
|
||||
{
|
||||
return Add(new Resource(name, id));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines the index of a specific item in the collection.
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public int IndexOf(Resource value)
|
||||
{
|
||||
return (List.IndexOf(value));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Inserts a new resource at the specified position.
|
||||
/// </summary>
|
||||
/// <param name="index">New resource position.</param>
|
||||
/// <param name="value">Resource to be added.</param>
|
||||
public void Insert(int index, Resource value)
|
||||
{
|
||||
List.Insert(index, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes a Resource from the collection.
|
||||
/// </summary>
|
||||
/// <param name="value">Resource to be removed.</param>
|
||||
public void Remove(Resource value)
|
||||
{
|
||||
List.Remove(value);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the collection contains a specified resource.
|
||||
/// </summary>
|
||||
/// <param name="value">Resource to be found.</param>
|
||||
/// <returns>True if the collection contains the resource</returns>
|
||||
public bool Contains(Resource value)
|
||||
{
|
||||
return (List.Contains(value));
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new collection from an ArrayList.
|
||||
/// </summary>
|
||||
/// <param name="items">ArrayList that contains the new resources.</param>
|
||||
public ResourceCollection(ArrayList items)
|
||||
: base()
|
||||
{
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
{
|
||||
if (items[i] is Resource)
|
||||
{
|
||||
this.Add((Resource)items[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new ResourceCollection.
|
||||
/// </summary>
|
||||
public ResourceCollection()
|
||||
: base()
|
||||
{ }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,136 +1,136 @@
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using Encoder=DayPilot.Utils.Encoder;
|
||||
|
||||
namespace DayPilot.Web.Ui.Serialization
|
||||
{
|
||||
/// <summary>
|
||||
/// Internal class for serializing ResourceCollection (ViewState).
|
||||
/// </summary>
|
||||
public class ResourceCollectionConverter : TypeConverter
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
/// <param name="sourceType"></param>
|
||||
/// <returns></returns>
|
||||
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
|
||||
{
|
||||
if (sourceType == typeof(String))
|
||||
return true;
|
||||
return base.CanConvertFrom(context, sourceType);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
/// <param name="destinationType"></param>
|
||||
/// <returns></returns>
|
||||
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
|
||||
{
|
||||
if (destinationType == typeof(String))
|
||||
return true;
|
||||
return base.CanConvertTo(context, destinationType);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
/// <param name="culture"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
|
||||
{
|
||||
String state = value as String;
|
||||
if (state == null)
|
||||
{
|
||||
return base.ConvertFrom(context, culture, value);
|
||||
}
|
||||
|
||||
if (state == String.Empty)
|
||||
{
|
||||
return new ResourceCollection();
|
||||
}
|
||||
|
||||
String[] parts = state.Split('&');
|
||||
|
||||
ResourceCollection collection = new ResourceCollection();
|
||||
foreach (string encRes in parts)
|
||||
{
|
||||
string[] props = Encoder.UrlDecode(encRes).Split('&');
|
||||
|
||||
Resource r = new Resource();
|
||||
r.Name = Encoder.UrlDecode(props[0]);
|
||||
r.Value = Encoder.UrlDecode(props[1]);
|
||||
|
||||
collection.Add(r);
|
||||
}
|
||||
|
||||
return collection;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
/// <param name="culture"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="destinationType"></param>
|
||||
/// <returns></returns>
|
||||
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
|
||||
{
|
||||
if (destinationType == null)
|
||||
throw new ArgumentException("destinationType");
|
||||
ResourceCollection collection = value as ResourceCollection;
|
||||
|
||||
if (collection == null)
|
||||
{
|
||||
return base.ConvertTo(context, culture, value, destinationType);
|
||||
|
||||
}
|
||||
|
||||
if (collection.designMode)
|
||||
{
|
||||
return "(Collection)";
|
||||
}
|
||||
|
||||
ArrayList al = new ArrayList();
|
||||
|
||||
foreach (Resource r in collection)
|
||||
{
|
||||
ArrayList properties = new ArrayList();
|
||||
properties.Add(r.Name);
|
||||
properties.Add(r.Value);
|
||||
|
||||
al.Add(Encoder.UrlEncode(properties));
|
||||
}
|
||||
|
||||
return Encoder.UrlEncode(al);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using Encoder=DayPilot.Utils.Encoder;
|
||||
|
||||
namespace DayPilot.Web.Ui.Serialization
|
||||
{
|
||||
/// <summary>
|
||||
/// Internal class for serializing ResourceCollection (ViewState).
|
||||
/// </summary>
|
||||
public class ResourceCollectionConverter : TypeConverter
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
/// <param name="sourceType"></param>
|
||||
/// <returns></returns>
|
||||
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
|
||||
{
|
||||
if (sourceType == typeof(String))
|
||||
return true;
|
||||
return base.CanConvertFrom(context, sourceType);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
/// <param name="destinationType"></param>
|
||||
/// <returns></returns>
|
||||
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
|
||||
{
|
||||
if (destinationType == typeof(String))
|
||||
return true;
|
||||
return base.CanConvertTo(context, destinationType);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
/// <param name="culture"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
|
||||
{
|
||||
String state = value as String;
|
||||
if (state == null)
|
||||
{
|
||||
return base.ConvertFrom(context, culture, value);
|
||||
}
|
||||
|
||||
if (state == String.Empty)
|
||||
{
|
||||
return new ResourceCollection();
|
||||
}
|
||||
|
||||
String[] parts = state.Split('&');
|
||||
|
||||
ResourceCollection collection = new ResourceCollection();
|
||||
foreach (string encRes in parts)
|
||||
{
|
||||
string[] props = Encoder.UrlDecode(encRes).Split('&');
|
||||
|
||||
Resource r = new Resource();
|
||||
r.Name = Encoder.UrlDecode(props[0]);
|
||||
r.Value = Encoder.UrlDecode(props[1]);
|
||||
|
||||
collection.Add(r);
|
||||
}
|
||||
|
||||
return collection;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
/// <param name="culture"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="destinationType"></param>
|
||||
/// <returns></returns>
|
||||
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
|
||||
{
|
||||
if (destinationType == null)
|
||||
throw new ArgumentException("destinationType");
|
||||
ResourceCollection collection = value as ResourceCollection;
|
||||
|
||||
if (collection == null)
|
||||
{
|
||||
return base.ConvertTo(context, culture, value, destinationType);
|
||||
|
||||
}
|
||||
|
||||
if (collection.designMode)
|
||||
{
|
||||
return "(Collection)";
|
||||
}
|
||||
|
||||
ArrayList al = new ArrayList();
|
||||
|
||||
foreach (Resource r in collection)
|
||||
{
|
||||
ArrayList properties = new ArrayList();
|
||||
properties.Add(r.Name);
|
||||
properties.Add(r.Value);
|
||||
|
||||
al.Add(Encoder.UrlEncode(properties));
|
||||
}
|
||||
|
||||
return Encoder.UrlEncode(al);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,39 +1,39 @@
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
namespace DayPilot.Web.Ui
|
||||
{
|
||||
/// <summary>
|
||||
/// Options for the time format.
|
||||
/// </summary>
|
||||
public enum TimeFormat
|
||||
{
|
||||
/// <summary>
|
||||
/// 12-hours time format (e.g. 2 p.m.)
|
||||
/// </summary>
|
||||
Clock12Hours,
|
||||
|
||||
/// <summary>
|
||||
/// 24-hours time format (e.g. 14:00)
|
||||
/// </summary>
|
||||
Clock24Hours
|
||||
}
|
||||
}
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
namespace DayPilot.Web.Ui
|
||||
{
|
||||
/// <summary>
|
||||
/// Options for the time format.
|
||||
/// </summary>
|
||||
public enum TimeFormat
|
||||
{
|
||||
/// <summary>
|
||||
/// 12-hours time format (e.g. 2 p.m.)
|
||||
/// </summary>
|
||||
Clock12Hours,
|
||||
|
||||
/// <summary>
|
||||
/// 24-hours time format (e.g. 14:00)
|
||||
/// </summary>
|
||||
Clock24Hours
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,40 +1,40 @@
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
|
||||
namespace DayPilot.Web.Ui
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for UserActionHandling.
|
||||
/// </summary>
|
||||
public enum UserActionHandling
|
||||
{
|
||||
/// <summary>
|
||||
/// It should run a JavaScript action.
|
||||
/// </summary>
|
||||
JavaScript,
|
||||
|
||||
/// <summary>
|
||||
/// It should call a PostBack.
|
||||
/// </summary>
|
||||
PostBack
|
||||
}
|
||||
}
|
||||
/*
|
||||
Copyright <20> 2005 - 2008 Annpoint, s.r.o.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
NOTE: Reuse requires the following acknowledgement (see also NOTICE):
|
||||
This product includes DayPilot (http://www.daypilot.org) developed by Annpoint, s.r.o.
|
||||
*/
|
||||
|
||||
|
||||
namespace DayPilot.Web.Ui
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for UserActionHandling.
|
||||
/// </summary>
|
||||
public enum UserActionHandling
|
||||
{
|
||||
/// <summary>
|
||||
/// It should run a JavaScript action.
|
||||
/// </summary>
|
||||
JavaScript,
|
||||
|
||||
/// <summary>
|
||||
/// It should call a PostBack.
|
||||
/// </summary>
|
||||
PostBack
|
||||
}
|
||||
}
|
||||
|
||||
18
app.config
18
app.config
@@ -1,10 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
</configSections>
|
||||
<connectionStrings>
|
||||
<add name="DayPilot.Properties.Settings.bookingsConnectionString"
|
||||
connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\bookings.mdf;Integrated Security=True;User Instance=True"
|
||||
providerName="System.Data.SqlClient" />
|
||||
</connectionStrings>
|
||||
</configuration>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
</configSections>
|
||||
<connectionStrings>
|
||||
<add name="DayPilot.Properties.Settings.bookingsConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\bookings.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
|
||||
</connectionStrings>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>
|
||||
|
||||
Reference in New Issue
Block a user