Example #1
0
 public static LogsPageViewModel GetLogVM()
 {
     if (Log == null)
     {
         Log = new LogsPageViewModel();
     }
     return(Log);
 }
Example #2
0
        public MainPageViewModel()
        {
            Messages = new ObservableCollection <BaseMessage>();
            statuses = new List <ChatStatus>();
            log      = MainWindowViewModel.GetLogVM();
            sc       = new SearchCommand();
            cs       = new ChatStatus();
            timer    = new DispatcherTimer();
            rnd      = new Random();
            InitStatuses();

            TimerStart();
            DuckyImage = "/Resources/Images/duck.png";
        }
Example #3
0
        public RadioPageViewModel()
        {
            #region Init
            UpdateStationInfo = new DispatcherTimer();
            fill = new StationFill();
            st   = new StationToPlay();
            bh   = MainWindowViewModel.GetBassNetHelper();
            log  = MainWindowViewModel.GetLogVM();
            #endregion

            InitCategories();

            CurrentStation = (new PlayingStation
            {
                RadioLogo = new BitmapImage(new Uri("pack://application:,,,/Resources/Radio/custom.jpg")),
                RadioName = "No selected radio"
            });
            CategoryIndex = 0;
        }
Example #4
0
        public PlayerPageViewModel()
        {
            #region Init
            Music           = new ObservableCollection <SongModel>();
            Files           = new List <string>();
            dispatcherTimer = new DispatcherTimer();
            au     = new AudioVizualHelpers();
            smr    = new SearchMusicResources();
            s_info = new SongInfo();
            bh     = MainWindowViewModel.GetBassNetHelper();
            log    = MainWindowViewModel.GetLogVM();
            #endregion

            MusicCollection = CollectionViewSource.GetDefaultView(AddMusic(Properties.Settings.Default.MusicFolders));

            MusicCollection.Filter = MusicFilter;

            SliderVolumePos = Properties.Settings.Default.UserVolume;
        }
Example #5
0
        public MainWindowViewModel()
        {
            // InstalledApps ia = new InstalledApps();
            #region Init
            instance   = this;
            BassHelper = BassHelper ?? new BassNetHelper();
            Log        = Log ?? new LogsPageViewModel();
            Player     = Player ?? new PlayerPageViewModel();
            Radio      = Radio ?? new RadioPageViewModel();
            Main       = Main ?? new MainPageViewModel();
            Settings   = Settings ?? new SettingsPageViewModel();
            Telegram   = Telegram ?? new TelegramAuth();
            TwitchPage = TwitchPage ?? new TwitchPageViewModel();
            Telebot    = Telebot ?? new TelegramBot();
            Proxy      = Proxy ?? new ProxyHelper();
            Internet   = Internet ?? new InternetConnection();
            Vk         = Vk ?? new VkAuth();
            #endregion

            SelectedViewModel = Main;
            IsAlertOn         = "null";
        }