本文整理汇总了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));
}
示例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);
}
}
示例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
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例8: InitializeForExport
protected void InitializeForExport(ProjectState state, IO.XmlStream s)
{
s.ReadAttributeOpt("export", ref mIsExported);
// if (IsExported)
// state.Compiler.AddExport(this);
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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;
}
}
}
示例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;
}
}
示例14: XvdFile
public XvdFile(string path)
{
_filePath = path;
_io = new IO(path);
LoadKeysFromDisk();
}
示例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);
}