Skip to content
Snippets Groups Projects
Commit 71be1928 authored by HAEFFLINGER AYMERIC's avatar HAEFFLINGER AYMERIC :thinking:
Browse files

Merge branch 'master' into 'master'

ajout FORM_politique, politique.ini

See merge request t4-the-origin/arti4!13
parents ad7649c3 2ecf2244
Branches
No related merge requests found
......@@ -63,6 +63,12 @@
<Compile Include="Formulaires\FORM_main.Designer.cs">
<DependentUpon>FORM_main.cs</DependentUpon>
</Compile>
<Compile Include="Formulaires\FORM_politique.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Formulaires\FORM_politique.Designer.cs">
<DependentUpon>FORM_politique.cs</DependentUpon>
</Compile>
<Compile Include="Models\Partie.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
......@@ -132,6 +138,9 @@
<EmbeddedResource Include="Formulaires\FORM_main.resx">
<DependentUpon>FORM_main.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Formulaires\FORM_politique.resx">
<DependentUpon>FORM_politique.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
......
......@@ -84,7 +84,7 @@
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "FORM_lexique";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "FORM_lexique";
this.Text = "Lexique";
this.Load += new System.EventHandler(this.FORM_lexique_Load);
this.ResumeLayout(false);
this.PerformLayout();
......
namespace Arti4.Formulaires
{
partial class FORM_politique
{
/// <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.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.listBox1 = new System.Windows.Forms.ListBox();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(300, 35);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(162, 13);
this.label1.TabIndex = 8;
this.label1.Text = "Choisissez une notion à expliciter";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(3, 10);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(265, 20);
this.textBox1.TabIndex = 7;
this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
//
// listBox1
//
this.listBox1.Font = new System.Drawing.Font("Cambria", 11.12727F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.listBox1.FormattingEnabled = true;
this.listBox1.ItemHeight = 17;
this.listBox1.Location = new System.Drawing.Point(3, 36);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(265, 378);
this.listBox1.TabIndex = 6;
this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);
//
// button1
//
this.button1.Location = new System.Drawing.Point(601, 388);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(197, 53);
this.button1.TabIndex = 5;
this.button1.Text = "Quitter";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// FORM_politique
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.label1);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.listBox1);
this.Controls.Add(this.button1);
this.Name = "FORM_politique";
this.Text = "FORM_politique";
this.Load += new System.EventHandler(this.FORM_politique_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.Button button1;
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using IniParser;
namespace Arti4.Formulaires
{
public partial class FORM_politique : Form
{
private IniParser.FileIniDataParser parser;
private IniParser.Model.IniData data;
private List<String> sortedData = new List<string>();
public FORM_politique()
{
InitializeComponent();
parser = new FileIniDataParser();
data = parser.ReadFile("../../politique.ini", System.Text.Encoding.UTF8);
}
private void FORM_politique_Load(object sender, EventArgs e)
{
var sdata = data.Sections["politique"];
foreach (var key in sdata)
{
sortedData.Add(key.KeyName);
}
sortedData.Sort();
listBox1.Items.AddRange(sortedData.ToArray());
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
listBox1.Items.Clear();
if (textBox1.Text.Equals(String.Empty))
{
listBox1.Items.AddRange(sortedData.ToArray());
}
else
{
List<string> filteredList = new List<string>();
foreach (var value in sortedData)
{
if (value.ToLower().Contains(textBox1.Text.ToLower()))
filteredList.Add(value);
}
listBox1.Items.AddRange(filteredList.ToArray());
}
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
label1.Text = data["politique"][listBox1.SelectedItem.ToString()].Replace("\\n", "\n").Replace("\"", "");
}
private void button1_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<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
......@@ -30,6 +30,7 @@
{
this.button1 = new System.Windows.Forms.Button();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.btnPolitique = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
......@@ -56,11 +57,25 @@
this.pictureBox1.TabIndex = 1;
this.pictureBox1.TabStop = false;
//
// btnPolitique
//
this.btnPolitique.BackColor = System.Drawing.SystemColors.Control;
this.btnPolitique.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnPolitique.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.21818F);
this.btnPolitique.Location = new System.Drawing.Point(503, 11);
this.btnPolitique.Name = "btnPolitique";
this.btnPolitique.Size = new System.Drawing.Size(287, 78);
this.btnPolitique.TabIndex = 2;
this.btnPolitique.Text = "Politique de décision";
this.btnPolitique.UseVisualStyleBackColor = false;
this.btnPolitique.Click += new System.EventHandler(this.btnPolitique_Click);
//
// UC_ToolBar
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.Controls.Add(this.btnPolitique);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.button1);
this.Name = "UC_ToolBar";
......@@ -74,5 +89,6 @@
private System.Windows.Forms.Button button1;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Button btnPolitique;
}
}
......@@ -23,5 +23,11 @@ namespace Arti4.UserControls.Jeu.Toolbar
FORM_lexique lexique = new FORM_lexique();
lexique.ShowDialog();
}
private void btnPolitique_Click(object sender, EventArgs e)
{
FORM_politique pol = new FORM_politique();
pol.ShowDialog();
}
}
}
[politique]
Conjoncturelle = "Court terme. L’objectif est de lutter contre le chômage et l’inflation."
Redistribution du revenu = "Vise à réduire les inégalités sociales."
Structurelle = "Soutien des secteurs jugés prioritaires en modifiant \ndurablement le partage entre le secteur public et le secteur privé."
Budgétaire = "Stimuler la demande en augmentant les dépenses publiques et \ndonc la consommation, la production et l’emploi.\n Elle peut permettre d’accélérer ou ralentir la croissance."
Monétaire = "Elle accompagne souvent une politique budgétaire.\n Consiste à baisser les taux d’intérêts pour stimuler l’investissement."
Relance = "L’Etat investit, baisse les impôts ou augmente les revenus ce qui relance l’activité économique."
Relance par l’investissement = "L’économie sera plus compétitive grâce à des entreprises plus performantes.\n L’augmentation des exportations et les diminution des importations va améliorer la balance commerciale.\n Par conséquence, la production va augmenter et le chômage diminuer.\n Il y aura également une augmentation de l’indice de la monnaie.\n L’Etat doit alors permettre aux entreprises d’améliorer leur rentabilité\n en allégeant les charges et en les incitant à investir."
Relance par la consommation = "Relancer la croissance par l’augmentation de la consommation des ménages.\n Les revenus de ces derniers vont augmenter et augmenter le déficit budgétaire de l’Etat."
Rigueur = "Réduire les différentes déficits (budgétaire, social et dette extérieure).\n L’Etat va provoquer une diminution de l’inflation, favoriser les exports\n et va augmenter la valeur de la monnaie.\nImplique une récession ou une dépression.\n L’économie sera alors plus compétitive avec les autres pays ce qui aura pour conséquence,\n une revalorisation de l’indice de la monnaie nationale."
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