Forex_Strategy_Builder.Instrument_Editor.SetSelectedInstrument C# (CSharp) Method

SetSelectedInstrument() private method

Sets the properties form.
private SetSelectedInstrument ( ) : void
return void
        void SetSelectedInstrument()
        {
            instrPropSelectedInstrument.Symbol          = tbxPropSymbol.Text;
            instrPropSelectedInstrument.InstrType       = (Instrumet_Type)Enum.Parse(typeof(Instrumet_Type), tbxPropType.Text);
            instrPropSelectedInstrument.Comment         = tbxPropComment.Text;
            instrPropSelectedInstrument.PriceIn         = tbxPropPriceIn.Text;
            instrPropSelectedInstrument.BaseFileName    = tbxPropFileName.Text;
            instrPropSelectedInstrument.SwapType        = (Commission_Type)Enum.GetValues(typeof(Commission_Type)).GetValue(cbxPropSwap.SelectedIndex);
            instrPropSelectedInstrument.CommissionType  = (Commission_Type)Enum.GetValues(typeof(Commission_Type)).GetValue(cbxPropCommission.SelectedIndex);
            instrPropSelectedInstrument.CommissionScope = (Commission_Scope)Enum.GetValues(typeof(Commission_Scope)).GetValue(cbxPropCommScope.SelectedIndex);
            instrPropSelectedInstrument.CommissionTime  = (Commission_Time)Enum.GetValues(typeof(Commission_Time)).GetValue(cbxPropCommTime.SelectedIndex);
            instrPropSelectedInstrument.Digits     = (int)nudPropDigits.Value;
            instrPropSelectedInstrument.LotSize    = (int)nudPropLotSize.Value;
            instrPropSelectedInstrument.Spread     = (float)nudPropSpread.Value;
            instrPropSelectedInstrument.SwapLong   = (float)nudPropSwapLong.Value;
            instrPropSelectedInstrument.SwapShort  = (float)nudPropSwapShort.Value;
            instrPropSelectedInstrument.Commission = (float)nudPropCommission.Value;
            instrPropSelectedInstrument.Slippage   = (int)nudPropSlippage.Value;
            if (tbxPropAccountIn.Text == "USD")
                instrPropSelectedInstrument.RateToUSD = (float)nudPropAccountRate.Value;
            else
                instrPropSelectedInstrument.RateToEUR = (float)nudPropAccountRate.Value;

            return;
        }