public TwoZeroFourEightScoreView()
 {
     InitializeComponent();
     model = new TwoZeroFourEightModel();
     model.AttachObserver(this);
     controller = new TwoZeroFourEightController();
 }
 public TwoZeroFourEightView()
 {
     InitializeComponent();
     model = new TwoZeroFourEightModel();
     model.AttachObserver(this);
     controller = new TwoZeroFourEightController();
     controller.AddModel(model);
     controller.ActionPerformed(TwoZeroFourEightController.LEFT);
 }
 public TwoZeroFourEightView()
 {
     InitializeComponent();
     model = new TwoZeroFourEightModel();
     model.AttachObserver(this);
     controller = new TwoZeroFourEightController();
     controller.AddModel(model);
     controller.ActionPerformed(TwoZeroFourEightController.LEFT);
     scoreView = new ShowScore(model);
     scoreView.Visible = true;
     scoreView.Enabled = true;
 }
        TwoZeroFourEightScoreView scoreview; //สร้างสกอร์วิว

        #endregion Fields

        #region Constructors

        public TwoZeroFourEightView()
        {
            InitializeComponent();
            model = new TwoZeroFourEightModel();
            model.AttachObserver(this);
            controller = new TwoZeroFourEightController();
            controller.AddModel(model);
            controller.ActionPerformed(TwoZeroFourEightController.LEFT);
            scoreview = new TwoZeroFourEightScoreView(); //การสร้างสกอร์ ชี้ไปที่คลาส 2048
            scoreview.Visible = true;
            scoreview.Enabled = true;
        }
        public TwoZeroFourEightView()
        {
            InitializeComponent();
            model = new TwoZeroFourEightModel();
            model.AttachObserver(this);

            ScoreVeiw = new TwoZeroFourEightScoreView();
            ScoreVeiw.Visible = false;
            ScoreVeiw.Enabled = false;

            controller = new TwoZeroFourEightController();
            controller.AddModel(model);
            controller.ActionPerformed(TwoZeroFourEightController.LEFT);
        }
예제 #6
0
 public TwoZeroFourEightView()
 {
     InitializeComponent();
     model = new TwoZeroFourEightModel();
     model.AttachObserver(this);
     model.AttachObserver(a);
     controller = new TwoZeroFourEightController();
     controller.AddModel(model);
     controller.ActionPerformed(TwoZeroFourEightController.LEFT);
        // a.Text = "TwoZeroFourEightScoreView";
     //a.Controls.Add(new Label() { Name = "lblScore" ,Text = "Hello"});
        // a.label1.Text = "Hello";
     a.Show();
 }