/// <summary> /// конструктор /// </summary> /// <param name="alligator">индикатор который будем настраивать</param> public AlligatorUi(Alligator alligator) { InitializeComponent(); _alligator = alligator; TextBoxLenghtBase.Text = _alligator.LenghtBase.ToString(); TextBoxShiftBase.Text = _alligator.ShiftBase.ToString(); HostColorBase.Child = new TextBox(); HostColorBase.Child.BackColor = _alligator.ColorBase; TextBoxLenghtUp.Text = _alligator.LenghtUp.ToString(); TextBoxShiftUp.Text = _alligator.ShiftUp.ToString(); HostColorUp.Child = new TextBox(); HostColorUp.Child.BackColor = _alligator.ColorUp; TextBoxLenghtDown.Text = _alligator.LenghtDown.ToString(); TextBoxShiftDown.Text = _alligator.ShiftDown.ToString(); HostColorDown.Child = new TextBox(); HostColorDown.Child.BackColor = _alligator.ColorDown; CheckBoxPaintOnOff.IsChecked = _alligator.PaintOn; ComboBoxMovingType.Items.Add(MovingAverageTypeCalculation.Exponential); ComboBoxMovingType.Items.Add(MovingAverageTypeCalculation.Simple); ComboBoxMovingType.Items.Add(MovingAverageTypeCalculation.Weighted); ComboBoxMovingType.SelectedItem = _alligator.TypeCalculationAverage; }
/// <summary> /// constructor /// конструктор /// </summary> /// <param name="alligator">configuration indicator/индикатор который будем настраивать</param> public AlligatorUi(Alligator alligator) { InitializeComponent(); _alligator = alligator; TextBoxLenghtBase.Text = _alligator.LenghtBase.ToString(); TextBoxShiftBase.Text = _alligator.ShiftBase.ToString(); HostColorBase.Child = new TextBox(); HostColorBase.Child.BackColor = _alligator.ColorBase; TextBoxLenghtUp.Text = _alligator.LenghtUp.ToString(); TextBoxShiftUp.Text = _alligator.ShiftUp.ToString(); HostColorUp.Child = new TextBox(); HostColorUp.Child.BackColor = _alligator.ColorUp; TextBoxLenghtDown.Text = _alligator.LenghtDown.ToString(); TextBoxShiftDown.Text = _alligator.ShiftDown.ToString(); HostColorDown.Child = new TextBox(); HostColorDown.Child.BackColor = _alligator.ColorDown; CheckBoxPaintOnOff.IsChecked = _alligator.PaintOn; ComboBoxMovingType.Items.Add(MovingAverageTypeCalculation.Exponential); ComboBoxMovingType.Items.Add(MovingAverageTypeCalculation.Simple); ComboBoxMovingType.Items.Add(MovingAverageTypeCalculation.Smoofed); ComboBoxMovingType.Items.Add(MovingAverageTypeCalculation.Weighted); ComboBoxMovingType.Items.Add(MovingAverageTypeCalculation.Adaptive); ComboBoxMovingType.Items.Add(MovingAverageTypeCalculation.VolumeWeighted); ComboBoxMovingType.Items.Add(MovingAverageTypeCalculation.Radchenko); ComboBoxMovingType.SelectedItem = _alligator.TypeCalculationAverage; ButtonColorUp.Content = OsLocalization.Charts.LabelButtonIndicatorColor; ButtonColorBase.Content = OsLocalization.Charts.LabelButtonIndicatorColor; ButtonColorDown.Content = OsLocalization.Charts.LabelButtonIndicatorColor; CheckBoxPaintOnOff.Content = OsLocalization.Charts.LabelPaintIntdicatorIsVisible; ButtonAccept.Content = OsLocalization.Charts.LabelButtonIndicatorAccept; LabelIndicatorPeriod1.Content = OsLocalization.Charts.LabelIndicatorPeriod; LabelIndicatorPeriod2.Content = OsLocalization.Charts.LabelIndicatorPeriod; LabelIndicatorPeriod3.Content = OsLocalization.Charts.LabelIndicatorPeriod; LabelIndicatorMethod.Content = OsLocalization.Charts.LabelIndicatorMethod; LabelIndicatorAlligator1.Content = OsLocalization.Charts.LabelIndicatorAlligator1; LabelIndicatorAlligator2.Content = OsLocalization.Charts.LabelIndicatorAlligator2; LabelIndicatorAlligator3.Content = OsLocalization.Charts.LabelIndicatorAlligator3; LabelIndicatorShift1.Content = OsLocalization.Charts.LabelIndicatorShift; LabelIndicatorShift2.Content = OsLocalization.Charts.LabelIndicatorShift; LabelIndicatorShift3.Content = OsLocalization.Charts.LabelIndicatorShift; }