public Graphics()
        {
            this.graphics = new GraphicsDeviceManager(this);
            this.graphics.PreferredBackBufferWidth = Convert.ToInt32(ProgramSettings.ResolutionWidth);
            this.graphics.PreferredBackBufferHeight = Convert.ToInt32(ProgramSettings.ResolutionHeight);
            this.graphics.IsFullScreen = ProgramSettings.FullscreenMode;
            Content.RootDirectory = "Content";

            // Create the screen factory and add it to the Services
            screenFactory = new ScreenFactory();
            Services.AddService(typeof(IScreenFactory), screenFactory);

            // Create the screen manager component.
            screenManager = new ScreenManager(this);
            screenManager.GraphicsDeviceManager = this.graphics;

            MultiInputManager manager = new MultiInputManager();
            if (ProgramSettings.KinectEnabled && KinectHelper.Instance().isRunning())
                manager.AddInputDevice(new GestureEventManager());

            screenManager.OtherInput = manager;
            Components.Add(screenManager);

            // Create the first screen
            screenManager.AddScreen(new BackgroundScreen(), null);
            screenManager.AddScreen(new MainMenuScreen(), null);
        }
Exemplo n.º 2
0
        SpriteBatch spriteBatch; // this is for FPS counter

        #endregion Fields

        #region Constructors

        public GameMain()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "main";

            #if XBOX
            // Create Gamer Service Component
            SignedInGamer.SignedOut += new EventHandler<SignedOutEventArgs>(SignedInGamer_SignedOut);
            GamerServicesComponent gamerServiceComp = new GamerServicesComponent(this);
            Components.Add(gamerServiceComp);
            #if DEBUG
            Guide.SimulateTrialMode = true;
            #endif
            #endif

            // Create the screen factory and add it to the Services
            screenFactory = new ScreenFactory();
            Services.AddService(typeof(IScreenFactory), screenFactory);

            // Create the screen manager component.
            screenManager = new ScreenManager(this);
            Components.Add(screenManager);

            // On Windows and Xbox we just add the initial screens
            AddInitialScreens();
        }
Exemplo n.º 3
0
        /// <summary>
        /// The main game constructor
        /// </summary>
        public MadLabGame()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
            this.TargetElapsedTime = TimeSpan.FromSeconds(1.0f / 60f);

            // Setup window
            Window.Title = "MadLab";
            graphics.PreferredBackBufferWidth = GameConstants.X_RESOLUTION;
            graphics.PreferredBackBufferHeight = GameConstants.Y_RESOLUTION;
            graphics.IsFullScreen = false;
            graphics.ApplyChanges();

            // Create the screen factory and add it to the Services
            screenFactory = new ScreenFactory();
            Services.AddService(typeof(IScreenFactory), screenFactory);

            // Create the screen manager component.
            screenManager = new ScreenManager(this);

            // component for screenManager
            Components.Add(screenManager);

            # if(XBOX)
            Components.Add(new GamerServicesComponent(this));
            #endif
        }
Exemplo n.º 4
0
        /// <summary>
        /// The main game constructor.
        /// </summary>
        public GameStateManagementGame()
        {
            Content.RootDirectory = "Content";

            graphics = new GraphicsDeviceManager(this);
            TargetElapsedTime = TimeSpan.FromTicks(333333);

            #if WINDOWS_PHONE
            graphics.IsFullScreen = true;

            // Choose whether you want a landscape or portait game by using one of the two helper functions.
            InitializeLandscapeGraphics();
            // InitializePortraitGraphics();
            #endif
            // Create the screen factory and add it to the Services
            screenFactory = new ScreenFactory();
            Services.AddService(typeof(IScreenFactory), screenFactory);

            // Create the screen manager component.
            screenManager = new ScreenManager(this);
            Components.Add(screenManager);

            #if WINDOWS_PHONE
            // Hook events on the PhoneApplicationService so we're notified of the application's life cycle
            Microsoft.Phone.Shell.PhoneApplicationService.Current.Launching +=
                new EventHandler<Microsoft.Phone.Shell.LaunchingEventArgs>(GameLaunching);
            Microsoft.Phone.Shell.PhoneApplicationService.Current.Activated +=
                new EventHandler<Microsoft.Phone.Shell.ActivatedEventArgs>(GameActivated);
            Microsoft.Phone.Shell.PhoneApplicationService.Current.Deactivated +=
                new EventHandler<Microsoft.Phone.Shell.DeactivatedEventArgs>(GameDeactivated);
            #else
            // On Windows and Xbox we just add the initial screens
            AddInitialScreens();
            #endif
        }
Exemplo n.º 5
0
        public Game()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            TargetElapsedTime = TimeSpan.FromTicks(333333);

            graphics.IsFullScreen = true;

            graphics.PreferredBackBufferWidth = 480;
            graphics.PreferredBackBufferHeight = 800;

            screenFactory = new ScreenFactory();
            Services.AddService(typeof(IScreenFactory), screenFactory);

            screenManager = new ScreenManager(this);
            Components.Add(screenManager);

            Microsoft.Phone.Shell.PhoneApplicationService.Current.Launching +=
                new EventHandler<Microsoft.Phone.Shell.LaunchingEventArgs>(GameLaunching);
            Microsoft.Phone.Shell.PhoneApplicationService.Current.Activated +=
                new EventHandler<Microsoft.Phone.Shell.ActivatedEventArgs>(GameActivated);
            Microsoft.Phone.Shell.PhoneApplicationService.Current.Deactivated +=
                new EventHandler<Microsoft.Phone.Shell.DeactivatedEventArgs>(GameDeactivated);
        }
Exemplo n.º 6
0
        public Game1()
        {
            // jazyk
            Thread.CurrentThread.CurrentUICulture	=	CultureInfo.GetCultureInfo("cs-CZ");

            this.graphics	=	new GraphicsDeviceManager(this);

            // rozmìry okna
            this.graphics.PreferredBackBufferWidth	=	733;
            this.graphics.PreferredBackBufferHeight	=	608;

            this.Content.RootDirectory	=	"Content";

            TargetElapsedTime = TimeSpan.FromTicks(333333);

            // Create the screen factory and add it to the Services
            screenFactory = new ScreenFactory();
            Services.AddService(typeof(IScreenFactory), screenFactory);

            // Create the screen manager component.
            screenManager = new ScreenManager(this);
            Components.Add(screenManager);

            this.AddInitialScreens();
        }
Exemplo n.º 7
0
        public Game()
        {
            graphics = new GraphicsDeviceManager(this);
              Content.RootDirectory = "Content";
              graphics.IsFullScreen = true;
              InitializeLandscapeGraphics();
              // Frame rate is 30 fps by default for Windows Phone.
              TargetElapsedTime = TimeSpan.FromTicks(333333);

              // Extend battery life under lock.
              InactiveSleepTime = TimeSpan.FromSeconds(1);

              screenFactory = new ScreenFactory();
              Services.AddService(typeof(IScreenFactory), screenFactory);

              screenManager = new ScreenManager(this);
              Components.Add(screenManager);

              Microsoft.Phone.Shell.PhoneApplicationService.Current.Launching +=
                new EventHandler<Microsoft.Phone.Shell.LaunchingEventArgs>(GameLaunching);
              Microsoft.Phone.Shell.PhoneApplicationService.Current.Activated +=
              new EventHandler<Microsoft.Phone.Shell.ActivatedEventArgs>(GameActivated);
              Microsoft.Phone.Shell.PhoneApplicationService.Current.Deactivated +=
              new EventHandler<Microsoft.Phone.Shell.DeactivatedEventArgs>(GameDeactivated);
        }
Exemplo n.º 8
0
        public Game()
        {
            _graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
            _graphics.PreferredBackBufferWidth = PREFERRED_WIDTH;
            _graphics.PreferredBackBufferHeight = PREFERRED_HEIGHT;

            // Krzysztoff has an ancient computer and that's why he needs manual resolution settings
            // If you are lucky enough to have a more powerful machine, feel free to uncomment the following lines.
            _graphics.PreparingDeviceSettings += graphics_PreparingDeviceSettings;
            #if !DEBUG
            _graphics.IsFullScreen = true;
            #endif
            //why was it turned off?
            IsFixedTimeStep = true;
            // disable FPS throttling
            _graphics.SynchronizeWithVerticalRetrace = false;

            _screenFactory = new ScreenFactory();
            Services.AddService(typeof (IScreenFactory), _screenFactory);

            // Create the screen manager component.
            _screenManager = new ScreenManager(this);
            Components.Add(_screenManager);

            IsMouseVisible = false;

            AddInitialScreens();
        }
Exemplo n.º 9
0
        public StarterGame()
        {
            // Default XNA setup.
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            // Required for lighting system.
            graphics.PreferredDepthStencilFormat = DepthFormat.Depth24Stencil8;

            // Frame rate is 30 fps by default for Windows Phone.
            TargetElapsedTime = TimeSpan.FromTicks(333333);

            // Create the screen factory and add it to the Services
            screenFactory = new ScreenFactory();
            Services.AddService(typeof(IScreenFactory), screenFactory);

            //Create a new instance of the Screen Manager
            screenManager = new ScreenManager(this);
            Components.Add(screenManager);

            database = new SQLiteDatabase();

            Instance = this;

            #if WINDOWS_PHONE
            graphics.IsFullScreen = true;

            // Choose whether you want a landscape or portait game by using one of the two helper functions.
            InitializeLandscapeGraphics();
            // InitializePortraitGraphics();
            #else
            graphics.IsFullScreen = false;
            #endif

            #if WINDOWS_PHONE
            // Hook events on the PhoneApplicationService so we're notified of the application's life cycle
            Microsoft.Phone.Shell.PhoneApplicationService.Current.Launching +=
                new EventHandler<Microsoft.Phone.Shell.LaunchingEventArgs>(GameLaunching);
            Microsoft.Phone.Shell.PhoneApplicationService.Current.Activated +=
                new EventHandler<Microsoft.Phone.Shell.ActivatedEventArgs>(GameActivated);
            Microsoft.Phone.Shell.PhoneApplicationService.Current.Deactivated +=
                new EventHandler<Microsoft.Phone.Shell.DeactivatedEventArgs>(GameDeactivated);
            #else
            // On Windows and Xbox we just add the initial screens
            AddInitialScreens();
            #endif

            // AudioManager.Initialize(this);

            // Required for lighting system.
            screenManager.splashScreenGameComponent = new SplashScreenGameComponent(this);
            Components.Add(screenManager.splashScreenGameComponent);
        }
Exemplo n.º 10
0
        public Game1()
        {
            //IsMouseVisible = true;
            Content.RootDirectory = "Content";
            graphics = new GraphicsDeviceManager(this);
            screenFactory = new ScreenFactory();
            Services.AddService(typeof(IScreenFactory), screenFactory);
            screenManager = new ScreenManager(this);
            Components.Add(screenManager);

            AddInitialScreen();
        }
        public void SetUp()
        {
            container = new Container(x =>
            {
                x.For<IFixtureNodeView>().Use<FixtureNodeView>();
                x.For<IScreen<IFixtureNode>>().Use<FixtureNodePresenter>();
            });

            factory = new ScreenFactory(container);

            fixture = new FixtureGraph("fixture1");

            subject = new FixtureNodeSubject(fixture);

            thePresenter = subject.CreateScreen(factory).ShouldBeOfType<FixtureNodePresenter>();
        }
Exemplo n.º 12
0
        public SpaceSurvivalGame()
        {
            Content.RootDirectory = "Content";

            graphics = new GraphicsDeviceManager(this);

            // Create the screen factory and add it to the Services
            screenFactory = new ScreenFactory();
            Services.AddService(typeof(IScreenFactory), screenFactory);

            // Create the screen manager component.
            screenManager = new ScreenManager(this);
            Components.Add(screenManager);

            screenManager.AddScreen(new BackgroundScreen(), null);
            screenManager.AddScreen(new MainMenuScreen(), null);
        }
Exemplo n.º 13
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            graphics.PreferredBackBufferHeight = 1080;
            graphics.PreferredBackBufferWidth = 1440;
            graphics.ToggleFullScreen();

            Content.RootDirectory = "Content";

            // Create the screen factory and add it to the Services
            screenFactory = new ScreenFactory();
            Services.AddService(typeof(IScreenFactory), screenFactory);

            // Create the screen manager component.
            screenManager = new ScreenManager(this, "Backgrounds/blank", "Fonts/menufont");
            Components.Add(screenManager);
            AddInitialScreens();
        }
Exemplo n.º 14
0
        /// <summary>
        /// The main game constructor.
        /// </summary>
        public ChessTactics()
        {
            Content.RootDirectory = "Content";
            IsMouseVisible = true;
            graphics = new GraphicsDeviceManager(this);
            TargetElapsedTime = TimeSpan.FromTicks(333333);

            // Create the screen factory and add it to the Services
            screenFactory = new ScreenFactory();
            Services.AddService(typeof(IScreenFactory), screenFactory);

            // Create the screen manager component.
            screenManager = new ScreenManager(this);
            Components.Add(screenManager);

            // On Windows and Xbox we just add the initial screens
            AddInitialScreens();
        }
Exemplo n.º 15
0
        public GameStateManagementGame(String filename)
        {
            Content.RootDirectory = "Content";

            graphics = new GraphicsDeviceManager(this);
            graphics.PreferredBackBufferWidth = 1280;
            graphics.PreferredBackBufferHeight = 768;
            graphics.ApplyChanges();
            TargetElapsedTime = TimeSpan.FromTicks(333333);

            // Create the screen factory and add it to the Services
            screenFactory = new ScreenFactory();
            Services.AddService(typeof(IScreenFactory), screenFactory);
            IsMouseVisible = true;
            // Create the screen manager component.
            screenManager = new ScreenManager(this);
            Components.Add(screenManager);
            screenManager.AddScreen(new GameplayScreen(filename), PlayerIndex.One);
        }
        /// <summary>
        /// The main game constructor.
        /// </summary>
        public GameStateManagementGame()
        {
            this.Content.RootDirectory = "Content";
            this.IsMouseVisible = true;
            this.graphics = new GraphicsDeviceManager(this);

            this.graphics.PreferredBackBufferWidth = 1366;
            this.graphics.PreferredBackBufferHeight = 768;
            this.graphics.IsFullScreen = true;
            this.TargetElapsedTime = TimeSpan.FromTicks(333333);
            this.Window.Title = "DeBugger by Team Kurt Vonnegut"; // Add Window Title

            #if WINDOWS_PHONE
            graphics.IsFullScreen = true;

            // Choose whether you want a landscape or portait game by using one of the two helper functions.
            InitializeLandscapeGraphics();
            // InitializePortraitGraphics();
            #endif

            // Create the screen factory and add it to the Services
            this.screenFactory = new ScreenFactory();
            this.Services.AddService(typeof(IScreenFactory), this.screenFactory);

            // Create the screen manager component.
            this.screenManager = new ScreenManager(this);
            this.Components.Add(this.screenManager);

            #if WINDOWS_PHONE
            // Hook events on the PhoneApplicationService so we're notified of the application's life cycle
            Microsoft.Phone.Shell.PhoneApplicationService.Current.Launching +=
                new EventHandler<Microsoft.Phone.Shell.LaunchingEventArgs>(GameLaunching);
            Microsoft.Phone.Shell.PhoneApplicationService.Current.Activated +=
                new EventHandler<Microsoft.Phone.Shell.ActivatedEventArgs>(GameActivated);
            Microsoft.Phone.Shell.PhoneApplicationService.Current.Deactivated +=
                new EventHandler<Microsoft.Phone.Shell.DeactivatedEventArgs>(GameDeactivated);
            #else
            // On Windows and Xbox we just add the initial screens
            this.AddInitialScreens();
            #endif
        }
Exemplo n.º 17
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            graphics.PreferredBackBufferHeight = 720;
            graphics.PreferredBackBufferWidth = 1280;

            Content.RootDirectory = "Content";

            TargetElapsedTime = TimeSpan.FromTicks(333333);

            // Create the screen factory and add it to the Services
            screenFactory = new ScreenFactory();
            Services.AddService(typeof(IScreenFactory), screenFactory);

            // Create the screen manager component.
            screenManager = new ScreenManager(this);
            Components.Add(screenManager);

            // On Windows and Xbox we just add the initial screens
            AddInitialScreens();
        }
Exemplo n.º 18
0
        /// <summary>
        /// The main game constructor.
        /// </summary>
        public GameStateManagementGame()
        {
            Content.RootDirectory = "Content";

            graphics = new GraphicsDeviceManager(this);
            //TargetElapsedTime = TimeSpan.FromTicks(333333);

            graphics.PreferredBackBufferWidth = 1280;
            graphics.PreferredBackBufferHeight = 720;

            graphics.PreferMultiSampling = true;

            #if !DEBUG
            graphics.IsFullScreen = true;
            #endif

            // Create the screen factory and add it to the Services
            screenFactory = new ScreenFactory();
            Services.AddService(typeof(IScreenFactory), screenFactory);

            // Create the screen manager component.
            screenManager = new ScreenManager(this);
            Components.Add(screenManager);

            GamerServicesComponent gamer = new GamerServicesComponent(this);
            Components.Add(gamer);

            #if DEBUG
            // Add the frame rate monitor
            // Components.Add(new FrameRateMonitor(this));
            Components.Add(new FrameRateMonitor(this, false)); // don’t wait for display

            #endif

            Components.Add(new TextFader(this));

            // On Windows and Xbox we just add the initial screens
            AddInitialScreens();
        }
Exemplo n.º 19
0
        public T2D()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            //graphics.PreferredBackBufferWidth = 800;
            //graphics.PreferredBackBufferHeight = 600;

            graphics.ApplyChanges();

            // Create the screen factory and add it to the Services
            screenFactory = new ScreenFactory();
            Services.AddService(typeof(IScreenFactory), screenFactory);

            // Create the screen manager component.
            screenManager = new ScreenManager(this);
            Components.Add(screenManager);

            Components.Add(new CompteurFPS(this));

            AddInitialScreens();
        }
Exemplo n.º 20
0
        /// <summary>
        /// The main game constructor.
        /// </summary>
        public Game()
        {
            Content.RootDirectory = "Content";

            graphics = new GraphicsDeviceManager(this);
            graphics.PreferredBackBufferHeight = 720;
            graphics.PreferredBackBufferWidth = 1280;
            graphics.ApplyChanges ( );

            // Create the screen factory and add it to the Services
            screenFactory = new ScreenFactory();
            Services.AddService(typeof(IScreenFactory), screenFactory);

            // Create the screen manager component.
            screenManager = new ScreenManager(this);
            Components.Add(screenManager);

            netGameManager = new NetworkManager (this);
            Components.Add ( netGameManager );
            Services.AddService ( typeof ( NetworkManager ), netGameManager );

            AddInitialScreens();
        }
        public void SetUp()
        {
            ProjectContext context = new ProjectContext();
            context.Hierarchy = DataMother.GrammarProject().LoadTests();
            context.Library = DataMother.GrammarsProjectRunner().GetLibary();
            UsageService service = new UsageService(context);

            container = new Container(x =>
            {
                x.For<IFixtureNodeView>().Use<StubFixtureNodeView>();
                x.For<IScreen<IFixtureNode>>().Use<FixtureNodePresenter>();
                x.For<UsageService>().Use(service);
            });

            factory = new ScreenFactory(container);

            fixture = context.Library.FixtureFor("Composite");

            subject = new FixtureNodeSubject(fixture);

            thePresenter = subject.CreateScreen(factory).ShouldBeOfType<FixtureNodePresenter>();
            thePresenter.Activate(null);
        }
Exemplo n.º 22
0
 public NavigationManager(SignalBus signalBus, ScreenFactory screenFactory)
 {
     _signalBus     = signalBus;
     _screenFactory = screenFactory;
 }
Exemplo n.º 23
0
 /// <summary>
 /// LoadedScreenName プロパティが示す Screen をロードします。
 /// このメソッドは非同期に呼び出されます。
 /// </summary>
 /// <returns>ロードされた Screen。</returns>
 protected virtual Screen LoadScreen()
 {
     return(ScreenFactory.CreateScreen(LoadedScreenName));
 }
Exemplo n.º 24
0
 private static void MainScreen()
 {
     _executionContext.CurrentScreen = ScreenFactory.CreateScreen(_render,
                                                                  ScreenTypeEnum.Main, new CommandModel(Text.MainScreen.DefaultBody));
 }
Exemplo n.º 25
0
 public override Screen GoBack()
 {
     Driver.Navigate().Back();
     return(ScreenFactory.CreateScreen <FragmentScreen>());
 }
Exemplo n.º 26
0
 public override void Launch()
 {
     base.Launch();
     CurrentScreen = ScreenFactory.CreateScreen <MainScreen>();
 }
        public ShellViewModel(ScreenFactory factory):base(factory)
        {

        }
Exemplo n.º 28
0
 public override void Close()
 {
     base.Close();
     CurrentScreen = ScreenFactory.CreateScreen <NullApiDemoScreen>();
 }
Exemplo n.º 29
0
        public void SetUp()
        {
            var container = new Container(x => { x.For <IScreen <Test> >().Use <StubTestScreen>(); });

            factory = new ScreenFactory(container);
        }
Exemplo n.º 30
0
        /// <summary>
        /// Dialog events loop
        /// </summary>
        /// <param name="msg"></param>
        public override void HandleMessage(string msg)
        {
            msg = msg.Trim();
            if (string.IsNullOrWhiteSpace(msg))
            {
                if (status == states.WaitForConfirm)
                {
                    msg = catalog.GetString("Yes");
                }
                else if (status != states.WaitForUsername)
                {
                    return;
                }
            }
            switch (status)
            {
            case states.WaitForUsername:
                string username = msg.ToUpper();
                bool   success  = false;
                switch (username)
                {
                case "":
                    client.screen = ScreenFactory.Create(client, server, "LoginScreen");
                    client.screen.Show();
                    break;

                case "LOGOUT":
                    client.screen = ScreenFactory.Create(client, server, "Logout");
                    client.screen.Show();
                    return;

                case "GUEST":
                case "NEW":
                    break;

                default:
                    if (user.AcceptableUsername(username))
                    {
                        using (bbsContext bbs = new bbsContext())
                        {
                            User test = bbs.GetUserByUsername(username);
                            if (test == null)
                            {
                                success = true;
                            }
                        }
                    }
                    break;
                }
                if (success)
                {
                    user.Userid = username;
                    LnWrite(catalog.GetString("Password") + ": ");
                    status           = states.WaitForPassword;
                    client.inputMode = EInputMode.PasswordMode;
                }
                else
                {
                    LnWrite(catalog.GetString("This name is already in use. Try another."));
                    LnWrite(catalog.GetString("Username") + ": ");
                }
                break;

            case states.WaitForPassword:
                password = msg;
                if (user.AcceptablePassword(password))
                {
                    LnWrite(catalog.GetString("Confirm password") + ": ");
                    status = states.WaitForConfirmPassword;
                }
                else
                {
                    LnWrite(catalog.GetString("Password do not meet security criteria."));
                    LnWrite(catalog.GetString("Password") + ": ");
                    status = states.WaitForPassword;
                }
                break;

            case states.WaitForConfirmPassword:
                if (password == msg)
                {
                    user.SetPassword(password);
                    client.status    = EClientStatus.Guest;
                    client.inputMode = EInputMode.LineMode;
                    LnWrite(catalog.GetString("Your real name") + ": ");
                    status = states.WaitForRealName;
                }
                else
                {
                    LnWrite(catalog.GetString("The two passwords do not match. Try again."));
                    LnWrite(catalog.GetString("Password") + ": ");
                    status = states.WaitForPassword;
                }
                break;

            case states.WaitForRealName:
                user.Realname = msg;
                LnWrite(catalog.GetString("Your city") + ": ");
                status = states.WaitForCity;
                break;

            case states.WaitForCity:
                user.City = msg;
                LnWrite(catalog.GetString("Your country") + ": ");
                status = states.WaitForNation;
                break;

            case states.WaitForNation:
                user.Nation = msg;
                LnWrite(catalog.GetString("Confirm new user creation? [{0}]/{1}",
                                          new object[] {
                    catalog.GetString("Yes"), catalog.GetString("No")
                }) + ": ");
                status = states.WaitForConfirm;
                break;

            case states.WaitForConfirm:
                msg = msg.ToUpper();
                if (msg == catalog.GetString("Yes").ToUpper())
                {
                    using (bbsContext bbs = new bbsContext())
                    {
                        bbs.Users.Add(user);
                        bbs.SaveChanges();
                    }
                    string m = catalog.GetString("Created new user '{0}'", user.Userid);
                    EventLogger.Write(m, client.Remote);
                }
                client.screen = ScreenFactory.Create(client, server, "LoginScreen");
                client.screen.Show();
                break;

            default:
                break;
            }
        }
Exemplo n.º 31
0
 /// <summary>
 /// Shows help screen
 /// </summary>
 protected virtual void ShowHelp()
 {
     client.screen = ScreenFactory.Create(client, server, "Help", this);
     client.screen.Show();
 }
Exemplo n.º 32
0
 public override Screen GoBack()
 {
     Driver.Navigate().Back();
     return(ScreenFactory.CreateScreen <NullApiDemoScreen>());
 }
Exemplo n.º 33
0
 public override Screen GoBack()
 {
     Driver.Navigate().Back();
     return(ScreenFactory.CreateScreen <ActivityScreen>());
 }
Exemplo n.º 34
0
        public void AddScreen_SetsParent()
        {
            TestScreen s = Collection.AddScreen(ScreenFactory.For <TestScreen>(Locator));

            Assert.AreEqual(Parent, s.Parent);
        }