private void btnSaveCard_Click(object sender, EventArgs e)
 {
     if (cbCardSelect.SelectedIndex != -1)
     {
         Objects.GraphicsCard cardSelected = rig.CardList[CardIDDropdown[cbCardSelect.SelectedIndex]];
         cardSelected.FriendlyName = tbGCFriendlyName.Text;
         DataHelper.DataManager.UpdateGraphicsCardFirendlyName(cardSelected);
     }
 }
        private void UpdateCardStatsView(bool UpdateFriendlyName)
        {
            int CardSelect = cbCardSelect.SelectedIndex;

            if (CardSelect != -1)
            {
                Objects.GraphicsCard cardSelected = rig.CardList[CardIDDropdown[CardSelect]];
                tbGCName.Text = cardSelected.DeviceName;
                if (UpdateFriendlyName)
                {
                    tbGCFriendlyName.Text = cardSelected.FriendlyName;
                }
                if (cardSelected.LastWorkUnits != null)
                {
                    string AlgoName      = "";
                    double totalTime     = 0;
                    float  totalEarnings = 0;
                    foreach (Objects.WorkUnit WU in cardSelected.LastWorkUnits)
                    {
                        AlgoName      += WU.algo.Name + "\t";
                        totalTime     += WU.Time;
                        totalEarnings += (WU.caclulatedEarnings * WU.efficiency) * ((float)WU.Time / (60 * 60 * 24));
                    }
                    float EarningsRate = (totalEarnings / (float)totalTime) * (60 * 60 * 24) * cardSelected.LastWorkUnits.Count();
                    tbGCEarnings.Text = EarningsRate.ToString();
                    tbAlogName.Text   = AlgoName;
                }
                else
                {
                    tbAlogName.Text   = "";
                    tbGCEarnings.Text = "";
                }
                if (cardSelected.LastGPUMetric != null)
                {
                    tbGCTemp.Text     = cardSelected.LastGPUMetric.Temprature.ToString();
                    tbGCPower.Text    = cardSelected.LastGPUMetric.Power.ToString();
                    tbGPUPercent.Text = cardSelected.LastGPUMetric.GPUUsage.ToString();
                    tbFanPercent.Text = cardSelected.LastGPUMetric.FanSpeedPercent.ToString();
                    tbFanRPM.Text     = cardSelected.LastGPUMetric.FanSpeedRPM.ToString();
                }
                tbCardUUID.Text = cardSelected.GUID;
            }
        }