private void Contract2CB1_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (OpMarketControl.contract2.SelectedValue != null)
     {
         VolCurvLV.TempCurveReset();
     }
 }
 private void Adjustment2_ValueChanged(object sender, RoutedPropertyChangedEventArgs <object> e)
 {
     if (e.OldValue != null && e.NewValue != null)
     {
         VolCurvLV.TempCurveReset();
     }
 }
        private async void VolModelCB1_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (WMSettingsLV.DataContext != null)
            {
                WMSettingsLV.RevertCurrent();
                VolCurvLV.TempCurveReset();
            }
            var volModel = OpMarketControl.volModelCB1.SelectedItem as ModelParamsVM;

            if (volModel != null)
            {
                await _otcHandler.QueryModelParamsAsync(volModel.ToString());

                WMSettingsLV.DataContext = null;
                WMSettingsLV.DataContext = volModel;
            }

            //var exchange = OpMarketControl.underlyingEX1.SelectedValue;
            //var uc = OpMarketControl.underlyingContractCB1.SelectedValue;
            //var ed = OpMarketControl.expireDateCB1.SelectedValue;

            //if (exchange != null && uc != null && ed != null)
            //{
            //    VolCurvLV.SelectOption(exchange.ToString(), uc.ToString(), ed.ToString());
            //    WMSettingsLV.SelectOption(exchange.ToString(), uc.ToString(), ed.ToString());
            //}
        }
        private async void RevertCurrentBtn_Click(object sender, RoutedEventArgs e)
        {
            VolCurvLV.TempCurveReset();
            var volModel = OpMarketControl.volModelCB1.SelectedItem as ModelParamsVM;

            if (volModel != null)
            {
                WMSettingsLV.DataContext = null;
                var modelparamsVM = await _otcHandler.QueryModelParamsAsync(volModel.ToString());

                WMSettingsLV.DataContext = modelparamsVM;
            }
        }
 private void SetCurrentBtn_Click(object sender, RoutedEventArgs e)
 {
     //Task.Run(() => { Task.Delay(5000); Dispatcher.Invoke(() => VolCurvLV.TempCurveReset()); });
     VolCurvLV.TempCurveReset();
 }