📄 mainwebform new.aspx.cs
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Drawing;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
using SuperMap.IS.Utility;
using SuperMap.IS.Web;
using SuperMap.IS.WebControls;
using SuperMap.IS.ServiceInterface;
public partial class MainWebForm : System.Web.UI.Page
{
#region 属性
public int QueryCount;
public double CurMapScale;
QueryStationInfo qsi = new QueryStationInfo();
GetMapCoordsRange getMapCoorsRange = new GetMapCoordsRange();
/// <summary>
/// 记录是第几次访问
/// </summary>
private int PostBackCount
{
set
{
RemovePreDay(Global.PostBackCount);
if(PageTimeHidden.Value =="")
SetPageTime();
if (!Global.PostBackCount.Contains(PageTimeHidden.Value))
{
Global.PostBackCount.Add(PageTimeHidden.Value, value);
}
else
Global.PostBackCount[PageTimeHidden.Value] = value;
}
get
{
string pageTime = PageTimeHidden.Value;
if (pageTime == "")
return 0;
if (!Global.PostBackCount.ContainsKey(pageTime))
return 0;
return (int)Global.PostBackCount[pageTime];
}
}
/// <summary>
/// 当前台站查询结果
/// </summary>
private DataSet TZResult
{
set
{
RemovePreDay(Global.TZHashtable);
if (PageTimeHidden.Value == "")
SetPageTime();
if (!Global.TZHashtable.Contains(PageTimeHidden.Value))
{
Global.TZHashtable.Add(PageTimeHidden.Value, value);
}
else
Global.TZHashtable[PageTimeHidden.Value] = value;
}
get
{
string pageTime = PageTimeHidden.Value;
if (pageTime == "")
return null;
if (!Global.TZHashtable.ContainsKey(pageTime))
return null;
return (DataSet)Global.TZHashtable[pageTime];
}
}
/// <summary>
/// 当前画在地图上的台站集合
/// </summary>
private ArrayList CurTZList
{
set
{
RemovePreDay(Global.CurTZList);
if(PageTimeHidden.Value =="")
SetPageTime();
if (!Global.CurTZList.Contains(PageTimeHidden.Value))
{
Global.CurTZList.Add(PageTimeHidden.Value, value);
}
else
Global.CurTZList[PageTimeHidden.Value] = value;
}
get
{
string pageTime = PageTimeHidden.Value;
if (pageTime == "")
return null;
if (!Global.CurTZList.ContainsKey(pageTime))
return null;
return (ArrayList)Global.CurTZList[pageTime];
}
}
/// <summary>
/// 记录当前地图上画链路的台站集合(主要用在地图打印)
/// </summary>
private ArrayList CurLLMapCoordList
{
set
{
RemovePreDay(Global.CurTZLLList);
if (PageTimeHidden.Value == "")
SetPageTime();
if (!Global.CurTZLLList .Contains(PageTimeHidden.Value))
{
Global.CurTZLLList.Add(PageTimeHidden.Value, value);
}
else
Global.CurTZLLList[PageTimeHidden.Value] = value;
}
get
{
string pageTime = PageTimeHidden.Value;
if (pageTime == "")
return null;
if (!Global.CurTZLLList.ContainsKey(pageTime))
return null;
return (ArrayList)Global.CurTZLLList[pageTime];
}
}
/// <summary>
/// 记录当前地图方位角信息(包括方位角的两个台站和之间的关系)(主要用在地图打印)
/// </summary>
private ArrayList CurFWJList
{
set
{
RemovePreDay(Global.CurTZFWJList);
if (PageTimeHidden.Value == "")
SetPageTime();
if (!Global.CurTZFWJList.Contains(PageTimeHidden.Value))
{
Global.CurTZFWJList.Add(PageTimeHidden.Value, value);
}
else
Global.CurTZFWJList[PageTimeHidden.Value] = value;
}
get
{
string pageTime = PageTimeHidden.Value;
if (pageTime == "")
return null;
if (!Global.CurTZFWJList .ContainsKey(pageTime))
return null;
return (ArrayList)Global.CurTZFWJList[pageTime];
}
}
///// <summary>
///// 把当前地图按照一定比例进行放大
///// </summary>
//private float CurScale
//{
// set
// {
// Session["CurScale"] = value;
// }
// get
// {
// if (Session["CurScale"] == null)
// return 0;
// return (float)Session["CurScale"];
// }
//}
/// <summary>
/// 地图 当前显示的矩形
/// </summary>
private MapRect MapCurRect
{
set
{
RemovePreDay(Global.CurMapRect);
if (PageTimeHidden.Value == "")
SetPageTime();
if (!Global.CurMapRect .Contains(PageTimeHidden.Value))
{
Global.CurMapRect.Add(PageTimeHidden.Value, value);
}
else
Global.CurMapRect[PageTimeHidden.Value] = value;
}
get
{
string pageTime = PageTimeHidden.Value;
if (pageTime == "")
return null;
if (!Global.CurMapRect.ContainsKey(pageTime))
return null;
return (MapRect)Global.CurMapRect[pageTime];
}
}
/// <summary>
/// 地图查询的类型
/// </summary>
private string QueryMapType
{
set
{
RemovePreDay(Global.CurQueryMapType);
if (PageTimeHidden.Value == "")
SetPageTime();
if (!Global.CurQueryMapType.Contains(PageTimeHidden.Value))
{
Global.CurQueryMapType.Add(PageTimeHidden.Value, value);
}
else
Global.CurQueryMapType[PageTimeHidden.Value] = value;
}
}
/// <summary>
/// 地图查询的两点坐标
/// </summary>
private MapCoord[] MapQueryMapCoords
{
set
{
RemovePreDay(Global.CurQueryMapCoords);
if (PageTimeHidden.Value == "")
SetPageTime();
if (!Global.CurQueryMapCoords .Contains(PageTimeHidden.Value))
{
Global.CurQueryMapCoords.Add(PageTimeHidden.Value, value);
}
else
Global.CurQueryMapCoords[PageTimeHidden.Value] = value;
}
}
#region 地图打印
/// <summary>
/// 当前地图的宽度
/// </summary>
private int MapControlWidth
{
set
{
RemovePreDay(Global.CurMapWidth);
if (PageTimeHidden.Value == "")
SetPageTime();
if (!Global.CurMapWidth.Contains(PageTimeHidden.Value))
{
Global.CurMapWidth.Add(PageTimeHidden.Value, value);
}
else
Global.CurMapWidth[PageTimeHidden.Value] = value;
}
get
{
string pageTime = PageTimeHidden.Value;
if (pageTime == "")
return 0;
if (!Global.CurMapWidth.ContainsKey(pageTime))
return 0;
return (int)Global.CurMapWidth[pageTime];
}
}
/// <summary>
/// 当前地图的高度
/// </summary>
private int MapControlHeight
{
set
{
RemovePreDay(Global.CurMapHeight);
if (PageTimeHidden.Value == "")
SetPageTime();
if (!Global.CurMapHeight .Contains(PageTimeHidden.Value))
{
Global.CurMapHeight.Add(PageTimeHidden.Value, value);
}
else
Global.CurMapHeight[PageTimeHidden.Value] = value;
}
get
{
string pageTime = PageTimeHidden.Value;
if (pageTime == "")
return 0;
if (!Global.CurMapHeight.ContainsKey(pageTime))
return 0;
return (int)Global.CurMapHeight[pageTime];
}
}
#endregion
#region 图层控制
/// <summary>
/// 保存图层的显示/隐藏序列(存储顺序是地图控件中的图层顺序一致)
/// </summary>
private DataTable LayerConfigTalbe
{
set
{
RemovePreDay(Global.CurMapLayerConfig);
if (PageTimeHidden.Value == "")
SetPageTime();
if (!Global.CurMapLayerConfig .Contains(PageTimeHidden.Value))
{
Global.CurMapLayerConfig.Add(PageTimeHidden.Value, value);
}
else
Global.CurMapLayerConfig[PageTimeHidden.Value] = value;
}
get
{
string pageTime = PageTimeHidden.Value;
if (pageTime == "")
return StaticClass.CreateLayerTable(); ;
if (!Global.CurMapLayerConfig.ContainsKey(pageTime))
return StaticClass.CreateLayerTable(); ;
return (DataTable)Global.CurMapLayerConfig[pageTime];
}
}
/// <summary>
/// 当前图层显示/隐藏序列(存储顺序是地图控件中的图层顺序一致)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -