/// <summary> /// constructor /// конструктор /// </summary> /// <param name="trix">configuration indicator/индикатор для настроек</param> public TrixUi(Trix trix) { InitializeComponent(); _trix = trix; TextBoxLenght.Text = _trix.Period.ToString(); HostColorBase.Child = new TextBox(); HostColorBase.Child.BackColor = _trix.ColorBase; CheckBoxPaintOnOff.IsChecked = _trix.PaintOn; Movingbox.Items.Add(MovingAverageTypeCalculation.Exponential); Movingbox.Items.Add(MovingAverageTypeCalculation.Simple); Movingbox.Items.Add(MovingAverageTypeCalculation.Weighted); Movingbox.Items.Add(MovingAverageTypeCalculation.Adaptive); Movingbox.SelectedItem = _trix.TypeCalculationAverage; Movingbox.SelectedItem = _trix.TypeIndicator; ButtonColor.Content = OsLocalization.Charts.LabelButtonIndicatorColor; CheckBoxPaintOnOff.Content = OsLocalization.Charts.LabelPaintIntdicatorIsVisible; ButtonAccept.Content = OsLocalization.Charts.LabelButtonIndicatorAccept; LabelIndicatorPeriod.Content = OsLocalization.Charts.LabelIndicatorPeriod; LabelIndicatorSmaType.Content = OsLocalization.Charts.LabelIndicatorSmaType; }
/// <summary> /// конструктор /// </summary> /// <param name="trix">индикатор для настроек</param> public TrixUi(Trix trix) { InitializeComponent(); _trix = trix; TextBoxLenght.Text = _trix.Period.ToString(); HostColorBase.Child = new TextBox(); HostColorBase.Child.BackColor = _trix.ColorBase; CheckBoxPaintOnOff.IsChecked = _trix.PaintOn; Movingbox.Items.Add(MovingAverageTypeCalculation.Exponential); Movingbox.Items.Add(MovingAverageTypeCalculation.Simple); Movingbox.Items.Add(MovingAverageTypeCalculation.Weighted); Movingbox.Items.Add(MovingAverageTypeCalculation.Adaptive); Movingbox.SelectedItem = _trix.TypeCalculationAverage; Movingbox.SelectedItem = _trix.TypeIndicator; }