Here are the examples of the csharp api float.ToString() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
896 Examples
19
Source : DoubleValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> IsGreaterOrEqualsThan(double val, float comparer, string key) =>
IsGreaterOrEqualsThan(val, (double)comparer, key, FluntErrorMessages.IsGreaterOrEqualsThanErrorMessage(key, comparer.ToString()));
19
Source : DoubleValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> IsLowerThan(double val, float comparer, string key) =>
IsLowerThan(val, comparer, key, FluntErrorMessages.IsLowerThanErrorMessage(key, comparer.ToString()));
19
Source : DoubleValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> IsLowerOrEqualsThan(double val, float comparer, string key) =>
IsLowerOrEqualsThan(val, (double)comparer, key, FluntErrorMessages.IsLowerOrEqualsThanErrorMessage(key, comparer.ToString()));
19
Source : DoubleValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> AreEquals(double val, float comparer, string key) =>
AreEquals(val, (double)comparer, key, FluntErrorMessages.AreEqualsErrorMessage(val.ToString(), comparer.ToString()));
19
Source : DoubleValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> AreNotEquals(double val, float comparer, string key) =>
AreNotEquals(val, (double)comparer, key, FluntErrorMessages.AreNotEqualsErrorMessage(val.ToString(), comparer.ToString()));
19
Source : FloatValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> IsGreaterThan(float val, float comparer, string key) =>
IsGreaterThan(val, comparer, key, FluntErrorMessages.IsGreaterThanErrorMessage(key, comparer.ToString()));
19
Source : FloatValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> IsGreaterOrEqualsThan(float val, float comparer, string key) =>
IsGreaterOrEqualsThan(val, comparer, key, FluntErrorMessages.IsGreaterOrEqualsThanErrorMessage(key, comparer.ToString()));
19
Source : FloatValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> IsLowerThan(float val, float comparer, string key) =>
IsLowerThan(val, comparer, key, FluntErrorMessages.IsLowerThanErrorMessage(key, comparer.ToString()));
19
Source : FloatValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> IsLowerOrEqualsThan(float val, float comparer, string key) =>
IsLowerOrEqualsThan(val, comparer, key, FluntErrorMessages.IsLowerOrEqualsThanErrorMessage(key, comparer.ToString()));
19
Source : FloatValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> AreEquals(float val, float comparer, string key) =>
AreEquals(val, comparer, key, FluntErrorMessages.AreEqualsErrorMessage(val.ToString(), comparer.ToString()));
19
Source : FloatValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> AreEquals(float val, int comparer, string key) =>
AreEquals(val, (float)comparer, key, FluntErrorMessages.AreEqualsErrorMessage(val.ToString(), comparer.ToString()));
19
Source : FloatValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> AreEquals(float val, double comparer, string key) =>
AreEquals(val, (float)comparer, key, FluntErrorMessages.AreEqualsErrorMessage(val.ToString(), comparer.ToString()));
19
Source : FloatValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> AreEquals(float val, decimal comparer, string key) =>
AreEquals(val, (float)comparer, key, FluntErrorMessages.AreEqualsErrorMessage(val.ToString(), comparer.ToString()));
19
Source : FloatValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> AreEquals(float val, long comparer, string key) =>
AreEquals(val, (float)comparer, key, FluntErrorMessages.AreEqualsErrorMessage(val.ToString(), comparer.ToString()));
19
Source : FloatValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> AreNotEquals(float val, float comparer, string key) =>
AreNotEquals(val, comparer, key, FluntErrorMessages.AreNotEqualsErrorMessage(val.ToString(), comparer.ToString()));
19
Source : FloatValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> AreNotEquals(float val, int comparer, string key) =>
AreNotEquals(val, (float)comparer, key, FluntErrorMessages.AreNotEqualsErrorMessage(val.ToString(), comparer.ToString()));
19
Source : FloatValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> AreNotEquals(float val, double comparer, string key) =>
AreNotEquals(val, (float)comparer, key, FluntErrorMessages.AreNotEqualsErrorMessage(val.ToString(), comparer.ToString()));
19
Source : FloatValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> AreNotEquals(float val, decimal comparer, string key) =>
AreNotEquals(val, (float)comparer, key, FluntErrorMessages.AreNotEqualsErrorMessage(val.ToString(), comparer.ToString()));
19
Source : FloatValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> AreNotEquals(float val, long comparer, string key) =>
AreNotEquals(val, (float)comparer, key, FluntErrorMessages.AreNotEqualsErrorMessage(val.ToString(), comparer.ToString()));
19
Source : FloatValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> Contains(float val, IEnumerable<float> list, string key) =>
Contains(val, list, key, FluntErrorMessages.ContainsErrorMessage(key, val.ToString()));
19
Source : FloatValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> NotContains(float val, IEnumerable<float> list, string key) =>
NotContains(val, list, key, FluntErrorMessages.NotContainsErrorMessage(key, val.ToString()));
19
Source : IntValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> IsGreaterThan(int val, float comparer, string key) =>
IsGreaterThan(val, comparer, key, FluntErrorMessages.IsGreaterThanErrorMessage(key, comparer.ToString()));
19
Source : IntValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> IsGreaterOrEqualsThan(int val, float comparer, string key) =>
IsGreaterOrEqualsThan(val, (int)comparer, key, FluntErrorMessages.IsGreaterOrEqualsThanErrorMessage(key, comparer.ToString()));
19
Source : IntValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> IsLowerThan(int val, float comparer, string key) =>
IsLowerThan(val, comparer, key, FluntErrorMessages.IsLowerThanErrorMessage(key, comparer.ToString()));
19
Source : IntValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> IsLowerOrEqualsThan(int val, float comparer, string key) =>
IsLowerOrEqualsThan(val, (int)comparer, key, FluntErrorMessages.IsLowerOrEqualsThanErrorMessage(key, comparer.ToString()));
19
Source : IntValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> AreEquals(int val, float comparer, string key) =>
AreEquals(val, (int)comparer, key, FluntErrorMessages.AreEqualsErrorMessage(val.ToString(), comparer.ToString()));
19
Source : DecimalValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> IsGreaterThan(decimal val, float comparer, string key) =>
IsGreaterThan(val, comparer, key, FluntErrorMessages.IsGreaterThanErrorMessage(key, comparer.ToString()));
19
Source : DecimalValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> IsGreaterOrEqualsThan(decimal val, float comparer, string key) =>
IsGreaterOrEqualsThan(val, (decimal)comparer, key, FluntErrorMessages.IsGreaterOrEqualsThanErrorMessage(key, comparer.ToString()));
19
Source : DecimalValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> IsLowerThan(decimal val, float comparer, string key) =>
IsLowerThan(val, comparer, key, FluntErrorMessages.IsLowerThanErrorMessage(key, comparer.ToString()));
19
Source : DecimalValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> IsLowerOrEqualsThan(decimal val, float comparer, string key) =>
IsLowerOrEqualsThan(val, (decimal)comparer, key, FluntErrorMessages.IsLowerOrEqualsThanErrorMessage(key, comparer.ToString()));
19
Source : IntValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> AreNotEquals(int val, float comparer, string key) =>
AreNotEquals(val, (int)comparer, key, FluntErrorMessages.AreNotEqualsErrorMessage(val.ToString(), comparer.ToString()));
19
Source : LongValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> IsGreaterThan(long val, float comparer, string key) =>
IsGreaterThan(val, comparer, key, FluntErrorMessages.IsGreaterThanErrorMessage(key, comparer.ToString()));
19
Source : LongValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> IsGreaterOrEqualsThan(long val, float comparer, string key) =>
IsGreaterOrEqualsThan(val, (long)comparer, key, FluntErrorMessages.IsGreaterOrEqualsThanErrorMessage(key, comparer.ToString()));
19
Source : LongValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> IsLowerThan(long val, float comparer, string key) =>
IsLowerThan(val, comparer, key, FluntErrorMessages.IsLowerThanErrorMessage(key, comparer.ToString()));
19
Source : LongValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> IsLowerOrEqualsThan(long val, float comparer, string key) =>
IsLowerOrEqualsThan(val, (long)comparer, key, FluntErrorMessages.IsLowerOrEqualsThanErrorMessage(key, comparer.ToString()));
19
Source : LongValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> AreEquals(long val, float comparer, string key) =>
AreEquals(val, (long)comparer, key, FluntErrorMessages.AreEqualsErrorMessage(val.ToString(), comparer.ToString()));
19
Source : LongValidationContract.cs
with MIT License
from andrebaltieri
with MIT License
from andrebaltieri
public Contract<T> AreNotEquals(long val, float comparer, string key) =>
AreNotEquals(val, (long)comparer, key, FluntErrorMessages.AreNotEqualsErrorMessage(val.ToString(), comparer.ToString()));
19
Source : FLOAT.cs
with MIT License
from andrew-raphael-lukasik
with MIT License
from andrew-raphael-lukasik
override public string ToString () => this.Value.ToString();
19
Source : ButtonsNumericTextbox.cs
with GNU General Public License v3.0
from anotak
with GNU General Public License v3.0
from anotak
private void buttons_ValueChanged(object sender, EventArgs e)
{
if(!ignorebuttonchange)
{
ignorebuttonchange = true;
if(!textbox.CheckIsRelative())
{
if(steps != null)
{
if(buttons.Value < 0)
textbox.Text = steps.GetNextHigher(textbox.GetResult(0)).ToString();
else if(buttons.Value > 0)
textbox.Text = steps.GetNextLower(textbox.GetResult(0)).ToString();
}
else if(textbox.AllowDecimal)
{
float newvalue = textbox.GetResultFloat(0.0f) - (float)(buttons.Value * stepsize);
if((newvalue < 0.0f) && !textbox.AllowNegative) newvalue = 0.0f;
textbox.Text = newvalue.ToString();
}
else
{
int newvalue = textbox.GetResult(0) - (buttons.Value * stepsize);
if((newvalue < 0) && !textbox.AllowNegative) newvalue = 0;
textbox.Text = newvalue.ToString();
}
}
buttons.Value = 0;
if(WhenButtonsClicked != null)
WhenButtonsClicked(this, EventArgs.Empty);
ignorebuttonchange = false;
}
}
19
Source : ThingInfoPanel.cs
with GNU General Public License v3.0
from anotak
with GNU General Public License v3.0
from anotak
public void ShowInfo(Thing t)
{
ThingTypeInfo ti;
LinedefActionInfo act = null;
TypeHandler th;
string actioninfo = "";
string zinfo;
float zvalue;
// Show/hide stuff depending on format
if(!General.Map.FormatInterface.HasActionArgs)
{
arglbl1.Visible = false;
arglbl2.Visible = false;
arglbl3.Visible = false;
arglbl4.Visible = false;
arglbl5.Visible = false;
arg1.Visible = false;
arg2.Visible = false;
arg3.Visible = false;
arg4.Visible = false;
arg5.Visible = false;
infopanel.Width = doomformatwidth;
}
else
{
arglbl1.Visible = true;
arglbl2.Visible = true;
arglbl3.Visible = true;
arglbl4.Visible = true;
arglbl5.Visible = true;
arg1.Visible = true;
arg2.Visible = true;
arg3.Visible = true;
arg4.Visible = true;
arg5.Visible = true;
infopanel.Width = hexenformatwidth;
}
// Move panel
spritepanel.Left = infopanel.Left + infopanel.Width + infopanel.Margin.Right + spritepanel.Margin.Left;
// Lookup thing info
ti = General.Map.Data.GetThingInfo(t.Type);
// Get thing action information
if(General.Map.Config.LinedefActions.ContainsKey(t.Action))
{
act = General.Map.Config.LinedefActions[t.Action];
actioninfo = act.ToString();
}
else if(t.Action == 0)
actioninfo = t.Action.ToString() + " - None";
else
actioninfo = t.Action.ToString() + " - Unknown";
// Determine z info to show
t.DetermineSector();
if(ti.AbsoluteZ)
{
zvalue = t.Position.z;
zinfo = zvalue.ToString();
}
else
{
if(t.Sector != null)
{
// Hangs from ceiling?
if(ti.Hangs)
{
zvalue = (float)t.Sector.CeilHeight + t.Position.z;
zinfo = zvalue.ToString();
}
else
{
zvalue = (float)t.Sector.FloorHeight + t.Position.z;
zinfo = zvalue.ToString();
}
}
else
{
zvalue = t.Position.z;
if(zvalue >= 0.0f) zinfo = "+" + zvalue.ToString(); else zinfo = zvalue.ToString();
}
}
// Thing info
infopanel.Text = " Thing " + t.Index + " ";
type.Text = t.Type + " - " + ti.replacedle;
action.Text = actioninfo;
position.Text = t.Position.x.ToString() + ", " + t.Position.y.ToString() + ", " + zinfo;
tag.Text = t.Tag.ToString();
angle.Text = t.AngleDoom.ToString() + "\u00B0";
// Sprite
if(ti.Sprite.ToLowerInvariant().StartsWith(DataManager.INTERNAL_PREFIX) && (ti.Sprite.Length > DataManager.INTERNAL_PREFIX.Length))
{
spritename.Text = "";
General.DisplayZoomedImage(spritetex, General.Map.Data.GetSpriteImage(ti.Sprite).GetBitmap());
}
else if(ti.Sprite.Length > 0)
{
spritename.Text = ti.Sprite;
General.DisplayZoomedImage(spritetex, General.Map.Data.GetSpriteImage(ti.Sprite).GetPreview());
}
else
{
spritename.Text = "";
spritetex.BackgroundImage = null;
}
// Arguments
if(act != null)
{
arglbl1.Text = act.Args[0].replacedle + ":";
arglbl2.Text = act.Args[1].replacedle + ":";
arglbl3.Text = act.Args[2].replacedle + ":";
arglbl4.Text = act.Args[3].replacedle + ":";
arglbl5.Text = act.Args[4].replacedle + ":";
arglbl1.Enabled = act.Args[0].Used;
arglbl2.Enabled = act.Args[1].Used;
arglbl3.Enabled = act.Args[2].Used;
arglbl4.Enabled = act.Args[3].Used;
arglbl5.Enabled = act.Args[4].Used;
arg1.Enabled = act.Args[0].Used;
arg2.Enabled = act.Args[1].Used;
arg3.Enabled = act.Args[2].Used;
arg4.Enabled = act.Args[3].Used;
arg5.Enabled = act.Args[4].Used;
th = General.Types.GetArgumentHandler(act.Args[0]);
th.SetValue(t.Args[0]); arg1.Text = th.GetStringValue();
th = General.Types.GetArgumentHandler(act.Args[1]);
th.SetValue(t.Args[1]); arg2.Text = th.GetStringValue();
th = General.Types.GetArgumentHandler(act.Args[2]);
th.SetValue(t.Args[2]); arg3.Text = th.GetStringValue();
th = General.Types.GetArgumentHandler(act.Args[3]);
th.SetValue(t.Args[3]); arg4.Text = th.GetStringValue();
th = General.Types.GetArgumentHandler(act.Args[4]);
th.SetValue(t.Args[4]); arg5.Text = th.GetStringValue();
}
else
{
arglbl1.Text = "Argument 1:";
arglbl2.Text = "Argument 2:";
arglbl3.Text = "Argument 3:";
arglbl4.Text = "Argument 4:";
arglbl5.Text = "Argument 5:";
arglbl1.Enabled = false;
arglbl2.Enabled = false;
arglbl3.Enabled = false;
arglbl4.Enabled = false;
arglbl5.Enabled = false;
arg1.Enabled = false;
arg2.Enabled = false;
arg3.Enabled = false;
arg4.Enabled = false;
arg5.Enabled = false;
arg1.Text = "-";
arg2.Text = "-";
arg3.Text = "-";
arg4.Text = "-";
arg5.Text = "-";
}
// Show the whole thing
this.Show();
//this.Update(); // ano - don't think this is needed, and is slow
}
19
Source : AngleDegreesFloatHandler.cs
with GNU General Public License v3.0
from anotak
with GNU General Public License v3.0
from anotak
public override string GetStringValue()
{
return this.value.ToString();
}
19
Source : FontSerializationHelper.cs
with BSD 3-Clause "New" or "Revised" License
from anoyetta
with BSD 3-Clause "New" or "Revised" License
from anoyetta
public static string ToString(
Font font)
{
if (font == null)
{
return string.Empty;
}
return string.Join(
FontSerializationDelimiter.ToString(),
new string[]
{
font.FontFamily.Name,
font.Size.ToString(),
font.Style.ToString(),
font.Unit.ToString(),
font.GdiCharSet.ToString(),
font.GdiVerticalFont.ToString()
});
}
19
Source : Skill.cs
with Apache License 2.0
from anpShawn
with Apache License 2.0
from anpShawn
public string GetFullDesc()
{
string desc = GetNameAndCost() + " ";
string skillType = "";
if (type == SkillType.MAGICAL)
skillType = Locale.Get("MAGICAL");
else if (type == SkillType.PHYSICAL)
skillType = Locale.Get("PHYSICAL");
if (!string.IsNullOrEmpty(skillType))
desc += skillType + ". ";
//replacedume we want to describe the skill in terms of attack power if it exists
if(attackMultiplier > 0)
{
string strMultiplier = "";
if (attackMultiplier < 1) strMultiplier = attackMultiplier.ToString(".00");
else strMultiplier = attackMultiplier.ToString();
if (strMultiplier[strMultiplier.Length - 1] == '0')
strMultiplier = strMultiplier.Substring(0, strMultiplier.Length - 1);
strMultiplier += "<size=-5>x</size>";
string strTargetType = Locale.Get( targetType == SkillTarget.ALL ? "GROUP" : "TARGET");
desc += Locale.Get("DEALS_ATK_X", strMultiplier, strTargetType) + ". ";
}
string flavorDesc = GetFlavorText();
if(flavorDesc != null)
{
desc += flavorDesc + " ";
}
if(cooldown > 0)
{
desc += Locale.Get("COOLDOWN_X", cooldown.ToString()) + ". ";
}
if (stats != null)
{
//no stats, end with a period
desc += " " + stats.ToStringFormatted();
}
return desc;
}
19
Source : RaycastExample.cs
with MIT License
from aornelas
with MIT License
from aornelas
private void UpdateStatusText()
{
_statusLabel.text = string.Format("Raycast Mode: {0}\nRaycast Hit Confidence: {1}", _raycastMode.ToString(), _confidence.ToString());
if(_raycastMode == RaycastMode.Eyes && MLEyes.IsStarted)
{
_statusLabel.text += string.Format("\n\nEye Calibration Status: {0}", MLEyes.CalibrationStatus.ToString());
}
}
19
Source : MessageTest.cs
with Apache License 2.0
from apache
with Apache License 2.0
from apache
[Test]
public void SendReceiveMessageProperties(
[Values(MsgDeliveryMode.Persistent, MsgDeliveryMode.NonPersistent)]
MsgDeliveryMode deliveryMode)
{
using (IConnection connection = CreateConnection(GetTestClientId()))
{
connection.Start();
using (ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
{
IDestination destination = CreateDestination(session, DestinationType.Queue);
using (IMessageConsumer consumer = session.CreateConsumer(destination))
using (IMessageProducer producer = session.CreateProducer(destination))
{
producer.DeliveryMode = deliveryMode;
IMessage request = session.CreateMessage();
request.Properties["a"] = a;
request.Properties["b"] = b;
request.Properties["c"] = c;
request.Properties["d"] = d;
request.Properties["e"] = e;
request.Properties["f"] = f;
request.Properties["g"] = g;
request.Properties["h"] = h;
request.Properties["i"] = i;
request.Properties["j"] = j;
request.Properties["k"] = k;
request.Properties["l"] = l;
request.Properties["m"] = m;
request.Properties["n"] = n;
try
{
request.Properties["o"] = o;
replacedert.Fail("Should not be able to add a Byte[] to the Properties of a Message.");
}
catch
{
// Expected
}
try
{
request.Properties.SetBytes("o", o);
replacedert.Fail("Should not be able to add a Byte[] to the Properties of a Message.");
}
catch
{
// Expected
}
producer.Send(request);
IMessage message = consumer.Receive(receiveTimeout);
replacedert.IsNotNull(message, "No message returned!");
replacedert.AreEqual(request.Properties.Count, message.Properties.Count,
"Invalid number of properties.");
replacedert.AreEqual(deliveryMode, message.NMSDeliveryMode, "NMSDeliveryMode does not match");
replacedert.AreEqual(ToHex(f), ToHex(message.Properties.GetLong("f")), "map entry: f as hex");
// use generic API to access entries
// Perform a string only comparison here since some NMS providers are type limited and
// may return only a string instance from the generic [] accessor. Each provider should
// further test this functionality to determine that the correct type is returned if
// it is capable of doing so.
replacedert.AreEqual(a.ToString(), message.Properties["a"].ToString(), "generic map entry: a");
replacedert.AreEqual(b.ToString(), message.Properties["b"].ToString(), "generic map entry: b");
replacedert.AreEqual(c.ToString(), message.Properties["c"].ToString(), "generic map entry: c");
replacedert.AreEqual(d.ToString(), message.Properties["d"].ToString(), "generic map entry: d");
replacedert.AreEqual(e.ToString(), message.Properties["e"].ToString(), "generic map entry: e");
replacedert.AreEqual(f.ToString(), message.Properties["f"].ToString(), "generic map entry: f");
replacedert.AreEqual(g.ToString(), message.Properties["g"].ToString(), "generic map entry: g");
replacedert.AreEqual(h.ToString(), message.Properties["h"].ToString(), "generic map entry: h");
replacedert.AreEqual(i.ToString(), message.Properties["i"].ToString(), "generic map entry: i");
replacedert.AreEqual(j.ToString(), message.Properties["j"].ToString(), "generic map entry: j");
replacedert.AreEqual(k.ToString(), message.Properties["k"].ToString(), "generic map entry: k");
replacedert.AreEqual(l.ToString(), message.Properties["l"].ToString(), "generic map entry: l");
replacedert.AreEqual(m.ToString(), message.Properties["m"].ToString(), "generic map entry: m");
replacedert.AreEqual(n.ToString(), message.Properties["n"].ToString(), "generic map entry: n");
// use type safe APIs
replacedert.AreEqual(a, message.Properties.GetBool("a"), "map entry: a");
replacedert.AreEqual(b, message.Properties.GetByte("b"), "map entry: b");
replacedert.AreEqual(c, message.Properties.GetChar("c"), "map entry: c");
replacedert.AreEqual(d, message.Properties.GetShort("d"), "map entry: d");
replacedert.AreEqual(e, message.Properties.GetInt("e"), "map entry: e");
replacedert.AreEqual(f, message.Properties.GetLong("f"), "map entry: f");
replacedert.AreEqual(g, message.Properties.GetString("g"), "map entry: g");
replacedert.AreEqual(h, message.Properties.GetBool("h"), "map entry: h");
replacedert.AreEqual(i, message.Properties.GetByte("i"), "map entry: i");
replacedert.AreEqual(j, message.Properties.GetShort("j"), "map entry: j");
replacedert.AreEqual(k, message.Properties.GetInt("k"), "map entry: k");
replacedert.AreEqual(l, message.Properties.GetLong("l"), "map entry: l");
replacedert.AreEqual(m, message.Properties.GetFloat("m"), "map entry: m");
replacedert.AreEqual(n, message.Properties.GetDouble("n"), "map entry: n");
}
}
}
}
19
Source : AppsFlyerService.cs
with Apache License 2.0
from AppRopio
with Apache License 2.0
from AppRopio
public void TrackECommerce(decimal fullPrice, float quanreplacedy, string orderId, string currency)
{
AppsFlyerLib.Instance.TrackEvent(Application.Context, AFInAppEventType.Purchase,
new Dictionary<string, Java.Lang.Object>
{
{AFInAppEventParameterName.ContentId, "order"},
{AFInAppEventParameterName.ContentType, "order created"},
{AFInAppEventParameterName.ReceiptId, orderId},
{AFInAppEventParameterName.Revenue, fullPrice.ToString()},
{AFInAppEventParameterName.Quanreplacedy, quanreplacedy.ToString()},
{AFInAppEventParameterName.Currency, currency ?? "RUB"}
});
}
19
Source : AppsFlyerService.cs
with Apache License 2.0
from AppRopio
with Apache License 2.0
from AppRopio
public void TrackECommerce(decimal fullPrice, float quanreplacedy, string orderId, string currency)
{
var makeOrderEvent = new NSDictionary(AFEventParameter.AFEventParamContentId, "order",
AFEventParameter.AFEventParamContentType, "order created",
AFEventParameter.AFEventParamReceiptId, orderId,
AFEventParameter.AFEventParamRevenue, fullPrice.ToString(),
AFEventParameter.AFEventParamQuanreplacedy, quanreplacedy.ToString(),
AFEventParameter.AFEventParamCurrency, currency ?? "RUB");
AppsFlyerTracker.SharedTracker().TrackEvent(AFEventName.AFEventPurchase, makeOrderEvent);
}
19
Source : NumberMinMaxFiVm.cs
with Apache License 2.0
from AppRopio
with Apache License 2.0
from AppRopio
protected override string ToRawString(float value)
{
return value.ToString();
}
19
Source : ConfigurationWindow.xaml.cs
with MIT License
from araghon007
with MIT License
from araghon007
void Load()
{
vendorID = int.Parse(Constants.Config.IniReadValue("Controller", "VendorID", "1118"));
VendorID.Text = vendorID.ToString();
productID = int.Parse(Constants.Config.IniReadValue("Controller", "ProductID", "746"));
ProductID.Text = productID.ToString();
leftStrength = float.Parse(Constants.Config.IniReadValue("Triggers", "LeftStrength", "1.0"), CultureInfo.InvariantCulture);
LeftStrength.Text = leftStrength.ToString();
rightStrength = float.Parse(Constants.Config.IniReadValue("Triggers", "RightStrength", "1.0"), CultureInfo.InvariantCulture);
RightStrength.Text = rightStrength.ToString();
leftInputModifierBase = float.Parse(Constants.Config.IniReadValue("Triggers", "LeftInputModifierBase", "100.0"), CultureInfo.InvariantCulture);
LeftInputModifierBase.Text = leftInputModifierBase.ToString();
rightInputModifierBase = float.Parse(Constants.Config.IniReadValue("Triggers", "RightInputModifierBase", "100.0"), CultureInfo.InvariantCulture);
RightInputModifierBase.Text = rightInputModifierBase.ToString();
leftTriggerLink = int.Parse(Constants.Config.IniReadValue("Triggers", "LeftTriggerLink", "0"));
LeftTriggerLink.SelectedIndex = leftTriggerLink;
rightTriggerLink = int.Parse(Constants.Config.IniReadValue("Triggers", "RightTriggerLink", "0"));
RightTriggerLink.SelectedIndex = rightTriggerLink;
leftMotorStrength = float.Parse(Constants.Config.IniReadValue("Motors", "LeftStrength", "1.0"), CultureInfo.InvariantCulture);
LeftMotorStrength.Text = leftMotorStrength.ToString();
rightMotorStrength = float.Parse(Constants.Config.IniReadValue("Motors", "RightStrength", "1.0"), CultureInfo.InvariantCulture);
RightMotorStrength.Text = rightMotorStrength.ToString();
swapSides = bool.Parse(Constants.Config.IniReadValue("Motors", "SwapSides", "False"));
SwapSides.IsChecked = swapSides;
}
19
Source : GUIUtils.cs
with GNU General Public License v3.0
from ArduinoIoTDev
with GNU General Public License v3.0
from ArduinoIoTDev
public static string GetStringFromFloatArray(float[] vars)
{
string res = string.Empty;
if (vars != null)
{
for (int i = 0; i < vars.Length; i++)
{
if (i < (vars.Length - 1))
res = res + vars[i].ToString() + " ";
else
res = res + vars[i].ToString();
}
}
return res;
}
See More Examples