예제 #1
0
        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);
        }
예제 #2
0
 internal void AddViewConfiguration(ViewConfiguration viewConfiguration)
 {
     if (ViewConfigurations.All(item => item != viewConfiguration))
     {
         ViewConfigurations = ViewConfigurations.Concat(new[] { viewConfiguration }).ToArray();
     }
 }
예제 #3
0
 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);
 }
예제 #4
0
        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;
        }
예제 #5
0
 internal void RemoveViewConfiguration(ViewConfiguration viewConfiguration)
 {
     ViewConfigurations =
         ViewConfigurations.Where(item => item != viewConfiguration).ToArray();
 }