本文整理匯總了C#中System.UInt32.ToString方法的典型用法代碼示例。如果您正苦於以下問題:C# UInt32.ToString方法的具體用法?C# UInt32.ToString怎麽用?C# UInt32.ToString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.UInt32
的用法示例。
在下文中一共展示了UInt32.ToString方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: AddNode
public static INode AddNode(this IGraph myIGraph, UInt32 myUInt32Id)
{
if (myIGraph == null)
throw new ArgumentNullException("myIGraph must not be null!");
return myIGraph.AddNode(myUInt32Id.ToString());
}
示例2: createNewCharacter
public UInt32 createNewCharacter(string handle, UInt32 userid, UInt32 worldId)
{
conn.Open();
UInt32 charId = 0;
//TODO: Complete with real data from a hashtable (or something to do it faster);
//TODO: find values for uria starting place
string sqlInsertQuery="INSERT INTO characters SET userid = '" + userid.ToString() + "', worldid='" + worldId.ToString() + "', status='0', handle = '" + handle + "', created=NOW() ";
queryExecuter= conn.CreateCommand();
queryExecuter.CommandText = sqlInsertQuery;
queryExecuter.ExecuteNonQuery();
//As i didnt find a solution for "last_insert_id" in C# we must fetch the last row by a normal query
string sqlQuery = "SELECT charId FROM characters WHERE userId='" + userid.ToString() + "' AND worldId='" + worldId.ToString() + "' AND is_deleted='0' ORDER BY charId DESC LIMIT 1";
queryExecuter = conn.CreateCommand();
queryExecuter.CommandText = sqlQuery;
dr = queryExecuter.ExecuteReader();
while (dr.Read())
{
charId = (UInt32)dr.GetDecimal(0);
}
conn.Close();
// Create RSI Entry
conn.Open();
string sqlRSIQuery = "INSERT INTO rsivalues SET charid='" + charId.ToString() + "' ";
queryExecuter = conn.CreateCommand();
queryExecuter.CommandText = sqlRSIQuery;
queryExecuter.ExecuteNonQuery();
conn.Close();
return charId;
}
示例3: getSampleName
public static string getSampleName(UInt32 val)
{
try{
string temp = "0x" + val.ToString("X");
sampleNames.TryGetValue(val, out temp);
if (temp == null) return "0x" + val.ToString("X");
return temp;
}catch{
return "0x" + val.ToString("X");
}
}
示例4: getMessageById
public Message getMessageById( UInt32 id )
{
string sql = "`SELECT " +
"messages`.`id`, " +
"`messages`.`nuberReceiver`, " +
"`messages`.`message`, " +
"`messages`.`sendAt`, " +
"`messages`.`contactId` " +
"FROM SmsApplicatie.messages " +
"WHERE id=:id";
MySqlCommand statement = this.databaseConnection.CreateCommand ();
statement.CommandText = sql;
statement.Parameters.AddWithValue ("id", id.ToString ());
MySqlDataReader reader = statement.ExecuteReader ();
if (reader.Read ())
{
Message message = new Message (
Convert.ToUInt32( reader["id"] ),
Convert.ToString( reader["nuberReceiver"] ),
Convert.ToString( reader["message"] ),
Convert.ToDateTime( reader["sendAt"] ),
Convert.ToUInt32( reader["contactId"] )
);
return new Message ();
}
return null;
}
示例5: getChunk
public Chunk_Base getChunk(UInt32 chunkID, bool error = true)
{
Chunk_Base chunk = getChunksByID(chunkID).FirstOrDefault();
if (chunk == null && error)
throw new WMOException(string.Format("File does not contain chunk 0x{0}.", chunkID.ToString("X")));
return chunk;
}
示例6: btnOK_Click
private void btnOK_Click(object sender, EventArgs e)
{
Nmin = Convert.ToUInt32(numNmin.Value);
Nmax = Convert.ToUInt32(numNmax.Value);
Tsay = Convert.ToUInt32(numTsayMinute.Value * 60 + numTsaySecond.Value);
Tnguoi = Convert.ToUInt32(numTnguoiMinute.Value * 60 + numTnguoiSecond.Value);
ret = Nmin.ToString() + "," + Nmax.ToString() + "," + Tsay.ToString() + "," + Tnguoi.ToString();
this.Close();
}
示例7: addItemToInventory
public void addItemToInventory(UInt16 slotId, UInt32 itemGoID)
{
UInt32 charID = Store.currentClient.playerData.getCharID();
string sqlQuery = "INSERT INTO inventory SET charId = '" + charID.ToString() + "' , goid = '" + itemGoID.ToString() + "', slot = '" + slotId.ToString() + "', created = NOW() ";
queryExecuter = conn.CreateCommand();
queryExecuter.CommandText = sqlQuery;
queryExecuter.ExecuteNonQuery();
}
示例8: addAbility
public void addAbility(Int32 abilityID, UInt16 slotID, UInt32 charID, UInt16 level, UInt16 is_loaded)
{
string theQuery = "INSERT INTO char_abilities SET char_id='" + charID.ToString() + "', slot='" + slotID.ToString() + "', ability_id='" + abilityID.ToString() + "', level='" + level.ToString() + "', is_loaded='" + is_loaded.ToString() + "', added=NOW() ";
conn.Open();
queryExecuter = conn.CreateCommand();
queryExecuter.CommandText = theQuery;
queryExecuter.ExecuteNonQuery();
conn.Close();
}
示例9: AVM2Method
/// <summary>
///
/// </summary>
/// <param name="index"></param>
/// <param name="abc"></param>
public AVM2Method( UInt32 index, AbcFile abc )
{
if ( abc.Methods.Count <= index )
{
ArgumentException ae = new ArgumentException( "Method " + index.ToString( "d" ) + " not in ABC file" );
Log.Error(this, ae );
throw ae;
}
_Abc = abc;
_MethodID = index;
}
示例10: FetchCardPage
public static RunnerResult FetchCardPage(UInt32 mid)
{
HttpWebResponse resp;
String respBody;
_RunHttpRequest(_CardDetailsUrlPath + mid.ToString(), out resp, out respBody);
if (resp.StatusCode != HttpStatusCode.OK)
return new RunnerResult(ResultType.UnknownCard, null);
else
return new RunnerResult(ResultType.CardResult, respBody);
}
示例11: SelectTask
// ITDLUIExtension ------------------------------------------------------------------
public bool SelectTask(UInt32 dwTaskID)
{
SampleListItem item = new SampleListItem();
item.Value = dwTaskID.ToString();
item.Type = "Selection";
m_Items.Add(item);
m_ListView.Items.Refresh();
return true;
}
示例12: TextureListObject
public TextureListObject(UInt32 imageHeaderOffset, TextureNode node)
{
name = "Texture " + (DatFile.textureList.Items.Count +1) + " (" + imageHeaderOffset.ToString("x8") + ")";
this.node = node;
imageHeader = node.imageHeader;
paletteHeader = node.paletteHeader;
imageBitmap = TPL.ConvertFromTextureMelee(imageHeader, paletteHeader, out imageSize);
}
示例13: SettingParams
//生成請求
public void SettingParams()
{
SystemOptions so = new SystemOptions();
//請求網關
requestUrl = so["MemberSharing_Tencent_Gateway"].ToString("").Trim();
//簽名類型
sign_type = "md5";
//簽名
key = so["MemberSharing_Tencent_MD5"].ToString("").Trim();
//對於商戶:使用和支付時一樣的key,可以登錄財付通商戶係統修改。
sign_encrypt_keyid = "0";
//字符編碼格式
input_charset = "GBK";
//服務名稱
service = "login";
//商戶編號
chnid = so["MemberSharing_Tencent_UserNumber"].ToString("").Trim();
//chnid類型
chtype = "0";
//服務器通知返回接口
redirect_url = Shove._Web.Utility.GetUrl() + "/Home/Room/TencentReceive.aspx";
//自定義參數
attach =redirect_url;
//時間戳
tmstamp = GetTmstamp();
Dictionary<string, string> dict = new Dictionary<string, string>();
dict.Add("sign_type", sign_type);
dict.Add("sign_encrypt_keyid", sign_encrypt_keyid);
dict.Add("input_charset", input_charset);
dict.Add("service", service);
dict.Add("chnid", chnid);
dict.Add("chtype", chtype);
dict.Add("redirect_url", redirect_url);
dict.Add("attach", attach);
dict.Add("tmstamp", tmstamp.ToString());
sign=GetSign(key, input_charset,dict);
}
示例14: Parse
/// <summary>
///
/// </summary>
/// <param name="sourceStream"></param>
protected override void Parse(BinaryReader sourceStream)
{
_DebugType = AVM2.Static.VariableLengthInteger.ReadU8(sourceStream);
_Index = AVM2.Static.VariableLengthInteger.ReadU30(sourceStream);
_Reg = AVM2.Static.VariableLengthInteger.ReadU8(sourceStream);
_Extra = AVM2.Static.VariableLengthInteger.ReadU30(sourceStream);
if (0 != _Extra)
{
// Of course, Adobe Flash CS4 makes use of this field
AbcFormatException abcfe = new AbcFormatException("Extra (reserved) field in Debug instruction used: 0x" + _Extra.ToString("X"));
Log.Warn(this, abcfe);
//throw abcfe;
//Log.Warn(this, "Extra (reserved) field in Debug instruction used: 0x" + _Extra.ToString("X"));
}
}
示例15: AddMessageData
// Allows the thread to place data in the RichEditBox control.
private void AddMessageData(Int32 chNum, UInt32 msgId, UInt32 dlc, Byte [] msgData,
UInt32 flags, Linlib.LinMessageInfo msgInfo)
{
if ((flags & Linlib.LIN_RX) != 0)
{
OutputRTB.AppendText(" RX " + chNum.ToString("00") + " ");
}
else
{
OutputRTB.AppendText(" TX " + chNum.ToString("00") + " ");
}
OutputRTB.AppendText(msgId.ToString("X8") + " ");
OutputRTB.AppendText(
(((flags & Linlib.LIN_BIT_ERROR) != 0) ? "B" : " ") +
(((flags & Linlib.LIN_SYNCH_ERROR) != 0) ? "S" : " ") +
(((flags & Linlib.LIN_PARITY_ERROR) != 0) ? "P" : " ") +
(((flags & Linlib.LIN_CSUM_ERROR) != 0) ? "C" : " ") +
(((flags & Linlib.LIN_NODATA) != 0) ? "H" : " ") +
(((flags & Linlib.LIN_WAKEUP_FRAME) != 0) ? "W" : " ") + " ");
OutputRTB.AppendText(dlc.ToString("D") + " " +
msgInfo.checkSum.ToString("X2") + " " +
msgInfo.idPar.ToString("X2") +
" ");
for (int i = 0; i < 8; i++)
{
if (i < dlc)
{
OutputRTB.AppendText(msgData[i].ToString("X2") + " ");
}
else
{
OutputRTB.AppendText(" ");
}
}
// time stamp
double modifiedTime;
modifiedTime = ((double)(msgInfo.timestamp)) / 1000.0;
OutputRTB.AppendText(modifiedTime.ToString(" " + "000000.000") + "\n");
// Need scroll bar to move down as data is added.
// qqq - Something needs to be fixed here so scroll bar prevents this call.
OutputRTB.ScrollToCaret();
}