예제 #1
0
        public MainWindow()
        {
            InitializeComponent();

            timeDelation();
            try
            {
                dataBase      = new DataBase.BaseData();
                dataBase.del += db =>
                {
                    if (db.Rows.Count > 0)
                    {
                        MainText.Text = db.Rows[0][0].ToString();
                        marquee.Text  = db.Rows[0][1].ToString();
                        ads_time      = int.Parse(db.Rows[0][2].ToString());
                        time          = marquee.Text.Length;
                    }
                };
                dataBase.SoursData("select name_b,(SELECT tvtablo_text FROM tvtablos_ticker),(SELECT rskbank.options.value FROM rskbank.options WHERE rskbank.options.`key` = 'Ads_time') from branches");
            }
            catch
            {
            }
            #region Timer
            dispatcherTimer.Tick    += new EventHandler(dispatcherTimer_Tick);
            dispatcherTimer.Interval = new TimeSpan(0, 0, 1);
            dispatcherTimer.Start();
            #endregion

            MediaStart();

            Personto_to_walk();

            this.MaximizeToSecondaryMonitor();
        }
예제 #2
0
        public void UpdateQ()
        {
            try
            {
                if (List.Items.Count > 0)
                {
                    List.Items.Clear();
                }
                else if (List.Items.Count == 0)
                {
                    NumberTxt.Text = "";
                    OperTxt.Text   = "";
                }
                dataBase      = new DataBase.BaseData();
                dataBase.del += db =>
                {
                    if (db.Rows.Count > 0)
                    {
                        for (int i = 0; i < db.Rows.Count; i++)
                        {
                            List.Items.Add
                            (
                                new Turns
                            {
                                number = db.Rows[i][1].ToString(),
                                oper   = db.Rows[i][2].ToString()
                            });
                        }

                        OperTxt.Text   = opera = db.Rows[0][2].ToString();
                        langu          = db.Rows[0][3].ToString();
                        NumberTxt.Text = number = db.Rows[0][1].ToString();
                        IDText.Text    = db.Rows[0][0].ToString();
                    }
                };
                dataBase.SoursData("SELECT t.id,t.turn_nomer,t.window_nomer,t.lang from tvtablos_current_turns AS t ORDER BY t.id DESC limit 10");
            }
            catch
            {
            }
        }
예제 #3
0
 public void timeDelation()
 {
     try
     {
         videolist     = new List <string>();
         dataBase      = new DataBase.BaseData();
         dataBase.del += bd =>
         {
             if (bd.Rows.Count > 0)
             {
                 for (int i = 0; i < bd.Rows.Count; i++)
                 {
                     videolist.Add(bd.Rows[i][2].ToString());
                 }
             }
         };
         dataBase.SoursData("SELECT a.start_date,a.end_date,d.video_url FROM ads_schedules AS a INNER JOIN ads AS d ON a.ads_id = d.id");
     }
     catch
     {
     }
 }