private void ApplyGlobalProfitCommandExecute(object obj) { if (GlobalProfitLossSetting != null) { GlobalProfitLossSetting.IsMaxProfitEditMode = false; GlobalProfitLossSetting.IsMaxLossEditMode = false; GlobalProfitLossSetting.MaxLoss = GlobalProfitLossSetting.MaxLossEdit; GlobalProfitLossSetting.MaxProfit = GlobalProfitLossSetting.MaxProfitEdit; GlobalProfitLossSetting.UpdateMinMax(true); BuySellSignalOrderManager.Instance.SetDayProfitLoss(GlobalProfitLossSetting.MaxProfit, GlobalProfitLossSetting.MaxLoss); } }
private void SetGlobalProfitLossCommandExecute(object obj) { if (GlobalProfitLossSetting == null) { GlobalProfitLossSetting = new GlobalProfitLossSetting() { IsMaxLossEditMode = true, IsMaxProfitEditMode = true }; GlobalProfitLossSetting.PropertyChanged += (s, e) => { ApplyGlobalProfitCommand.RaiseCanExecuteChanged(); }; } }