Example #1
0
            public BuildTabProxy(GameCookerWindow win, PlatformSelector platformSelector)
            {
                GameCookerWin = win;
                Selector = platformSelector;

                PerPlatformOptions[PlatformType.Windows].Init("Output/Windows", "Win");
                PerPlatformOptions[PlatformType.XboxOne].Init("Output/XboxOne", "XboxOne");
                PerPlatformOptions[PlatformType.WindowsStore].Init("Output/WindowsStore", "UWP");
            }
Example #2
0
            public BuildTabProxy(GameCookerWindow win, PlatformSelector platformSelector)
            {
                GameCookerWin = win;
                Selector      = platformSelector;

                // TODO: restore build settings from the Editor cache!
                PerPlatformOptions[PlatformType.Windows].Output      = "Output/Windows";
                PerPlatformOptions[PlatformType.XboxOne].Output      = "Output/XboxOne";
                PerPlatformOptions[PlatformType.WindowsStore].Output = "Output/WindowsStore";
            }
Example #3
0
            public BuildTabProxy(GameCookerWindow win, PlatformSelector platformSelector)
            {
                GameCookerWin = win;
                Selector      = platformSelector;

                PerPlatformOptions[PlatformType.Windows].Init("Output/Windows", "Windows");
                PerPlatformOptions[PlatformType.XboxOne].Init("Output/XboxOne", "XboxOne");
                PerPlatformOptions[PlatformType.UWP].Init("Output/UWP", "UWP");
                PerPlatformOptions[PlatformType.Linux].Init("Output/Linux", "Linux");
                PerPlatformOptions[PlatformType.PS4].Init("Output/PS4", "PS4");
                PerPlatformOptions[PlatformType.XboxScarlett].Init("Output/XboxScarlett", "XboxScarlett");
                PerPlatformOptions[PlatformType.Android].Init("Output/Android", "Android");
            }
Example #4
0
        private void CreateBuildTab(Tabs sections)
        {
            var tab = sections.AddTab(new Tab("Build"));

            var platformSelector = new PlatformSelector
            {
                DockStyle = DockStyle.Top,
                BackgroundColor = Style.Current.LightBackground,
                Parent = tab,
            };
            var panel = new Panel(ScrollBars.Vertical)
            {
                DockStyle = DockStyle.Fill,
                Parent = tab
            };

            var settings = new CustomEditorPresenter(null);
            settings.Panel.Parent = panel;
            settings.Select(new BuildTabProxy(this, platformSelector));
        }
Example #5
0
        private void CreateBuildTab(Tabs sections)
        {
            var tab = sections.AddTab(new Tab("Build"));

            var platformSelector = new PlatformSelector
            {
                AnchorPreset    = AnchorPresets.HorizontalStretchTop,
                BackgroundColor = Style.Current.LightBackground,
                Parent          = tab,
            };
            var panel = new Panel(ScrollBars.Vertical)
            {
                AnchorPreset = AnchorPresets.StretchAll,
                Offsets      = new Margin(0, 0, platformSelector.Offsets.Height, 0),
                Parent       = tab
            };

            var settings = new CustomEditorPresenter(null);

            settings.Panel.Parent = panel;
            settings.Select(new BuildTabProxy(this, platformSelector));
        }
Example #6
0
        public MainWindowViewModel()
        {
            StartSupervisorCommand      = ReactiveCommand.Create(StartSupervisor, this.WhenAnyValue(x => x.IsSupervisorRunning, x => x.PreventClose, x => x.IsWaiting, (v, c, w) => !w && !v && c));
            StopSupervisorCommand       = ReactiveCommand.Create(StopSupervisor, this.WhenAnyValue(x => x.IsSupervisorRunning, x => x.PreventClose, x => x.IsWaiting, (v, c, w) => !w && v && c));
            MoveSelectedHostUpCommand   = ReactiveCommand.Create <string>(MoveSelectedHostUp, this.WhenAnyValue(x => x.KnownHosts, x => x.SelectedHost, x => x.IsWaiting, (k, s, w) => !w && !string.IsNullOrEmpty(s) && k.IndexOf(s) > 0));
            MoveSelectedHostDownCommand = ReactiveCommand.Create <string>(MoveSelectedHostDown, this.WhenAnyValue(x => x.KnownHosts, x => x.SelectedHost, x => x.IsWaiting, (k, s, w) =>
            {
                if (!w || string.IsNullOrEmpty(s))
                {
                    return(false);
                }
                int index = k.IndexOf(s);
                return(index >= 0 && index < k.Count - 1);
            }));
            OpenSettingsFileCommand      = ReactiveCommand.Create(OpenSettingsFile);
            OpenSettingsDirectoryCommand = ReactiveCommand.Create(OpenSettingsDirectory);
            ExitApplicationCommand       = ReactiveCommand.Create(ExitApplication, this.WhenAnyValue(x => x.PreventClose, x => x.IsWaiting, (c, w) => !w && c));

            Supervisor.Started += OnSupervisorStarted;
            Supervisor.Stopped += OnSupervisorStopped;
            Supervisor.RunningAllowedUpdated += OnSupervisorRunningAllowedUpdated;
            Supervisor.HostRunningUpdated    += OnHostRunningUpdated;
            Supervisor.PeerStatusesUpdated   += OnPeerStatusesUpdated;
            Config.SettingsReloaded          += OnSettingsReloaded;

            IsSupervisorRunning = Supervisor.Running;
            IsRunningAllowed    = Supervisor.RunningAllowed;
            IsHostRunning       = Supervisor.HostRunning;
            SelfName            = Config.Instance.Self;
            KnownHosts          = Config.Instance.Desktops.ToList();
            PeerStatuses        = GetPeerStatuses();

            var systemPermissions = PlatformSelector.GetSystemPersmissions();

            IsAdmin     = systemPermissions.IsAdmin().Result;
            HasUiAccess = systemPermissions.HasUiAccess().Result;
        }
Example #7
0
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddAuthentication(CertificateMatchAuthenticationDefaults.AuthenticationScheme).AddCertificateMatch(options =>
            {
                options.ServerCertificate = Certificate.ServerCertificate;
            });
            services.AddAuthorization(o =>
            {
                o.DefaultPolicy = new AuthorizationPolicyBuilder()
                                  .AddAuthenticationSchemes(CertificateMatchAuthenticationDefaults.AuthenticationScheme)
                                  .RequireAuthenticatedUser()
                                  .Build();
            });
            services.AddSignalR()
            .AddMessagePackProtocol();

            services.AddSingleton <Supervisor>();
            services.AddSingleton <ClientIdentifierService>();
            services.AddSingleton <WorkspaceClientManager>();
            services.AddSingleton <WorkspaceNetwork>();
            services.AddSingleton <IInputManager>(services => PlatformSelector.GetInputManager());
            services.AddTransient <WorkspaceSettings, WorkspaceSettingsService>();
            services.AddSingleton <Workspace>();
        }