Beispiel #1
0
 private void UpdateContext()
 {
     GUI_OmniRange = RTUtil.FormatSI(Omni, "m");
     GUI_DishRange = RTUtil.FormatSI(Dish, "m");
     GUI_EnergyReq = RTUtil.FormatConsumption(Consumption);
     Events["EventTarget"].guiName = RTUtil.TargetName(Target);
 }
Beispiel #2
0
        public override string GetInfo()
        {
            var info = new StringBuilder();

            if (ShowEditor_OmniRange && Mode1OmniRange > 0)
            {
                info.AppendFormat("Omni range: {0} / {1}", RTUtil.FormatSI(Mode0OmniRange * RangeMultiplier, "m"), RTUtil.FormatSI(Mode1OmniRange * RangeMultiplier, "m")).AppendLine();
            }
            if (ShowEditor_DishRange && Mode1DishRange > 0)
            {
                info.AppendFormat("Dish range: {0} / {1}", RTUtil.FormatSI(Mode0DishRange * RangeMultiplier, "m"), RTUtil.FormatSI(Mode1DishRange * RangeMultiplier, "m")).AppendLine();
            }
            if (ShowEditor_EnergyReq && EnergyCost > 0)
            {
                info.AppendFormat("Energy req.: {0}", RTUtil.FormatConsumption(EnergyCost * ConsumptionMultiplier)).AppendLine();
            }

            if (ShowEditor_DishAngle && CanTarget)
            {
                info.AppendFormat("Cone angle: {0} degrees", DishAngle.ToString("F2")).AppendLine();
            }

            if (IsRTActive)
            {
                info.AppendLine("Activated by default");
            }

            if (MaxQ > 0)
            {
                info.AppendLine("Snaps under high dynamic pressure");
            }

            return(info.ToString().TrimEnd(Environment.NewLine.ToCharArray()));
        }
Beispiel #3
0
        public override string GetInfo()
        {
            var info = new StringBuilder();

            if (ShowEditor_OmniRange && Mode1OmniRange > 0)
            {
                info.AppendFormat("Omni {0}: {1} / {2}", AntennaInfoDescriptionFromRangeModel(), RTUtil.FormatSI(Mode0OmniRange * RangeMultiplier, "m"), RTUtil.FormatSI(Mode1OmniRange * RangeMultiplier, "m")).AppendLine();
            }
            if (ShowEditor_DishRange && Mode1DishRange > 0)
            {
                info.AppendFormat("Dish {0}: {1} / {2}", AntennaInfoDescriptionFromRangeModel(), RTUtil.FormatSI(Mode0DishRange * RangeMultiplier, "m"), RTUtil.FormatSI(Mode1DishRange * RangeMultiplier, "m")).AppendLine();
            }

            if (ShowEditor_DishAngle && CanTarget)
            {
                info.AppendFormat("Cone angle: {0} degrees", DishAngle.ToString("F3")).AppendLine();
            }

            if (IsRTActive)
            {
                info.AppendLine("<color=#89929B>Activated by default</color>");
            }

            if (MaxQ > 0)
            {
                info.AppendLine("<b><color=#FDA401>Snaps under high dynamic pressure</color></b>");
            }

            if (this.IsNonRetractable)
            {
                info.AppendLine("<b><color=#FDA401>Antenna is not retractable</color></b>");
            }

            if (ShowEditor_EnergyReq && EnergyCost > 0)
            {
                info.AppendLine().Append("<b><color=#99ff00ff>Requires:</color></b>").AppendLine();
                info.AppendFormat("<b>ElectricCharge: </b>{0}", RTUtil.FormatConsumption(EnergyCost * ConsumptionMultiplier)).AppendLine();
            }

            return(info.ToString().TrimEnd(Environment.NewLine.ToCharArray()));
        }
Beispiel #4
0
        public override string GetInfo()
        {
            var info = new StringBuilder();

            if (ShowEditor_OmniRange && Mode1OmniRange > 0)
            {
                info.AppendFormat(Localizer.Format("#RT_Editor_Omni") + " {0}: {1} / {2}", AntennaInfoDescriptionFromRangeModel(), RTUtil.FormatSI(Mode0OmniRange * RangeMultiplier, "m"), RTUtil.FormatSI(Mode1OmniRange * RangeMultiplier, "m")).AppendLine();//"Omni"
            }
            if (ShowEditor_DishRange && Mode1DishRange > 0)
            {
                info.AppendFormat(Localizer.Format("#RT_Editor_Dish") + " {0}: {1} / {2}", AntennaInfoDescriptionFromRangeModel(), RTUtil.FormatSI(Mode0DishRange * RangeMultiplier, "m"), RTUtil.FormatSI(Mode1DishRange * RangeMultiplier, "m")).AppendLine();//"Dish"
            }

            if (ShowEditor_DishAngle && CanTarget)
            {
                info.AppendFormat(Localizer.Format("#RT_Editor_Coneangle") + " {0} " + Localizer.Format("#RT_degrees"), DishAngle.ToString("F3")).AppendLine();//"Cone angle:degrees"
            }

            if (IsRTActive)
            {
                info.AppendLine("<color=green>" + Localizer.Format("#RT_Editor_Activatedbydefault") + "</color>");//"Activated by default"
            }

            if (MaxQ > 0)
            {
                info.AppendLine("<b><color=#FDA401>" + Localizer.Format("#RT_Editor_Snaps") + "</color></b>");//"Snaps under high dynamic pressure"
            }

            if (this.IsNonRetractable)
            {
                info.AppendLine("<b><color=#FDA401>" + Localizer.Format("#RT_Editor_Notretractable") + "</color></b>");//"Antenna is not retractable"
            }

            if (ShowEditor_EnergyReq && EnergyCost > 0)
            {
                info.AppendLine().Append("<b><color=#99ff00ff>" + Localizer.Format("#RT_Editor_Requires") + "</color></b>").AppendLine();                                              //"Requires:"
                info.AppendFormat("<b>" + Localizer.Format("#RT_Editor_ElectricCharge") + " </b>" + "{0}", RTUtil.FormatConsumption(EnergyCost * ConsumptionMultiplier)).AppendLine(); //"ElectricCharge:
            }

            return(info.ToString().TrimEnd(Environment.NewLine.ToCharArray()));
        }