ObjectEditor.frmMain.SetListViewFormatters C# (CSharp) Method

SetListViewFormatters() private method

private SetListViewFormatters ( ) : void
return void
        private void SetListViewFormatters()
        {
            this.olvType.AspectToStringConverter = delegate(object x) {
                int Id=(int)x;
                return String.Format("{0}", FOCommon.Utils.GetKeyByValue(Data.ItemTypes, Id));
            };

            this.olvPID.AspectToStringConverter = delegate(object x)
            {
                UInt16 Pid = (UInt16)x;
                if (Config.ShowItemPidDefine)
                {
                    String Str = FOCommon.Utils.GetKeyByValue(Data.ItemPid, Pid);
                    if (String.IsNullOrEmpty(Str))
                        return String.Format("{0}", Pid);
                    else
                    {
                        if (Config.ItemPidDefineBeforeId)
                            return String.Format("{0}", Str + " [" + Pid + "]");
                        else
                            return String.Format("{0}", Pid + " [" + Str + "]");
                    }
                }
                return String.Format("{0}", Pid);
            };

            this.olvFile.AspectToStringConverter = delegate(object x)
            {
                String FilePath = (String)x;
                if (Config.ShowWholeFilePath)
                    return FilePath;
                return Path.GetFileName(FilePath);
            };
        }