예제 #1
0
        /// <summary>
        /// конструктор
        /// </summary>
        /// <param name="so">индикатор для настроек</param>
        public StochasticOscillatorUi(StochasticOscillator so)
        {
            InitializeComponent();
            _so = so;

            TextBoxLenght.Text  = _so.P1.ToString();
            TextBoxLenght2.Text = _so.P2.ToString();
            TextBoxLenght3.Text = _so.P3.ToString();

            HostColor1.Child           = new TextBox();
            HostColor1.Child.BackColor = _so.ColorUp;

            HostColor2.Child           = new TextBox();
            HostColor2.Child.BackColor = _so.ColorDown;

            CheckBoxPaintOnOff.IsChecked = _so.PaintOn;


            Movingbox.Items.Add(MovingAverageTypeCalculation.Exponential);
            Movingbox.Items.Add(MovingAverageTypeCalculation.Simple);
            Movingbox.Items.Add(MovingAverageTypeCalculation.Weighted);
            Movingbox.Items.Add(MovingAverageTypeCalculation.Adaptive);
            Movingbox.SelectedItem = _so.TypeCalculationAverage;

            Movingbox.SelectedItem = _so.TypeIndicator;
        }
예제 #2
0
        /// <summary>
        /// constructor
        /// конструктор
        /// </summary>
        /// <param name="so">configuration indicator/индикатор для настроек</param>
        public StochasticOscillatorUi(StochasticOscillator so)
        {
            InitializeComponent();
            _so = so;

            TextBoxLenght.Text  = _so.P1.ToString();
            TextBoxLenght2.Text = _so.P2.ToString();
            TextBoxLenght3.Text = _so.P3.ToString();

            HostColor1.Child           = new TextBox();
            HostColor1.Child.BackColor = _so.ColorUp;

            HostColor2.Child           = new TextBox();
            HostColor2.Child.BackColor = _so.ColorDown;

            CheckBoxPaintOnOff.IsChecked = _so.PaintOn;


            Movingbox.Items.Add(MovingAverageTypeCalculation.Exponential);
            Movingbox.Items.Add(MovingAverageTypeCalculation.Simple);
            Movingbox.Items.Add(MovingAverageTypeCalculation.Weighted);
            Movingbox.Items.Add(MovingAverageTypeCalculation.Adaptive);
            Movingbox.SelectedItem = _so.TypeCalculationAverage;

            Movingbox.SelectedItem = _so.TypeIndicator;

            ButtonColor1.Content = OsLocalization.Charts.LabelButtonIndicatorColor + " 1";
            ButtonColor2.Content = OsLocalization.Charts.LabelButtonIndicatorColor + " 2";

            CheckBoxPaintOnOff.Content = OsLocalization.Charts.LabelPaintIntdicatorIsVisible;
            ButtonAccept.Content       = OsLocalization.Charts.LabelButtonIndicatorAccept;

            LabelIndicatorPeriod1.Content = OsLocalization.Charts.LabelIndicatorPeriod + " 1";
            LabelIndicatorPeriod2.Content = OsLocalization.Charts.LabelIndicatorPeriod + " 2";
            LabelIndicatorPeriod3.Content = OsLocalization.Charts.LabelIndicatorPeriod + " 3";

            LabelIndicatorSmaType.Content = OsLocalization.Charts.LabelIndicatorSmaType;
        }