예제 #1
0
        private void EventsControl_Load(object sender, EventArgs e)
        {
            defaultstyle           = new DataGridViewCellStyle();
            defaultstyle.ForeColor = Color.Black;
            addstyle              = new DataGridViewCellStyle();
            addstyle.ForeColor    = Color.DarkGreen;
            changestyle           = new DataGridViewCellStyle();
            changestyle.ForeColor = Color.DarkBlue;

            _queuerForm = Tag as QueuerForm;
            if (_queuerForm != null)
            {
                _queuerForm.controlTag.eventsControl = this;

                dataGridViewEvents.AutoGenerateColumns = false;

                if (_queuerForm == null || _queuerForm.controlTag == null || _queuerForm.controlTag.singersXml == null || _queuerForm.controlTag.singersXml == null)
                {
                    return;
                }
                LoadVenues();
                _scc = _queuerForm.scc;
                LoadTSCEvents(_queuerForm.controlTag.eventsXml);
            }
            else
            {
                _scc = new SingerDatabase();
            }
        }
예제 #2
0
        private void UserInitialize()
        {
            cmb_events          = cmbEvent;
            txt_invisible       = txtInvisible;
            Tag                 = controlTag = new ControlTag();
            venuesControl1.Tag  = this;
            eventsControl1.Tag  = this;
            singersControl1.Tag = this;
            queueControl1.Tag   = this;
            queueControl2.Tag   = this;
            queueControl3.Tag   = this;
            queueControl4.Tag   = this;
            queueControl5.Tag   = this;
            queueControl6.Tag   = this;

            scc = new SingerDatabase();
            controlTag.venuesXml  = InitVenues();
            controlTag.eventsXml  = InitEvents();
            controlTag.singersXml = InitSingers();
            LoadEventsCombo(controlTag.eventsXml);
            if (cmbEvent.Items.Count > 0)
            {
                cmbEvent.SelectedIndex = cmbEvent.Items.Count - 1;
            }
            Reload();
        }
예제 #3
0
 public void SetUp(SingerDatabase scc, string singer)
 {
     _scc    = scc;
     _singer = singer;
 }
예제 #4
0
        private void QueueControl_Load(object sender, EventArgs e)
        {
            dataGridViewQueue.EnableHeadersVisualStyles = true;

            defaultstyle           = new DataGridViewCellStyle();
            defaultstyle.ForeColor = Color.Black;
            addstyle              = new DataGridViewCellStyle();
            addstyle.ForeColor    = Color.DarkGreen;
            changestyle           = new DataGridViewCellStyle();
            changestyle.ForeColor = Color.DarkBlue;

            stateDefault                 = new DataGridViewCellStyle();
            stateDefault.BackColor       = Color.Green;
            stateStyleFinished           = new DataGridViewCellStyle();
            stateStyleFinished.BackColor = Color.DarkBlue;
            stateStyleGoneHome           = new DataGridViewCellStyle();
            stateStyleGoneHome.BackColor = Color.Black;

            _queuerForm = Tag as QueuerForm;
            dataGridViewQueue.AutoGenerateColumns = false;
            SetSingers();
            if (_queuerForm != null)
            {
                _scc = _queuerForm.scc;
                string ix = Name.Substring(Name.Length - 1, 1);
                switch (ix)
                {
                case "1":
                    (Tag as QueuerForm).controlTag.queueControl1 = this;
                    _round = 1;
                    break;

                case "2":
                    (Tag as QueuerForm).controlTag.queueControl2 = this;
                    _round = 2;
                    break;

                case "3":
                    (Tag as QueuerForm).controlTag.queueControl3 = this;
                    _round = 3;
                    break;

                case "4":
                    (Tag as QueuerForm).controlTag.queueControl4 = this;
                    _round = 4;
                    break;

                case "5":
                    (Tag as QueuerForm).controlTag.queueControl5 = this;
                    _round = 5;
                    break;

                case "6":
                    (Tag as QueuerForm).controlTag.queueControl6 = this;
                    _round = 6;
                    break;
                }
                //xml = GetQueue(_round);
                if (_round > 0 && _queuerForm != null)
                {
                    LoadTSCQueue(_queuerForm.controlTag.queueXml, _round);
                    _queuerForm.controlTag.queueControl1.MasterRefresh();
                    _queuerForm.SetNext();
                }
            }
            else
            {
                _scc = new SingerDatabase();
            }
        }