예제 #1
0
        public void SetTraitorsEnabled(YesNoMaybe enabled)
        {
            if (GameMain.Server != null)
            {
                GameMain.Server.TraitorsEnabled = enabled;
            }
#if CLIENT
            (traitorProbabilityText as GUITextBlock).Text = enabled.ToString();
#endif
        }
예제 #2
0
        public void SetTraitorsEnabled(YesNoMaybe enabled)
        {
#if SERVER
            if (GameMain.Server != null)
            {
                GameMain.Server.ServerSettings.TraitorsEnabled = enabled;
            }
#endif
#if CLIENT
            (traitorProbabilityText as GUITextBlock).Text = TextManager.Get(enabled.ToString());
#endif
        }
예제 #3
0
 public TypeWithOnlyEnum(YesNoMaybe maybe)
 {
     _maybe = maybe;
 }
예제 #4
0
   public TypeWithABunchOfTypes(bool aBool, int aInt, long aLong, short aShort, string aString, YesNoMaybe aEnum,
 DateTime aDateTime)
   {
       _aBool = aBool;
         _aDateTime = aDateTime;
         _aInt = aInt;
         _aLong = aLong;
         _aShort = aShort;
         _aString = aString;
         _aEnum = aEnum;
   }
        public override void AddDataElement(string key, string value)
        {
            bool val;

            key = key.ToUpper();
            YesNoMaybe YesNoMabyVal;

            switch (key)
            {
            case PatientInterestKey:
                if (bool.TryParse(value, out val))
                {
                    this.PatientInterest = val;
                }
                break;

            case OverviewBenefitsKey:
                if (bool.TryParse(value, out val))
                {
                    this.OverviewBenefits = val;
                }
                break;

            case SupportServicesKey:
                if (bool.TryParse(value, out val))
                {
                    this.SupportServices = val;
                }
                break;

            case SuppliesKey:
                if (bool.TryParse(value, out val))
                {
                    this.Supplies = val;
                }
                break;

            case PatientInterestInBrestfeedKey:
                if (YesNoMaybe.TryParse <YesNoMaybe>(value, out YesNoMabyVal))
                {
                    this.PatientInterestedInBreastfeeding = YesNoMabyVal;
                }
                break;

            case PatientInterestInMoreInfoKey:
                if (YesNoMaybe.TryParse <YesNoMaybe>(value, out YesNoMabyVal))
                {
                    this.PatientInterestedInMoreInformation = YesNoMabyVal;
                }
                break;

            case PatientInterestInSuppliesKey:
                if (YesNoMaybe.TryParse <YesNoMaybe>(value, out YesNoMabyVal))
                {
                    this.PatientInterestedInSupplies = YesNoMabyVal;
                }
                break;

            //case PatientIntendsToBreastfeedKey:
            //    if (bool.TryParse(value, out val))
            //        this.PatientIntendsToBreastfeed = val;
            //break;
            case OfferToOrderSuppliesKey:
                if (bool.TryParse(value, out val))
                {
                    this.OfferToOrderSupplies = val;
                }
                break;

            case BreastPumpOrderedKey:
                if (!string.IsNullOrWhiteSpace(value))
                {
                    if (bool.TryParse(value, out val))
                    {
                        this.BreastPumpOrdered = val;
                    }
                }
                break;

            case BreastPumpRecievedKey:
                if (!string.IsNullOrWhiteSpace(value))
                {
                    if (bool.TryParse(value, out val))
                    {
                        this.BreastPumpReceived = val;
                    }
                }
                break;

            case ReOfferBreastPumpKey:
                if (bool.TryParse(value, out val))
                {
                    this.ReOfferBreastPump = val;
                }
                break;

            case AdviseToCallKey:
                if (bool.TryParse(value, out val))
                {
                    this.AdviseToCall = val;
                }
                break;

            case SuppliesToOrderKey:
                this.SuppliesToOrder = value;
                break;

            case BreastfeedingCommentKey:
                this.BreastfeedingComment = value;
                break;

            case ConfirmReceiptKey:
                if (bool.TryParse(value, out val))
                {
                    this.ConfirmReceipt = val;
                }
                break;

            case BreastfeedingAssessmentKey:
                if (bool.TryParse(value, out val))
                {
                    this.BreastfeedingAssessment = val;
                }
                break;

            case SuppliesUseKey:
                if (bool.TryParse(value, out val))
                {
                    this.SuppliesUse = val;
                }
                break;
            }
        }