当前位置: 首页>>代码示例>>C#>>正文


C# IO类代码示例

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


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


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