示例#1
0
 private void dgShowStorages_SelectionChanged(object sender, EventArgs e)
 {
     foreach (DataGridViewRow row in dgShowStorages.SelectedRows)
     {
         DiskInfo disc = new DiskInfo()
         {
             Model = row.Cells["Model"].Value?.ToString(),
             IsSSD = false,
             Index = 0,
             Size  = 0
         };
         ShowPCtoList(dicPC, disc);
     }
 }
示例#2
0
        public bool IsSame(object obj)
        {
            if (obj is DiskInfo)
            {
                DiskInfo diskInfo = obj as DiskInfo;
                if (this.Model == diskInfo.Model)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            MessageBox.Show("this obj not a Disc");

            return(false);
        }