//
// MainPage.xaml.h
// Declaration of the MainPage class.
//

#pragma once
#include "Common\LayoutAwarePage.h"
#include "GameMain.h"
#include "MainPage.g.h"

namespace ShootingGame
{

  /// <summary>
  /// An empty page that can be used on its own or navigated to within a Frame.
  /// </summary>
  public ref class MainPage
  {
  internal:
    MainPage(GameMain^ g);
    Windows::UI::Xaml::Controls::SwapChainBackgroundPanel^ MainPage::SwapChainBackgroundPanel()
    {
      return DXSwapChainPanel;
    }
    void UpdateProcessTime(float delta);
    void UpdateFrameTime(float delta,float max,float min,float avg);
    void Subframe(Windows::UI::Xaml::Controls::Page^ p);
  protected:
    virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override;
  private:
    void backButton_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
    GameMain^ gameMain_;
  };
}
