private void Play_Click(object sender, EventArgs e) { PlayPage playPage = new PlayPage(cartoonlist.Cartoon_id, cartoonlist.Cartoon_name); FormClose(this, new EventArgs()); playPage.ShowDialog(); }
public GameServer(PlayPage playpage, string name, string portUDP1, string portUDP2, string portTCP1L, string portTCP1S, string portTCP2L, string portTCP2S, string portTCP3L, string portTCP3S) { serverBussyflag = false; this.playpage = playpage; gameData = new GameData(); serverUDP = new UDPListener(playpage, name, portUDP1, portUDP2); firstConnectionClient = TCPClientRemote.Instance; firstConnectionClient.initTCPClient(playpage, name); firstConnectionClient.initListener(portTCP3L); firstConnectionClient.Received += firstConnectionReceived; this.portTCP3S = portTCP3S; this.portTCP2S = portTCP2S; this.portTCP1L = portTCP1L; server = new Server(playpage, portTCP2S); server.Received1 += onServerRecieved1; server.Received2 += onServerRecieved2; client = TCPClientRemote.Instance; client.initTCPClient(playpage, name); client.Received += OnReceived1; server.addForPlayer1Listener(portTCP1L); client.initListener(portTCP1S); server.addForPlayer2Listener(portTCP2L); client.initSender(portTCP1L, IPAdress.LocalIPAddress()); server.addForPlayer1Sender(portTCP1S, IPAdress.LocalIPAddress()); server.addForPlayer2Listener(portTCP2L); }
private void PlayButton_Click(object sender, RoutedEventArgs e) { if (Client.IsLoggedIn) { var playPage = new PlayPage(); Client.SwitchPage(playPage); } }
public BombSprite Create(Machine machine, PlayPage page) { this.machine = machine; this.page = page; tiles = AssetStore.Tiles; return(this); }
/// <summary> /// constructor that initializes all the pages for the application /// </summary> public SpooftifyMain() { InitializeComponent(); playlistsPage = new PlaylistsPage(); playPage = new PlayPage(); profilePage = new ProfilePage(); searchPage = new SearchPage(); PageFrame.Content = playlistsPage; }
public Server(PlayPage playPage, string portSender, string name = "Server") { this.Client1 = TCPClientRemote.Instance; Client1.initTCPClient(playPage, name); this.Client2 = TCPClientRemote.Instance; Client2.initTCPClient(playPage, name); this.playPage = playPage; this.portSender = portSender; Client1.Received += OnReceived1; Client2.Received += OnReceived2; }
public UDPListener(PlayPage playPage, string name, string portListener, string portSender) { this.playPage = playPage; this.name = name; this.portListener = portListener; this.portSender = portSender; Task.Run( async() => { await startListener(); }); }
public UDPListener(PlayPage playPage, string name, string portListener, string portSender) { this.playPage = playPage; this.name = name; this.portListener = portListener; this.portSender = portSender; Task.Run( async () => { await startListener(); }); }
public AmmoSprite Create(Machine machine, PlayPage page) { this.machine = machine; this.page = page; tiles = AssetStore.Tiles; this.Width = 8; this.Height = 8; this.InitializeCollision(0); return(this); }
// Constructor #region Constructor public GameDriver(Texture2D buttonTexture, SpriteFont font, Texture2D patientSprite, Texture2D userAvatarSprite, Dictionary <string, ShopItem> imagesDictionary, Texture2D sprite, PlayerManager playerManager) { ButtonTexture = buttonTexture; Font = font; PatientTexture = patientSprite; UserAvatarTexture = userAvatarSprite; // Initialize all pages using assets provided mainMenuPage = new MainMenu(ButtonTexture, Font); shopPage = new ShopPage(ButtonTexture, Font, imagesDictionary, playerManager); customizePage = new CustomizePage(ButtonTexture, Font, imagesDictionary, sprite); statsPage = new StatsPage(ButtonTexture, Font, playerManager); playPage = new PlayPage(PatientTexture, ButtonTexture, Font); }
private void ShowTab(Tab tab) { int pageHeight = (int)(double)FindResource("PageHeight"); SlidingGrid.Height = pageHeight * Enum.GetValues(typeof(Tab)).Length; var slideAnim = new ThicknessAnimation(new Thickness(0, -pageHeight * ((int)tab), 0, 0), new Duration(TimeSpan.FromMilliseconds(100))); SlidingGrid.BeginAnimation(MarginProperty, slideAnim); if (tab == Tab.Play) { PlayPage.Reset(); } }
public BabySprite Create(Machine machine, PlayPage page) { this.machine = machine; this.page = page; tiles = AssetStore.Tiles; walkAnimator = AssetStore.CreateBabyAnimation(); this.Width = walkAnimator.Width; this.Height = walkAnimator.Height; this.InitializeCollision(3); return(this); }
public FlySprite Create(Machine machine, PlayPage page) { this.machine = machine; this.page = page; tiles = AssetStore.Tiles; flyAnimator = AssetStore.CreateFlyAnimation(); flyIndex = 0; this.Width = 16; this.Height = 16; this.InitializeCollision(3); return(this); }
public CoinSprite Create(Machine machine, PlayPage page) { this.machine = machine; this.page = page; tiles = AssetStore.Tiles; coin1Animator = AssetStore.CreateCoin1Animation(); coin5Animator = AssetStore.CreateCoin5Animation(); this.Width = 16; this.Height = 16; this.InitializeCollision(3); return(this); }
public MainPage() { var playPage = new PlayPage() { Title = "Play" }; var settingsPage = new SettingsPage() { Title = "Settings" }; var aboutPage = new AboutPage() { Title = "About" }; Children.Add(playPage); Children.Add(settingsPage); Children.Add(aboutPage); }
public KaboomSprite Create(Machine machine, PlayPage page) { this.machine = machine; this.page = page; tiles = AssetStore.Tiles; kaboomAnimator = AssetStore.CreateKaboomAnimation(); this.Width = 8; this.Height = 8; kaboomAnimator.Stop(); Width = kaboomAnimator.Width; Height = kaboomAnimator.Height; return(this); }
public OpaSprite(Machine machine, PlayPage page) { this.machine = machine; this.page = page; pathDeathStart.Initialize(EasingFunctions.CircularEaseOut, EasingFunctions.Linear, 40, 1, 1, 1, 100); frameDeathStarThresold0 = (int)((double)pathDeathStart.MaximumFrame * 0.4d); frameDeathStarThresold1 = (int)((double)pathDeathStart.MaximumFrame * 0.8d); tiles = AssetStore.Tiles; flightAnimator = AssetStore.OpaFlightAnimator; walkAnimator = AssetStore.OpaWalkAnimator; deathStarAnimator = AssetStore.CreateDeathStartAnimation(); deathStarAnimator.AnimationType = AnimationTypes.Manual; isOpaHorizontalFlipped = true; Initialize(); }
public MotherSprite Create(Machine machine, PlayPage page) { this.machine = machine; this.page = page; tiles = AssetStore.Tiles; flyAnimator = AssetStore.CreateMotherFlyAnimation(); openAnimator = AssetStore.CreateMotherOpenAnimation(); tiredMap = AssetStore.MotherTired; healthThresold1 = (int)((double)HEALTH * 0.33d); healthThresold2 = (int)((double)HEALTH * 0.66d); openAnimator.Stop(); this.Width = openAnimator.Width + (2 * 8); // on ajoute les ailes qui dépassent this.Height = openAnimator.Height; this.InitializeCollision(3, 8, 16 + 3, 3); return(this); }
public GameClient(PlayPage playpage, string name, string portUDP1, string portUDP2, string portTCP1L, string portTCP1S, string portTCP2L, string portTCP2S, string portTCP3L, string portTCP3S) { this.playpage = playpage; this.name = name; this.portTCP2S = portTCP2S; finderUDP = new UDPListenerFinder(playpage, name, portUDP1, portUDP2); finderUDP.SendDiscovery(); firstConnectionClient = TCPClientRemote.Instance; firstConnectionClient.initTCPClient(playpage, name); firstConnectionClient.initListener(portTCP3L); firstConnectionClient.Received += firstConnectionReceived; client = new TCPClientRemote(); client.initTCPClient(playpage, name); client.initListener(portTCP2L); client.Received += OnClientReceived; }
public void SetDetailPage(MenuItemType type) { NavigationPage detailNavPage = null; ContentPage detailPage = null; switch (type) { case MenuItemType.Play: //Create new PlayPage each time in case ball image has changed detailPage = new PlayPage(); break; default: if (_ballsPage == null) { _ballsPage = new BallsPage(); } detailPage = _ballsPage; break; } detailNavPage = new DarkNavigationPage(detailPage); _rootPage.Detail = detailNavPage; _rootPage.IsPresented = false; }
public ContentPage GetPage(ViewName viewName, object o = null) { ContentPage page; switch (viewName) { case ViewName.LoginPage: page = new LoginPage(); break; case ViewName.MainPage: if (o == null) { throw new ArgumentNullException(nameof(o), "User parameter is null"); } page = new MainPage((User)o); break; case ViewName.RegisterPage: page = new RegisterPage(); break; case ViewName.UpdatePage: page = new UpdatePage(); break; case ViewName.PlayPage: page = new PlayPage(); break; default: throw new ArgumentOutOfRangeException(nameof(viewName), viewName, null); } return(page); }
public void SetUp() { //Set Variable of Type Class Parameters param = new Parameters(); //Set Driver variable from Parameters Get Driver method this.driver = param.GetDriver(); // ---- And Headless version //this.driver = param.GetHeadlessDriver(); // the this.driver needs to be added prior to these next 3 lines else driver not recognised homepage = new HomePage(driver); loginpage = new LoginPage(driver); playpage = new PlayPage(driver); //Set a Wait Period driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5.00); //Set which URL to open from the Parameters Class driver.Navigate().GoToUrl(param.GetUrl()); //maximize the window driver.Manage().Window.Maximize(); }
void MainWindow_Loaded(object sender, RoutedEventArgs e) { playPage = new PlayPage(); this.Content = playPage; //this.Content = new Page2(); }
public void initTCPClient(PlayPage playpage, string name) { this.playPage = playpage; this.name = name; }