Esempio n. 1
0
        private void CloseEditListControl()
        {
            var start = _editListControl.OpenSymbolControl;
            if (_editListControl == null) return;
            CloseModalPanel(_editListControl, DevComponents.DotNetBar.Controls.eSlideSide.Right);
            _editListControl.Dispose();
            _editListControl = null;

            if (start)
            {
                OpenSymbolEditControl();
            }

            _clientService.ServiceProxy.onSymbolGroupListRecieved("");
        }
Esempio n. 2
0
        private void EditGroupNewSymbolExecuted(object sender, EventArgs e)
        {
            if (_symbolsEditControl.ui_listBox_groups.SelectedItem == null)
            {
                ToastNotification.Show(_symbolsEditControl.ui_listBox_groups, "Pleasse, select group!");
                return;
            }

            var groupName = _symbolsEditControl.ui_listBox_groups.SelectedItem.ToString();
            var oldGroupInfo =
                TickNetClientDataManager.GetGroupsForUser(_client.UserID).First(oo => oo.GroupName == groupName);
            //_groups.Find(a => a.GroupName == groupName);

            _editListControl = new EditListControl(oldGroupInfo.GroupId,oldGroupInfo)
            {
                Commands = _commands,
                textBoxXListName = { Text = oldGroupInfo.GroupName },
                OpenSymbolControl = true
            };

            foreach (var item in _editListControl.cmbHistoricalPeriod.Items)
            {
                if (item.ToString() == oldGroupInfo.TimeFrame)
                {
                    _editListControl.cmbHistoricalPeriod.SelectedItem = item;
                    _editListControl.cmbHistoricalPeriod.Text = item.ToString();
                }
            }

            foreach (var item in _editListControl.cmbContinuationType.Items)
            {
                if (item.ToString() == oldGroupInfo.CntType)
                {
                    _editListControl.cmbContinuationType.SelectedItem = item;
                    _editListControl.cmbContinuationType.Text = item.ToString();
                }
            }

            var symbols = TickNetClientDataManager.GetSymbolsInGroup(oldGroupInfo.GroupId);

            foreach (var symbol in symbols)
            {
                _editListControl.lbSelList.Items.Add(symbol.SymbolName);
            }

            CloseAddSymbolControl();

            ShowModalPanel(_editListControl, DevComponents.DotNetBar.Controls.eSlideSide.Right);
        }
Esempio n. 3
0
        void styledListControl_groups_ItemEditGroupClick(int itemIndex)
        {
            var oldGroupInfo = _groupItems[itemIndex].GroupModel;

            _editListControl = new EditListControl(oldGroupInfo.GroupId, oldGroupInfo)
            {
                Commands = _commands,
                textBoxXListName = { Text = oldGroupInfo.GroupName },
                OpenSymbolControl = false
            };

            ShowModalPanel(_editListControl, DevComponents.DotNetBar.Controls.eSlideSide.Right);
        }