Пример #1
0
        public void ActivateContent(Content content)
        {
            // TODO load order
            ActiveContent.Add(content);
            InvalidateCache();

            RefreshContent(content);
        }
Пример #2
0
 public void UpdateActiveAdditionalContent(IReadOnlyCollection <Content> contents)
 {
     ActiveContent.Clear();
     ActiveContent.Add(Vanilla);
     foreach (var content in contents)
     {
         ActiveContent.Add(content);
     }
     InvalidateCache();
 }
Пример #3
0
 public override void GetMenu(MenuBuilder bld)
 {
     if (RedirectMenuToActiveContent && ActiveContent != null)
     {
         ActiveContent.GetMenu(bld);
     }
     else
     {
         base.GetMenu(bld);
     }
 }
Пример #4
0
        public void LoadVanilla(string gameDir)
        {
            Vanilla              = new Content();
            Vanilla.Name         = "vanilla";
            Vanilla.AbsolutePath = gameDir;

            logger.LogInformation("Loading portraits from vanilla.");
            var reader = new PortraitReader(gameDir);

            Vanilla.PortraitData = reader.Parse();

            // Init
            ActivePortraitData = Vanilla.PortraitData;
            ActiveContent.Add(Vanilla);
            InvalidateCache();
        }
 public void InitContent()
 {
     Clear();
     ActiveContent = AddContent();
     ActiveContent.SetBounds(Splitter <T> .SIZE, Splitter <T> .SIZE, Width - (2 * Splitter <T> .SIZE), Height - (2 * Splitter <T> .SIZE));
 }
Пример #6
0
 public void DeactivateContent(Content content)
 {
     ActiveContent.Remove(content);
     InvalidateCache();
 }
Пример #7
0
 private void Close_Executed(object sender, ExecutedRoutedEventArgs e)
 {
     App.Current.Settings.MainWindowLayout = dock.SaveLayout(); ActiveContent.Close();
 }