示例#1
0
        private static void LoadOpCodeItems()
        {
            string line;

            OpCodeItems = new List <NuGenOpCodeItem>();
            using (StringReader reader = new StringReader(Resources.OpCodeItems))
            {
                do
                {
                    line = reader.ReadLine();

                    if (line != null)
                    {
                        short  opCodeValue = Convert.ToInt16(line);
                        string description = reader.ReadLine();

                        NuGenOpCodeItem opCodeItem = new NuGenOpCodeItem();
                        opCodeItem.OpCodeValue = opCodeValue;
                        opCodeItem.Description = description;

                        OpCodeItems.Add(opCodeItem);
                    }
                } while (line != null);
            }

            OpCodeNames = new List <string>();
            using (StringReader reader = new StringReader(Resources.OpCodeNames))
            {
                do
                {
                    line = reader.ReadLine();

                    if (line != null)
                    {
                        OpCodeNames.Add(line);
                    }
                } while (line != null);
            }
        }
		private static void LoadOpCodeItems()
		{
			string line;

			OpCodeItems = new List<NuGenOpCodeItem>();
			using (StringReader reader = new StringReader(Resources.OpCodeItems))
			{
				do
				{
					line = reader.ReadLine();

					if (line != null)
					{
						short opCodeValue = Convert.ToInt16(line);
						string description = reader.ReadLine();

						NuGenOpCodeItem opCodeItem = new NuGenOpCodeItem();
						opCodeItem.OpCodeValue = opCodeValue;
						opCodeItem.Description = description;

						OpCodeItems.Add(opCodeItem);
					}

				} while (line != null);
			}

			OpCodeNames = new List<string>();
			using (StringReader reader = new StringReader(Resources.OpCodeNames))
			{
				do
				{
					line = reader.ReadLine();

					if (line != null)
					{
						OpCodeNames.Add(line);
					}

				} while (line != null);
			}
		}