public void MainTimer() { if (Manager == null || !Manager.IsLoadedConfiguration) { return; } UpdateDealControls(); if (FormsControls.Invoke(() => CmbxProduct.Items.Count) <= 0)//if (CmbxProduct.Items.Count <= 0)// { this.UpdateItemsProducts(); } }
public void Peacemaker() { if (Manager == null || Manager.ForexArchive == null) { return; } if (Manager.ForexArchive.Saving || Manager.ForexArchive.Loading || Manager.ForexArchive.Repairing) { FormsControls.SetProperty(BtnNuke, "Enabled", false, true); FormsControls.SetProperty(BtnSaveAll, "Enabled", false, true); FormsControls.SetProperty(BtnRepair, "Enabled", false, true); } else { FormsControls.SetProperty(BtnNuke, "Enabled", true, true); FormsControls.SetProperty(BtnSaveAll, "Enabled", true, true); FormsControls.SetProperty(BtnRepair, "Enabled", true, true); } if (Manager.ForexArchive.Saving) { FormsControls.SetProperty(TbxStatus, "Text", "Saving Records ... ", true); } else if (Manager.ForexArchive.Loading) { FormsControls.SetProperty(TbxStatus, "Text", "Loading Records ... ", true); } else if (Manager.ForexArchive.Repairing) { FormsControls.SetProperty(TbxStatus, "Text", "Reapiring Records ... ", true); } else { FormsControls.SetProperty(TbxStatus, "Text", " Archive Ready ! ", true); } FormsControls.SetProperty(TbxNewUpdates, "Text", Manager.ForexArchive.Updates.ToString(), true); FormsControls.SetProperty(TbxTotalRecords, "Text", Manager.ForexArchive.Records.ToString(), true); }
private void PeacemakerUpdate() { if (Manager == null || Manager.ForexTrading == null || !Manager.ForexTrading.AccountLogs.IsValid) { return; } Account account = Manager.ForexTrading.Account; char punctuation = ','; int decimals = 2; double origin = account.OriginBalance; double closed = account.ClosedBalance; double realized = account.RealizedBalance; double live = account.LiveProfit; this.Invoke((MethodInvoker)(() => { TbxOriginBalance.Text = Doubles.ToString(account.OriginBalance, "???", decimals, 0, double.MaxValue, punctuation); FormsControls.ColourDouble(ref TbxClosedBalance, account.ClosedBalance, account.OriginBalance, "???", decimals, 0, double.MaxValue, punctuation); FormsControls.ColourDouble(ref TbxRealizedBalance, account.RealizedBalance, account.ClosedBalance, "???", decimals, 0, double.MaxValue, punctuation, 0.001); FormsControls.ColourDouble(ref TbxLiveProfit, account.LiveProfit, "???", decimals, double.MinValue, double.MaxValue, punctuation); })); }
private void ClearControls(bool invoke) { FormsControls.SetPropertyAllOfType <TextBox>(GpbxRateProperties, "Text", "???", invoke, 1); }