Skip to content
Snippets Groups Projects
Commit ab83893e authored by HUONG THOMAS's avatar HUONG THOMAS
Browse files

Merge branch 'master' into 'master'

Implémentation d'une fenetre main

See merge request deleted_user_177013/t4-foc21!16
parents c72f503d 43d518b8
No related merge requests found
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using fichier1.Model;
namespace fichier1.Controllers namespace fichier1.Controllers
{ {
...@@ -8,9 +9,10 @@ namespace fichier1.Controllers ...@@ -8,9 +9,10 @@ namespace fichier1.Controllers
public class GameController : IGameController public class GameController : IGameController
{ {
public GameController() private Partie game;
public GameController(Partie game)
{ {
this.game = game;
} }
/// <summary> /// <summary>
......

namespace fichier1
{
partial class MainForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.pnlContent = new System.Windows.Forms.Panel();
this.SuspendLayout();
//
// pnlContent
//
this.pnlContent.Location = new System.Drawing.Point(25, 28);
this.pnlContent.Name = "pnlContent";
this.pnlContent.Size = new System.Drawing.Size(943, 557);
this.pnlContent.TabIndex = 0;
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(995, 611);
this.Controls.Add(this.pnlContent);
this.Name = "MainForm";
this.Text = "MainForm";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel pnlContent;
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using fichier1.Model;
using fichier1.Views;
using fichier1.Controllers;
namespace fichier1
{
public partial class MainForm : Form, IObserver<Partie>
{
private Partie game;
private IGameController ctrl;
public MainForm()
{
InitializeComponent();
this.game = new Partie();
this.ctrl = new GameController(this.game);
}
public void OnCompleted()
{
pnlContent.Controls.Clear();
pnlContent.Controls.Add(new ViewResultats(this.ctrl));
}
public void OnError(Exception error)
{
throw new NotImplementedException();
}
public void OnNext(Partie value)
{
pnlContent.Controls.Clear();
pnlContent.Controls.Add(new ViewDecoupage(ctrl));
}
}
}
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment