2010年8月10日_周二_TaskManagercontrol

/*****************************************************************************/

//TaskManager control

//2010年8月10日

/****************************************************************************/

The TaskManager control is designed to organize tasks in a Web application.   The TaskManager control generates hierarchical(按照等级划分的)XML data that can be used by an ASP.NET navigation control such as a Menu or TreeView.  At runtime, nodes in the ASP.NET Menu or TreeView can be used to display the floating panel for a task.  It is only visible at design-time. 
TaskManager控件被设计为组织Web应用程序中的任务。TaskManager控件可以生成分等级的XML数据,这些数据可以被一个ASP.NET导航控件使用,比如:菜单、或者treeView控件,运行状态下,在ASP.NET菜单和treeView中的节点可以被显示用于任务的浮动面板。TaskManager控件仅仅在设计视图下是可见的。
Assembly: ESRI.ArcGIS.ADF.Web.UI.WebControls.dll
Class: ESRI.ArcGIS.ADF.Web.UI.WebControls.TaskManager

Using the TaskManager control

Add the control to the page
Open or create a Web site within Visual Studio.NET.   Open a Web form in design mode, select the Toolbox, and expand the ArcGIS Web Controls tab.  Drag and drop a TaskManager control on the Web form.  You should see the following in Visual Studio.NET:
使用TaskManager控件

向页面中添加控件

在VS.NET中打开或者创建一个web站点。在设计视图下打开一个web表格,选择Toolbox并展开ArcGIS Web controls页签.拖放一个TaskManager控件到那个web表单。在VS里面你应该看到如下的界面。

Add an ASP.NET Navigation control
添加一个ASP.NET导航控件
In the Toolbox, expand the Navigation tab.  A set of ASP.NET navigation controls are provided to traverse content in a Web application.  The SiteMapPath is explicitly designed to navigate pages in an application.  The Menu and TreeView controls can bind to hierarchical XML data to initiate actions, such as display a dialog or navigate to another page.  The TaskManager control generates hierarchical XML data at runtime, which can be used by both controls.  In this example, a Menu control is used. 

在Toolbox中,展开导航的Tab。一系列的ASP.NET导航控件被提供,这些控件实现了在一个web应用程序中不同内容之间的跳转。SiteMapPath 控件被明确的设计为在一个应用程序中为页面导航。Menu和treeView控件可以和结构分级的XML数据绑定,一次来初始化动作,比如:弹出一个对话框或者指向另外一个页面。TaskManager控件在运行状态下生成结构分级的XML数据,menu和treeview控件都可以使用这种数据。在这个例子中,一次菜单控件被使用

Buddy the TaskManager control to the ASP.NET Navigation control
将TaskManager控件和ASP.NET控件绑定
At runtime, the XML data generated by the TaskManager needs to bind to the Navigation control.  To do this, set the BuddyControl property on the TaskManager.  
在运行状态下,有TaskManager控件生成的MXL数据可以绑定到导航控件,为了实现这个功能,设置TaskManager控件的BuddyControl属性

Add one or more task controls to the TaskManager

添加一个多个task 控件到TaskManager控件。
In the Toolbox, select any out-of-the-box or custom task controls and drag and drop them on the TaskManager.  In most situations, you will want to set the visibility of the task to false so it does not display when the page first loads, and define a menu item title for the task in the menu.  The task is displayed at runtime when a user clicks on the title in the menu.   To do this, set the Visible property to False and enter a string in the Title property.   You will probably have other controls on the page to work with your task, such as a Map control and TaskResults control.  At this point, you will probably proceed(前进、进行) with setting up the task control to work with other controls.  See the task control topics for additional information on configuring specific tasks.

在工具箱中,选择任何的out-of-the-box控件或者自定义控件然后将他们拖动到TaskManager。在多数的情况下,你可能会将task控件的可见性设置为false,这样在页面第一次加载的时候就不会看见了。定义在菜单里面定义一个menu item 的title属性为任务。 当用户单击菜单中的title项的时候,这个任务就会出现。 为来实现这个操作,设置Visible属性为false,在Title属性里面输入一个字符串。你也可以使用页面中其他的控件来和你的任务一起工作,比如:地图控件taskResults控件。这里,你可能大概继续前进设置task控件和其他的控件一起工作。更多的信息查看配置特殊任务里面的taks控件话题。

Use the Menu at runtime to display a task
使用菜单在运行的时候展示一个任务框
Click on the Menu item for a task to display the task dialog.  At this point, the task is ready for use.  See the task control discussions for runtime usage.  
单击菜单中的任务菜单,弹出一个任务对话框。这一点,任务已经可以使用了。

Members

Properties

  The following table provides a list of properties of interest.  For complete reference information, see the TaskManager control in the library reference section.

Property Name

 Type

Description

BuddyControl

string

The ID of the control that will display the list of tasks on the page.

NavigationPathSeparator

char

The separator between items in the path for values in the NavigationPath for tasks. Default is forward slash (/).

原文地址:https://www.cnblogs.com/xingchen/p/1797054.html