public string ReturnResolution() { string resolution; resolution = $"{Diagonal.ToString()} inches; {Horizontal.ToString()}x{Vertical.ToString()} pixels; {CalculatePpi(Horizontal, Vertical, Diagonal)} ppi"; return(resolution); }
internal void Export(XmlWriter writer) { writer.WriteStartElement("Alignment"); if (Vertical != VerticalAlignment.None) { writer.WriteAttributeString("ss", "Vertical", null, Vertical.ToString()); } if (Horizontal != HorizontalAlignment.None) { writer.WriteAttributeString("ss", "Horizontal", null, Horizontal.ToString()); } if (WrapText) { writer.WriteAttributeString("ss", "WrapText", null, "1"); } if (ShrinkToFit) { writer.WriteAttributeString("ss", "ShrinkToFit", null, "1"); } if (Indent > 0) { writer.WriteAttributeString("ss", "Indent", null, Indent.ToString(CultureInfo.InvariantCulture)); } if (Rotate > 0) { writer.WriteAttributeString("ss", "Rotate", null, Rotate.ToString(CultureInfo.InvariantCulture)); } writer.WriteEndElement(); }
public override string ToString() { ///Shrnutí ///Metoda ToString() vrátí obě dvě čísla oddělená čárkou ///Tato metoda je důležitá při ukládání hry do souboru string toString = Horizontal.ToString() + ',' + Vertical.ToString(); return(toString); }
/// <summary> /// Save Features.Charts.Guidelines settings to the settings file /// </summary> /// <param name="generalNode">XML-node for the Features.Charts.Guidelines settings</param> public void Save(XmlNode guidelineNode) { string xpath; xpath = "./color"; SettingsHelper.SetSettingValue(xpath, guidelineNode, Color); xpath = "./horizontal"; SettingsHelper.SetSettingValue(xpath, guidelineNode, Horizontal.ToString()); xpath = "./vertical"; SettingsHelper.SetSettingValue(xpath, guidelineNode, Vertical.ToString()); }
void ProcessReceivedMessage_JoyStick_Horizontal_PS2(Nettention.Proud.Message __msg, Nettention.Proud.ReceivedMessage pa, Object hostTag, Nettention.Proud.HostID remote) { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; float Horizontal; SngClient.Marshaler.Read(__msg, out Horizontal); core.PostCheckReadMessage(__msg, RmiName_JoyStick_Horizontal_PS2); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += Horizontal.ToString() + ","; NotifyCallFromStub(Common.JoyStick_Horizontal_PS2, RmiName_JoyStick_Horizontal_PS2, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.JoyStick_Horizontal_PS2; summary.rmiName = RmiName_JoyStick_Horizontal_PS2; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = JoyStick_Horizontal_PS2(remote, ctx, Horizontal); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_JoyStick_Horizontal_PS2); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.JoyStick_Horizontal_PS2; summary.rmiName = RmiName_JoyStick_Horizontal_PS2; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } }
public override string ToString() { return(Type.ToString() + " [" + Vertical.ToString() + ", " + Horizontal.ToString() + "] " + NextState.ToString()); }
public override string ToString() { return($"{(Horizontal == null ? "undefined" : Horizontal.ToString())}, {(Vertical == null ? "undefined" : Vertical.ToString())}"); }
/* * public static bool operator ==(Direction direction1, Direction direction2) * { * return direction1.Horizontal == direction2.Horizontal && direction1.Vertical == direction2.Vertical; * } * * public static bool operator !=(Direction direction1, Direction direction2) * { * return direction1.Horizontal != direction2.Horizontal || direction1.Vertical != direction2.Vertical; * } */ public override string ToString() { return(Horizontal.ToString() + " " + Vertical.ToString()); }