예제 #1
0
        private void ApplyRadMediaQuickFilter()
        {
            string medianame = "";
            string filename = "";
            string description = "";
            string allsearch = "";
            try
            {
                string searchterm = radMediaFilter.Text.ToLower();
                if (searchterm == "")
                {
                    ApplyMediaFilter();
                }
                else
                {
                    contentCollection.Clear();
                    foreach (DAL.Content item in allcontentCollection)
                    {
                        allsearch = "";
                        try
                        {
                            DAL.Content _content = new DAL.Content();
                            _content = item;
                            //MessageBox.Show(_content.Name);
                            try
                            {
                                filename = _content.Filelocation.ToLower();
                                allsearch += filename;
                            }
                            catch (Exception ex)
                            {
                                MessageBox.Show("fn" + ex.Message);
                            }
                            try
                            {
                                medianame = _content.Name.ToLower();
                                allsearch += medianame;
                            }
                            catch (Exception ex)
                            {
                                MessageBox.Show("mn" + ex.Message);
                            }
                            try
                            {
                                description = _content.Description.ToLower();
                                allsearch += description;
                            }
                            catch (Exception ex)
                            {
                                //MessageBox.Show("de" + ex.Message);
                            }

                            if ((bool)cbfilterImages.IsChecked == true && item.Contenttype == "Image" && allsearch.Contains(searchterm)==true) contentCollection.Add(item);
                            if ((bool)cbfilterVideo.IsChecked == true && item.Contenttype == "Video" && allsearch.Contains(searchterm)==true) contentCollection.Add(item);
                            if ((bool)cbfilterFlash.IsChecked == true && item.Contenttype == "Flash" && allsearch.Contains(searchterm)==true) contentCollection.Add(item);
                        }
                        catch (Exception ex)
                        {
                            //MessageBox.Show(ex.Message);
                        }
                    }
                }

            }
            catch (Exception ex)
            {

            }
        }
예제 #2
0
 private void btnAddNewTicker_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     si.sie("btnAddNewTicker_Click");
     try
     {
         cbTickerFont.SelectedIndex = 0;
         cbTickerSize.SelectedIndex = 0;
         ticker = new DAL.Content();
         ticker.Contenttype = "Ticker";
         borderTickerInformation.DataContext = ticker;
         EnableTickerChanges();
         tbTickerName.Focus();
     }
     catch (Exception ex)
     {
     }
     si.sil("btnAddNewTicker_Click");
 }
예제 #3
0
        private void lbTickerTapes_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
        {
            try
            {
                DAL.Content sTicker = new DAL.Content();
                sTicker = (DAL.Content)lbTickerTapes.SelectedItem;

                borderTickerInformation.DataContext = sTicker;
                cbTickerFont.Text = (string)sTicker.Metadata2;
                cbTickerSize.SelectedValue = (string)sTicker.Metadata3;
                Color c = new Color();
                c = (Color)ColorConverter.ConvertFromString(sTicker.Metadata4);
                cbTickerColour.SelectedColor = c;
                Color tbColor = new Color();
                try
                {
                    tbColor = (Color)ColorConverter.ConvertFromString(sTicker.Metadata6);
                    cbTickerBackgroundColour.SelectedColor = tbColor;
                    //MessageBox.Show(ticker.Metadata5);
                    si.sii("TICKER SPEED=" + sTicker.Metadata5);
                    sliderTickerSpeed.Value = Convert.ToDouble(sTicker.Metadata5);
                    sliderTickerBackgroundOpacity.Value = Convert.ToDouble(sTicker.Metadata7);
                }
                catch (Exception ex)
                {
                }

                UpdateSampleTicker(sTicker);
            }
            catch (Exception ex)
            {

            }
        }
예제 #4
0
        private void listBoxMedia_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
        {
            try
            {
                DAL.Content _cnt = new DAL.Content();
                _cnt = (DAL.Content)listBoxMedia.SelectedItem;

                imageMediaTypeFlash.Visibility = Visibility.Collapsed;
                imageMediaTypeImage.Visibility = Visibility.Collapsed;
                imageMediaTypeVideo.Visibility = Visibility.Collapsed;
                imageMediaTypeTicker.Visibility = Visibility.Collapsed;

                if (_cnt.Contenttype == "Image") imageMediaTypeImage.Visibility = Visibility.Visible;
                if (_cnt.Contenttype == "Video") imageMediaTypeVideo.Visibility = Visibility.Visible;
                if (_cnt.Contenttype == "Flash") imageMediaTypeFlash.Visibility = Visibility.Visible;
                if (_cnt.Contenttype == "Ticker") imageMediaTypeTicker.Visibility = Visibility.Visible;

                borderMediaDetail.DataContext = _cnt;
            }
            catch (Exception ex)
            {
            }
        }
예제 #5
0
 private void btnRemoveTicker_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     e.Handled = true;
     try
     {
         showWait();
         DAL.Content sTicker = new DAL.Content();
         sTicker = (DAL.Content)lbTickerTapes.SelectedItem;
         proxy.RemoveTicker(sTicker);
         try
         {
             contentCollection.Remove(sTicker);
         }
         catch (Exception ex)
         {
         }
         try
         {
             allcontentCollection.Remove(sTicker);
         }
         catch (Exception ex)
         {
         }
         showConfirmation();
     }
     catch (Exception ex)
     {
     }
     DisableTickerChanges();
     RefreshTickers();
 }
예제 #6
0
 private void CheckFTPQueue()
 {
     try
     {
         if (ftpQ.Count() > 0)
         {
             si.sii("FTP Q = " + ftpQ.Count.ToString());
             DAL.Content _file = new DAL.Content();
             _file = ftpQ.Dequeue();
             SendFileViaFTP(_file);
         }
     }
     catch (Exception ex)
     {
     }
 }
예제 #7
0
 private void btnImportMedia_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     CheckExpiry();
     e.Handled = true;
     try
     {
         mediaElementPreview.Stop();
         mediaElementPreview.Visibility = Visibility.Collapsed;
         sliderVolume.Value = 0.75;
         ContentAddEditMode = "add";
         mediaFile = new DAL.Content();
         mediaFile.Importdate = (DateTime)DateTime.Now;
         gbAddEditMedia.DataContext = mediaFile;
         gbAddEditMedia.Visibility = Visibility.Visible;
         btnOpenMedia_Click(sender, e);
     }
     catch (Exception x)
     {
         si.six(x);
     }
 }
예제 #8
0
 private void btnEditTicker_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     e.Handled = true;
     try
     {
         ticker = new DAL.Content();
         ticker = (DAL.Content)lbTickerTapes.SelectedItem;
         borderTickerInformation.DataContext = ticker;
         cbTickerFont.Text = (string)ticker.Metadata2;
         cbTickerSize.SelectedValue = (string)ticker.Metadata3;
         Color c = new Color();
         c = (Color)ColorConverter.ConvertFromString(ticker.Metadata4);
         cbTickerColour.SelectedColor = c;
         Color tbColor = new Color();
         try
         {
             tbColor = (Color)ColorConverter.ConvertFromString(ticker.Metadata6);
             cbTickerBackgroundColour.SelectedColor = tbColor;
             //MessageBox.Show(ticker.Metadata5);
             si.sii("TICKER SPEED=" + ticker.Metadata5);
             sliderTickerSpeed.Value = Convert.ToDouble(ticker.Metadata5);
             sliderTickerBackgroundOpacity.Value = Convert.ToDouble(ticker.Metadata7);
         }
         catch (Exception ex)
         {
         }
         EnableTickerChanges();
         tbTickerName.Focus();
     }
     catch (Exception ex)
     {
         DisableTickerChanges();
     }
 }
예제 #9
0
 private void btnEditMedia_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     try
     {
         e.Handled = true;
         ContentAddEditMode = "edit";
         mediaFile = new DAL.Content();
         mediaFile = (DAL.Content)listBoxMedia.SelectedItem;
         Double vol = 0;
         try
         {
             vol = Convert.ToDouble(mediaFile.Metadata9);
         }
         catch (Exception ex)
         {
             vol = 0;
         }
         sliderVolume.Value = vol;
         if (mediaFile.Contenttype != "Video")
         {
             spVolume.Visibility = Visibility.Collapsed;
         }
         else
         {
             spVolume.Visibility = Visibility.Visible;
         }
         if (mediaFile.Contenttype == "Image") tbDuration.IsEnabled = true;
         gbAddEditMedia.DataContext = mediaFile;
         gbAddEditMedia.Visibility = Visibility.Visible;
     }
     catch (Exception ex)
     {
         si.sie("Edit Media:" + ex.Message);
     }
 }
예제 #10
0
 private void btnDeleteMedia_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     e.Handled = true;
     try
     {
         showWait();
         mediaFile = new DAL.Content();
         mediaFile = (DAL.Content)listBoxMedia.SelectedItem;
         proxy.RemoveMedia(mediaFile);
         contentCollection.Remove(mediaFile);
         showConfirmation();
     }
     catch (Exception ex)
     {
     }
 }
예제 #11
0
 private void btnCreateAction_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     PopulateAddActionCombos();
     tbActionName.Text = "";
     tbActionDescription.Text = "";
     ContentAddEditMode = "add";
     mediaFile = new DAL.Content();
     mediaFile.Importdate = (DateTime)DateTime.Now;
     gbAddAction.Visibility = Visibility.Visible;
 }