本文整理汇总了C#中Microsoft.VisualBasic.Collection类的典型用法代码示例。如果您正苦于以下问题:C# Collection类的具体用法?C# Collection怎么用?C# Collection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Collection类属于Microsoft.VisualBasic命名空间,在下文中一共展示了Collection类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Start
public override void Start()
{
try
{
if (base.m_ItemsSelecteds.Count > 0)
{
using (ISession Sesion = m_SessionFactory.OpenSession())
{
Collection ObjectsFlow = new Collection();
foreach (String ID in base.m_ItemsSelecteds)
{
Parent Entity = (Parent)Sesion.Get(base.m_EntidadSF.NombreClase, ID);
Entity.NewInstance = false;
ObjectsFlow.Add(Entity);
}
base.m_ObjectFlow = ObjectsFlow;
base.m_ResultProcess = EnumResult.SUCESS;
}
}
}
catch (Exception ex)
{
base.m_ResultProcess = EnumResult.ERROR;
SoftException.Control(ex);
}
base.Start();
}
开发者ID:eldersontc,项目名称:soft-erp,代码行数:27,代码来源:RecoveryCollection.cs
示例2: Load
public void Load(Collection[,] StaticMap, string iFilename)
{
XmlDocument xmlDocument = new XmlDocument();
try
{
xmlDocument.Load(iFilename);
XmlElement xmlElement1 = (XmlElement) xmlDocument.SelectSingleNode("//Static_Tiles");
try
{
foreach (XmlElement xmlElement2 in xmlElement1.SelectNodes("Tile"))
{
short iTileID = XmlConvert.ToInt16(xmlElement2.GetAttribute("TileID"));
short num1 = XmlConvert.ToInt16(xmlElement2.GetAttribute("X"));
short num2 = XmlConvert.ToInt16(xmlElement2.GetAttribute("Y"));
short iZ = XmlConvert.ToInt16(xmlElement2.GetAttribute("Z"));
short iHue = XmlConvert.ToInt16(xmlElement2.GetAttribute("Hue"));
StaticCell staticCell = new StaticCell(iTileID, checked ((byte) unchecked ((int) num1 % 8)), checked ((byte) unchecked ((int) num2 % 8)), iZ, iHue);
StaticMap[(int) (short) ((int) num1 >> 3), (int) (short) ((int) num2 >> 3)].Add((object) staticCell, (string) null, (object) null, (object) null);
}
}
finally
{
IEnumerator enumerator;
if (enumerator is IDisposable)
((IDisposable) enumerator).Dispose();
}
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
int num = (int) Interaction.MsgBox((object) ("Can not find:" + iFilename), MsgBoxStyle.OKOnly, (object) null);
ProjectData.ClearProjectError();
}
}
开发者ID:HankTheDrunk,项目名称:ultimaonlinemapcreator,代码行数:34,代码来源:ImportTiles.cs
示例3: Fleet
public Fleet(byte[] Data)
{
this.xShips = new Collection();
this.Waypoints = new Collection();
this.WaypointTasks = new Collection();
this.IncompleteInfo = true;
this.FleetData = Data;
}
开发者ID:runholen,项目名称:stars,代码行数:8,代码来源:Fleet.cs
示例4: ImportTiles
public ImportTiles(Collection[,] StaticMap, string iPath)
{
iPath = iPath + "\\Import Files\\";
if (!Directory.Exists(iPath))
{
int num = (int) Interaction.MsgBox((object) "No Import Tiles directory was found.", MsgBoxStyle.OKOnly, (object) null);
}
else
this.ProcessDirectory(StaticMap, iPath);
}
开发者ID:HankTheDrunk,项目名称:ultimaonlinemapcreator,代码行数:10,代码来源:ImportTiles.cs
示例5: Load
public long Load(string Filename)
{
long num2;
this.xPlanets = new Collection();
Decryptor decryptor = new Decryptor();
int num4 = Strings.InStrRev(Filename, ".m", -1, CompareMethod.Text);
if (num4 > 0)
{
this.PlayerNo = Conversions.ToInteger(Filename.Substring(num4 + 1));
Filename = Filename.Substring(0, num4 - 1);
}
else
{
Interaction.MsgBox("A valid .m file must be entered", MsgBoxStyle.ApplicationModal, null);
return num2;
}
this.xyFile = decryptor.OpenFile(Filename + ".xy");
this.xPlayerCount = this.xyFile[0x1c];
this.xPlanetCount = this.xyFile[30] + (this.xyFile[0x1f] * 0x100);
this.xGameName = "";
int index = 0x34;
do
{
if (this.xyFile[index] == 0)
{
break;
}
this.xGameName = this.xGameName + Conversions.ToString(Strings.Chr(this.xyFile[index]));
index++;
}
while (index <= 0x53);
int x = 0x3e8;
int num9 = this.PlanetCount - 1;
for (int i = 0; i <= num9; i++)
{
Planet item = new Planet(i);
item.X = (this.xyFile[(0x54 + (i * 4)) + 0] + ((this.xyFile[(0x54 + (i * 4)) + 1] & 3) * 0x100)) + x;
x = item.X;
item.Y = (int) Math.Round((double) (Conversion.Int((double) (((double) this.xyFile[(0x54 + (i * 4)) + 1]) / 4.0)) + ((this.xyFile[(0x54 + (i * 4)) + 2] & 0x3f) * 0x40)));
item.NameID = (int) Math.Round((double) (Conversion.Int((double) (((double) this.xyFile[(0x54 + (i * 4)) + 2]) / 64.0)) + (this.xyFile[(0x54 + (i * 4)) + 3] * 4)));
this.Planets().Add(item, "ID" + Conversions.ToString(i), null, null);
}
this.mFile = decryptor.OpenFile(Filename + ".m" + Conversions.ToString(this.PlayerNo));
this.hstLoaded = true;
int hstPosition = 0;
do
{
int num7;
int num8;
byte[] data = new byte[0x401];
this.ReadBlock(this.mFile, ref hstPosition, ref data, ref num8, ref num7);
}
while (hstPosition != this.mFile.Length);
return num2;
}
开发者ID:stars-4x,项目名称:decompiled,代码行数:55,代码来源:StarsPlayerEditor.cs
示例6: ImportTiles
public ImportTiles(Collection[,] StaticMap, string iPath)
{
iPath = string.Concat(iPath, "\\Import Files\\");
if (Directory.Exists(iPath))
{
this.ProcessDirectory(StaticMap, iPath);
}
else
{
Interaction.MsgBox("No Import Tiles directory was found.", MsgBoxStyle.OKOnly, null);
}
}
开发者ID:HankTheDrunk,项目名称:ultimaonlinemapcreator,代码行数:12,代码来源:ImportTiles.cs
示例7: DatabasesToIgnore
/// <summary>
///
/// <remarks></remarks>
/// </summary>
/// <returns></returns>
public static IEnumerable<String> DatabasesToIgnore()
{
Collection<String> dbNames = new Collection<String>();
dbNames.Add("ReportServer");
dbNames.Add("ReportServerTempDB");
dbNames.Add("master");
dbNames.Add("msdb");
dbNames.Add("model");
dbNames.Add("tempdb");
return dbNames;
}
开发者ID:rexwhitten,项目名称:MGenerator,代码行数:18,代码来源:Generator.cs
示例8: ProcessDirectory
public void ProcessDirectory(Collection[,] StaticMap, string targetDirectory)
{
string[] files = Directory.GetFiles(targetDirectory, "*.xml");
for (int i = 0; i < (int)files.Length; i++)
{
this.Load(StaticMap, files[i]);
}
string[] directories = Directory.GetDirectories(targetDirectory);
for (int j = 0; j < (int)directories.Length; j++)
{
this.ProcessDirectory(StaticMap, directories[j]);
}
}
开发者ID:HankTheDrunk,项目名称:ultimaonlinemapcreator,代码行数:13,代码来源:ImportTiles.cs
示例9: AddAfterNoKey
public void AddAfterNoKey()
{
Collection c;
c = new Collection ();
c.Add (typeof (int), null, null, 0);
c.Add (typeof (double), null, null, 1);
c.Add (typeof (string), null, null, 1);
c.Add (typeof (object), null, null, 3);
Assert.AreEqual (4, c.Count, "#AANK01");
Assert.AreEqual (typeof (object), c[4], "#AANK02");
Assert.AreEqual (typeof (int), c[1], "#AANK03");
Assert.AreEqual (typeof (string), c[2], "#AANK04");
}
开发者ID:h-endo12345,项目名称:mono-basic,代码行数:16,代码来源:CollectionTests.cs
示例10: RandomStatics
public RandomStatics(string iFileName)
{
this.m_Random = new Collection();
XmlDocument xmlDocument = new XmlDocument();
try
{
string filename = string.Format("{0}Data\\Statics\\{1}", AppDomain.CurrentDomain.BaseDirectory, iFileName);
xmlDocument.Load(filename);
XmlElement xmlElement = (XmlElement)xmlDocument.SelectSingleNode("//RandomStatics");
this.m_Freq = (int)XmlConvert.ToInt16(xmlElement.GetAttribute("Chance"));
IEnumerator enumerator = xmlElement.SelectNodes("Statics").GetEnumerator();
try
{
while (enumerator.MoveNext())
{
XmlElement xmlInfo = (XmlElement)enumerator.Current;
RandomStaticCollection randomStaticCollection = new RandomStaticCollection(xmlInfo);
this.InnerList.Add(randomStaticCollection);
if (randomStaticCollection.Freq > 0)
{
byte arg_AC_0 = 1;
byte b = checked((byte)randomStaticCollection.Freq);
for (byte b2 = arg_AC_0; b2 <= b; b2 += 1)
{
this.m_Random.Add(randomStaticCollection, null, null, null);
}
}
}
}
finally
{
if (enumerator is IDisposable)
{
((IDisposable)enumerator).Dispose();
}
}
}
catch (Exception expr_F8)
{
ProjectData.SetProjectError(expr_F8);
Interaction.MsgBox("Can not find:" + iFileName, MsgBoxStyle.OkOnly, null);
ProjectData.ClearProjectError();
}
}
开发者ID:HankTheDrunk,项目名称:ultimaonlinemapcreator,代码行数:46,代码来源:RandomStatics.cs
示例11: AddAfterKey
public void AddAfterKey()
{
Collection c;
c = new Collection ();
c.Add ("Baseball", "Base", null, 0);
c.Add ("Football", "Foot", null, 1);
c.Add ("Basketball", "Basket", null, 1);
c.Add ("Volleyball", "Volley", null, 2);
Assert.AreEqual (4, c.Count, "#AAK01");
Assert.AreEqual ("Baseball", c[1], "#AAK02");
Assert.AreEqual ("Football", c[4], "#AAK03");
Assert.AreEqual ("Basketball", c["Basket"], "#AAK04");
Assert.AreEqual ("Volleyball", c["Volley"], "#AAK05");
}
开发者ID:h-endo12345,项目名称:mono-basic,代码行数:17,代码来源:CollectionTests.cs
示例12: ContractGenerator
/// <summary>
/// Initializes a new instance of the <see cref="T:ProxyGenerator"/> class.
/// </summary>
/// <param name="options">The options.</param>
public ContractGenerator(ContractGenerationOptions options)
{
if (!string.IsNullOrEmpty(options.OutputConfigurationFile))
{
System.Configuration.Configuration machineConfiguration = ConfigurationManager.OpenMachineConfiguration();
ExeConfigurationFileMap configurationMap = new ExeConfigurationFileMap();
configurationMap.ExeConfigFilename = options.OutputConfigurationFile;
configurationMap.MachineConfigFilename = machineConfiguration.FilePath;
this.configuration = ConfigurationManager.OpenMappedExeConfiguration(configurationMap, ConfigurationUserLevel.None);
}
else if (options.OutputConfiguration != null)
{
this.configuration = options.OutputConfiguration;
}
this.codeCompileUnit = new CodeCompileUnit();
this.options = options;
this.generatedChannelElements = new Collection<ChannelEndpointElement>();
}
开发者ID:Phidiax,项目名称:open-wssf-2015,代码行数:23,代码来源:ContractGenerator.cs
示例13: ProcessDirectory
public void ProcessDirectory(Collection[,] StaticMap, string targetDirectory)
{
string[] files = Directory.GetFiles(targetDirectory, "*.xml");
int index1 = 0;
while (index1 < files.Length)
{
string iFilename = files[index1];
this.Load(StaticMap, iFilename);
checked { ++index1; }
}
string[] directories = Directory.GetDirectories(targetDirectory);
int index2 = 0;
while (index2 < directories.Length)
{
string targetDirectory1 = directories[index2];
this.ProcessDirectory(StaticMap, targetDirectory1);
checked { ++index2; }
}
}
开发者ID:HankTheDrunk,项目名称:ultimaonlinemapcreator,代码行数:19,代码来源:ImportTiles.cs
示例14: RandomStatics
public RandomStatics(string iFileName)
{
IEnumerator enumerator = null;
this.m_Random = new Collection();
XmlDocument xmlDocument = new XmlDocument();
try
{
string str = string.Format("{0}Data\\Statics\\{1}", AppDomain.CurrentDomain.BaseDirectory, iFileName);
xmlDocument.Load(str);
XmlElement xmlElement = (XmlElement)xmlDocument.SelectSingleNode("//RandomStatics");
this.m_Freq = XmlConvert.ToInt16(xmlElement.GetAttribute("Chance"));
try
{
enumerator = xmlElement.SelectNodes("Statics").GetEnumerator();
while (enumerator.MoveNext())
{
RandomStaticCollection randomStaticCollection = new RandomStaticCollection((XmlElement)enumerator.Current);
this.InnerList.Add(randomStaticCollection);
if (randomStaticCollection.Freq > 0)
{
byte freq = checked((byte)randomStaticCollection.Freq);
for (byte i = 1; i <= freq; i = checked((byte)(i + 1)))
{
this.m_Random.Add(randomStaticCollection, null, null, null);
}
}
}
}
finally
{
if (enumerator is IDisposable)
{
((IDisposable)enumerator).Dispose();
}
}
}
catch (Exception exception)
{
ProjectData.SetProjectError(exception);
Interaction.MsgBox(string.Concat("Can not find:", iFileName), MsgBoxStyle.OKOnly, null);
ProjectData.ClearProjectError();
}
}
开发者ID:HankTheDrunk,项目名称:ultimaonlinemapcreator,代码行数:43,代码来源:RandomStatics.cs
示例15: ProcessDirectory
public void ProcessDirectory(Collection[,] StaticMap, string targetDirectory)
{
string[] files = Directory.GetFiles(targetDirectory, "*.xml");
string[] array = files;
checked
{
for (int i = 0; i < array.Length; i++)
{
string iFilename = array[i];
this.Load(StaticMap, iFilename);
}
string[] directories = Directory.GetDirectories(targetDirectory);
string[] array2 = directories;
for (int j = 0; j < array2.Length; j++)
{
string targetDirectory2 = array2[j];
this.ProcessDirectory(StaticMap, targetDirectory2);
}
}
}
开发者ID:HankTheDrunk,项目名称:ultimaonlinemapcreator,代码行数:20,代码来源:ImportTiles.cs
示例16: Adjust
public void Adjust(Collection.Node Node, AdjustIndexType Type)
{
if ((Node != null) && !this.mDisposed)
{
switch (Type)
{
case AdjustIndexType.Insert:
if ((this.mCurrent != null) && (Node == this.mCurrent.m_Next))
{
this.mNext = Node;
}
break;
case AdjustIndexType.Remove:
if ((Node != this.mCurrent) && (Node == this.mNext))
{
this.mNext = this.mNext.m_Next;
}
break;
}
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:22,代码来源:ForEachEnum.cs
示例17: RandomStatics
public RandomStatics(string iFileName)
{
this.m_Random = new Collection();
XmlDocument xmlDocument = new XmlDocument();
try
{
string filename = string.Format("{0}Data\\Statics\\{1}", (object) AppDomain.CurrentDomain.BaseDirectory, (object) iFileName);
xmlDocument.Load(filename);
XmlElement xmlElement = (XmlElement) xmlDocument.SelectSingleNode("//RandomStatics");
this.m_Freq = (int) XmlConvert.ToInt16(xmlElement.GetAttribute("Chance"));
try
{
foreach (XmlElement xmlInfo in xmlElement.SelectNodes("Statics"))
{
RandomStaticCollection staticCollection = new RandomStaticCollection(xmlInfo);
this.InnerList.Add((object) staticCollection);
if (staticCollection.Freq > 0)
{
int num1 = 1;
byte num2 = checked ((byte) staticCollection.Freq);
for (byte index = (byte) num1; (int) index <= (int) num2; ++index)
this.m_Random.Add((object) staticCollection, (string) null, (object) null, (object) null);
}
}
}
finally
{
IEnumerator enumerator;
if (enumerator is IDisposable)
((IDisposable) enumerator).Dispose();
}
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
int num = (int) Interaction.MsgBox((object) ("Can not find:" + iFileName), MsgBoxStyle.OKOnly, (object) null);
ProjectData.ClearProjectError();
}
}
开发者ID:HankTheDrunk,项目名称:ultimaonlinemapcreator,代码行数:39,代码来源:RandomStatics.cs
示例18: Load
public void Load(Collection[,] StaticMap, string iFilename)
{
XmlDocument xmlDocument = new XmlDocument();
try
{
xmlDocument.Load(iFilename);
XmlElement xmlElement = (XmlElement)xmlDocument.SelectSingleNode("//Static_Tiles");
IEnumerator enumerator = xmlElement.SelectNodes("Tile").GetEnumerator();
try
{
while (enumerator.MoveNext())
{
XmlElement xmlElement2 = (XmlElement)enumerator.Current;
short iTileID = XmlConvert.ToInt16(xmlElement2.GetAttribute("TileID"));
short num = XmlConvert.ToInt16(xmlElement2.GetAttribute("X"));
short num2 = XmlConvert.ToInt16(xmlElement2.GetAttribute("Y"));
short iZ = XmlConvert.ToInt16(xmlElement2.GetAttribute("Z"));
short iHue = XmlConvert.ToInt16(xmlElement2.GetAttribute("Hue"));
StaticCell item = checked(new StaticCell(iTileID, (byte)(num % 8), (byte)(num2 % 8), iZ, iHue));
StaticMap[(int)((short)(num >> 3)), (int)((short)(num2 >> 3))].Add(item, null, null, null);
}
}
finally
{
if (enumerator is IDisposable)
{
((IDisposable)enumerator).Dispose();
}
}
}
catch (Exception expr_FB)
{
ProjectData.SetProjectError(expr_FB);
Interaction.MsgBox("Can not find:" + iFilename, MsgBoxStyle.OkOnly, null);
ProjectData.ClearProjectError();
}
}
开发者ID:HankTheDrunk,项目名称:ultimaonlinemapcreator,代码行数:39,代码来源:ImportTiles.cs
示例19: Load
public void Load(Collection[,] StaticMap, string iFilename)
{
IEnumerator enumerator = null;
XmlDocument xmlDocument = new XmlDocument();
try
{
xmlDocument.Load(iFilename);
XmlElement xmlElement = (XmlElement)xmlDocument.SelectSingleNode("//Static_Tiles");
try
{
enumerator = xmlElement.SelectNodes("Tile").GetEnumerator();
while (enumerator.MoveNext())
{
XmlElement current = (XmlElement)enumerator.Current;
short num = XmlConvert.ToInt16(current.GetAttribute("TileID"));
short num1 = XmlConvert.ToInt16(current.GetAttribute("X"));
short num2 = XmlConvert.ToInt16(current.GetAttribute("Y"));
short num3 = XmlConvert.ToInt16(current.GetAttribute("Z"));
short num4 = XmlConvert.ToInt16(current.GetAttribute("Hue"));
StaticCell staticCell = new StaticCell(num, checked((byte)(num1 % 8)), checked((byte)(num2 % 8)), num3, num4);
StaticMap[(short)(num1 >> 3), (short)(num2 >> 3)].Add(staticCell, null, null, null);
}
}
finally
{
if (enumerator is IDisposable)
{
((IDisposable)enumerator).Dispose();
}
}
}
catch (Exception exception)
{
ProjectData.SetProjectError(exception);
Interaction.MsgBox(string.Concat("Can not find:", iFilename), MsgBoxStyle.OKOnly, null);
ProjectData.ClearProjectError();
}
}
开发者ID:HankTheDrunk,项目名称:ultimaonlinemapcreator,代码行数:38,代码来源:ImportTiles.cs
示例20: GetDCNData
public static string GetDCNData(Collection DocCollection)
{
StringBuilder DCNInfo = new StringBuilder();
TSDocument BeginDoc = (TSDocument)DocCollection[1];
TSDocument EndDoc = (TSDocument)DocCollection[DocCollection.Count];
Int32 PageCount = 0;
DCNInfo.AppendLine("[BatchHdr]");
DCNInfo.AppendLine("CustomerId=NEAT");
DCNInfo.AppendLine("ProjectId=NEAT");
DCNInfo.AppendLine("ScanVendor=Rantoul");
DCNInfo.AppendLine("ScanDate=" + BeginDoc.ScanDate.ToString("MM/dd/yyyy"));
DCNInfo.AppendLine("FolderId=" + BeginDoc.ExportFolder);
DCNInfo.AppendLine("ParentBatchId=" + BeginDoc.BatchName);
DCNInfo.AppendLine("DOCTYPE=");
DCNInfo.AppendLine("BatchId=" + BeginDoc.BatchName);
DCNInfo.AppendLine("StartDCN=" + BeginDoc.DCN);
DCNInfo.AppendLine("EndDCN=" + EndDoc.DCN);
DCNInfo.AppendLine("TotDoc=" + DocCollection.Count);
DCNInfo.AppendLine("POBOX=999999");
DCNInfo.AppendLine("RecvDate=");
DCNInfo.AppendLine();
DCNInfo.AppendLine("[Detail]");
// Iterate through the documents
foreach (TSDocument DocInfo in DocCollection) {
DCNInfo.AppendLine("DCN=" + DocInfo.DCN);
for (Int32 i = 1; i <= DocInfo.NumPages; i++) {
DCNInfo.AppendLine("File=" + DocInfo.DCN + "_" + i + DocInfo.FileExt);
}
PageCount += DocInfo.NumPages;
}
DCNInfo.AppendLine();
DCNInfo.AppendLine("[BatchTrlr]");
DCNInfo.AppendLine("NumberClaims=" + DocCollection.Count);
DCNInfo.AppendLine("NumberFiles=" + PageCount);
return DCNInfo.ToString();
}
开发者ID:JamisonHarris,项目名称:TurboscanNG,代码行数:36,代码来源:Support.cs
注:本文中的Microsoft.VisualBasic.Collection类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论