Esempio n. 1
0
    private string SubstractFileInfo(string file, File.eType type)
    {
        string[] parts = file.Split('_');

        switch (type)
        {
        case File.eType.File:
        {
            if (parts.Length > 1)
            {
                return(parts[0]);
            }
            return(string.Empty);
        }

        case File.eType.Field:
        {
            if (parts.Length > 2)
            {
                return(parts[1]);
            }
            return(string.Empty);
        }

        default:
            return(string.Empty);
        }
    }
Esempio n. 2
0
    public string GetFileName(object item)
    {
        File.eType itemType = (File.eType)DataBinder.Eval(item, "Type");
        switch (itemType)
        {
        case File.eType.File:
            return(DataBinder.Eval(item, "FileName").ToString());

        case File.eType.Field:
            return(DataBinder.Eval(item, "FileName").ToString() + "_" + DataBinder.Eval(item, "FieldName").ToString());

        default:
            return(DataBinder.Eval(item, "FileName").ToString());
        }
    }
Esempio n. 3
0
    public string GetFileType(object item)
    {
        File.eType type = (File.eType)DataBinder.Eval(item, "Type");
        switch (type)
        {
        case File.eType.File:
            return(GetGlobalResourceObject("ContextHelpManager", "file").ToString());

        case File.eType.Field:
            return(GetGlobalResourceObject("ContextHelpManager", "field").ToString());

        case File.eType.Undefined:
            return(GetGlobalResourceObject("ContextHelpManager", "undefined").ToString());

        default:
            return(string.Empty);
        }
    }