Exemplo n.º 1
0
        private void previewTidbit()
        {
            if (_selectedTidbit != null)
            {
                PlayerCommand commandToSend = new PlayerCommand();

                commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
                commandToSend.CommandID = Guid.NewGuid().ToString();
                commandToSend.Parameters = new List<CommandParameter>();
                commandToSend.Parameters.Add(new CommandParameter("TemplateName", "TeamTidbitPreview"));

                XmlDataRow xmlRow = new XmlDataRow();

                xmlRow.Add("TIDBIT_1", _selectedTidbit.TidbitText);
                xmlRow.Add("TRICODE_1", _team.Tricode);
                xmlRow.Add("SWATCH_1", _team.SwatchTga.LocalPath);
                xmlRow.Add("TEAMLOGO_1", _team.LogoTgaNoKey.LocalPath);

                commandToSend.TemplateData = xmlRow.GetXMLString();

                OnSendCommand(commandToSend, null);
            }
        }
Exemplo n.º 2
0
        private void nextOnTheClock()
        {
            _takeClock = false;

            Global.GlobalCollections.Instance.LoadOnTheClock();

            PlayerCommand commandToSend;

            //send a command to change the clock on-air
            commandToSend = new PlayerCommand();

            commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
            commandToSend.CommandID = Guid.NewGuid().ToString();
            commandToSend.Parameters = new List<CommandParameter>();
            commandToSend.Parameters.Add(new CommandParameter("TemplateName", "Clock"));

            XmlDataRow xmlRow = new XmlDataRow();

            if (GlobalCollections.Instance.OnTheClock != null)
            {
                xmlRow.Add("ROUND_1", Global.GlobalCollections.Instance.OnTheClock.Round.ToString());
                xmlRow.Add("PICK_1", Global.GlobalCollections.Instance.OnTheClock.OverallPick.ToString());

                if (Global.GlobalCollections.Instance.OnTheClock.Team.LogoTgaNoKey != null)
                {
                    xmlRow.Add("LOGO_1", Global.GlobalCollections.Instance.OnTheClock.Team.LogoTgaNoKey.LocalPath);
                }

                if (Global.GlobalCollections.Instance.OnTheClock.Team.SwatchTga != null)
                {
                    xmlRow.Add("SWATCH_1", Global.GlobalCollections.Instance.OnTheClock.Team.SwatchTga.LocalPath);
                }

                xmlRow.Add("ABBREV_4_1", Global.GlobalCollections.Instance.OnTheClock.Team.Tricode);
            }

            xmlRow.Add("CLOCK_OVERLAY", "ON THE CLOCK");
            xmlRow.Add("CLOCK", "");

            commandToSend.TemplateData = xmlRow.GetXMLString();
            commandToSend.CommandID = Guid.NewGuid().ToString();

            updateTotem(true);

            sendCommandToPlayout(commandToSend);

            //hide the current selection template
            commandToSend = new PlayerCommand();

            commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "HidePage");
            commandToSend.Parameters = new List<CommandParameter>();
            commandToSend.Parameters.Add(new CommandParameter("TemplateName", "CurrentSelection"));
            //commandToSend.Parameters.Add(new CommandParameter("QueueCommand", "true"));

            sendCommandToPlayout(commandToSend);

            //show the hashtag on the right side
            commandToSend = new PlayerCommand();

            commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
            commandToSend.Parameters = new List<CommandParameter>();
            commandToSend.Parameters.Add(new CommandParameter("TemplateName", "RightLogo"));

            xmlRow = new XmlDataRow();

            string hashtag = "";

            if (OTCHashtag && SelectedRightLogo != null && SelectedRightLogo.FileName.ToUpper().IndexOf("HASHTAG") > -1)
            {
                hashtag = Global.GlobalCollections.Instance.OnTheClock.Team.Hashtag;
            }

            xmlRow.Add("TIDBIT_1", hashtag);

            commandToSend.TemplateData = xmlRow.GetXMLString();
            commandToSend.CommandID = Guid.NewGuid().ToString();

            sendCommandToPlayout(commandToSend);
        }
        private void showInterruption()
        {
            if (this.SelectedTidbitText != null && this.SelectedTidbitText != "")
            {
                if (OnStopCycle != null) OnStopCycle();

                PlayerCommand commandToSend = new PlayerCommand();

                commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
                commandToSend.CommandID = Guid.NewGuid().ToString();
                commandToSend.Parameters = new List<CommandParameter>();
                commandToSend.Parameters.Add(new CommandParameter("TemplateName", Category.Template));

                XmlDataRow xmlRow = new XmlDataRow();

                if (Category.LogoTga != null)
                {
                    xmlRow.Add("CHIP_1", Category.LogoTga.LocalPath);
                }

                if (Category.SwatchFile != null)
                {
                    xmlRow.Add("SWATCH_1", Category.SwatchFile.LocalPath);
                }

                xmlRow.Add("TIDBIT_1", SelectedTidbitText.Trim());

                commandToSend.TemplateData = xmlRow.GetXMLString();

                OnSendCommand(commandToSend, null);
            }
        }
        private void revealCurrentSelection()
        {
            if (_currentPlayer != null)
            {
                PlayerCommand commandToSend = new PlayerCommand();

                commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
                commandToSend.CommandID = Guid.NewGuid().ToString();
                commandToSend.Parameters = new List<CommandParameter>();
                commandToSend.Parameters.Add(new CommandParameter("TemplateName", "CurrentSelection"));

                XmlDataRow xmlRow = new XmlDataRow();

                xmlRow.Add("CURRENT_SELECTION_STATE", "REVEAL");

                string curSelStr = _currentPlayer.FirstName + " " + _currentPlayer.LastName + " <font EventFranklinGothic Book>" + _currentPlayer.Position + " - " + _currentPlayer.School.Name + "<\\font>";

                if (_currentPlayer.TradeTidbit.Trim() != "")
                {
                    curSelStr += " " + _currentPlayer.TradeTidbit;
                }

                xmlRow.Add("PLAYER_1", curSelStr);

                commandToSend.TemplateData = xmlRow.GetXMLString();

                OnSendCommand(commandToSend, null);

                if (DbConnection.SelectPlayer(_currentPlayer))
                {
                    OnSetStatusBarMsg(_currentPlayer.FirstName + " " + _currentPlayer.LastName + " selected", "Green");

                    Global.GlobalCollections.Instance.LoadPlayers();

                    if (RefreshPlayersAfterSelection)
                    {
                        OnRefreshPlayers();  //refresh the players on the PlayerTabVM
                    }
                }

                _currentPlayerTidbit = 0;

                Global.GlobalCollections.Instance.LoadOnTheClock();

                OnResetCycle();
            }
        }
Exemplo n.º 5
0
        private void updateClock()
        {
            PlayerCommand commandToSend = new PlayerCommand();

            XmlDataRow xmlRow = new XmlDataRow();

            commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
            commandToSend.Parameters = new List<CommandParameter>();

            if (_takeClock)
            {
                if (_playlistTabVM.SelectedPlaylist != null)
                {
                    switch (_playlistTabVM.SelectedPlaylist.PlaylistName.ToUpper())
                    {
                        case "PROMPTER":
                            commandToSend.Parameters.Add(new CommandParameter("TemplateName", "Prompter"));
                            break;
                        case "BREAK CLOCK":
                            commandToSend.Parameters.Add(new CommandParameter("TemplateName", "BreakClock"));
                            break;
                        default:
                            commandToSend.Parameters.Add(new CommandParameter("TemplateName", "Clock"));
                            xmlRow.Add("TURN_CLOCK_RED", _clockRedUnderMin.ToString().ToUpper());
                            break;
                    }
                }
                else
                {
                    commandToSend.Parameters.Add(new CommandParameter("TemplateName", "Clock"));
                    xmlRow.Add("TURN_CLOCK_RED", _clockRedUnderMin.ToString().ToUpper());
                }

                if (_playlistTabVM.SelectedPlaylist != null)
                {
                    if (_playlistTabVM.SelectedPlaylist.PlaylistName.ToUpper() != "BREAK CLOCK" && _playlistTabVM.SelectedPlaylist.PlaylistName.ToUpper() != "PROMPTER")
                    {
                        switch (_clockSeconds)
                        {
                            case 0:
                                if (_prevClockSeconds != 0)
                                {
                                    xmlRow.Add("CLOCK_OVERLAY", "PICK IS IN");
                                }
                                break;
                            case 60:
                                if (_clockRedUnderMin)
                                {
                                    xmlRow.Add("CLOCK_COLOR", "RED");
                                }
                                break;
                            default:
                                if (_clockSeconds > _prevClockSeconds && _prevClockSeconds > 0)
                                {
                                    xmlRow.Add("CLOCK_OVERLAY", "PICK IS IN");
                                    xmlRow.Add("CLOCK", "");
                                    _pickIsIn = true;
                                }
                                else
                                {
                                    //if (_useCountdownClock)
                                    //{
                                    //    xmlRow.Add("CLOCK", _countdownClock);
                                    //}
                                    //else
                                    //{
                                    //    if (_pickIsIn == false)
                                    //    {
                                    //        xmlRow.Add("CLOCK", _clock);
                                    //    }
                                    //}

                                    commandToSend.Parameters.Add(new CommandParameter("MergeDataWithoutTransitions", "true"));
                                }

                                break;
                        }

                        if (_clockSeconds == 0)
                        {
                            _takeClock = false;

                        }
                    }
                }
                else
                {
                    _takeClock = true;
                }
            }
            else
            {
                //commandToSend.Parameters.Add(new CommandParameter("MergeDataWithoutTransitions", "true"));
            }

            _prevClockSeconds = _clockSeconds;

            if (_useCountdownClock)
            {
                xmlRow.Add("CLOCK", _countdownClock);
            }
            else
            {
                if (_pickIsIn == false)
                {
                    xmlRow.Add("CLOCK", _clock);
                }
            }

            commandToSend.TemplateData = xmlRow.GetXMLString();

            _clockTalker.Talk(commandToSend);
        }
Exemplo n.º 6
0
        private void updateTotem(bool changeTotem = false)
        {
            PlayerCommand commandToSend = new PlayerCommand();

            commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
            commandToSend.CommandID = Guid.NewGuid().ToString();
            commandToSend.Parameters = new List<CommandParameter>();
            commandToSend.Parameters.Add(new CommandParameter("TemplateName", "Next"));

            XmlDataRow xmlRow = new XmlDataRow();

            Pick nextPick1 = null;
            Pick nextPick2 = null;

            if (Global.GlobalCollections.Instance.OnTheClock != null)
            {
                nextPick1 = (Pick)Global.GlobalCollections.Instance.DraftOrder.SingleOrDefault(p => p.OverallPick == Global.GlobalCollections.Instance.OnTheClock.OverallPick + 1);
                nextPick2 = (Pick)Global.GlobalCollections.Instance.DraftOrder.SingleOrDefault(p => p.OverallPick == Global.GlobalCollections.Instance.OnTheClock.OverallPick + 2);
            }

            if (nextPick1 != null)
            {
                xmlRow.Add("ABBREV_4_1", nextPick1.Team.Tricode);

                if (nextPick2 != null)
                {
                    xmlRow.Add("ABBREV_4_2", nextPick2.Team.Tricode);
                }
                else
                {
                    xmlRow.Add("ABBREV_4_2", "");
                }
            }
            else
            {
                xmlRow.Add("ABBREV_4_1", "");
                xmlRow.Add("ABBREV_4_2", "");
            }

            if (changeTotem)
            {
                xmlRow.Add("CHANGE_TOTEM_FLAG", "1");
            }
            else
            {
                xmlRow.Add("CHANGE_TOTEM_FLAG", "");
            }

            commandToSend.TemplateData = xmlRow.GetXMLString();

            sendCommandToPlayout(commandToSend);
        }
        private void updateHashtag()
        {
            //show the hashtag on the right side
            PlayerCommand commandToSend = new PlayerCommand();

            commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
            commandToSend.Parameters = new List<CommandParameter>();
            commandToSend.Parameters.Add(new CommandParameter("TemplateName", "RightLogo"));

            XmlDataRow xmlRow = new XmlDataRow();

            string hashtag = "";

            if (OTCHashtag && SelectedRightLogoFilename.ToUpper().IndexOf("HASHTAG") > -1)
            {
                hashtag = Global.GlobalCollections.Instance.OnTheClock.Team.Hashtag;
            }

            xmlRow.Add("TIDBIT_1", hashtag);

            commandToSend.TemplateData = xmlRow.GetXMLString();
            commandToSend.CommandID = Guid.NewGuid().ToString();

            OnSendCommand(commandToSend, null);
        }
Exemplo n.º 8
0
        private void showPollResults()
        {
            string[] poll = DbConnection.GetPoll(true);

            if (poll != null)
            {
                string pollChip = ConfigurationManager.AppSettings["PollChipDirectory"].ToString() + "\\" + _selectedPollChip.FileName;

                if (File.Exists(pollChip))
                {
                    stopCycle();

                    PlayerCommand commandToSend;

                    commandToSend = new PlayerCommand();

                    commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
                    commandToSend.CommandID = Guid.NewGuid().ToString();
                    commandToSend.Parameters = new List<CommandParameter>();
                    commandToSend.Parameters.Add(new CommandParameter("TemplateName", "Poll"));

                    XmlDataRow xmlRow = new XmlDataRow();

                    xmlRow.Add("TITLE_1", poll[0]);
                    xmlRow.Add("TIDBIT_1", poll[1]);

                    xmlRow.Add("CHIP_1", pollChip);
                    xmlRow.Add("VENT_SWATCH_1", "Images\\Swatches\\black_swatch.tga");

                    commandToSend.TemplateData = xmlRow.GetXMLString();

                    sendCommandToPlayout(commandToSend);
                }
            }
        }
        private void showPlayerTidbits()
        {
            if (_currentPlayer.Tidbits != null)
            {
                if (_currentPlayerTidbit < _currentPlayer.Tidbits.Count)
                {
                    PlayerCommand commandToSend = new PlayerCommand();

                    commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
                    commandToSend.CommandID = Guid.NewGuid().ToString();
                    commandToSend.Parameters = new List<CommandParameter>();
                    commandToSend.Parameters.Add(new CommandParameter("TemplateName", "CurrentSelection"));

                    XmlDataRow xmlRow = new XmlDataRow();

                    xmlRow.Add("CURRENT_SELECTION_STATE", "SHOWTIDBITS");

                    string curSelStr = _currentPlayer.FirstName + " " + _currentPlayer.LastName + " <font EventFranklinGothic Book>" + _currentPlayer.Position + " - " + _currentPlayer.School.Name + "<\\font>";

                    if (_currentPlayer.TradeTidbit.Trim() != "")
                    {
                        curSelStr += " " + _currentPlayer.TradeTidbit;
                    }

                    xmlRow.Add("PLAYER_1", curSelStr);
                    xmlRow.Add("TIDBIT_1", _currentPlayer.Tidbits[_currentPlayerTidbit].TidbitText);

                    _currentPlayerTidbit++;

                    commandToSend.TemplateData = xmlRow.GetXMLString();

                    //raise an event to the main...
                    OnSendCommand(commandToSend, null);
                }
            }
        }
        private void updateClock(bool isLastPick)
        {
            PlayerCommand commandToSend;

            //send a command to change the clock on-air
            commandToSend = new PlayerCommand();

            commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
            commandToSend.Parameters = new List<CommandParameter>();
            commandToSend.Parameters.Add(new CommandParameter("TemplateName", "Clock"));

            XmlDataRow xmlRow = new XmlDataRow();

            if (isLastPick)
            {
                xmlRow.Add("CLOCK_OVERLAY", "OVERLAY");
                xmlRow.Add("CHIP_1", ConfigurationManager.AppSettings["ClockOverlayDirectory"].ToString() + "\\" + ConfigurationManager.AppSettings["EndOfDraftChip"].ToString());
            }
            else
            {
                xmlRow.Add("ROUND_1", Global.GlobalCollections.Instance.OnTheClock.Round.ToString());
                xmlRow.Add("PICK_1", Global.GlobalCollections.Instance.OnTheClock.OverallPick.ToString());
                xmlRow.Add("LOGO_1", Global.GlobalCollections.Instance.OnTheClock.Team.LogoTgaNoKey.LocalPath);
                xmlRow.Add("SWATCH_1", Global.GlobalCollections.Instance.OnTheClock.Team.SwatchTga.LocalPath);
                xmlRow.Add("ABBREV_4_1", Global.GlobalCollections.Instance.OnTheClock.Team.Tricode);

                xmlRow.Add("CLOCK_OVERLAY", "ON THE CLOCK");
                xmlRow.Add("CLOCK", "");

                updateTotem(true);
            }

            //xmlRow.Add("CLOCK_COLOR", "NORMAL");

            commandToSend.TemplateData = xmlRow.GetXMLString();
            commandToSend.CommandID = Guid.NewGuid().ToString();

            OnSendCommand(commandToSend, null);
        }
        private void showPickIsIn()
        {
            //int lastPick = Global.GlobalCollections.Instance.OnTheClock.OverallPick - 1;

            //CurrentPlayer = DbConnection.GetPlayerByPick(lastPick);

            PlayerCommand commandToSend = new PlayerCommand();

            commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
            commandToSend.CommandID = Guid.NewGuid().ToString();
            commandToSend.Parameters = new List<CommandParameter>();
            commandToSend.Parameters.Add(new CommandParameter("TemplateName", "Clock"));

            XmlDataRow xmlRow = new XmlDataRow();

            xmlRow.Add("CLOCK_OVERLAY", "PICK IS IN");
            //xmlRow.Add("CLOCK_COLOR", "NORMAL");

            commandToSend.TemplateData = xmlRow.GetXMLString();

            OnSendCommand(commandToSend, null);
        }
        private void showCurrentSelectionAction(object parameter)
        {
            AskShowCurrentSelection = false;

            PlayerCommand commandToSend = new PlayerCommand();

            commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
            commandToSend.CommandID = Guid.NewGuid().ToString();
            commandToSend.Parameters = new List<CommandParameter>();
            commandToSend.Parameters.Add(new CommandParameter("TemplateName", "CurrentSelection"));

            XmlDataRow xmlRow = new XmlDataRow();

            xmlRow.Add("CURRENT_SELECTION_STATE", "CURRENTSELECTION");
            xmlRow.Add("CHIP_1", Global.GlobalCollections.Instance.OnTheClock.Team.PickPlateTga.LocalPath);
            xmlRow.Add("SWATCH_1", Global.GlobalCollections.Instance.OnTheClock.Team.SwatchTga.LocalPath);

            commandToSend.TemplateData = xmlRow.GetXMLString();

            //raise an event to the main...
            OnSendCommand(commandToSend, null);
        }
        private void showClock()
        {
            PlayerCommand commandToSend = new PlayerCommand();

            commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
            commandToSend.CommandID = Guid.NewGuid().ToString();
            commandToSend.Parameters = new List<CommandParameter>();
            commandToSend.Parameters.Add(new CommandParameter("TemplateName", "Clock"));

            XmlDataRow xmlRow = new XmlDataRow();

            xmlRow.Add("CLOCK_OVERLAY", "CLOCK");

            commandToSend.TemplateData = xmlRow.GetXMLString();

            OnSendCommand(commandToSend, null);
        }
Exemplo n.º 14
0
        private void showClock()
        {
            _takeClock = true;
            _pickIsIn = false;

            PlayerCommand commandToSend = new PlayerCommand();

            commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
            commandToSend.Parameters = new List<CommandParameter>();
            commandToSend.Parameters.Add(new CommandParameter("TemplateName", "Clock"));

            XmlDataRow xmlRow = new XmlDataRow();

            xmlRow.Add("CLOCK_OVERLAY", "CLOCK");

            commandToSend.TemplateData = xmlRow.GetXMLString();

            sendCommandToPlayout(commandToSend);
        }
Exemplo n.º 15
0
        private void animateTradeAction(object parameter)
        {
            OnStopCycle();

            AskAnimateTrade = false;

            PlayerCommand commandToSend = new PlayerCommand();

            commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
            commandToSend.Parameters = new List<CommandParameter>();
            commandToSend.Parameters.Add(new CommandParameter("TemplateName", "Clock"));
            commandToSend.Parameters.Add(new CommandParameter("QueueCommand", "true"));

            XmlDataRow xmlRow = new XmlDataRow();

            xmlRow.Add("CLOCK_OVERLAY", "TRADE");
            xmlRow.Add("LOGO_1", Global.GlobalCollections.Instance.OnTheClock.Team.LogoTgaNoKey.LocalPath);
            xmlRow.Add("SWATCH_1", Global.GlobalCollections.Instance.OnTheClock.Team.SwatchTga.LocalPath);
            xmlRow.Add("ABBREV_4_1", Global.GlobalCollections.Instance.OnTheClock.Team.Tricode);

            commandToSend.TemplateData = xmlRow.GetXMLString();

            OnSendCommand(commandToSend, null);

            commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
            commandToSend.Parameters = new List<CommandParameter>();
            commandToSend.Parameters.Add(new CommandParameter("TemplateName", "TradeInterruption"));

            xmlRow = new XmlDataRow();

            xmlRow.Add("TIDBIT_1", _tradeString);

            commandToSend.TemplateData = xmlRow.GetXMLString();
            commandToSend.CommandID = Guid.NewGuid().ToString();

            OnSendCommand(commandToSend, null);

            _tradeString = "";
        }
Exemplo n.º 16
0
        private void showClockOverlay()
        {
            if (_selectedClockOverlay != null)
            {
                PlayerCommand commandToSend = new PlayerCommand();

                commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
                commandToSend.Parameters = new List<CommandParameter>();
                commandToSend.Parameters.Add(new CommandParameter("TemplateName", "Clock"));

                XmlDataRow xmlRow = new XmlDataRow();

                if (_selectedClockOverlay.FileName == "<NONE>")
                {
                    xmlRow.Add("CLOCK_OVERLAY", "ON THE CLOCK");
                }
                else
                {
                    xmlRow.Add("CLOCK_OVERLAY", "OVERLAY");
                    xmlRow.Add("CHIP_1", ConfigurationManager.AppSettings["ClockOverlayDirectory"].ToString() + "\\" + _selectedClockOverlay.FileName);
                }

                commandToSend.TemplateData = xmlRow.GetXMLString();
                commandToSend.CommandID = Guid.NewGuid().ToString();

                sendCommandToPlayout(commandToSend);
            }
        }
Exemplo n.º 17
0
        private void cancelAnimateTradeAction(object parameter)
        {
            AskAnimateTrade = false;

            _tradeString = "";

            //maybe just hot change the team on the clock here?

            PlayerCommand commandToSend = new PlayerCommand();

            commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
            commandToSend.Parameters = new List<CommandParameter>();
            commandToSend.Parameters.Add(new CommandParameter("TemplateName", "Clock"));

            XmlDataRow xmlRow = new XmlDataRow();

            xmlRow.Add("CLOCK_OVERLAY", "ON THE CLOCK");
            xmlRow.Add("LOGO_1", Global.GlobalCollections.Instance.OnTheClock.Team.LogoTgaNoKey.LocalPath);
            xmlRow.Add("SWATCH_1", Global.GlobalCollections.Instance.OnTheClock.Team.SwatchTga.LocalPath);
            xmlRow.Add("ABBREV_4_1", Global.GlobalCollections.Instance.OnTheClock.Team.Tricode);

            commandToSend.TemplateData = xmlRow.GetXMLString();
            commandToSend.CommandID = Guid.NewGuid().ToString();

            //raise an event to the main...
            OnSendCommand(commandToSend, null);
        }
Exemplo n.º 18
0
        private void showRightLogo()
        {
            if (_selectedRightLogo != null)
            {
                PlayerCommand commandToSend = new PlayerCommand();

                commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
                commandToSend.Parameters = new List<CommandParameter>();
                commandToSend.Parameters.Add(new CommandParameter("TemplateName", "RightLogo"));

                XmlDataRow xmlRow = new XmlDataRow();

                if (_selectedRightLogo.FileName == "<NONE>")
                {
                    xmlRow.Add("CHIP_1", "");
                    xmlRow.Add("VISIBLE", "0");
                }
                else
                {
                    xmlRow.Add("CHIP_1", ConfigurationManager.AppSettings["RightLogoDirectory"].ToString() + "\\" + _selectedRightLogo.FileName);
                    xmlRow.Add("VISIBLE", "1");
                }

                if (_selectedRightLogo.FileName.ToUpper().IndexOf("HASHTAG") > -1)
                {
                    xmlRow.Add("TIDBIT_1", _rightSideHashtag);
                }

                commandToSend.TemplateData = xmlRow.GetXMLString();
                commandToSend.CommandID = Guid.NewGuid().ToString();

                sendCommandToPlayout(commandToSend);
            }
        }
Exemplo n.º 19
0
        private void hideTradeInterruption()
        {
            OnResetCycle();

            PlayerCommand commandToSend = new PlayerCommand();

            commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
            commandToSend.Parameters = new List<CommandParameter>();
            commandToSend.Parameters.Add(new CommandParameter("TemplateName", "Clock"));
            commandToSend.Parameters.Add(new CommandParameter("QueueCommand", "true"));

            XmlDataRow xmlRow = new XmlDataRow();

            xmlRow.Add("CLOCK_OVERLAY", "ON THE CLOCK");
            xmlRow.Add("LOGO_1", Global.GlobalCollections.Instance.OnTheClock.Team.LogoTgaNoKey.LocalPath);
            xmlRow.Add("SWATCH_1", Global.GlobalCollections.Instance.OnTheClock.Team.SwatchTga.LocalPath);
            xmlRow.Add("ABBREV_4_1", Global.GlobalCollections.Instance.OnTheClock.Team.Tricode);

            commandToSend.TemplateData = xmlRow.GetXMLString();
            commandToSend.CommandID = Guid.NewGuid().ToString();

            OnSendCommand(commandToSend, null);

            //show the hashtag on the right side
            commandToSend = new PlayerCommand();

            commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
            commandToSend.Parameters = new List<CommandParameter>();
            commandToSend.Parameters.Add(new CommandParameter("TemplateName", "RightLogo"));

            xmlRow = new XmlDataRow();

            string hashtag = "";

            if (OTCHashtag && SelectedRightLogoFilename != null && SelectedRightLogoFilename.ToUpper().IndexOf("HASHTAG") > -1)
            {
                hashtag = Global.GlobalCollections.Instance.OnTheClock.Team.Hashtag;
            }

            xmlRow.Add("TIDBIT_1", hashtag);

            commandToSend.TemplateData = xmlRow.GetXMLString();
            commandToSend.CommandID = Guid.NewGuid().ToString();

            OnSendCommand(commandToSend, null);

            commandToSend = new PlayerCommand();

            commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "HidePage");
            commandToSend.CommandID = Guid.NewGuid().ToString();
            commandToSend.Parameters = new List<CommandParameter>();
            commandToSend.Parameters.Add(new CommandParameter("TemplateName", "TradeInterruption"));

            OnSendCommand(commandToSend, null);
        }
Exemplo n.º 20
0
        private void updateCountdownClock()
        {
            if (_useCountdownClock)
            {
                if (_playlistTabVM.SelectedPlaylist != null)
                {
                    PlayerCommand commandToSend = new PlayerCommand();

                    XmlDataRow xmlRow = new XmlDataRow();

                    commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");

                    commandToSend.Parameters = new List<CommandParameter>();

                    if (_playlistTabVM.SelectedPlaylist.PlaylistName.ToUpper() == "PROMPTER")
                    {
                        commandToSend.Parameters.Add(new CommandParameter("TemplateName", "Prompter"));
                    }
                    else
                    {
                        commandToSend.Parameters.Add(new CommandParameter("TemplateName", "Clock"));
                    }

                    commandToSend.Parameters.Add(new CommandParameter("MergeDataWithoutTransitions", "true"));

                    xmlRow.Add("CLOCK", _countdownClock);

                    commandToSend.TemplateData = xmlRow.GetXMLString();

                    _clockTalker.Talk(commandToSend);
                }
            }
        }
Exemplo n.º 21
0
        private void tradePickAction(object parameter)
        {
            AskTradePick = false;

            if (DbConnection.TradePick(_selectedPick, _selectedTradePickTeam))
            {
                if (Global.GlobalCollections.Instance.OnTheClock != null)
                {
                    int currentPick = Global.GlobalCollections.Instance.OnTheClock.OverallPick;

                    OnSetStatusBarMsg("#" + _selectedPick.OverallPick + " overall pick traded to " + _selectedTradePickTeam.Name, "Green");

                    int pick = _selectedPick.OverallPick;

                    string fromTeam = "";
                    string toTeam = "";

                    if (_selectedPick.Team.Name.ToUpper() == "49ERS")
                    {
                        fromTeam = "49ers";
                    }
                    else
                    {
                        fromTeam = _selectedPick.Team.Name.ToUpper();
                    }

                    if (_selectedTradePickTeam.Name.ToUpper() == "49ERS")
                    {
                        toTeam = "49ers";
                    }
                    else
                    {
                        toTeam = _selectedTradePickTeam.Name.ToUpper();
                    }

                    _tradeString = "<font EventFranklinGothic-Demi>" + fromTeam + "<\\font> trade pick to <font EventFranklinGothic-Demi>" + toTeam + "<\\font>";

                    Global.GlobalCollections.Instance.LoadDraftOrder();
                    Global.GlobalCollections.Instance.LoadOnTheClock();

                    if (pick == currentPick)
                    {
                        OnStopCycle();

                        PromptMessage = "Animate this trade?";
                        AskAnimateTrade = true;
                    }
                    else if (pick == currentPick + 1 || pick == currentPick + 2)
                    {
                        PlayerCommand commandToSend = new PlayerCommand();

                        commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
                        commandToSend.Parameters = new List<CommandParameter>();
                        commandToSend.Parameters.Add(new CommandParameter("TemplateName", "Next"));

                        XmlDataRow xmlRow = new XmlDataRow();

                        Pick nextPick1;
                        Pick nextPick2;

                        nextPick1 = (Pick)Global.GlobalCollections.Instance.DraftOrder.SingleOrDefault(p => p.OverallPick == currentPick + 1);
                        nextPick2 = (Pick)Global.GlobalCollections.Instance.DraftOrder.SingleOrDefault(p => p.OverallPick == currentPick + 2);

                        xmlRow.Add("ABBREV_4_1", nextPick1.Team.Tricode);
                        xmlRow.Add("ABBREV_4_2", nextPick2.Team.Tricode);
                        xmlRow.Add("CHANGE_TOTEM_FLAG", "0");

                        commandToSend.TemplateData = xmlRow.GetXMLString();
                        commandToSend.CommandID = Guid.NewGuid().ToString();

                        OnSendCommand(commandToSend, null);
                    }
                }
                else
                {
                    //just reload the draft order
                    Global.GlobalCollections.Instance.LoadDraftOrder();
                }
            }
        }
Exemplo n.º 22
0
        private void animateBand()
        {
            PlayerCommand commandToSend = new PlayerCommand();

            XmlDataRow xmlRow = new XmlDataRow();

            switch (_animate)
            {
                case "Animate Off":
                    //MJF
                    commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
                    commandToSend.CommandID = Guid.NewGuid().ToString();
                    commandToSend.Parameters = new List<CommandParameter>();
                    commandToSend.Parameters.Add(new CommandParameter("TemplateName", "BandCover"));

                    //xmlRow.Add("ANIMATE_ALL", "1");

                    //commandToSend.TemplateData = xmlRow.GetXMLString();
                    sendCommandToPlayout(commandToSend);

                    commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "HidePage");
                    commandToSend.CommandID = Guid.NewGuid().ToString();
                    commandToSend.Parameters = new List<CommandParameter>();
                    commandToSend.Parameters.Add(new CommandParameter("AnimateAll", "1"));

                    xmlRow.Add("ANIMATE_ALL", "1");

                    commandToSend.TemplateData = xmlRow.GetXMLString();

                    //MJF

                    Animate = "Animate On";

                    break;
                case "Animate On":
                    commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
                    commandToSend.CommandID = Guid.NewGuid().ToString();
                    commandToSend.Parameters = new List<CommandParameter>();
                    commandToSend.Parameters.Add(new CommandParameter("TemplateName", "BandCover"));

                    //xmlRow.Add("ANIMATE_ALL", "1");

                    //commandToSend.TemplateData = xmlRow.GetXMLString();
                    sendCommandToPlayout(commandToSend);

                    commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
                    commandToSend.CommandID = Guid.NewGuid().ToString();
                    commandToSend.Parameters = new List<CommandParameter>();
                    commandToSend.Parameters.Add(new CommandParameter("AnimateAll", "1"));

                    xmlRow.Add("ANIMATE_ALL", "1");

                    commandToSend.TemplateData = xmlRow.GetXMLString();

                    Animate = "Animate Off";

                    break;
            }

            sendCommandToPlayout(commandToSend);
        }
Exemplo n.º 23
0
        private void showTweet()
        {
            if (_selectedTweetText != null && _selectedTweetText != "" && _selectedLogo != null)
            {
                if (OnStopCycle != null) OnStopCycle();

                PlayerCommand commandToSend = new PlayerCommand();

                commandToSend.Command = (DraftAdmin.PlayoutCommands.CommandType)Enum.Parse(typeof(DraftAdmin.PlayoutCommands.CommandType), "ShowPage");
                commandToSend.CommandID = Guid.NewGuid().ToString();
                commandToSend.Parameters = new List<CommandParameter>();
                commandToSend.Parameters.Add(new CommandParameter("TemplateName", ConfigurationManager.AppSettings["TwitterTemplate"].ToString()));

                XmlDataRow xmlRow = new XmlDataRow();

                xmlRow.Add("TITLE_1", _selectedTweetUsername);
                xmlRow.Add("CHIP_1", ConfigurationManager.AppSettings["FranchiseChipDirectory"].ToString() + "\\" + _selectedLogo.FileName);
                xmlRow.Add("TIDBIT_1", _selectedTweetText);
                //xmlRow.Add("SWATCH_1", this.Category.SwatchFile.LocalPath);

                commandToSend.TemplateData = xmlRow.GetXMLString();

                OnSendCommand(commandToSend, null);
            }
        }