internal SavesView(ViewConfiguration viewConfiguration) { var configurationName = viewConfiguration.Identifier[1]; Data = MmasfContext .Instance .UserConfigurations .Single(u => u.Name == configurationName) .SaveFiles .Select(s => new SaveFileClusterProxy(s, configurationName)) .ToArray(); ContextMenu = CreateContextMenu(); Content = CreateGrid(Data); Task.Factory.StartNew ( () => { Thread.CurrentThread.Priority = ThreadPriority.BelowNormal; 100.MilliSeconds().Sleep(); RefreshData(); } ); Title = viewConfiguration.Identifier.Stringify(" of "); this.InstallPositionPersister(viewConfiguration.PositionPath); this.InstallMainMenu(CreateMenu()); this.InstallStatusLine(StatusBar); }
internal void AddViewConfiguration(ViewConfiguration viewConfiguration) { if (ViewConfigurations.All(item => item != viewConfiguration)) { ViewConfigurations = ViewConfigurations.Concat(new[] { viewConfiguration }).ToArray(); } }
internal ModsView(ViewConfiguration viewConfiguration) { ConfigurationName = viewConfiguration.Identifier[1]; DataGrid = CreateGrid(Data); Content = DataGrid; Title = viewConfiguration.Identifier.Stringify(" of "); this.InstallPositionPersister(viewConfiguration.PositionPath); this.InstallMainMenu(CreateMenu()); this.InstallStatusLine(StatusBar); }
public ModDictionaryView(ViewConfiguration viewConfiguration) { DataGrid = CreateGrid(); Content = DataGrid; RefreshData(); RawTitle = viewConfiguration.Identifier.Stringify(" / "); Title = RawTitle; this.InstallPositionPersister(viewConfiguration.PositionPath); this.InstallMainMenu(CreateMenu()); this.InstallStatusLine(StatusBar); MainContainer.Instance.CommandManager[this] = true; }
internal void RemoveViewConfiguration(ViewConfiguration viewConfiguration) { ViewConfigurations = ViewConfigurations.Where(item => item != viewConfiguration).ToArray(); }