コード例 #1
0
ファイル: VMStoragePage.cs プロジェクト: paitha28/xenadmin
        private object CellValue(int col)
        {
            switch (col)
            {
            case 0:
                return(VBD.userdevice);

            case 1:
                return(VDI.Name());

            case 2:
                return(VDI.Description());

            case 3:
                return(SR.Name());

            case 4:
                string name;
                return(VDI.sm_config.TryGetValue("displayname", out name) ? name : "");

            case 5:
                return(VDI.SizeText());

            case 6:
                return(VBD.IsReadOnly() ? Messages.YES : Messages.NO);

            case 7:
                return(GetPriorityString(VBD.GetIoNice()));

            case 8:
                return(VBD.currently_attached ? Messages.YES : Messages.NO);

            case 9:
                return(VBD.device == "" ? Messages.STORAGE_PANEL_UNKNOWN : string.Format("/dev/{0}", VBD.device));

            default:
                throw new ArgumentException(String.Format("Invalid column number {0} in VBDRenderer.CellValue()", col));
            }
        }