Пример #1
0
    private void UpdateData()
    {
        this.InternalReset();
        if (this.BoostProfileEntry == null)
        {
            return;
        }
        this.Enabled = true;
        this.tbProfileBoostMin0.Text = CE00D.E005(this.BoostProfileEntry.PE003);
        this.tbProfileBoostMax0.Text = CE00D.E005(this.BoostProfileEntry.PE004);
        this.lblProfileBoost0.Text   = string.Format("P{0:00} - Profile", this.BoostProfileEntry.PE002);
        List <CE01B> list = Enumerable.ToList <CE01B>(Enumerable.OrderBy <CE01B, byte>(this.BoostProfileEntry.FE008, c => c.PE001));

        for (int index = 0; index < list.Count && index < 3; ++index)
        {
            CE01B   obj      = list[index];
            Control control1 = this.Ctrl(string.Format("tbBoostMin0Clock{0}", index));
            Control control2 = this.Ctrl(string.Format("tbBoostMax0Clock{0}", index));
            this.Ctrl(string.Format("lblBoostProfileMinClock{0}", index));
            this.Ctrl(string.Format("lblBoostProfileMaxClock{0}", index));
            control1.Enabled = true;
            control2.Enabled = true;
            control1.Text    = CE00D.E005(obj.PE003);
            control2.Text    = CE00D.E005(obj.PE004);
        }
    }
Пример #2
0
 private void E001(bool param0 = true)
 {
     this.E000();
     if (this.FE000 == null)
     {
         return;
     }
     if (param0)
     {
         this.E002();
     }
     if (this.FE000.PE00A != byte.MaxValue)
     {
         this.FE004.Text    = CE00D.E005(this.FE000.FE008[this.FE000.PE00A].FE005[0].PE001);
         this.FE004.Enabled = true;
     }
     if (this.FE000.PE008 != byte.MaxValue)
     {
         this.FE006.Text    = CE00D.E005(this.FE000.FE008[this.FE000.PE008].FE005[0].PE001);
         this.FE006.Enabled = this.FE000.PE008 != this.FE000.PE00A;
     }
     if (this.FE000.PE009 == byte.MaxValue)
     {
         return;
     }
     this.FE005.Text    = CE00D.E005(this.FE000.FE008[this.FE000.PE009].FE005[0].PE001);
     this.FE005.Enabled = this.FE000.PE009 != this.FE000.PE00A && this.FE000.PE009 != this.FE000.PE008;
 }
Пример #3
0
 public ushort GetAllMaxClock()
 {
     if (!this.AreAllMaxClocksEqual())
     {
         return(0);
     }
     return(CE00D.E006(this.tbProfileBoostMax0.Text));
 }
Пример #4
0
 private string GetClockString(int index)
 {
     if (this._SliderClocks == null)
     {
         return("");
     }
     return(string.Format("{0} MHz", CE00D.E005(this._SliderClocks[index])));
 }
 private void numClockSelector_ValueChanged(object sender, EventArgs e)
 {
     if (updating)
     {
         return;
     }
     tbClock.Text = CE00D.E005(CE00D.PE000[(int)numClockSelector.Value]);
 }
Пример #6
0
 public void SetAllMaxClock(ushort clock)
 {
     if (this.BoostProfileEntry == null)
     {
         return;
     }
     this.tbProfileBoostMax0.Text = CE00D.E005(clock);
     for (int index = 0; index < this.BoostProfileEntry.FE008.Count && index < 3; ++index)
     {
         this.Ctrl(string.Format("tbBoostMax0Clock{0}", index)).Text = CE00D.E005(clock);
     }
 }
Пример #7
0
    private void InitSlider()
    {
        ushort num1 = CE00D.E006(this.GetItemByIndex(this.GetMaxBoostIndex(), true).Text);

        this.SliderMaximum = this._SliderClocks.Count - 1;
        int num2 = this._SliderClocks.IndexOf(num1);

        if (num2 < 0)
        {
            return;
        }
        this.SliderPosition = num2;
    }
Пример #8
0
    public void ApplyChanges()
    {
        if (this.BoostTable == null || !this.Enabled)
        {
            return;
        }
        byte maxBoostIndex = this.GetMaxBoostIndex();
        int  splitIndex    = this.GetSplitIndex(maxBoostIndex);

        for (int index = maxBoostIndex; index > splitIndex; --index)
        {
            ListViewItem.ListViewSubItem itemByIndex = this.GetItemByIndex(index, true);
            this._BoostTable.BoostClocks[index].Frequency = CE00D.E006(itemByIndex.Text);
        }
    }
Пример #9
0
    public bool AreAllMaxClocksEqual()
    {
        if (this.BoostProfileEntry == null)
        {
            return(false);
        }
        ushort num1 = CE00D.E006(this.tbProfileBoostMax0.Text);
        int    num2 = 1;
        ushort num3 = num1;

        for (int index = 0; index < this.BoostProfileEntry.FE008.Count && index < 3; ++index)
        {
            num3 += CE00D.E006(this.Ctrl(string.Format("tbBoostMax0Clock{0}", index)).Text);
            ++num2;
        }
        return(num3 / num2 == num1);
    }
Пример #10
0
    public void ApplyChanges()
    {
        if (this.BoostProfileEntry == null)
        {
            return;
        }
        this.BoostProfileEntry.PE003 = CE00D.E006(this.tbProfileBoostMin0.Text);
        this.BoostProfileEntry.PE004 = CE00D.E006(this.tbProfileBoostMax0.Text);
        List <CE01B> list = Enumerable.ToList <CE01B>(Enumerable.OrderBy <CE01B, byte>(this.BoostProfileEntry.FE008, c => c.PE001));

        for (int index = 0; index < list.Count && index < 3; ++index)
        {
            CE01B obj = list[index];
            obj.PE003 = CE00D.E006(this.Ctrl(string.Format("tbBoostMin0Clock{0}", index)).Text);
            obj.PE004 = CE00D.E006(this.Ctrl(string.Format("tbBoostMax0Clock{0}", index)).Text);
        }
    }
    private void UpdateClockSelector()
    {
        updating = true;
        if (string.IsNullOrEmpty(tbClock.Text))
        {
            numClockSelector.Value = new Decimal(0);
        }
        ushort num1 = CE00D.E006(tbClock.Text);

        foreach (ushort num2 in CE00D.PE000)
        {
            if (num1 <= num2)
            {
                numClockSelector.Value = CE00D.PE000.IndexOf(num2);
                break;
            }
        }
        numClockSelector.Enabled = CE00D.PE000.IndexOf(num1) >= 0;
        updating = false;
    }
Пример #12
0
 public void ApplyChanges()
 {
     if (this.FE000 == null)
     {
         return;
     }
     if (this.FE000.PE009 != byte.MaxValue && this.FE005.Enabled)
     {
         this.FE000.FE008[this.FE000.PE009].FE005[0].PE001 = CE00D.E006(this.FE005.Text);
     }
     if (this.FE000.PE00A != byte.MaxValue && this.FE004.Enabled)
     {
         this.FE000.FE008[this.FE000.PE00A].FE005[0].PE001 = CE00D.E006(this.FE004.Text);
     }
     if (this.FE000.PE008 == byte.MaxValue || !this.FE006.Enabled)
     {
         return;
     }
     this.FE000.FE008[this.FE000.PE008].FE005[0].PE001 = CE00D.E006(this.FE006.Text);
 }
Пример #13
0
    private void FillClockTableView(bool showInvalid)
    {
        byte maxBoostIndex       = this.GetMaxBoostIndex();
        IEnumerable <int> source = Enumerable.Select <CE018, int>(this.BoostTable.FE005, p => (int)p.PE002);
        int splitIndex           = this.GetSplitIndex(maxBoostIndex);

        this.InitTableView();
        for (int index = 0; index < this.BoostTable.BoostClocks.Count; ++index)
        {
            ListViewItem.ListViewSubItem itemByIndex1 = this.GetItemByIndex(index, false);
            ListViewItem.ListViewSubItem itemByIndex2 = this.GetItemByIndex(index, true);
            ushort num = this.BoostTable.BoostClocks[index].Frequency;
            itemByIndex1.Text = index.ToString("00");
            itemByIndex2.Text = CE00D.E005(num);
            if (index > splitIndex && index <= maxBoostIndex)
            {
                itemByIndex1.BackColor = this._YellowBackColor;
                itemByIndex2.BackColor = this._YellowBackColor;
                itemByIndex1.ForeColor = this._YellowForeColor;
                itemByIndex2.ForeColor = this._YellowForeColor;
            }
            if (Enumerable.Contains <int>(source, index))
            {
                itemByIndex1.BackColor = this._GreenBackColor;
                itemByIndex2.BackColor = this._GreenBackColor;
                itemByIndex1.ForeColor = this._GreenForeColor;
                itemByIndex2.ForeColor = this._GreenForeColor;
            }
            if (showInvalid && maxBoostIndex > splitIndex && (index > splitIndex && index <= maxBoostIndex) && CE00D.PE000.IndexOf(num) == -1)
            {
                itemByIndex2.Font = new Font(itemByIndex2.Font, FontStyle.Strikeout);
            }
            if (showInvalid && splitIndex > maxBoostIndex && (index >= maxBoostIndex && index < splitIndex) && CE00D.PE000.IndexOf(num) == -1)
            {
                itemByIndex2.Font = new Font(itemByIndex2.Font, FontStyle.Strikeout);
            }
        }
    }
Пример #14
0
    private void ShiftClockTableMaxBoost(ushort maxBoost)
    {
        byte maxBoostIndex = this.GetMaxBoostIndex();
        int  splitIndex    = this.GetSplitIndex(maxBoostIndex);
        int  index1        = CE00D.PE000.IndexOf(maxBoost);

        if (maxBoostIndex > splitIndex)
        {
            for (int index2 = maxBoostIndex; index2 > splitIndex; --index2)
            {
                this.GetItemByIndex(index2, true).Text = CE00D.E005(CE00D.PE000[index1]);
                --index1;
            }
        }
        else
        {
            for (int index2 = maxBoostIndex; index2 < splitIndex; ++index2)
            {
                this.GetItemByIndex(index2, true).Text = CE00D.E005(CE00D.PE000[index1]);
                ++index1;
            }
        }
    }
Пример #15
0
    private void InitSliderClocks()
    {
        byte          maxBoostIndex = this.GetMaxBoostIndex();
        int           splitIndex    = this.GetSplitIndex(maxBoostIndex);
        ushort        num1          = CE00D.E006(this.GetItemByIndex(maxBoostIndex, true).Text);
        ushort        num2          = CE00D.E006(this.GetItemByIndex(splitIndex, true).Text);
        int           num3          = CE00D.E006(this.GetItemByIndex(splitIndex + 1, true).Text);
        List <ushort> list          = new List <ushort>();

        foreach (ushort num4 in CE00D.PE000)
        {
            if (num4 >= num2)
            {
                list.Add(num4);
            }
        }
        int num5 = 0;

        for (int index = 0; index < list.Count; ++index)
        {
            if (list[index] == num1)
            {
                num5 = index;
                break;
            }
        }
        for (int index = num5; index >= 0; --index)
        {
            if (maxBoostIndex - splitIndex - index > 0)
            {
                list.RemoveAt(index);
            }
        }
        this._SliderClocks = list;
        this.InitSlider();
    }
Пример #16
0
 private void UpdateSliderText()
 {
     this.scBoostLimit.ValueText = string.Format("{0} MHz", CE00D.E005(CE00D.PE000[this.scBoostLimit.SliderPosition]));
 }
Пример #17
0
 static CE00D()
 {
     CE00D.PE000 = CE00D.FE001;
     CE00D.FE003 = CE00D.E004();
 }
        private void AbrirBios(string path)
        {
            LimparTela();
            Bios = new Bios(path);

            if (Bios.PE000)
            {
                LinhaBios linhaBios = Bios.linhasDaBios[0];
                hcHeader.RomHeader         = linhaBios.RomHeader;
                hcHeader.FileName          = new FileInfo(path).Name;
                hcHeader.ImageChecksum     = linhaBios.ImageChecksum;
                hcHeader.GeneratedChecksum = linhaBios.GenerateChecksum();

                if (linhaBios.BoostTable != null)
                {
                    CE00D.E001(linhaBios.BoostTable.BoostClocks.Select(param0_2 => param0_2.Frequency).ToList());
                }

                tabControl.TabPages.Add(tpCommon);
                bbcBaseBoost.PE000 = linhaBios.FE006;

                if (Bios.PE003)
                {
                    vtcVoltageTable.BoostTable   = linhaBios.BoostTable;
                    vtcVoltageTable.PerfTable    = linhaBios.PerfTable;
                    vtcVoltageTable.VoltageTable = linhaBios.VoltageTable;
                    tabControl.TabPages.Add(tpVoltageTable);
                }

                if (Bios.PossuiFanSettings)
                {
                    frcFanRange.FanSettings  = linhaBios.FanSettings;
                    frcFanRange.FanSettings2 = linhaBios.FanSettings2;
                }

                if (Bios.PossuiPowerTable)
                {
                    ptcPowerTable.PowerTable = linhaBios.PowerTable;
                    tabControl.TabPages.Add(tpPowerTable);
                }

                tabControl.TabPages.Add(tpBoostTable);

                if (Bios.PossuiBoostProfile)
                {
                    boostConfigControl.BoostProfile = linhaBios.BoostProfile;
                    blhBoostLimiterHelperControl.BoostConfigControl = boostConfigControl;
                    tabControl.TabPages.Add(tpBoostStates);
                }

                ptcPerfTable.PerfTable          = linhaBios.PerfTable;
                mchMemoryClock.PerfTableControl = ptcPerfTable;
                ttcTempTargets.TempTargets      = linhaBios.TempTargets;
                tabControl.TabPages.Add(tpClockStates);
                btcBoostClocks.BoostTable = linhaBios.BoostTable;
                tabControl.Enabled        = true;
            }
            else
            {
                hcHeader.ResetDisplay(true);
            }
        }