コード例 #1
0
        /// <summary>
        /// create a table of orders
        /// создать таблицу ордеров
        /// </summary>
        private DataGridView CreateOrderTable()
        {
            DataGridView newGrid = DataGridFactory.GetDataGridOrder();

            newGrid.AutoResizeColumnHeadersHeight();
            return(newGrid);
        }
コード例 #2
0
        public static DataGridView GetDataGridServers()
        {
            DataGridView newGrid = DataGridFactory.GetDataGridView(DataGridViewSelectionMode.FullRowSelect, DataGridViewAutoSizeRowsMode.None);

            DataGridViewTextBoxCell cell0 = new DataGridViewTextBoxCell();

            cell0.Style = newGrid.DefaultCellStyle;

            DataGridViewColumn colum0 = new DataGridViewColumn();

            colum0.CellTemplate = cell0;
            colum0.HeaderText   = OsLocalization.Entity.ColumnServers1;
            colum0.ReadOnly     = true;
            colum0.Width        = 150;
            newGrid.Columns.Add(colum0);

            DataGridViewColumn colu = new DataGridViewColumn();

            colu.CellTemplate = cell0;
            colu.HeaderText   = OsLocalization.Entity.ColumnServers2;
            colu.ReadOnly     = true;
            colu.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            newGrid.Columns.Add(colu);

            return(newGrid);
        }
コード例 #3
0
        private void CreateTable()
        {
            _grid = DataGridFactory.GetDataGridView(DataGridViewSelectionMode.FullRowSelect,
                                                    DataGridViewAutoSizeRowsMode.None);

            DataGridViewTextBoxCell cell0 = new DataGridViewTextBoxCell();

            cell0.Style = _grid.DefaultCellStyle;

            DataGridViewColumn column0 = new DataGridViewColumn();

            column0.CellTemplate = cell0;
            column0.HeaderText   = OsLocalization.Entity.ParametersColumn1;
            column0.ReadOnly     = true;
            column0.Width        = 250;

            _grid.Columns.Add(column0);

            DataGridViewColumn column1 = new DataGridViewColumn();

            column1.CellTemplate = cell0;
            column1.HeaderText   = OsLocalization.Entity.ParametersColumn2;
            column1.ReadOnly     = false;
            column1.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            _grid.Columns.Add(column1);

            _grid.Rows.Add(null, null);

            _grid.CellValueChanged += _grid_CellValueChanged;

            HostParametrs.Child = _grid;
        }
コード例 #4
0
        // main table
        // главная таблица

        /// <summary>
        /// create a table
        /// создать таблицу
        /// </summary>
        /// <returns>table for drawing positions on it/таблица для прорисовки на ней позиций</returns>
        private void CreateMainTable()
        {
            DataGridView newGrid = DataGridFactory.GetDataGridPosition();

            newGrid.Rows.Add(GetRow(_position));

            FormsHostMainGrid.Child = newGrid;
        }
コード例 #5
0
        private void CreateMainTable()
        {
            DataGridView newGrid = DataGridFactory.GetDataGridPosition(false);

            newGrid.ScrollBars      = ScrollBars.Vertical;
            FormsHostMainGrid.Child = newGrid;
            _mainPosGrid            = newGrid;
        }
コード例 #6
0
        /// <summary>
        /// create a table of securities
        /// создать таблицу бумаг
        /// </summary>
        private void CreateTable()
        {
            _grid = DataGridFactory.GetDataGridSecurities();

            HostSecurities.Child = _grid;
            HostSecurities.Child.Show();
            HostSecurities.Child.Refresh();
            _grid.CellValueChanged += _grid_CellValueChanged;
        }
コード例 #7
0
        private void CreateTradeTable()
        {
            DataGridView newGrid = DataGridFactory.GetDataGridMyTrade(false);

            _tradesGrid = newGrid;
            _tradesGrid.SelectionMode = DataGridViewSelectionMode.CellSelect;
            FormsHostTreid.Child      = _tradesGrid;
            _tradesGrid.Click        += _tradesGrid_Click;
        }
コード例 #8
0
        private DataGridView CreateOrderTable()
        {
            DataGridView newGrid = DataGridFactory.GetDataGridOrder(false);

            newGrid.ScrollBars    = ScrollBars.Vertical;
            newGrid.SelectionMode = DataGridViewSelectionMode.CellSelect;
            newGrid.AutoResizeColumnHeadersHeight();
            return(newGrid);
        }
コード例 #9
0
ファイル: ProxiesUi.xaml.cs プロジェクト: sollerss/OsEngine
        private void CreateTable()
        {
            if (_gridErrorLog != null)
            {
                return;
            }

            _gridErrorLog = DataGridFactory.GetDataGridProxies();

            Host.Child = _gridErrorLog;
        }
コード例 #10
0
        public static DataGridView GetDataGridProxies()
        {
            DataGridView newGrid = DataGridFactory.GetDataGridView(DataGridViewSelectionMode.FullRowSelect,
                                                                   DataGridViewAutoSizeRowsMode.AllCellsExceptHeaders);

            DataGridViewTextBoxCell cell0 = new DataGridViewTextBoxCell();

            cell0.Style = newGrid.DefaultCellStyle;

            DataGridViewColumn column0 = new DataGridViewColumn();

            column0.CellTemplate = cell0;
            column0.HeaderText   = OsLocalization.Entity.ProxiesColumn1;
            column0.ReadOnly     = true;
            column0.Width        = 170;

            newGrid.Columns.Add(column0);

            DataGridViewColumn column1 = new DataGridViewColumn();

            column1.CellTemplate = cell0;
            column1.HeaderText   = OsLocalization.Entity.ProxiesColumn2;
            column1.ReadOnly     = true;
            column1.Width        = 100;

            newGrid.Columns.Add(column1);

            DataGridViewColumn column = new DataGridViewColumn();

            column.CellTemplate = cell0;
            column.HeaderText   = OsLocalization.Entity.ProxiesColumn3;
            column.ReadOnly     = true;
            column.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            newGrid.Columns.Add(column);

            return(newGrid);
        }
コード例 #11
0
        public static DataGridView GetDataGridDataSource()
        {
            DataGridView myGridView = DataGridFactory.GetDataGridView(DataGridViewSelectionMode.FullRowSelect, DataGridViewAutoSizeRowsMode.None);

            DataGridViewTextBoxCell cell0 = new DataGridViewTextBoxCell();

            cell0.Style = myGridView.DefaultCellStyle;

            DataGridViewColumn column2 = new DataGridViewColumn();

            column2.CellTemplate = cell0;
            column2.HeaderText   = OsLocalization.Entity.ColumnDataSource1;
            column2.ReadOnly     = true;
            column2.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

            myGridView.Columns.Add(column2);

            DataGridViewColumn column0 = new DataGridViewColumn();

            column0.CellTemplate = cell0;
            column0.HeaderText   = OsLocalization.Entity.ColumnDataSource2;
            column0.ReadOnly     = true;
            column0.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

            myGridView.Columns.Add(column0);

            DataGridViewColumn column = new DataGridViewColumn();

            column.CellTemplate = cell0;
            column.HeaderText   = OsLocalization.Entity.ColumnDataSource3;
            column.ReadOnly     = false;
            column.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

            myGridView.Columns.Add(column);

            DataGridViewColumn column1 = new DataGridViewColumn();

            column1.CellTemplate = cell0;
            column1.HeaderText   = OsLocalization.Entity.ColumnDataSource4;
            column1.ReadOnly     = true;
            column1.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

            myGridView.Columns.Add(column1);

            DataGridViewColumn column3 = new DataGridViewColumn();

            column3.CellTemplate = cell0;
            column3.HeaderText   = OsLocalization.Entity.ColumnDataSource5;
            column3.ReadOnly     = true;
            column3.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

            myGridView.Columns.Add(column3);

            DataGridViewColumn column4 = new DataGridViewColumn();

            column4.CellTemplate = cell0;
            column4.HeaderText   = OsLocalization.Entity.ColumnDataSource6;
            column4.ReadOnly     = true;
            column4.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

            myGridView.Columns.Add(column4);

            return(myGridView);
        }
コード例 #12
0
        public static DataGridView GetDataGridPortfolios()
        {
            DataGridView _gridPosition = DataGridFactory.GetDataGridView(DataGridViewSelectionMode.FullRowSelect, DataGridViewAutoSizeRowsMode.None);

            DataGridViewTextBoxCell cell0 = new DataGridViewTextBoxCell();

            cell0.Style = _gridPosition.DefaultCellStyle;

            DataGridViewColumn column0 = new DataGridViewColumn();

            column0.CellTemplate = cell0;
            column0.HeaderText   = OsLocalization.Entity.ColumnPortfolio1;
            column0.ReadOnly     = true;
            column0.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

            _gridPosition.Columns.Add(column0);

            DataGridViewColumn column = new DataGridViewColumn();

            column.CellTemplate = cell0;
            column.HeaderText   = OsLocalization.Entity.ColumnPortfolio2;
            column.ReadOnly     = true;
            column.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

            _gridPosition.Columns.Add(column);

            DataGridViewColumn column1 = new DataGridViewColumn();

            column1.CellTemplate = cell0;
            column1.HeaderText   = OsLocalization.Entity.ColumnPortfolio3;
            column1.ReadOnly     = true;
            column1.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

            _gridPosition.Columns.Add(column1);

            DataGridViewColumn column3 = new DataGridViewColumn();

            column3.CellTemplate = cell0;
            column3.HeaderText   = OsLocalization.Entity.ColumnPortfolio4;
            column3.ReadOnly     = true;
            column3.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

            _gridPosition.Columns.Add(column3);

            DataGridViewColumn column4 = new DataGridViewColumn();

            column4.CellTemplate = cell0;
            column4.HeaderText   = OsLocalization.Entity.ColumnPortfolio5;
            column4.ReadOnly     = true;
            column4.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

            _gridPosition.Columns.Add(column4);

            DataGridViewColumn column5 = new DataGridViewColumn();

            column5.CellTemplate = cell0;
            column5.HeaderText   = OsLocalization.Entity.ColumnPortfolio6;
            column5.ReadOnly     = true;
            column5.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

            _gridPosition.Columns.Add(column5);

            DataGridViewColumn column6 = new DataGridViewColumn();

            column6.CellTemplate = cell0;
            column6.HeaderText   = OsLocalization.Entity.ColumnPortfolio7;
            column6.ReadOnly     = true;
            column6.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

            _gridPosition.Columns.Add(column6);

            DataGridViewColumn column7 = new DataGridViewColumn();

            column7.CellTemplate = cell0;
            column7.HeaderText   = OsLocalization.Entity.ColumnPortfolio8;
            column7.ReadOnly     = true;
            column7.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            _gridPosition.Columns.Add(column7);

            return(_gridPosition);
        }
コード例 #13
0
        /// <summary>
        /// create a table for trades
        /// создать таблицу для трейдов
        /// </summary>
        private DataGridView CreateTradeTable()
        {
            DataGridView newGrid = DataGridFactory.GetDataGridMyTrade();

            return(newGrid);
        }
コード例 #14
0
        /// <summary>
        /// Load controls into the connector
        /// загрузить контролы в коннектор
        /// </summary>
        public void CreateGlass()
        {
            try
            {
                _glassBox = DataGridFactory.GetDataGridView(DataGridViewSelectionMode.FullRowSelect,
                                                            DataGridViewAutoSizeRowsMode.None);
                _glassBox.AllowUserToResizeRows = false;

                _glassBox.SelectionChanged += _glassBox_SelectionChanged;

                DataGridViewTextBoxCell cell0 = new DataGridViewTextBoxCell();
                cell0.Style = _glassBox.DefaultCellStyle;

                DataGridViewColumn column0 = new DataGridViewColumn();
                column0.CellTemplate = cell0;
                column0.HeaderText   = OsLocalization.Entity.ColumnMarketDepth1;
                column0.ReadOnly     = true;
                column0.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

                _glassBox.Columns.Add(column0);

                DataGridViewTextBoxCell cell   = new DataGridViewTextBoxCell();
                DataGridViewColumn      column = new DataGridViewColumn();
                column.CellTemplate = cell;
                column.HeaderText   = OsLocalization.Entity.ColumnMarketDepth3;
                column.ReadOnly     = true;
                column.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

                _glassBox.Columns.Add(column);

                DataGridViewTextBoxCell cell2   = new DataGridViewTextBoxCell();
                DataGridViewColumn      column1 = new DataGridViewColumn();
                column1.CellTemplate = cell2;
                column1.HeaderText   = OsLocalization.Entity.ColumnMarketDepth2;
                column1.ReadOnly     = true;
                column1.Width        = 90;

                _glassBox.Columns.Add(column1);


                DataGridViewTextBoxCell cell3   = new DataGridViewTextBoxCell();
                DataGridViewColumn      column3 = new DataGridViewColumn();
                column3.CellTemplate = cell3;
                column3.HeaderText   = OsLocalization.Entity.ColumnMarketDepth3;
                column3.ReadOnly     = true;
                column3.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

                _glassBox.Columns.Add(column3);

                DataGridViewCellStyle styleRed = new DataGridViewCellStyle();
                styleRed.Alignment = DataGridViewContentAlignment.MiddleRight;
                styleRed.ForeColor = Color.FromArgb(254, 84, 0);
                styleRed.Font      = new Font("Areal", 3);


                for (int i = 0; i < 25; i++)
                {
                    _glassBox.Rows.Add(null, null, null);
                    _glassBox.Rows[_glassBox.Rows.Count - 1].DefaultCellStyle.BackColor = Color.FromArgb(28, 33, 37);
                    _glassBox.Rows[_glassBox.Rows.Count - 1].DefaultCellStyle.ForeColor = Color.FromArgb(254, 84, 0);
                    _glassBox.Rows[_glassBox.Rows.Count - 1].DefaultCellStyle.Font      = new Font("New Times Roman", 10);
                    _glassBox.Rows[_glassBox.Rows.Count - 1].Cells[0].Style             = styleRed;
                    _glassBox.Rows[_glassBox.Rows.Count - 1].Cells[1].Style             = styleRed;
                }

                DataGridViewCellStyle styleBlue = new DataGridViewCellStyle();
                styleBlue.Alignment = DataGridViewContentAlignment.MiddleRight;
                styleBlue.ForeColor = Color.FromArgb(57, 157, 54);
                styleBlue.Font      = new Font("Areal", 3);

                for (int i = 0; i < 25; i++)
                {
                    _glassBox.Rows.Add(null, null, null);
                    //_glassBox.Rows[_glassBox.Rows.Count - 1].DefaultCellStyle.BackColor = Color.Black;
                    _glassBox.Rows[_glassBox.Rows.Count - 1].DefaultCellStyle.ForeColor = Color.FromArgb(57, 157, 54);
                    _glassBox.Rows[_glassBox.Rows.Count - 1].DefaultCellStyle.Font      = new Font("New Times Roman", 10);
                    _glassBox.Rows[_glassBox.Rows.Count - 1].Cells[0].Style             = styleBlue;
                    _glassBox.Rows[_glassBox.Rows.Count - 1].Cells[1].Style             = styleBlue;
                }

                _glassBox.Rows[22].Cells[0].Selected = true;
                _glassBox.Rows[22].Cells[0].Selected = false;
            }
            catch (Exception error)
            {
                SendNewLogMessage(error.ToString(), LogMessageType.Error);
            }
        }