Exemple #1
0
 internal CommonResourceManager(VmcStudioApp app)
 {
     this.app    = app;
     this.images = new Dictionary <string, ImageSource>();
     this.ResetResources();
     app.ThemeManager.ApplyingThemes += new EventHandler <ApplyThemesEventArgs>(this.ThemeManagerApplyingThemes);
 }
Exemple #2
0
 public StartMenuDocument(VmcStudioApp app)
 {
     this.app = app;
     this.Name = "Start Menu";
     this.IsDirty = this.app.StartMenuManager.IsDirty;
     this.app.StartMenuManager.PropertyChanged += new PropertyChangedEventHandler(this.StartMenuManager_PropertyChanged);
 }
Exemple #3
0
        private void StartMenuExecuted(object sender, ExecutedRoutedEventArgs e)
        {
            VmcStudioApp application = VmcStudioUtil.Application;
            VmcDocument  vmcDocument = application.Documents.FirstOrDefault((VmcDocument o) => o is StartMenuDocument);

            if (vmcDocument == null)
            {
                vmcDocument = new StartMenuDocument(application);
                application.Documents.Add(vmcDocument);
            }
            application.SelectedDocument = vmcDocument;
            e.Handled = true;
        }
Exemple #4
0
 public MainWindow()
 {
     try
     {
         VmcExecuteInstaller vmcExecuteInstaller = new VmcExecuteInstaller(VmcStudioUtil.Application);
         vmcExecuteInstaller.Install();
         MediaCenterUnmanagedLibrary.MediaCenterLibraryUpdated += new EventHandler <MediaCenterLibraryUpdatedEventArgs>(this.MediaCenterLibraryUpdated);
         this.documents = new ObservableCollection <FrameworkElement>();
         this.InitializeComponent();
         VmcStudioApp app = VmcStudioUtil.Application;
         base.DataContext = app;
         DependencyPropertyDescriptor dependencyPropertyDescriptor = DependencyPropertyDescriptor.FromProperty(VmcStudioApp.SelectedDocumentProperty, typeof(VmcStudioApp));
         dependencyPropertyDescriptor.AddValueChanged(app, delegate
         {
             if (app.SelectedDocument != null)
             {
                 FrameworkElement selectedItem = this.documents.First((FrameworkElement o) => o.DataContext == app.SelectedDocument);
                 this.tabs.SelectedItem        = selectedItem;
             }
             else
             {
                 this.tabs.SelectedItem = null;
             }
             this.gamesDropDown.IsEnabled = (app.SelectedDocument is StartMenuDocument);
         });
         app.Documents.CollectionChanged += new NotifyCollectionChangedEventHandler(this.DocumentsCollectionChanged);
         app.Documents.Add(new ThemeSelectionDocument(app));
         app.Documents.Add(new StartMenuDocument(app));
         app.SelectedDocument = app.Documents[0];
         MainWindow.Instance  = this;
     }
     catch (Exception ex)
     {
         String why = ex.Message;
     }
 }
 public ThemeSelectionDocument(VmcStudioApp app)
 {
     this.ThemeManager = app.ThemeManager;
     this.Name = "Themes";
 }
Exemple #6
0
 public VmcExecuteInstaller(VmcStudioApp app)
     : base(app.StartMenuManager)
 {
 }
Exemple #7
0
 public VmcExecuteInstaller(VmcStudioApp app)
     : base(app.StartMenuManager)
 {
 }