예제 #1
0
        public MainSearchViewModel(RegionManager regionManager, IFetchFromXml ifetch_)
        {
            _regionManager        = regionManager;
            ifetch                = ifetch_;
            OtherLangBooks        = ifetch.FetchOtherLangBooknames(current_language);
            Books                 = ifetch.FetchBooknames(current_language);
            Bookselected          = 0;
            SearchforVerse        = new DelegateCommand(searchforverse);
            ShoworHideLiveScreen  = new DelegateCommand(showorhideLive);
            BrowseBackgroundImage = new DelegateCommand(BrowseImage);
            livewindow            = new Window();
            ls = new LiveScreen();
            pv = new PrevSearch();
            livewindow.Name          = "LiveWindow";
            livewindow.Title         = "Live";
            livewindow.Content       = ls;
            ls.verseContent.FontSize = Convert.ToDouble(SliderValueBinding);
            if (Properties.Settings.Default.FontColor != "" && Properties.Settings.Default.FontColor != "0")
            {
                Brush brush = new SolidColorBrush((Color)ColorConverter.ConvertFromString(Properties.Settings.Default.FontColor));
                ls.chapterlabel.Foreground = brush;
                ls.verseContent.Foreground = brush;
                FontColor = (Color)ColorConverter.ConvertFromString(Properties.Settings.Default.FontColor);;
            }
            ls.livebackgroundimage.Source = new BitmapImage(new Uri(Properties.Settings.Default.BackgroundImage, UriKind.Relative));
            LangSelection = new DelegateCommand <object>(languagechanged);
            WindowExt.MaximizeToSecondaryMonitor(livewindow);
            ls.UpdateLayout();
            livewindow.Content     = ls;
            livewindow.WindowStyle = WindowStyle.None;
            livewindow.Hide();

            //FontColor =  (Color)ColorConverter.ConvertFromString(Properties.Settings.Default.FontColor);
            ClearTempVerse();
        }
예제 #2
0
 public PrevSearchViewModel(RegionManager regionManager, IFetchFromXml ifetch_)
 {
     _regionManager = regionManager;
     ifetch         = ifetch_;
 }