예제 #1
0
 public FolderViewModel()
 {
     ThemeChanger.SetDefaultTheme();
     Theme               = ThemeChanger.CurrentTheme;
     Ctrler              = new Logic.FileManager.FileController("Win");
     Itemlist            = new ObservableCollection <Item>(Ctrler.GetFolderContents(CurrentFolderManager.CurrentFolderPath));
     Theme.ThemeChanged += Theme_ThemeChanged;
 }
예제 #2
0
        private void SwitchTheme_Click(object sender, RoutedEventArgs e)
        {
            MenuItem clickedTheme = (MenuItem)sender;
            Theme    newTheme     = (Theme)Enum.Parse(typeof(Theme), clickedTheme.Header.ToString());

            CurrentDictionary.MergedDictionaries[0].Source = newTheme.ToUri();
            MainImageBrush.ImageSource = newTheme.ToImage();
            ThemeChanger.SetAsCurrentTheme(newTheme);
            (MainFrame.Content as IThemeChangeable).ChangeTheme();
        }
예제 #3
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            string theme = ThemeChanger.GetCurrentTheme().ToString();

            if (value is Logic.FileManager.Item.File fi)
            {
                return($"/FileExplorer;component/GUI/Themes/{theme}/Images/File.png");
            }
            else if (value is Logic.FileManager.Item.LinkFile)
            {
                return($"/FileExplorer;component/GUI/Themes/{theme}/Images/LinkFile.png");
            }
            else if (value is Logic.FileManager.Item.Folder)
            {
                return($"/FileExplorer;component/GUI/Themes/{theme}/Images/Folder.png");
            }
            else
            {
                return($"/FileExplorer;component/GUI/Themes/{theme}/Images/SomeFile.png");
            }
        }
예제 #4
0
 public void ChangeTheme()
 {
     CurrentDictionary.MergedDictionaries[0].Source = ThemeChanger.GetCurrentTheme().ToUri();
     (IndexPageGrid.Children[0] as IndexControl).ChangeTheme();
 }
예제 #5
0
 public void ChangeTheme()
 {
     CurrentDictionary.MergedDictionaries[0].Source = ThemeChanger.GetCurrentTheme().ToUri();
 }
예제 #6
0
 void Awake()
 {
     Instance     = this;
     _mainVolume  = Camera.main.GetComponent <PostProcessVolume>();
     _mainProfile = _mainVolume.profile;
 }