Beispiel #1
0
 public virtual void ShowDetails()
 {
     ElectricityFunctions.WorkOutActualNumbers(this);
     Logger.Log("connections " + (string.Join(",", Data.connections)), Category.Electrical);
     //Logger.Log("ID " + (this.GetInstanceID()), Category.Electrical);
     Logger.Log("Type " + (Categorytype.ToString()), Category.Electrical);
     Logger.Log("Can connect to " + (string.Join(",", CanConnectTo)), Category.Electrical);
     Logger.Log("WireEndA > " + WireEndA + " WireEndB > " + WireEndB, Category.Electrical);
     foreach (var Supply in Data.SupplyDependent)
     {
         string ToLog;
         ToLog  = "Supply > " + Supply.Key + "\n";
         ToLog += "Upstream > ";
         ToLog += string.Join(",", Supply.Value.Upstream) + "\n";
         ToLog += "Downstream > ";
         ToLog += string.Join(",", Supply.Value.Downstream) + "\n";
         ToLog += "ResistanceGoingTo > ";
         ToLog += string.Join(",", Supply.Value.ResistanceGoingTo) + "\n";
         ToLog += "ResistanceComingFrom > ";
         ToLog += string.Join(",", Supply.Value.ResistanceComingFrom) + "\n";
         ToLog += "CurrentComingFrom > ";
         ToLog += string.Join(",", Supply.Value.CurrentComingFrom) + "\n";
         ToLog += "CurrentGoingTo > ";
         ToLog += string.Join(",", Supply.Value.CurrentGoingTo) + "\n";
         ToLog += "SourceVoltages > ";
         ToLog += string.Join(",", Supply.Value.SourceVoltage) + "\n";
         Logger.Log(ToLog, Category.Electrical);
     }
     Logger.Log(" ActualVoltage > " + Data.ActualVoltage
                + " CurrentInWire > " + Data.CurrentInWire
                + " EstimatedResistance >  " + Data.EstimatedResistance, Category.Electrical);
 }
        public virtual string ShowDetails()
        {
            StringBuilder SB = new StringBuilder();

            ElectricityFunctions.WorkOutActualNumbers(this);
            SB.Append("connections " + (string.Join(",", Data.connections)));
            SB.Append("\n");
            SB.Append("Type " + (Categorytype.ToString()));
            SB.Append("\n");
            SB.Append("Can connect to " + (string.Join(",", CanConnectTo)));
            SB.Append("\n");
            SB.Append("WireEndA > " + WireEndA + " WireEndB > " + WireEndB);
            foreach (var Supply in Data.SupplyDependent)
            {
                SB.Append("Supply > " + Supply.Key + "\n");
                SB.Append("Upstream > ");
                SB.Append(string.Join(",", Supply.Value.Upstream) + "\n");
                SB.Append("Downstream > ");
                SB.Append(string.Join(",", Supply.Value.Downstream) + "\n");
                SB.Append("ResistanceGoingTo > ");
                SB.Append(string.Join(",", Supply.Value.ResistanceGoingTo) + "\n");
                SB.Append("ResistanceComingFrom > ");
                SB.Append(string.Join(",", Supply.Value.ResistanceComingFrom) + "\n");
                SB.Append("CurrentComingFrom > ");
                SB.Append(string.Join(",", Supply.Value.CurrentComingFrom) + "\n");
                SB.Append("CurrentGoingTo > ");
                SB.Append(string.Join(",", Supply.Value.CurrentGoingTo) + "\n");
                SB.Append("SourceVoltages > ");
                SB.Append(string.Join(",", Supply.Value.SourceVoltage) + "\n");
            }
            SB.Append(" ActualVoltage > " + Data.ActualVoltage
                      + " CurrentInWire > " + Data.CurrentInWire
                      + " EstimatedResistance >  " + Data.EstimatedResistance);
            return(SB.ToString());
        }
Beispiel #3
0
 public string ShowInGameDetails()
 {
     ElectricityFunctions.WorkOutActualNumbers(this);
     return("Component : " + Categorytype + "\nVoltage > " + Data.ActualVoltage.ToEngineering("V") + " Current > " + Data.CurrentInWire.ToEngineering("A"));
 }
 public string ShowInGameDetails()
 {
     ElectricityFunctions.WorkOutActualNumbers(this);
     return($"{Categorytype}: {Data.ActualVoltage.ToEngineering("V")}, {Data.CurrentInWire.ToEngineering("A")}");
 }