コード例 #1
0
        public string GetStatus()
        {
            if (Script != null)
            {
                string state    = ControllerStateDictionary.Dict[Script.GetState()];
                string fraction = GetStateFractionScripted();

                if (String.IsNullOrEmpty(state) && String.IsNullOrEmpty(fraction))
                {
                    return(String.Empty);
                }
                else if (!String.IsNullOrEmpty(state) && String.IsNullOrEmpty(fraction))
                {
                    return(state);
                }
                else if (String.IsNullOrEmpty(state) && !String.IsNullOrEmpty(fraction))
                {
                    return(fraction);
                }
                else
                {
                    return(String.Format("{0} {1}", state, fraction));
                }
            }
            else
            {
                return(String.Empty);
            }
        }
コード例 #2
0
        public string GetStatus()
        {
            if (Script != null)
            {
                //ToDo translation via catalog
                string state    = EnumExtension.GetDescription(Script.GetState());
                string fraction = GetStateFractionScripted();

                if (String.IsNullOrEmpty(state) && String.IsNullOrEmpty(fraction))
                {
                    return(String.Empty);
                }
                else if (!String.IsNullOrEmpty(state) && String.IsNullOrEmpty(fraction))
                {
                    return(state);
                }
                else if (String.IsNullOrEmpty(state) && !String.IsNullOrEmpty(fraction))
                {
                    return(fraction);
                }
                else
                {
                    return(String.Format("{0} {1}", state, fraction));
                }
            }
            else
            {
                return(String.Empty);
            }
        }
コード例 #3
0
        public string GetStatus()
        {
            if (Script != null)
            {
                //ToDo translation via catalog
                string state    = Script.GetState().GetLocalizedDescription();
                string fraction = GetStateFractionScripted();

                if (string.IsNullOrEmpty(state) && string.IsNullOrEmpty(fraction))
                {
                    return(string.Empty);
                }
                else if (!string.IsNullOrEmpty(state) && string.IsNullOrEmpty(fraction))
                {
                    return(state);
                }
                else if (string.IsNullOrEmpty(state) && !string.IsNullOrEmpty(fraction))
                {
                    return(fraction);
                }
                else
                {
                    return($"{state} {fraction}");
                }
            }
            else
            {
                return(string.Empty);
            }
        }