Пример #1
0
 private void DJCommand(RegisteredCommandArgs argument)
 {
     if (this.con == null)
     {
         this.con = new DJCon(this); con.Show();
     }
 }
Пример #2
0
        private void OnChannelNormalMessage(ChannelNormalMessageArgs argument)
        {
            if (djstatus == false)
            {
                return;
            }                                                                                           //Do nothing if off-air
            else if (djstatus == true)                                                                  //Process on-air requests.
            {
                if (argument.Message.StartsWith("!request") || argument.Message.StartsWith("!Request")) // Only parse if !request command is detected in a channel.
                {
                    if (this.con == null)
                    {
                        this.con = new DJCon(this); con.Show();
                    }

                    object d = DateTime.Now.ToShortDateString();
                    object t = DateTime.Now.ToShortTimeString();
                    rTS = d + " @ " + t;


                    rNick    = argument.User.Nick;
                    rIDHTS   = argument.User.Ident + "@" + argument.User.Host;
                    rRequest = argument.Message.Remove(0, 9);
                    rChannel = argument.Channel.Name;

                    // ⚠ EXPERIMENTAL CODE ⚠ //
                    for (int i = 0; i < 1; i++)
                    {
                        UserRequest nr = addreq(i);                                                                                                                       //Ref. newly created control.
                        con.RequestConsole.Controls.Add(nr);                                                                                                              // Add newly created control to flowlayoutpanel
                        con.SLog.AppendText("Song: " + rRequest + " Requested by: " + rNick + " (" + rIDHTS + ") in: " + rChannel + " at: " + rTS + Environment.NewLine); //Add to secret log for exporting.
                        con.Refresh();                                                                                                                                    // Vain attempt to get 2nd and additional controls to display
                        con.RequestConsole.Refresh();                                                                                                                     // same as above
                        nr.Refresh();                                                                                                                                     //same as above
                        Application.DoEvents();                                                                                                                           //same as above
                    }
                    if (Properties.Settings.Default.hcr == true)
                    {
                        Client.ActiveIWindow.OutputText("*** [DJ REQUESTS] " + rNick + " (" + rIDHTS + ") made this request: " + rRequest + " in: " + rChannel);
                        argument.EatData = EatData.EatAll;
                    }
                    if (Properties.Settings.Default.hcr == false)
                    {
                        argument.EatData = EatData.EatNone; return;
                    }
                }
            }
        }
Пример #3
0
 private void OnAir(object sender, EventArgs e)
 {
     if (this.con == null)
     {
         this.con            = new DJCon(this);
         con.appExit.Text    = "Go off-air first";
         con.appExit.Enabled = false; //Block console termination
         Client.ActiveIWindow.OutputText("*** [DJ REQUESTS] You have gone on-air. The requests console cannot be closed during this time. To close it, you must go off-air.");
         djstatus = true;             //Set the DJ as on-air
         con.Show();
     }
     else
     {
         Client.ActiveIWindow.OutputText("*** [DJ REQUESTS] You are already on-air!");
     }
 }