📄 selecteddatescollection.cs
字号:
using System;
using System.Collections;
namespace System.Web.UI.WebControls
{
/// <summary>
/// Summary description for SelectedDatesCollection.
/// </summary>
public sealed class SelectedDatesCollection : IEnumerable,ICollection
{
private System.Collections.ArrayList dateList;
public SelectedDatesCollection(ArrayList dateList) : base()
{
this.dateList = dateList;
}
public void Add(DateTime date)
{
// int local0;
//
// if (!(this.FindIndex(date.Date, ref local0)))
// this.dateList.Insert(local0, date.Date);
}
public void Clear()
{
this.dateList.Clear();
}
public bool Contains(DateTime date)
{
throw new Exception("");
// int local0;
// return this.FindIndex(date.Date,ref local0);
}
public void CopyTo(Array array, int index)
{
IEnumerator local0;
local0 = this.GetEnumerator();
while (local0.MoveNext())
{
index = index + 1;
array.SetValue(local0.Current, index);
}
}
private bool FindIndex(DateTime date, ref int index)
{
int local0;
int local1;
int local2;
local0 = this.Count;
local1 = 0;
local2 = local0;
while (local1 < local2)
{
// <{ class ILEngineer::Ops::MSIL::StoreIndirect<8> }>;
if (date== this[index])
return true;
if (date < this[index])
{
local2 = index;
continue;
}
local1 = index + 1;
}
//<{ class ILEngineer::Ops::MSIL::StoreIndirect<8> }>;
return false;
}
public IEnumerator GetEnumerator()
{
return this.dateList.GetEnumerator();
}
public void Remove(DateTime date)
{
// int local0;
//
// if (this.FindIndex(date.Date, ref local0))
// this.dateList.RemoveAt(local0);
throw new Exception("");
}
public void SelectRange(DateTime fromDate, DateTime toDate)
{
DateTime local0;
this.dateList.Clear();
if (fromDate<= toDate)
{
local0 = fromDate.Date;
while (local0<= toDate.Date)
{
this.dateList.Add(local0);
local0 = local0.AddDays(1);
}
}
}
public int Count
{
get
{
return this.dateList.Count;
}
}
public bool IsReadOnly
{
get
{
return false;
}
}
public bool IsSynchronized
{
get
{
return false;
}
}
public DateTime this[int index]
{
get
{
return (DateTime) this.dateList[index];
}
}
public object SyncRoot
{
get
{
return this;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -