• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IO类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IO的典型用法代码示例。如果您正苦于以下问题:C# IO类的具体用法?C# IO怎么用?C# IO使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IO类属于命名空间,在下文中一共展示了IO类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SaveToXml

 public void SaveToXml(IO.XmlEditor xml, string node)
 {
     xml.SaveNode("Forecolor", node, GetXmlFromColor(ForeColor));
     xml.SaveNode("Backcolor", node, GetXmlFromColor(BackColor));
     xml.SaveNode("Bordercolor", node, GetXmlFromColor(BorderColor));
     xml.SaveNode("Hovercolor", node, GetXmlFromColor(HoverColor));
 }
开发者ID:ChaotixBluix,项目名称:PMU-Client,代码行数:7,代码来源:ButtonTheme.cs


示例2: Write

			public override void Write(IO.EndianWriter stream)
			{
				Compiler comp = stream.Owner as Compiler;

				uint elementsAddress = 0;
				int flags = (
						(tagRef.IsNonResolving ? 1<<1 : 0)
					);

				if (tagRef.Elements.Count > 1)
				{
					elementsAddress = stream.PositionUnsigned;
					foreach (string i in tagRef.Elements)
						stream.WriteTag(i);

					comp.MarkLocationFixup(tagRef.Name, stream, true);
					stream.Write(flags);
					stream.Write((int)-1);
					stream.WritePointer(elementsAddress);
				}
				else
				{
					comp.MarkLocationFixup(tagRef.Name, stream, true);
					stream.Write(flags);
					stream.WriteTag(tagRef.Elements[0]);
					stream.Write((int)0);
				}
			}
开发者ID:guardian2433,项目名称:open-sauce,代码行数:28,代码来源:Compiler_Tags.cs


示例3: VT100

		public VT100(IO.Net.Telnet.Server server) :
			this(server as IO.IByteDevice)
		{
			this.server = server;
			this.Echo = true;
			this.Out.Write('\x1b', '[', 'c'); // Request Identification string
		}
开发者ID:imintsystems,项目名称:Kean,代码行数:7,代码来源:VT100.cs


示例4: Write

			public void Write(IO.EndianWriter stream)
			{
				int orgPos = stream.Position;

				if (address != 0)
				{
					if (offsets.Count == 0)
					{
						string name = (stream.Owner as Compiler).GetLocationName(this);
						Debug.LogFile.WriteLine("LocationWriteback: unused address! There are no references to '{0}'", name);
					}
					else foreach (uint tempPos in offsets)
					{
						stream.PositionUnsigned = tempPos;
						stream.WritePointer(address);
					}
				}
				else
				{
					string name = (stream.Owner as Compiler).GetLocationName(this);
					Debug.LogFile.WriteLine("LocationWriteback: failed to writeback! '{0}'s address was not set, {1} memory locations will be null!",
						name, offsets.Count.ToString());
				}

				stream.Position = orgPos;
			}
开发者ID:CodeAsm,项目名称:open-sauce,代码行数:26,代码来源:Compiler.cs


示例5: FlacFrame

        ////------------------------------------------------------------------------------------------------------------------------------
        /// <summary>
        /// Initializes a new instance of the <see cref="FlacFrame"/> class. 
        /// </summary>
        /// <param name="stream">
        /// The stream.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown if stream is null.
        /// </exception>
        private FlacFrame(IO.FlacStream stream)
        {
            if (stream == null)
                throw new ArgumentNullException("stream");

            FlacStream = stream;
        }
开发者ID:NeWbY100,项目名称:AudioVideoLib,代码行数:17,代码来源:FlacFrame.cs


示例6: Terminal

		protected Terminal(IO.ICharacterInDevice inDevice, IO.ICharacterOutDevice outDevice)
		{
			this.In = IO.CharacterReader.Open(IO.Filter.CharacterInDevice.Open(inDevice, this.FilterInput));
			this.Out = IO.CharacterWriter.Open(outDevice) ?? new IO.Null.CharacterWriter();
			if (this.Out.NotNull())
				this.Out.AutoFlush = true;
		}
开发者ID:imintsystems,项目名称:Kean,代码行数:7,代码来源:Terminal.cs


示例7: Oscillograph

        private Oscillograph(IO.IStringStream stream)
            : base(stream)
        {
            IList<string> initCommands = new List<string>()
            {
                {"Hdr Off"},
                {"Measurement:Meas1:State OFF"},
                {"Measurement:Meas2:State OFF"},
                {"Measurement:Meas3:State OFF"},
                {"Measurement:Meas4:State OFF"},
                {"Measurement:Meas1:Type Delay"},
                {"Measurement:Meas1:Delay:Direction Forwards"},
                {"Measurement:Meas1:Delay:Edge1 Rise"},
                {"Measurement:Meas1:Delay:Edge2 Rise"},
                {"Measurement:Meas1:Source CH1"},
                {"Measurement:Meas1:Source2 CH2"},
                {"Measurement:Meas1:State ON"},
                {"Measurement:Meas2:Type Delay"},
                {"Measurement:Meas2:Delay:Direction Forwards"},
                {"Measurement:Meas2:Delay:Edge1 Fall"},
                {"Measurement:Meas2:Delay:Edge2 Fall"},
                {"Measurement:Meas2:Source CH1"},
                {"Measurement:Meas2:Source2 CH2"},
                {"Measurement:Meas2:State ON"}
            };

            this.InitCommands = initCommands;
        }
开发者ID:dalinhuang,项目名称:appcollection,代码行数:28,代码来源:Oscillograph.cs


示例8: InitializeForExport

			protected void InitializeForExport(ProjectState state, IO.XmlStream s)
			{
				s.ReadAttributeOpt("export", ref mIsExported);

//				if (IsExported)
//					state.Compiler.AddExport(this);
			}
开发者ID:guardian2433,项目名称:open-sauce,代码行数:7,代码来源:Import.cs


示例9: exportRevenueDataDump_Click

 protected void exportRevenueDataDump_Click(object sender, EventArgs e)
 {
     try
     {
         List<System.Data.SqlClient.SqlParameter> spParams = new List<System.Data.SqlClient.SqlParameter>();
         spParams.Add(Param.CreateParam("STARTDATE", System.Data.SqlDbType.Date, DateTime.Now));
         spParams.Add(Param.CreateParam("ENTRYDATESTART", System.Data.SqlDbType.Date, "1/1/2002"));
         spParams.Add(Param.CreateParam("ENTRYDATEEND", System.Data.SqlDbType.Date, DateTime.Now));
         spParams.Add(Param.CreateParam("COMPANYID", System.Data.SqlDbType.Int, Convert.ToInt32(dropDownCompany.SelectedValue)));
         spParams.Add(Param.CreateParam("TRANSITY", System.Data.SqlDbType.VarChar, "Y"));
         spParams.Add(Param.CreateParam("TRANSITN", System.Data.SqlDbType.VarChar, "N"));
         spParams.Add(Param.CreateParam("REVENUETYPE", System.Data.SqlDbType.VarChar, "M"));
         spParams.Add(Param.CreateParam("ORDERBY", System.Data.SqlDbType.VarChar, "CONTRACT_NUMBER"));
         spParams.Add(Param.CreateParam("SHOWCONSOLIDATED", System.Data.SqlDbType.Int, 1));
         spParams.Add(Param.CreateParam("EXCLUDEMTA", System.Data.SqlDbType.Int, 1));
         spParams.Add(Param.CreateParam("STARTYEAR", System.Data.SqlDbType.Int, Convert.ToInt32(dropDownStartYear.SelectedValue)));
         using (IO io = new IO(WebCommon.ConnectionString))
         {
             WebCommon.ExportHtmlToExcel("RevenueFlashDataDump", WebCommon.DataTableToHtmlTable(io.ExecuteDataSetQuery(IO.CreateCommandFromStoredProc("OnlineFlash_GetRevFlashDataDump", spParams)).Tables[0], "RevenueFlashDataDump"));
         }
     }
     catch (Exception ex)
     {
         WebCommon.LogExceptionInfo(ex);
     }
 }
开发者ID:adayalantitan,项目名称:Apollo,代码行数:26,代码来源:FlashDataDump.aspx.cs


示例10: Build

		public Base Build(IO.TextSection section, String prefix)
		{
			if (section == null) throw new ArgumentNullException("section");
			if (prefix == null) throw new ArgumentNullException("prefix");

			return Build(prefix, section, prefix);
		}
开发者ID:lodossDev,项目名称:xnamugen,代码行数:7,代码来源:Collection.cs


示例11: UpdateWithIOEvent

        public override void UpdateWithIOEvent(IO.IOEvent ioEvent)
        {
            if (ioEvent.Equals(rightMousePress))
            {
                Vector2 sceenPosition = IOState.MouseScreenPosition();
                Company rightClickCompany = this.PlayerObject.ClickCompany(sceenPosition);

                if (rightClickCompany != null)
                {

                    new AddTransportVehicleToCompany(this.LocalPlayer, rightClickCompany, vehicle);
                    this.LocalPlayer.PopUIContext();
                    new CompanySelected(this.NextInStack, rightClickCompany);
                }
            }
            else if (ioEvent.Equals(leftMousePress))
            {
                this.LocalPlayer.PopUIContext();
                this.UpdateNextInStackIO(ioEvent);
            }
            else
            {
                this.UpdateNextInStackIO(ioEvent);
            }
        }
开发者ID:BenjaminAlexander,项目名称:materiel,代码行数:25,代码来源:TransportVehicleSelected.cs


示例12: DoSkill

        public bool DoSkill(Network.WorldClient client, IO.InteractiveObject io)
        {
            if (!this.IsCraftSkill)
            {
                if (io.State == IO.InteractiveObjectState.FULL)
                {
                    client.Action.RefreshDirection(3);//TODO: From player direction

                    var packet = "GA" + this.ID + ";501;" + client.Character.ID + ";" + io.CellID + "," + this.GetJobTime();
                    client.Character.Map.Engine.Send(packet);
                    return true;
                }
                else
                {
                    return false;
                }
            }
            else
            {
                if (client.Action.CurrentJobCraftSkill == null)
                {
                    client.Action.CurrentJobCraftSkill = new JobCraftSkill(this, client);
                    var packet = "ECK3|" + this.GetJobCraftMax() + ";" + this.ID;
                    client.Send(packet);
                    return false;
                }
                else
                {
                    return false;
                }
            }
        }
开发者ID:nightwolf93,项目名称:Crystal,代码行数:32,代码来源:JobSkill.cs


示例13: Create

 /// <summary>
 /// Creates a new restore index
 /// </summary>
 /// <param name="path">
 /// The path to the restore index file to create
 /// </param>
 /// <param name="header">
 /// The restore index header to insert
 /// </param>
 /// <returns>
 /// A new restore index implementation
 /// </returns>
 public static IRestoreIndex Create(IO.Path path, Header header)
 {
     // create the restore index file and schema
      Database.Create(path, "SkyFloe.Sqlite.Resources.RestoreIndex.sql");
      var index = (RestoreIndex)null;
      try
      {
     // connect to the database and add the header row
     index = new RestoreIndex(path);
     index.Execute(
        "INSERT INTO Header (" +
           "Version) " +
        "VALUES (@p0);",
        header.Version = CurrentVersion
     );
     return index;
      }
      catch
      {
     if (index != null)
        index.Dispose();
     try { Database.Delete(path); } catch { }
     throw;
      }
 }
开发者ID:bspell1,项目名称:SkyFloe,代码行数:37,代码来源:RestoreIndex.cs


示例14: XvdFile

        public XvdFile(string path)
        {
            _filePath = path;
            _io = new IO(path);

            LoadKeysFromDisk();
        }
开发者ID:Overx,项目名称:xvdtool,代码行数:7,代码来源:XVDFile.cs


示例15: PdbInfo

 public unsafe PdbInfo(IO.FileStream inputStream, Metadata.Reader reader)
 {
   this.reader = reader;
   this.pdbFunctionMap = PdbFile.LoadFunctionMap(inputStream, out tokenToSourceMapping, out sourceServerData, reader);
   //inputStream.Seek(0L, IO.SeekOrigin.Begin);
   //this.remapTable = PdbFile.LoadRemapTable(inputStream);
 }
开发者ID:asvishnyakov,项目名称:CodeContracts,代码行数:7,代码来源:PdbInfo.cs


示例16: AGIConnectionHandler

 /// <summary>
 /// Creates a new AGIConnectionHandler to handle the given socket connection.
 /// </summary>
 /// <param name="socket">the socket connection to handle.</param>
 /// <param name="mappingStrategy">the strategy to use to determine which script to run.</param>
 public AGIConnectionHandler(IO.SocketConnection socket, IMappingStrategy mappingStrategy, bool SC511_CAUSES_EXCEPTION, bool SCHANGUP_CAUSES_EXCEPTION)
 {
     this.socket = socket;
     this.mappingStrategy = mappingStrategy;
     this._SC511_CAUSES_EXCEPTION = SC511_CAUSES_EXCEPTION;
     this._SCHANGUP_CAUSES_EXCEPTION = SCHANGUP_CAUSES_EXCEPTION;
 }
开发者ID:jgowdy,项目名称:AsterNET,代码行数:12,代码来源:AGIConnectionHandler.cs


示例17: InvalidVersion

			public InvalidVersion(IO.ITagStream tag, string msg)
			{
				Debug.LogFile.WriteLine("Invalid versioning ({0})" + Program.NewLine +
					"\tIn {1}",
					msg,
					tag.GetExceptionDescription());
			}
开发者ID:CodeAsm,项目名称:open-sauce,代码行数:7,代码来源:Exceptions.cs


示例18: Load

		public Boolean Load(IO.File file, Int32 pcxsize, out Point size, out Texture2D pixels, out Texture2D palette)
		{
			if (file == null) throw new ArgumentNullException("file");

			size = new Point(Int32.MinValue, Int32.MinValue);
			pixels = null;
			palette = null;

			Byte[] filedata = file.ReadBytes(pcxsize);
			if (filedata.Length != pcxsize) return false;

			IO.FileHeaders.PcxFileHeader header = new IO.FileHeaders.PcxFileHeader(filedata);
			Point tempsize = new Point(header.XMax - header.XMin + 1, header.YMax - header.YMin + 1);

			if (header.Manufacturer != 10 || header.Encoding != 1 || header.Version > 5 || header.BitsPerPixel != 8) return false;
			if (header.ColorPlanes != 1) return false;
			if (tempsize.X <= 0 || tempsize.Y <= 0) return false;

			size = tempsize;

			Int32 readoffset = 0;
			pixels = LoadPixels(filedata, size, header.BytesPerLine, ref readoffset);
			palette = LoadPalette(filedata, ref readoffset);
			return true;
		}
开发者ID:lodossDev,项目名称:xnamugen,代码行数:25,代码来源:PcxLoader.cs


示例19: Create

 /// <summary>
 /// Creates a new backup index
 /// </summary>
 /// <param name="path">
 /// The path to the backup index file to create
 /// </param>
 /// <param name="header">
 /// The backup index header to insert
 /// </param>
 /// <returns>
 /// A new backup index implementation
 /// </returns>
 public static IBackupIndex Create(IO.Path path, Header header)
 {
     // create the backup index file and schema
      Database.Create(path, "SkyFloe.Sqlite.Resources.BackupIndex.sql");
      var index = (BackupIndex)null;
      try
      {
     // connect to the database and add the header row
     index = new BackupIndex(path);
     index.Execute(
        "INSERT INTO Header (" +
        "   Version, " +
        "   CryptoIterations, " +
        "   ArchiveSalt, " +
        "   PasswordHash, " +
        "   PasswordSalt) " +
        "VALUES (@p0, @p1, @p2, @p3, @p4);",
        header.Version = CurrentVersion,
        header.CryptoIterations,
        header.ArchiveSalt,
        header.PasswordHash,
        header.PasswordSalt
     );
     return index;
      }
      catch
      {
     if (index != null)
        index.Dispose();
     try { Database.Delete(path); } catch { }
     throw;
      }
 }
开发者ID:bspell1,项目名称:SkyFloe,代码行数:45,代码来源:BackupIndex.cs


示例20: Write

			public void Write(IO.EndianWriter stream)
			{
				Compiler comp = stream.Owner as Compiler;
				Import import = comp.OwnerState.Importer as Import;

				int real_count = import.Groups.Count;
				stream.Write("dynamic tag groups", false);
				stream.Write((short)DataArray.MaxValue);
				stream.Write((short)Item.Size);
				stream.Write(true);
				stream.Write(true);
				stream.Write((short)0);
				MiscGroups.data.Write(stream);
				stream.Write((short)real_count);//stream.Write((short)Datums.Count);
				stream.Write((short)real_count);//stream.Write((short)Datums.Count);
				stream.Write(real_count);
				stream.WritePointer(stream.PositionUnsigned + 4);

				#region Write tag group datums
				foreach (Import.TagGroup tg in import.Groups.Values)
				{
					stream.Write((short)0); // Header
					stream.Write((short)0); // Flags
					comp.AddLocationFixup(tg.Name, stream, false);
					stream.Write((int)0);
				}
				#endregion

				#region Write null datums
				Item i = new Item();
				int count = DataArray.MaxValue - real_count;
				for (int x = 0; x < count; x++)
					i.Write(stream);
				#endregion
			}
开发者ID:CodeAsm,项目名称:open-sauce,代码行数:35,代码来源:Compiler.cs



注:本文中的IO类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Extended.ShapeReader类代码示例发布时间:2022-05-24
下一篇:
C# INyARRgbRaster类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap