本文整理汇总了C#中Basket.SetAsActive方法的典型用法代码示例。如果您正苦于以下问题:C# Basket.SetAsActive方法的具体用法?C# Basket.SetAsActive怎么用?C# Basket.SetAsActive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Basket
的用法示例。
在下文中一共展示了Basket.SetAsActive方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: createTemplateXML
private string createTemplateXML(IExportDocument docRef, IExportTools exportTools, string tempfolder, string tempName)
{
string templateFolder = tempfolder;
string templateName = tempName.ToString() + ".xml";
string temp = templateFolder + "\\" + templateName;
NTAccount ntAccount = new NTAccount("Everyone");
SecurityIdentifier sid = (SecurityIdentifier)ntAccount.Translate(typeof(SecurityIdentifier));
byte[] sidArray = new byte[sid.BinaryLength];
sid.GetBinaryForm(sidArray, 0);
if (!File.Exists(temp))
{
fileCabinetForm = new DocuwareFileCabinet(docRef, exportTools, temp);
fileCabinetForm.ShowDialog();
}
if (File.Exists(temp))
{
// create the XmlReader object
XmlReaderSettings settings = new XmlReaderSettings();
XmlReader reader = XmlReader.Create(temp.ToString(), settings);
int depth = -1; // tree depth is -1, no indentation
while (reader.Read()) // display each node's content
{
switch (reader.NodeType)
{
case XmlNodeType.Element: // XML Element, display its name
depth++; // increase tab depth
TabOutput(depth); // insert tabs
if (reader.Name == "FileCabinetName")
{
depth++;
reader.Read();
xmlfilecabinetpath = reader.Value;
depth--;
reader.Read();
}
if (reader.Name == "FieldName")
{
depth++;
reader.Read();
xmlfieldname = reader.Value;
fieldnamelist.Add(reader.Value);
getFields(docRef.Children, docRef, xmlfieldname);
depth--;
reader.Read();
}
if (reader.Name == "FieldIndex")
{
depth++;
reader.Read();
xmlfieldindex = reader.Value;
fieldindexlist.Add(Convert.ToUInt32(reader.Value));
depth--;
reader.Read();
openWith.Add(Convert.ToInt32(xmlfieldindex), fieldValue);
}
// if empty element, decrease depth
if (reader.IsEmptyElement)
depth--;
break;
case XmlNodeType.Comment: // XML Comment, display it
TabOutput(depth); // insert tabs
break;
case XmlNodeType.Text: // XML Text, display it
TabOutput(depth); // insert tabs
break;
// XML XMLDeclaration, display it
case XmlNodeType.XmlDeclaration:
TabOutput(depth); // insert tabs
break;
case XmlNodeType.EndElement: // XML EndElement, display it
TabOutput(depth); // insert tabs
depth--; // decrement depth
break;
} // end switch
} // end while
//------------------- DocuWare -------------------
string fullimportimagepath = exportImages(docRef, exportTools, templateFolder);
UpdateLogFile("Full path of current working image: "+fullimportimagepath);
//select filecabinet
filecabinet = new FileCabinet(session, xmlfilecabinetpath);
UpdateLogFile(filecabinet.FileCabinetPath);
filecabinet.Open();
abasket = new ActiveBasket(session);
// open basket
basket = session.GetActiveBasket();
basket = new Basket(session, abasket.BasketPath);
UpdateLogFile("Active Basket Path: " + abasket.BasketPath);
basket = new ActiveBasket(session);
basket.Open();
basket.SetAsActive();
//.........这里部分代码省略.........