예제 #1
0
 private void dgShowOSs_SelectionChanged(object sender, EventArgs e)
 {
     foreach (DataGridViewRow row in dgShowOSs.SelectedRows)
     {
         OperationSystem os = new OperationSystem()
         {
             ProductName = row.Cells["OSName"].Value?.ToString(),
             Build       = row.Cells["Build"].Value?.ToString(),
             Version     = row.Cells["Version"].Value?.ToString(),
             IsX64       = row.Cells["isX64"].Value?.ToString() == "YES" ? true : false
         };
         ShowPCtoList(dicPC, os);
     }
 }
예제 #2
0
        public bool IsSame(object obj)
        {
            if (obj is OperationSystem)
            {
                OperationSystem os = obj as OperationSystem;
                if (this.ProductName == os.ProductName &&
                    this.Version == os.Version &&
                    this.Build == os.Build &&
                    this.IsX64 == os.IsX64)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            MessageBox.Show("this obj not a OperationSystem");

            return(false);
        }