本文整理汇总了C#中Microsoft.Add方法的典型用法代码示例。如果您正苦于以下问题:C# Microsoft.Add方法的具体用法?C# Microsoft.Add怎么用?C# Microsoft.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft
的用法示例。
在下文中一共展示了Microsoft.Add方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddTo
internal bool AddTo(Microsoft.Web.Administration.BindingCollection collection)
{
string bindingInformation = "*:" + _port + ":" + _hostName;
Microsoft.Web.Administration.Binding existingBinding = collection.SingleOrDefault(b => b.BindingInformation.Equals(bindingInformation, StringComparison.InvariantCultureIgnoreCase));
bool changed = false;
if (existingBinding != null)
{
if (existingBinding.Protocol != _protocol)
{
existingBinding.Protocol = _protocol;
changed = true;
}
if (existingBinding.BindingInformation != bindingInformation)
{
existingBinding.BindingInformation = bindingInformation;
changed = true;
}
}
else
{
collection.Add(bindingInformation, _protocol);
changed = true;
}
return changed;
}
示例2: AddLBpaths
public static void AddLBpaths(Microsoft.VisualBasic.Collection data)
{
ContentAPI apiCont = new ContentAPI();
Ektron.Cms.Library.EkLibrary objLib;
int lbICount;
int lbFCount;
Collection lb;
Collection cLbs;
lbICount = 0;
lbFCount = 0;
objLib = apiCont.EkLibraryRef;
cLbs = objLib.GetAllLBPaths("images");
if (cLbs.Count > 0)
{
foreach (Collection tempLoopVar_lb in cLbs)
{
lb = tempLoopVar_lb;
lbICount++;
data.Add(HttpContext.Current.Server.MapPath((string)(lb["LoadBalancePath"])), (string)("LoadBalanceImagePath_" + lbICount), null, null);
}
}
data.Add(lbICount, "LoadBalanceImageCount", null, null);
cLbs = null;
lb = null;
cLbs = objLib.GetAllLBPaths("files");
if (cLbs.Count > 0)
{
foreach (Collection tempLoopVar_lb in cLbs)
{
lb = tempLoopVar_lb;
lbFCount++;
data.Add(HttpContext.Current.Server.MapPath((string)(lb["LoadBalancePath"])), (string)("LoadBalanceFilePath_" + lbFCount), null, null);
}
}
data.Add(lbFCount, "LoadBalanceFileCount", null, null);
cLbs = null;
}
示例3: InitTreeRootNode
/// <summary>
/// ��ʼ��TreeView �� RootNode
/// </summary>
private void InitTreeRootNode(Microsoft.Web.UI.WebControls.TreeNodeCollection TNC)
{
DataView dataView = new DataView();
dataView = dataTbl1.Copy().DefaultView;
dataView.RowFilter = "ClassParentID = ClassID";
foreach(DataRowView drv in dataView)
{
Microsoft.Web.UI.WebControls.TreeNode tn = new Microsoft.Web.UI.WebControls.TreeNode();
tn.ID = drv["ClassID"].ToString();
tn.Text = drv["ClassName"].ToString();
tn.ImageUrl = GetIcon(drv["ClassType"].ToString(),_imagepath);
//tn.NavigateUrl = "# onclick='alert('dddd')'";
//tn.Target = "self";
TNC.Add(tn);
InitChildNodeDataTable(Int32.Parse(tn.ID.ToString()));
InitTreeChildNode(tn.Nodes,tn.ID);
}
dataTbl1 = null;
dataTbl2 = null;
}
示例4: InitTreeChildNode
/// <summary>
/// ��ʼ��TreeView �� ChildNode
/// </summary>
private void InitTreeChildNode(Microsoft.Web.UI.WebControls.TreeNodeCollection TNC, string classParentID)
{
DataView dataView = new DataView();
dataView = dataTbl2.Copy().DefaultView ;
dataView.RowFilter = "ClassParentID = " + classParentID + "";
foreach(DataRowView drv in dataView)
{
Microsoft.Web.UI.WebControls.TreeNode tn = new Microsoft.Web.UI.WebControls.TreeNode();
tn.ID = drv["ClassID"].ToString();
tn.Text = drv["ClassName"].ToString();
tn.ImageUrl = GetIcon(drv["ClassType"].ToString(),_imagepath);
//tn.NavigateUrl = "#";
//tn.Target = "parent";
TNC.Add(tn);
InitTreeChildNode(tn.Nodes,tn.ID);
}
}
示例5: FindFeatureClassByName
private IFeatureClass FindFeatureClassByName(IWorkspace workspace, string name, Microsoft.VisualBasic.Collection colFCByName)
{
IFeatureClass esriFeatureClass = null;
try
{
// try to retrieve FeatureClass in collection
esriFeatureClass = (IFeatureClass)colFCByName[name];
return esriFeatureClass;
}
catch { }
IEnumDataset enumDatasets;
IDataset esriDataset;
IFeatureClassContainer featContainer;
// get datasets
enumDatasets = workspace.get_Datasets(esriDatasetType.esriDTFeatureDataset);
enumDatasets.Reset();
esriDataset = enumDatasets.Next();
while (esriDataset != null)
{
// try to find class in dataset
try
{
featContainer = (IFeatureClassContainer)esriDataset;
// get FeatureClass from current dataset
esriFeatureClass = featContainer.get_ClassByName(name);
if (esriFeatureClass != null)
{
// if exists add to collection and quit
colFCByName.Add(esriFeatureClass, name, null, null);
return esriFeatureClass;
}
}
catch { }
// try another dataset
esriDataset = enumDatasets.Next();
}
try
{
// try to find FeatureClass in workspace
featContainer = (IFeatureClassContainer)workspace;
esriFeatureClass = featContainer.get_ClassByName(name);
if (esriFeatureClass != null)
{
// if exists add to collection and quit
colFCByName.Add(esriFeatureClass, name, null, null);
return esriFeatureClass;
}
}
catch { }
return null;
}
示例6: InitTreeRootNode
/// <summary>
/// ��ʼ��TreeView �� RootNode
/// </summary>
private void InitTreeRootNode(Microsoft.Web.UI.WebControls.TreeNodeCollection TNC)
{
DataView dataView = new DataView();
dataView = dataTbl1.Copy().DefaultView;
dataView.RowFilter = "Super_Position_ID = Position_ID";
foreach (DataRowView drv in dataView)
{
Microsoft.Web.UI.WebControls.TreeNode tn = new Microsoft.Web.UI.WebControls.TreeNode();
tn.ID = drv["Position_ID"].ToString();
tn.Text = "<span onmouseover=javascript:title='" + drv["Position_Description"].ToString() + "'>" + drv["Position_Name"].ToString() + "</span>";
tn.ImageUrl = GetIcon("8");
tn.NavigateUrl = "ListView.aspx?PositionID=" + tn.ID;
tn.Target = "MainFrame";
TNC.Add(tn);
InitChildNodeDataTable(Int32.Parse(tn.ID.ToString()));
InitTreeChildNode(tn.Nodes, tn.ID);
}
dataTbl1 = null;
dataTbl2 = null;
}
示例7: CreateField
protected override SPField CreateField(Microsoft.SharePoint.SPFieldCollection fieldCollection)
{
TaxonomyField field = (TaxonomyField)fieldCollection.CreateNewField(FieldType, Name);
fieldCollection.Add(field);
return fieldCollection[Name];
}
示例8: InitTreeRootNode
/// <summary>
/// ��ʼ��TreeView �� RootNode
/// </summary>
private void InitTreeRootNode(Microsoft.Web.UI.WebControls.TreeNodeCollection TNC)
{
DataView dataView = new DataView();
dataView = dataTbl1.Copy().DefaultView;
// dataView.RowFilter = "ClassParentID = ClassID";
foreach(DataRowView drv in dataView)
{
Microsoft.Web.UI.WebControls.TreeNode tn = new Microsoft.Web.UI.WebControls.TreeNode();
tn.ID = drv["ClassID"].ToString();
tn.Text = "<span onmousemove=javascript:title='"+drv["ClassName"]+"'>"+drv["ClassName"].ToString()+"</span>";
//tn.ImageUrl = GetIcon(drv["ClassType"].ToString());
tn.NavigateUrl = "Switch.aspx?Action=1&ClassID="+drv["ClassID"].ToString();
tn.Target = "MainFrame";
TNC.Add(tn);
InitChildNodeDataTable(Int32.Parse(tn.ID.ToString()));
InitTreeChildNode(tn.Nodes,tn.ID);
}
dataTbl1 = null;
dataTbl2 = null;
}
示例9: InitTreeRootNode
/// <summary>
/// ��ʼ��TreeView �� RootNode
/// </summary>
private void InitTreeRootNode(Microsoft.Web.UI.WebControls.TreeNodeCollection TNC)
{
DataView dataView = new DataView();
dataView = dataTbl1.Copy().DefaultView;
// dataView.RowFilter = "ClassParentID = ClassID";
foreach(DataRowView drv in dataView)
{
Microsoft.Web.UI.WebControls.TreeNode tn = new Microsoft.Web.UI.WebControls.TreeNode();
tn.ID = drv["ClassID"].ToString();
tn.Text = "<span onmousemove=javascript:title='"+drv["ClassName"]+"'>"+drv["ClassName"].ToString()+"</span>";
tn.ImageUrl = GetIcon(drv["ClassType"].ToString());
tn.NavigateUrl = "RightList.aspx?ClassID="+drv["ClassID"].ToString() + "&SrcID=" + SrcID.ToString() + "&DisplayType=" + DisplayType.ToString();
tn.Target = "RightList";
TNC.Add(tn);
InitChildNodeDataTable(Int32.Parse(tn.ID.ToString()));
InitTreeChildNode(tn.Nodes,tn.ID);
}
dataTbl1 = null;
dataTbl2 = null;
Microsoft.Web.UI.WebControls.TreeNode tnn = new Microsoft.Web.UI.WebControls.TreeNode();
tnn.ID = "0";
tnn.Text = "<span onmousemove=javascript:title='ȫ�ֶ���'>ȫ�ֶ���</span>";
tnn.ImageUrl = GetIcon("-1");
tnn.NavigateUrl = "RightList.aspx?ClassID=0&SrcID=" + SrcID.ToString() + "&DisplayType=" + DisplayType.ToString();
tnn.Target = "RightList";
TNC.Add(tnn);
}
示例10: InitTreeChildNode
/// <summary>
/// ��ʼ��TreeView �� ChildNode
/// </summary>
private void InitTreeChildNode(Microsoft.Web.UI.WebControls.TreeNodeCollection TNC, string classParentID)
{
DataView dataView = new DataView();
dataView = dataTbl2.Copy().DefaultView ;
dataView.RowFilter = "ClassParentID = " + classParentID + "";
foreach(DataRowView drv in dataView)
{
Microsoft.Web.UI.WebControls.TreeNode tn = new Microsoft.Web.UI.WebControls.TreeNode();
tn.ID = drv["ClassID"].ToString();
tn.Text = "<span onmousemove=javascript:title='"+drv["ClassName"]+"'>"+drv["ClassName"].ToString()+"</span>";
tn.ImageUrl = GetIcon(drv["ClassType"].ToString());
tn.NavigateUrl = "RightList.aspx?ClassID="+drv["ClassID"].ToString() + "&SrcID=" + SrcID.ToString() + "&DisplayType=" + DisplayType.ToString();
tn.Target = "RightList";
TNC.Add(tn);
InitTreeChildNode(tn.Nodes,tn.ID);
}
}
示例11: SetParameterValue
private void SetParameterValue(string parameterName, Microsoft.Practices.Prism.UriQuery query, double? value)
{
if (value.HasValue)
{
query.Add(parameterName, value.Value.ToString(CultureInfo.InvariantCulture));
}
}