本文整理汇总了C#中Byte4.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Byte4.ToString方法的具体用法?C# Byte4.ToString怎么用?C# Byte4.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Byte4
的用法示例。
在下文中一共展示了Byte4.ToString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestMemberFn_ToString_i
public void TestMemberFn_ToString_i()
{
var testCase = new Byte4();
testCase.PackFrom(0.656f, 0.125f, 0.222f, 0.861f);
String s = testCase.ToString ();
Assert.That(s, Is.EqualTo("01000001"));
}
示例2: glControl1_MouseDown
/// <summary>
/// Event for when the glControl1 is focused and the mouse is held down, this should be used
/// when navigating through the screen using the mouse.
/// </summary>
/// <param name="sender">The object that sent this event.</param>
/// <param name="e">The arguments for the mouseEvent, should include the X and Y coordinates.</param>
private void glControl1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
//IEnumerator<CurveItemTypePair> ienum = GraphInformation.CurveTypeItems.GetEnumerator();
//while (ienum.MoveNext())
//{
// ienum.Current.CurveObj.Render(true);
//}
Byte4 Pixel = new Byte4();
GL.ReadPixels(e.X, glControl1.Height - e.Y, 1, 1, PixelFormat.Rgba, PixelType.UnsignedByte, ref Pixel);
//Console.WriteLine(Pixel.ToString());
IEnumerator<CurveItemTypePair> ienum2 = GraphInformation.CurveTypeItems.GetEnumerator();
int igListIndex = 0;
while (ienum2.MoveNext())
{
CurveItemTypePair curr = ienum2.Current;
if (curr.CurveObj.m_colorID[0] == Pixel.R
&& curr.CurveObj.m_colorID[1] == Pixel.G
&& curr.CurveObj.m_colorID[2] == Pixel.B)
{
CurrentFileIndex = igListIndex;
}
igListIndex++;
}
Console.WriteLine(Pixel.ToString());
Console.WriteLine(CurrentFileIndex);
MousePressed = true;
}