예제 #1
0
    public void setNextState(TypeNextStateKnownValues new_value)
    {
        TypeNextState new_full_value = new TypeNextState();

        Debug.Assert(new_value != TypeNextStateKnownValues.NextState__none);
        new_full_value.in_known_list = true;
        new_full_value.list_value    = new_value;
        setNextState(new_full_value);
    }
예제 #2
0
            protected override void handle_result(string result)
            {
                TypeNextStateKnownValues known     = stringToNextState(result);
                TypeNextState            new_value = new TypeNextState();

                if (known == TypeNextStateKnownValues.NextState__none)
                {
                    new_value.in_known_list = false;
                    new_value.string_value  = result;
                }
                else
                {
                    new_value.in_known_list = true;
                    new_value.list_value    = known;
                }
                handle_result(new_value);
            }
예제 #3
0
    public void setNextState(string chars)
    {
        TypeNextStateKnownValues known     = stringToNextState(chars);
        TypeNextState            new_value = new TypeNextState();

        if (known == TypeNextStateKnownValues.NextState__none)
        {
            new_value.in_known_list = false;
            new_value.string_value  = chars;
        }
        else
        {
            new_value.in_known_list = true;
            new_value.list_value    = known;
        }
        setNextState(new_value);
    }
예제 #4
0
    public static string  stringFromNextState(TypeNextStateKnownValues the_enum)
    {
        switch (the_enum)
        {
        case TypeNextStateKnownValues.NextState_select_pick_up_location:
            return("select_pick_up_location");

        case TypeNextStateKnownValues.NextState_select_drop_off_location:
            return("select_drop_off_location");

        case TypeNextStateKnownValues.NextState_request_confirmation:
            return("request_confirmation");

        case TypeNextStateKnownValues.NextState_login:
            return("login");

        case TypeNextStateKnownValues.NextState_surge_confirmation:
            return("surge_confirmation");

        default:
            Debug.Assert(false);
            return(null);
        }
    }