Ejemplo n.º 1
0
        public KrakenServerUi(KrakenServer serv, Log log)
        {
            InitializeComponent();
            _server = serv;

            LabelStatus.Content = _server.ServerStatus;
            _server.ConnectStatusChangeEvent += server_ConnectChangeEvent;
            log.StartPaint(Host);
            CheckBoxNeadToSaveTrade.IsChecked = _server.NeadToSaveTicks;
            CheckBoxNeadToSaveTrade.Click    += CheckBoxNeadToSaveTrade_Click;
            TextBoxCountDaysSave.Text         = _server.CountDaysTickNeadToSave.ToString();
            TextBoxCountDaysSave.TextChanged += TextBoxCountDaysSave_TextChanged;
            TextBoxPublicKey.Text             = _server.PublicKey;
            TextBoxPrivateKey.Password        = _server.PrivateKey;

            ComboBoxLoadDataType.Items.Add(KrakenDateType.OnlyMarketDepth);
            ComboBoxLoadDataType.Items.Add(KrakenDateType.OnlyTrades);
            ComboBoxLoadDataType.Items.Add(KrakenDateType.AllData);

            ComboBoxLoadDataType.SelectedItem = _server.LoadDateType;

            ComboBoxLeverage.Items.Add("none");
            ComboBoxLeverage.Items.Add("2");
            ComboBoxLeverage.Items.Add("3");
            ComboBoxLeverage.Items.Add("4");
            ComboBoxLeverage.Items.Add("5");
            ComboBoxLeverage.SelectedItem      = _server.LeverageType;
            ComboBoxLeverage.SelectionChanged += ComboBoxLeverage_SelectionChanged;
        }
Ejemplo n.º 2
0
        public KrakenServerUi(KrakenServer serv, Log log)
        {
            InitializeComponent();
            _server = serv;

            LabelStatus.Content = _server.ServerStatus;
            _server.ConnectStatusChangeEvent += server_ConnectChangeEvent;
            log.StartPaint(Host);
            CheckBoxNeadToSaveTrade.IsChecked = _server.NeadToSaveTicks;
            CheckBoxNeadToSaveTrade.Click    += CheckBoxNeadToSaveTrade_Click;
            TextBoxCountDaysSave.Text         = _server.CountDaysTickNeadToSave.ToString();
            TextBoxCountDaysSave.TextChanged += TextBoxCountDaysSave_TextChanged;
            TextBoxPublicKey.Text             = _server.PublicKey;
            TextBoxPrivateKey.Password        = _server.PrivateKey;

            ComboBoxLoadDataType.Items.Add(KrakenDateType.OnlyMarketDepth);
            ComboBoxLoadDataType.Items.Add(KrakenDateType.OnlyTrades);
            ComboBoxLoadDataType.Items.Add(KrakenDateType.AllData);

            ComboBoxLoadDataType.SelectedItem = _server.LoadDateType;

            ComboBoxLeverage.Items.Add("none");
            ComboBoxLeverage.Items.Add("2");
            ComboBoxLeverage.Items.Add("3");
            ComboBoxLeverage.Items.Add("4");
            ComboBoxLeverage.Items.Add("5");
            ComboBoxLeverage.SelectedItem      = _server.LeverageType;
            ComboBoxLeverage.SelectionChanged += ComboBoxLeverage_SelectionChanged;

            LabelPublicKey.Content          = OsLocalization.Market.ServerParamPublicKey;
            LabelSecretKey.Content          = OsLocalization.Market.ServerParamSecretKey;
            LabelDaysToLoad.Content         = OsLocalization.Market.ServerParam2;
            CheckBoxNeadToSaveTrade.Content = OsLocalization.Market.ServerParam1;
            LabelServerState.Content        = OsLocalization.Market.Label21;
            ButtonConnect.Content           = OsLocalization.Market.ButtonConnect;
            ButtonAbort.Content             = OsLocalization.Market.ButtonDisconnect;
            ButtonProxy.Content             = OsLocalization.Market.ServerParamProxy;
            LabelLeverage.Content           = OsLocalization.Market.ServerParamLeverage;
            LabelLoadDataType.Content       = OsLocalization.Market.ServerParam3;
        }