예제 #1
0
        internal static void getAgentAnnounces()
        {
            sipClient sipClient = (from p in Application.OpenForms.OfType <sipClient>() select p).FirstOrDefault();
            setSounds setSounds = (from p in Application.OpenForms.OfType <setSounds>() select p).FirstOrDefault();

            if (setSounds != null)
            {
                setSounds.announces.Rows.Clear();
            }
            sipClient.announces.Rows.Clear();
            int i = 0;

            string[] package =
            {
                sipClient.jwsSessionId
            };
            try
            {
                var answer = jws.jAgentGetAnnounce(main.packUp(package));
                if (answer.result == "OK" && answer.records.ToString().Length > 0)
                {
                    string[] fields = answer.records.ToString().Split(';');
                    foreach (string field in fields)
                    {
                        try
                        {
                            string[] datas = field.Split('|');
                            if (setSounds != null)
                            {
                                setSounds.announces.Rows.Insert(i, datas[0], datas[1], datas[2], datas[3], datas[4], datas[5], "Oynat");
                            }

                            sipClient.announces.Rows.Insert(i, datas[0], datas[1], datas[2], datas[3], "Oynat");
                            i++;
                        }
                        catch { }
                    }
                }
                else
                {
                    main.errorModal("Records Error: " + answer.result);
                }
            }
            catch { }
        }
예제 #2
0
        private void karşılamaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            setSounds callWelcome = new setSounds();

            callWelcome.ShowDialog();
        }