Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Class Members

frmBrowser.cs

Go to the documentation of this file.
00001 /*
00002 SimImmuno version 1.0
00003 Copyright (C) 2005 sebeuh.ajsinfo.net
00004 
00005 SimImmuno est libre, vous pouvez le redistribuer et/ou le modifier
00006 selon les termes de la Licence Publique Générale GNU publiée par la
00007 Free Software Foundation (version 2).
00008 
00009 SimImmuno est distribué car potentiellement utile, mais SANS AUCUNE GARANTIE,
00010 ni explicite ni implicite, y compris les garanties de commercialisation
00011 ou d'adaptation dans un but spécifique. Reportez-vous à la
00012 Licence Publique Générale GNU pour plus de détails.
00013 
00014 Texte de la license officielle (anglais) :
00015 http://simimmuno.ajsinfo.net/text.aspx?code=no&txt_file=GPL.txt
00016 Traduction francaise (non-officielle) :
00017 http://simimmuno.ajsinfo.net/text.aspx?code=no&txt_file=GPL-fr.txt
00018 */
00019 using System;
00020 using System.Drawing;
00021 using System.Collections;
00022 using System.ComponentModel;
00023 using System.Windows.Forms;
00024 
00025 namespace SimImmuno
00026 {
00027         public class frmBrowser : System.Windows.Forms.Form
00028         {
00029                 #region Déclaration et initialisation
00030                 private System.Windows.Forms.Button button1;
00031                 private System.Windows.Forms.ListView listView1;
00032                 private System.Windows.Forms.ColumnHeader columnHeader1;
00033                 private System.Windows.Forms.ColumnHeader columnHeader2;
00034                 private System.Windows.Forms.ColumnHeader columnHeader3;
00035                 private System.Windows.Forms.ColumnHeader columnHeader4;
00036                 private System.Windows.Forms.ColumnHeader columnHeader5;
00037                 private System.Windows.Forms.GroupBox groupBox1;
00038                 private System.Windows.Forms.GroupBox groupBox2;
00039                 private System.ComponentModel.Container components = null;
00040                 private System.Windows.Forms.ContextMenu contextMenu1;
00041                 private System.Windows.Forms.MenuItem menuItem1;
00042                 private System.Windows.Forms.Button button2;
00043                 private System.Windows.Forms.Button button3;
00044                 private System.Windows.Forms.Button button4;
00045                 private System.Windows.Forms.Button button5;
00046                 private System.Windows.Forms.GroupBox groupBox3;
00047                 private System.Windows.Forms.NumericUpDown numericUpDown1;
00048                 private System.Windows.Forms.NumericUpDown numericUpDown2;
00049                 private System.Windows.Forms.NumericUpDown numericUpDown3;
00050                 private System.Windows.Forms.NumericUpDown numericUpDown4;
00051                 private System.Windows.Forms.NumericUpDown numericUpDown5;
00052                 private System.Windows.Forms.Label label1;
00053                 private System.Windows.Forms.Label label2;
00054                 private System.Windows.Forms.Label label3;
00055                 private System.Windows.Forms.Label label4;
00056                 private System.Windows.Forms.Label label5;
00057                 private System.Windows.Forms.NumericUpDown numericUpDown6;
00058                 private System.Windows.Forms.Label label6;
00059                 private System.Windows.Forms.Button button8;
00060                 private System.Windows.Forms.Button button9;
00061                 private CellulesCollection cc;
00062                 private System.Windows.Forms.Button button10;
00063                 private System.Windows.Forms.GroupBox groupBox4;
00064                 private System.Windows.Forms.Label label7;
00065                 private System.Windows.Forms.MenuItem menuItem2;
00066                 private System.Windows.Forms.MenuItem menuItem3;
00067                 private System.Windows.Forms.MenuItem menuItem4;
00068                 private System.Windows.Forms.MenuItem menuItem5;
00069                 private System.Windows.Forms.MenuItem menuItem6;
00070                 private System.Windows.Forms.MenuItem menuItem7;
00071                 private System.Windows.Forms.MenuItem menuItem8;
00072                 private System.Windows.Forms.MenuItem menuItem9;
00073                 private System.Windows.Forms.MenuItem menuItem10;
00074                 private System.Windows.Forms.MenuItem menuItem11;
00075                 private System.Windows.Forms.MenuItem menuItem12;
00076                 private System.Windows.Forms.MenuItem menuItem13;
00077                 private System.Windows.Forms.MenuItem menuItem14;
00078                 private System.Windows.Forms.MenuItem menuItem15;
00079                 private System.Windows.Forms.NumericUpDown numericUpDown7;
00080                 private System.Windows.Forms.NumericUpDown numericUpDown8;
00081                 private System.Windows.Forms.NumericUpDown numericUpDown9;
00082                 private System.Windows.Forms.NumericUpDown numericUpDown10;
00083                 private System.Windows.Forms.Label label8;
00084                 private System.Windows.Forms.Label label9;
00085                 private System.Windows.Forms.Label label10;
00086                 private System.Windows.Forms.Label label11;
00087                 private System.Windows.Forms.CheckBox checkBox1;
00088                 private System.Windows.Forms.Button button6;
00089                 private System.Windows.Forms.Button button7;
00090                 private Random ran;
00091                 private int am_action;
00092                 private int am_index;
00093                 private System.Windows.Forms.Button button11;
00094                 private System.Windows.Forms.MenuItem menuItem16;
00095                 private System.Windows.Forms.MenuItem menuItem17;
00096                 private System.Windows.Forms.Label label12;
00097                 private System.Windows.Forms.NumericUpDown numericUpDown11;
00098                 private System.Windows.Forms.Label label13;
00099                 private string am_type;
00100 
00101                 public frmBrowser()
00102                 {
00103                         InitializeComponent();
00104                 }
00105                 #endregion
00106 
00107                 #region Fonctions de base .NET
00108                 protected override void Dispose( bool disposing )
00109                 {
00110                         if( disposing )
00111                         {
00112                                 if(components != null)
00113                                 {
00114                                         components.Dispose();
00115                                 }
00116                         }
00117                         base.Dispose( disposing );
00118                 }
00119 
00120                 #region Windows Form Designer generated code
00125                 private void InitializeComponent()
00126                 {
00127                         System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmBrowser));
00128                         this.button1 = new System.Windows.Forms.Button();
00129                         this.listView1 = new System.Windows.Forms.ListView();
00130                         this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
00131                         this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
00132                         this.columnHeader3 = new System.Windows.Forms.ColumnHeader();
00133                         this.columnHeader4 = new System.Windows.Forms.ColumnHeader();
00134                         this.columnHeader5 = new System.Windows.Forms.ColumnHeader();
00135                         this.groupBox1 = new System.Windows.Forms.GroupBox();
00136                         this.groupBox2 = new System.Windows.Forms.GroupBox();
00137                         this.groupBox4 = new System.Windows.Forms.GroupBox();
00138                         this.label13 = new System.Windows.Forms.Label();
00139                         this.numericUpDown11 = new System.Windows.Forms.NumericUpDown();
00140                         this.label12 = new System.Windows.Forms.Label();
00141                         this.button7 = new System.Windows.Forms.Button();
00142                         this.button6 = new System.Windows.Forms.Button();
00143                         this.checkBox1 = new System.Windows.Forms.CheckBox();
00144                         this.label11 = new System.Windows.Forms.Label();
00145                         this.label10 = new System.Windows.Forms.Label();
00146                         this.label9 = new System.Windows.Forms.Label();
00147                         this.label8 = new System.Windows.Forms.Label();
00148                         this.numericUpDown10 = new System.Windows.Forms.NumericUpDown();
00149                         this.numericUpDown9 = new System.Windows.Forms.NumericUpDown();
00150                         this.numericUpDown8 = new System.Windows.Forms.NumericUpDown();
00151                         this.numericUpDown7 = new System.Windows.Forms.NumericUpDown();
00152                         this.groupBox3 = new System.Windows.Forms.GroupBox();
00153                         this.button9 = new System.Windows.Forms.Button();
00154                         this.button8 = new System.Windows.Forms.Button();
00155                         this.label6 = new System.Windows.Forms.Label();
00156                         this.numericUpDown6 = new System.Windows.Forms.NumericUpDown();
00157                         this.label5 = new System.Windows.Forms.Label();
00158                         this.label4 = new System.Windows.Forms.Label();
00159                         this.label3 = new System.Windows.Forms.Label();
00160                         this.label2 = new System.Windows.Forms.Label();
00161                         this.label1 = new System.Windows.Forms.Label();
00162                         this.numericUpDown5 = new System.Windows.Forms.NumericUpDown();
00163                         this.numericUpDown4 = new System.Windows.Forms.NumericUpDown();
00164                         this.numericUpDown3 = new System.Windows.Forms.NumericUpDown();
00165                         this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
00166                         this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
00167                         this.button11 = new System.Windows.Forms.Button();
00168                         this.button10 = new System.Windows.Forms.Button();
00169                         this.button5 = new System.Windows.Forms.Button();
00170                         this.button4 = new System.Windows.Forms.Button();
00171                         this.button3 = new System.Windows.Forms.Button();
00172                         this.button2 = new System.Windows.Forms.Button();
00173                         this.contextMenu1 = new System.Windows.Forms.ContextMenu();
00174                         this.menuItem3 = new System.Windows.Forms.MenuItem();
00175                         this.menuItem4 = new System.Windows.Forms.MenuItem();
00176                         this.menuItem1 = new System.Windows.Forms.MenuItem();
00177                         this.menuItem2 = new System.Windows.Forms.MenuItem();
00178                         this.menuItem17 = new System.Windows.Forms.MenuItem();
00179                         this.menuItem5 = new System.Windows.Forms.MenuItem();
00180                         this.menuItem6 = new System.Windows.Forms.MenuItem();
00181                         this.menuItem7 = new System.Windows.Forms.MenuItem();
00182                         this.menuItem8 = new System.Windows.Forms.MenuItem();
00183                         this.menuItem9 = new System.Windows.Forms.MenuItem();
00184                         this.menuItem10 = new System.Windows.Forms.MenuItem();
00185                         this.menuItem11 = new System.Windows.Forms.MenuItem();
00186                         this.menuItem12 = new System.Windows.Forms.MenuItem();
00187                         this.menuItem13 = new System.Windows.Forms.MenuItem();
00188                         this.menuItem14 = new System.Windows.Forms.MenuItem();
00189                         this.menuItem15 = new System.Windows.Forms.MenuItem();
00190                         this.menuItem16 = new System.Windows.Forms.MenuItem();
00191                         this.label7 = new System.Windows.Forms.Label();
00192                         this.groupBox1.SuspendLayout();
00193                         this.groupBox2.SuspendLayout();
00194                         this.groupBox4.SuspendLayout();
00195                         ((System.ComponentModel.ISupportInitialize)(this.numericUpDown11)).BeginInit();
00196                         ((System.ComponentModel.ISupportInitialize)(this.numericUpDown10)).BeginInit();
00197                         ((System.ComponentModel.ISupportInitialize)(this.numericUpDown9)).BeginInit();
00198                         ((System.ComponentModel.ISupportInitialize)(this.numericUpDown8)).BeginInit();
00199                         ((System.ComponentModel.ISupportInitialize)(this.numericUpDown7)).BeginInit();
00200                         this.groupBox3.SuspendLayout();
00201                         ((System.ComponentModel.ISupportInitialize)(this.numericUpDown6)).BeginInit();
00202                         ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).BeginInit();
00203                         ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).BeginInit();
00204                         ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit();
00205                         ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
00206                         ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
00207                         this.SuspendLayout();
00208                         // 
00209                         // button1
00210                         // 
00211                         this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
00212                         this.button1.Location = new System.Drawing.Point(592, 416);
00213                         this.button1.Name = "button1";
00214                         this.button1.Size = new System.Drawing.Size(75, 18);
00215                         this.button1.TabIndex = 1;
00216                         this.button1.Text = "Fermer";
00217                         this.button1.Click += new System.EventHandler(this.button1_Click);
00218                         // 
00219                         // listView1
00220                         // 
00221                         this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
00222                                 | System.Windows.Forms.AnchorStyles.Left) 
00223                                 | System.Windows.Forms.AnchorStyles.Right)));
00224                         this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
00225                                                                                                                                                                                 this.columnHeader1,
00226                                                                                                                                                                                 this.columnHeader2,
00227                                                                                                                                                                                 this.columnHeader3,
00228                                                                                                                                                                                 this.columnHeader4,
00229                                                                                                                                                                                 this.columnHeader5});
00230                         this.listView1.FullRowSelect = true;
00231                         this.listView1.HoverSelection = true;
00232                         this.listView1.Location = new System.Drawing.Point(8, 16);
00233                         this.listView1.Name = "listView1";
00234                         this.listView1.Size = new System.Drawing.Size(456, 392);
00235                         this.listView1.TabIndex = 2;
00236                         this.listView1.View = System.Windows.Forms.View.Details;
00237                         this.listView1.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.ColumnClick);
00238                         // 
00239                         // columnHeader1
00240                         // 
00241                         this.columnHeader1.Text = "Index";
00242                         this.columnHeader1.Width = 43;
00243                         // 
00244                         // columnHeader2
00245                         // 
00246                         this.columnHeader2.Text = "Type";
00247                         this.columnHeader2.Width = 120;
00248                         // 
00249                         // columnHeader3
00250                         // 
00251                         this.columnHeader3.Text = "Vie";
00252                         this.columnHeader3.Width = 61;
00253                         // 
00254                         // columnHeader4
00255                         // 
00256                         this.columnHeader4.Text = "Spécificité";
00257                         this.columnHeader4.Width = 76;
00258                         // 
00259                         // columnHeader5
00260                         // 
00261                         this.columnHeader5.Text = "Localisation";
00262                         this.columnHeader5.Width = 116;
00263                         // 
00264                         // groupBox1
00265                         // 
00266                         this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
00267                                 | System.Windows.Forms.AnchorStyles.Left) 
00268                                 | System.Windows.Forms.AnchorStyles.Right)));
00269                         this.groupBox1.Controls.Add(this.listView1);
00270                         this.groupBox1.Location = new System.Drawing.Point(0, 0);
00271                         this.groupBox1.Name = "groupBox1";
00272                         this.groupBox1.Size = new System.Drawing.Size(472, 416);
00273                         this.groupBox1.TabIndex = 3;
00274                         this.groupBox1.TabStop = false;
00275                         this.groupBox1.Text = "Acteur(s) present dans la simulation";
00276                         // 
00277                         // groupBox2
00278                         // 
00279                         this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
00280                                 | System.Windows.Forms.AnchorStyles.Right)));
00281                         this.groupBox2.Controls.Add(this.groupBox4);
00282                         this.groupBox2.Controls.Add(this.groupBox3);
00283                         this.groupBox2.Controls.Add(this.button11);
00284                         this.groupBox2.Controls.Add(this.button10);
00285                         this.groupBox2.Controls.Add(this.button5);
00286                         this.groupBox2.Controls.Add(this.button4);
00287                         this.groupBox2.Controls.Add(this.button3);
00288                         this.groupBox2.Controls.Add(this.button2);
00289                         this.groupBox2.Location = new System.Drawing.Point(472, 0);
00290                         this.groupBox2.Name = "groupBox2";
00291                         this.groupBox2.Size = new System.Drawing.Size(200, 416);
00292                         this.groupBox2.TabIndex = 4;
00293                         this.groupBox2.TabStop = false;
00294                         this.groupBox2.Text = "Contrôle";
00295                         // 
00296                         // groupBox4
00297                         // 
00298                         this.groupBox4.Controls.Add(this.label13);
00299                         this.groupBox4.Controls.Add(this.numericUpDown11);
00300                         this.groupBox4.Controls.Add(this.label12);
00301                         this.groupBox4.Controls.Add(this.button7);
00302                         this.groupBox4.Controls.Add(this.button6);
00303                         this.groupBox4.Controls.Add(this.checkBox1);
00304                         this.groupBox4.Controls.Add(this.label11);
00305                         this.groupBox4.Controls.Add(this.label10);
00306                         this.groupBox4.Controls.Add(this.label9);
00307                         this.groupBox4.Controls.Add(this.label8);
00308                         this.groupBox4.Controls.Add(this.numericUpDown10);
00309                         this.groupBox4.Controls.Add(this.numericUpDown9);
00310                         this.groupBox4.Controls.Add(this.numericUpDown8);
00311                         this.groupBox4.Controls.Add(this.numericUpDown7);
00312                         this.groupBox4.Location = new System.Drawing.Point(8, 216);
00313                         this.groupBox4.Name = "groupBox4";
00314                         this.groupBox4.Size = new System.Drawing.Size(184, 192);
00315                         this.groupBox4.TabIndex = 8;
00316                         this.groupBox4.TabStop = false;
00317                         this.groupBox4.Text = "(none)";
00318                         this.groupBox4.Visible = false;
00319                         // 
00320                         // label13
00321                         // 
00322                         this.label13.Location = new System.Drawing.Point(144, 75);
00323                         this.label13.Name = "label13";
00324                         this.label13.Size = new System.Drawing.Size(24, 16);
00325                         this.label13.TabIndex = 14;
00326                         this.label13.Text = "fois";
00327                         // 
00328                         // numericUpDown11
00329                         // 
00330                         this.numericUpDown11.Location = new System.Drawing.Point(96, 72);
00331                         this.numericUpDown11.Minimum = new System.Decimal(new int[] {
00332                                                                                                                                                         1,
00333                                                                                                                                                         0,
00334                                                                                                                                                         0,
00335                                                                                                                                                         0});
00336                         this.numericUpDown11.Name = "numericUpDown11";
00337                         this.numericUpDown11.Size = new System.Drawing.Size(48, 20);
00338                         this.numericUpDown11.TabIndex = 13;
00339                         this.numericUpDown11.Value = new System.Decimal(new int[] {
00340                                                                                                                                                   1,
00341                                                                                                                                                   0,
00342                                                                                                                                                   0,
00343                                                                                                                                                   0});
00344                         // 
00345                         // label12
00346                         // 
00347                         this.label12.Location = new System.Drawing.Point(16, 72);
00348                         this.label12.Name = "label12";
00349                         this.label12.Size = new System.Drawing.Size(56, 16);
00350                         this.label12.TabIndex = 12;
00351                         this.label12.Text = "Répéter :";
00352                         // 
00353                         // button7
00354                         // 
00355                         this.button7.Location = new System.Drawing.Point(16, 160);
00356                         this.button7.Name = "button7";
00357                         this.button7.TabIndex = 11;
00358                         this.button7.Text = "Valider";
00359                         this.button7.Click += new System.EventHandler(this.button7_Click);
00360                         // 
00361                         // button6
00362                         // 
00363                         this.button6.Location = new System.Drawing.Point(96, 160);
00364                         this.button6.Name = "button6";
00365                         this.button6.TabIndex = 10;
00366                         this.button6.Text = "Annuler";
00367                         this.button6.Click += new System.EventHandler(this.button6_Click);
00368                         // 
00369                         // checkBox1
00370                         // 
00371                         this.checkBox1.Checked = true;
00372                         this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked;
00373                         this.checkBox1.Location = new System.Drawing.Point(24, 96);
00374                         this.checkBox1.Name = "checkBox1";
00375                         this.checkBox1.Size = new System.Drawing.Size(128, 16);
00376                         this.checkBox1.TabIndex = 9;
00377                         this.checkBox1.Text = "Position aléatoire";
00378                         this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
00379                         // 
00380                         // label11
00381                         // 
00382                         this.label11.Location = new System.Drawing.Point(56, 136);
00383                         this.label11.Name = "label11";
00384                         this.label11.Size = new System.Drawing.Size(32, 16);
00385                         this.label11.TabIndex = 8;
00386                         this.label11.Text = "Y :";
00387                         // 
00388                         // label10
00389                         // 
00390                         this.label10.Location = new System.Drawing.Point(57, 115);
00391                         this.label10.Name = "label10";
00392                         this.label10.Size = new System.Drawing.Size(32, 16);
00393                         this.label10.TabIndex = 7;
00394                         this.label10.Text = "X :";
00395                         // 
00396                         // label9
00397                         // 
00398                         this.label9.Location = new System.Drawing.Point(16, 40);
00399                         this.label9.Name = "label9";
00400                         this.label9.Size = new System.Drawing.Size(64, 16);
00401                         this.label9.TabIndex = 6;
00402                         this.label9.Text = "Spécificité :";
00403                         // 
00404                         // label8
00405                         // 
00406                         this.label8.Location = new System.Drawing.Point(16, 18);
00407                         this.label8.Name = "label8";
00408                         this.label8.Size = new System.Drawing.Size(80, 16);
00409                         this.label8.TabIndex = 5;
00410                         this.label8.Text = "Durée de vie :";
00411                         // 
00412                         // numericUpDown10
00413                         // 
00414                         this.numericUpDown10.Location = new System.Drawing.Point(96, 40);
00415                         this.numericUpDown10.Maximum = new System.Decimal(new int[] {
00416                                                                                                                                                         999,
00417                                                                                                                                                         0,
00418                                                                                                                                                         0,
00419                                                                                                                                                         0});
00420                         this.numericUpDown10.Name = "numericUpDown10";
00421                         this.numericUpDown10.Size = new System.Drawing.Size(80, 20);
00422                         this.numericUpDown10.TabIndex = 4;
00423                         // 
00424                         // numericUpDown9
00425                         // 
00426                         this.numericUpDown9.Enabled = false;
00427                         this.numericUpDown9.Location = new System.Drawing.Point(96, 136);
00428                         this.numericUpDown9.Maximum = new System.Decimal(new int[] {
00429                                                                                                                                                    999,
00430                                                                                                                                                    0,
00431                                                                                                                                                    0,
00432                                                                                                                                                    0});
00433                         this.numericUpDown9.Name = "numericUpDown9";
00434                         this.numericUpDown9.Size = new System.Drawing.Size(80, 20);
00435                         this.numericUpDown9.TabIndex = 3;
00436                         // 
00437                         // numericUpDown8
00438                         // 
00439                         this.numericUpDown8.Enabled = false;
00440                         this.numericUpDown8.Location = new System.Drawing.Point(96, 112);
00441                         this.numericUpDown8.Maximum = new System.Decimal(new int[] {
00442                                                                                                                                                    999,
00443                                                                                                                                                    0,
00444                                                                                                                                                    0,
00445                                                                                                                                                    0});
00446                         this.numericUpDown8.Name = "numericUpDown8";
00447                         this.numericUpDown8.Size = new System.Drawing.Size(80, 20);
00448                         this.numericUpDown8.TabIndex = 2;
00449                         // 
00450                         // numericUpDown7
00451                         // 
00452                         this.numericUpDown7.Location = new System.Drawing.Point(96, 16);
00453                         this.numericUpDown7.Maximum = new System.Decimal(new int[] {
00454                                                                                                                                                    1410065407,
00455                                                                                                                                                    2,
00456                                                                                                                                                    0,
00457                                                                                                                                                    0});
00458                         this.numericUpDown7.Name = "numericUpDown7";
00459                         this.numericUpDown7.Size = new System.Drawing.Size(80, 20);
00460                         this.numericUpDown7.TabIndex = 0;
00461                         // 
00462                         // groupBox3
00463                         // 
00464                         this.groupBox3.Controls.Add(this.button9);
00465                         this.groupBox3.Controls.Add(this.button8);
00466                         this.groupBox3.Controls.Add(this.label6);
00467                         this.groupBox3.Controls.Add(this.numericUpDown6);
00468                         this.groupBox3.Controls.Add(this.label5);
00469                         this.groupBox3.Controls.Add(this.label4);
00470                         this.groupBox3.Controls.Add(this.label3);
00471                         this.groupBox3.Controls.Add(this.label2);
00472                         this.groupBox3.Controls.Add(this.label1);
00473                         this.groupBox3.Controls.Add(this.numericUpDown5);
00474                         this.groupBox3.Controls.Add(this.numericUpDown4);
00475                         this.groupBox3.Controls.Add(this.numericUpDown3);
00476                         this.groupBox3.Controls.Add(this.numericUpDown2);
00477                         this.groupBox3.Controls.Add(this.numericUpDown1);
00478                         this.groupBox3.Location = new System.Drawing.Point(8, 216);
00479                         this.groupBox3.Name = "groupBox3";
00480                         this.groupBox3.Size = new System.Drawing.Size(184, 120);
00481                         this.groupBox3.TabIndex = 6;
00482                         this.groupBox3.TabStop = false;
00483                         this.groupBox3.Text = "Remplissage aléatoire";
00484                         this.groupBox3.Visible = false;
00485                         // 
00486                         // button9
00487                         // 
00488                         this.button9.Location = new System.Drawing.Point(96, 88);
00489                         this.button9.Name = "button9";
00490                         this.button9.TabIndex = 13;
00491                         this.button9.Text = "Annuler";
00492                         this.button9.Click += new System.EventHandler(this.button9_Click_1);
00493                         // 
00494                         // button8
00495                         // 
00496                         this.button8.Location = new System.Drawing.Point(8, 88);
00497                         this.button8.Name = "button8";
00498                         this.button8.TabIndex = 12;
00499                         this.button8.Text = "Valider";
00500                         this.button8.Click += new System.EventHandler(this.button8_Click_1);
00501                         // 
00502                         // label6
00503                         // 
00504                         this.label6.Location = new System.Drawing.Point(8, 64);
00505                         this.label6.Name = "label6";
00506                         this.label6.Size = new System.Drawing.Size(48, 16);
00507                         this.label6.TabIndex = 11;
00508                         this.label6.Text = "Phago. :";
00509                         // 
00510                         // numericUpDown6
00511                         // 
00512                         this.numericUpDown6.Location = new System.Drawing.Point(64, 64);
00513                         this.numericUpDown6.Maximum = new System.Decimal(new int[] {
00514                                                                                                                                                    999,
00515                                                                                                                                                    0,
00516                                                                                                                                                    0,
00517                                                                                                                                                    0});
00518                         this.numericUpDown6.Name = "numericUpDown6";
00519                         this.numericUpDown6.Size = new System.Drawing.Size(40, 20);
00520                         this.numericUpDown6.TabIndex = 10;
00521                         this.numericUpDown6.Value = new System.Decimal(new int[] {
00522                                                                                                                                                  10,
00523                                                                                                                                                  0,
00524                                                                                                                                                  0,
00525                                                                                                                                                  0});
00526                         // 
00527                         // label5
00528                         // 
00529                         this.label5.Location = new System.Drawing.Point(104, 64);
00530                         this.label5.Name = "label5";
00531                         this.label5.Size = new System.Drawing.Size(32, 16);
00532                         this.label5.TabIndex = 9;
00533                         this.label5.Text = "LT8 :";
00534                         // 
00535                         // label4
00536                         // 
00537                         this.label4.Location = new System.Drawing.Point(104, 40);
00538                         this.label4.Name = "label4";
00539                         this.label4.Size = new System.Drawing.Size(32, 16);
00540                         this.label4.TabIndex = 8;
00541                         this.label4.Text = "LT4 :";
00542                         // 
00543                         // label3
00544                         // 
00545                         this.label3.Location = new System.Drawing.Point(112, 16);
00546                         this.label3.Name = "label3";
00547                         this.label3.Size = new System.Drawing.Size(24, 16);
00548                         this.label3.TabIndex = 7;
00549                         this.label3.Text = "LB :";
00550                         // 
00551                         // label2
00552                         // 
00553                         this.label2.Location = new System.Drawing.Point(32, 40);
00554                         this.label2.Name = "label2";
00555                         this.label2.Size = new System.Drawing.Size(24, 16);
00556                         this.label2.TabIndex = 6;
00557                         this.label2.Text = "Ag :";
00558                         // 
00559                         // label1
00560                         // 
00561                         this.label1.Location = new System.Drawing.Point(8, 16);
00562                         this.label1.Name = "label1";
00563                         this.label1.Size = new System.Drawing.Size(56, 16);
00564                         this.label1.TabIndex = 5;
00565                         this.label1.Text = "Cellules :";
00566                         // 
00567                         // numericUpDown5
00568                         // 
00569                         this.numericUpDown5.Location = new System.Drawing.Point(136, 64);
00570                         this.numericUpDown5.Maximum = new System.Decimal(new int[] {
00571                                                                                                                                                    999,
00572                                                                                                                                                    0,
00573                                                                                                                                                    0,
00574                                                                                                                                                    0});
00575                         this.numericUpDown5.Name = "numericUpDown5";
00576                         this.numericUpDown5.Size = new System.Drawing.Size(40, 20);
00577                         this.numericUpDown5.TabIndex = 4;
00578                         this.numericUpDown5.Value = new System.Decimal(new int[] {
00579                                                                                                                                                  15,
00580                                                                                                                                                  0,
00581                                                                                                                                                  0,
00582                                                                                                                                                  0});
00583                         // 
00584                         // numericUpDown4
00585                         // 
00586                         this.numericUpDown4.Location = new System.Drawing.Point(136, 40);
00587                         this.numericUpDown4.Maximum = new System.Decimal(new int[] {
00588                                                                                                                                                    999,
00589                                                                                                                                                    0,
00590                                                                                                                                                    0,
00591                                                                                                                                                    0});
00592                         this.numericUpDown4.Name = "numericUpDown4";
00593                         this.numericUpDown4.Size = new System.Drawing.Size(40, 20);
00594                         this.numericUpDown4.TabIndex = 3;
00595                         this.numericUpDown4.Value = new System.Decimal(new int[] {
00596                                                                                                                                                  20,
00597                                                                                                                                                  0,
00598                                                                                                                                                  0,
00599                                                                                                                                                  0});
00600                         // 
00601                         // numericUpDown3
00602                         // 
00603                         this.numericUpDown3.Location = new System.Drawing.Point(64, 40);
00604                         this.numericUpDown3.Maximum = new System.Decimal(new int[] {
00605                                                                                                                                                    999,
00606                                                                                                                                                    0,
00607                                                                                                                                                    0,
00608                                                                                                                                                    0});
00609                         this.numericUpDown3.Name = "numericUpDown3";
00610                         this.numericUpDown3.Size = new System.Drawing.Size(40, 20);
00611                         this.numericUpDown3.TabIndex = 2;
00612                         this.numericUpDown3.Value = new System.Decimal(new int[] {
00613                                                                                                                                                  10,
00614                                                                                                                                                  0,
00615                                                                                                                                                  0,
00616                                                                                                                                                  0});
00617                         // 
00618                         // numericUpDown2
00619                         // 
00620                         this.numericUpDown2.Location = new System.Drawing.Point(64, 16);
00621                         this.numericUpDown2.Maximum = new System.Decimal(new int[] {
00622                                                                                                                                                    999,
00623                                                                                                                                                    0,
00624                                                                                                                                                    0,
00625                                                                                                                                                    0});
00626                         this.numericUpDown2.Name = "numericUpDown2";
00627                         this.numericUpDown2.Size = new System.Drawing.Size(40, 20);
00628                         this.numericUpDown2.TabIndex = 1;
00629                         this.numericUpDown2.Value = new System.Decimal(new int[] {
00630                                                                                                                                                  50,
00631                                                                                                                                                  0,
00632                                                                                                                                                  0,
00633                                                                                                                                                  0});
00634                         // 
00635                         // numericUpDown1
00636                         // 
00637                         this.numericUpDown1.Location = new System.Drawing.Point(136, 16);
00638                         this.numericUpDown1.Maximum = new System.Decimal(new int[] {
00639                                                                                                                                                    999,
00640                                                                                                                                                    0,
00641                                                                                                                                                    0,
00642                                                                                                                                                    0});
00643                         this.numericUpDown1.Name = "numericUpDown1";
00644                         this.numericUpDown1.Size = new System.Drawing.Size(40, 20);
00645                         this.numericUpDown1.TabIndex = 0;
00646                         this.numericUpDown1.Value = new System.Decimal(new int[] {
00647                                                                                                                                                  15,
00648                                                                                                                                                  0,
00649                                                                                                                                                  0,
00650                                                                                                                                                  0});
00651                         // 
00652                         // button11
00653                         // 
00654                         this.button11.Location = new System.Drawing.Point(16, 184);
00655                         this.button11.Name = "button11";
00656                         this.button11.Size = new System.Drawing.Size(176, 23);
00657                         this.button11.TabIndex = 9;
00658                         this.button11.Text = "Réinitialiser la simulation";
00659                         this.button11.Click += new System.EventHandler(this.button11_Click);
00660                         // 
00661                         // button10
00662                         // 
00663                         this.button10.Location = new System.Drawing.Point(16, 152);
00664                         this.button10.Name = "button10";
00665                         this.button10.Size = new System.Drawing.Size(176, 23);
00666                         this.button10.TabIndex = 7;
00667                         this.button10.Text = "Actualiser la liste";
00668                         this.button10.Click += new System.EventHandler(this.button10_Click);
00669                         // 
00670                         // button5
00671                         // 
00672                         this.button5.Location = new System.Drawing.Point(16, 120);
00673                         this.button5.Name = "button5";
00674                         this.button5.Size = new System.Drawing.Size(176, 23);
00675                         this.button5.TabIndex = 3;
00676                         this.button5.Text = "Supprimer la selection";
00677                         this.button5.Click += new System.EventHandler(this.button5_Click);
00678                         // 
00679                         // button4
00680                         // 
00681                         this.button4.Location = new System.Drawing.Point(16, 88);
00682                         this.button4.Name = "button4";
00683                         this.button4.Size = new System.Drawing.Size(176, 23);
00684                         this.button4.TabIndex = 2;
00685                         this.button4.Text = "Modifier l\'acteur selectionné";
00686                         this.button4.Click += new System.EventHandler(this.button4_Click);
00687                         // 
00688                         // button3
00689                         // 
00690                         this.button3.Location = new System.Drawing.Point(16, 56);
00691                         this.button3.Name = "button3";
00692                         this.button3.Size = new System.Drawing.Size(176, 23);
00693                         this.button3.TabIndex = 1;
00694                         this.button3.Text = "Remplissage aléatoire";
00695                         this.button3.Click += new System.EventHandler(this.button3_Click);
00696                         // 
00697                         // button2
00698                         // 
00699                         this.button2.Location = new System.Drawing.Point(16, 24);
00700                         this.button2.Name = "button2";
00701                         this.button2.Size = new System.Drawing.Size(176, 23);
00702                         this.button2.TabIndex = 0;
00703                         this.button2.Text = "Ajouter un acteur";
00704                         this.button2.Click += new System.EventHandler(this.button2_Click);
00705                         // 
00706                         // contextMenu1
00707                         // 
00708                         this.contextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
00709                                                                                                                                                                                  this.menuItem3,
00710                                                                                                                                                                                  this.menuItem4,
00711                                                                                                                                                                                  this.menuItem1,
00712                                                                                                                                                                                  this.menuItem2,
00713                                                                                                                                                                                  this.menuItem17,
00714                                                                                                                                                                                  this.menuItem5,
00715                                                                                                                                                                                  this.menuItem6,
00716                                                                                                                                                                                  this.menuItem7,
00717                                                                                                                                                                                  this.menuItem8,
00718                                                                                                                                                                                  this.menuItem9,
00719                                                                                                                                                                                  this.menuItem10,
00720                                                                                                                                                                                  this.menuItem11,
00721                                                                                                                                                                                  this.menuItem12,
00722                                                                                                                                                                                  this.menuItem13,
00723                                                                                                                                                                                  this.menuItem14,
00724                                                                                                                                                                                  this.menuItem15,
00725                                                                                                                                                                                  this.menuItem16});
00726                         // 
00727                         // menuItem3
00728                         // 
00729                         this.menuItem3.Index = 0;
00730                         this.menuItem3.Text = "Antigène";
00731                         this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click);
00732                         // 
00733                         // menuItem4
00734                         // 
00735                         this.menuItem4.Index = 1;
00736                         this.menuItem4.Text = "Anticorps";
00737                         this.menuItem4.Click += new System.EventHandler(this.menuItem4_Click);
00738                         // 
00739                         // menuItem1
00740                         // 
00741                         this.menuItem1.Index = 2;
00742                         this.menuItem1.Text = "Cellule normale";
00743                         this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click);
00744                         // 
00745                         // menuItem2
00746                         // 
00747                         this.menuItem2.Index = 3;
00748                         this.menuItem2.Text = "Cellule infectée";
00749                         this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
00750                         // 
00751                         // menuItem17
00752                         // 
00753                         this.menuItem17.Index = 4;
00754                         this.menuItem17.Text = "Cellule infectée du VIH";
00755                         this.menuItem17.Click += new System.EventHandler(this.menuItem17_Click);
00756                         // 
00757                         // menuItem5
00758                         // 
00759                         this.menuItem5.Index = 5;
00760                         this.menuItem5.Text = "Complexe Immun";
00761                         this.menuItem5.Click += new System.EventHandler(this.menuItem5_Click);
00762                         // 
00763                         // menuItem6
00764                         // 
00765                         this.menuItem6.Index = 6;
00766                         this.menuItem6.Text = "Débris";
00767                         this.menuItem6.Click += new System.EventHandler(this.menuItem6_Click);
00768                         // 
00769                         // menuItem7
00770                         // 
00771                         this.menuItem7.Index = 7;
00772                         this.menuItem7.Text = "LB";
00773                         this.menuItem7.Click += new System.EventHandler(this.menuItem7_Click);
00774                         // 
00775                         // menuItem8
00776                         // 
00777                         this.menuItem8.Index = 8;
00778                         this.menuItem8.Text = "LBm";
00779                         this.menuItem8.Click += new System.EventHandler(this.menuItem8_Click);
00780                         // 
00781                         // menuItem9
00782                         // 
00783                         this.menuItem9.Index = 9;
00784                         this.menuItem9.Text = "LT4";
00785                         this.menuItem9.Click += new System.EventHandler(this.menuItem9_Click);
00786                         // 
00787                         // menuItem10
00788                         // 
00789                         this.menuItem10.Index = 10;
00790                         this.menuItem10.Text = "LT4m";
00791                         this.menuItem10.Click += new System.EventHandler(this.menuItem10_Click);
00792                         // 
00793                         // menuItem11
00794                         // 
00795                         this.menuItem11.Index = 11;
00796                         this.menuItem11.Text = "LT8";
00797                         this.menuItem11.Click += new System.EventHandler(this.menuItem11_Click);
00798                         // 
00799                         // menuItem12
00800                         // 
00801                         this.menuItem12.Index = 12;
00802                         this.menuItem12.Text = "LT8m";
00803                         this.menuItem12.Click += new System.EventHandler(this.menuItem12_Click);
00804                         // 
00805                         // menuItem13
00806                         // 
00807                         this.menuItem13.Index = 13;
00808                         this.menuItem13.Text = "LTc";
00809                         this.menuItem13.Click += new System.EventHandler(this.menuItem13_Click);
00810                         // 
00811                         // menuItem14
00812                         // 
00813                         this.menuItem14.Index = 14;
00814                         this.menuItem14.Text = "Phagocyte";
00815                         this.menuItem14.Click += new System.EventHandler(this.menuItem14_Click);
00816                         // 
00817                         // menuItem15
00818                         // 
00819                         this.menuItem15.Index = 15;
00820                         this.menuItem15.Text = "Plasmocyte";
00821                         this.menuItem15.Click += new System.EventHandler(this.menuItem15_Click);
00822                         // 
00823                         // menuItem16
00824                         // 
00825                         this.menuItem16.Index = 16;
00826                         this.menuItem16.Text = "VIH";
00827                         this.menuItem16.Click += new System.EventHandler(this.menuItem16_Click);
00828                         // 
00829                         // label7
00830                         // 
00831                         this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 
00832                                 | System.Windows.Forms.AnchorStyles.Right)));
00833                         this.label7.Location = new System.Drawing.Point(56, 420);
00834                         this.label7.Name = "label7";
00835                         this.label7.Size = new System.Drawing.Size(504, 16);
00836                         this.label7.TabIndex = 9;
00837                         this.label7.Text = "N\'hesitez pas à utiliser les fonctions Charger/Enregistrer de la fenêtre principa" +
00838                                 "le";
00839                         this.label7.TextAlign = System.Drawing.ContentAlignment.TopCenter;
00840                         // 
00841                         // frmBrowser
00842                         // 
00843                         this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
00844                         this.ClientSize = new System.Drawing.Size(680, 421);
00845                         this.ControlBox = false;
00846                         this.Controls.Add(this.groupBox2);
00847                         this.Controls.Add(this.groupBox1);
00848                         this.Controls.Add(this.button1);
00849                         this.Controls.Add(this.label7);
00850                         this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
00851                         this.Location = new System.Drawing.Point(40, 40);
00852                         this.MaximizeBox = false;
00853                         this.MinimizeBox = false;
00854                         this.Name = "frmBrowser";
00855                         this.ShowInTaskbar = false;
00856                         this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
00857                         this.Text = "Acteurs de la simulation";
00858                         this.Load += new System.EventHandler(this.frmBrowser_Load);
00859                         this.groupBox1.ResumeLayout(false);
00860                         this.groupBox2.ResumeLayout(false);
00861                         this.groupBox4.ResumeLayout(false);
00862                         ((System.ComponentModel.ISupportInitialize)(this.numericUpDown11)).EndInit();
00863                         ((System.ComponentModel.ISupportInitialize)(this.numericUpDown10)).EndInit();
00864                         ((System.ComponentModel.ISupportInitialize)(this.numericUpDown9)).EndInit();
00865                         ((System.ComponentModel.ISupportInitialize)(this.numericUpDown8)).EndInit();
00866                         ((System.ComponentModel.ISupportInitialize)(this.numericUpDown7)).EndInit();
00867                         this.groupBox3.ResumeLayout(false);
00868                         ((System.ComponentModel.ISupportInitialize)(this.numericUpDown6)).EndInit();
00869                         ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).EndInit();
00870                         ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).EndInit();
00871                         ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit();
00872                         ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
00873                         ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
00874                         this.ResumeLayout(false);
00875 
00876                 }
00877                 #endregion
00878                 #endregion
00879 
00880                 #region Fct Browser
00881                 private void frmBrowser_Load(object sender, System.EventArgs e)
00882                 {
00883                         //Demarrage
00884                         update();
00885                 }
00886 
00887                 private void ColumnClick(object o, ColumnClickEventArgs e)
00888                 {
00889                         //Gestion du clic sur une colone (fct de tri)
00890                         this.listView1.ListViewItemSorter = new ListViewItemComparer(e.Column);
00891                 }
00892 
00893                 public void update()
00894                 {
00895                         //Mise a jour du tableau
00896                         listView1.Items.Clear();
00897                         cc = (CellulesCollection)frmMain.ccol.Clone();
00898                         foreach(Cellule cell in cc)
00899                         {
00900                                 if(cell is Antigen)
00901                                 {
00902                                         ListViewItem item = new ListViewItem(cell.index.ToString());
00903                                         item.SubItems.Add("Antigène");
00904                                         item.SubItems.Add(cell.Life.ToString());
00905                                         item.SubItems.Add(cell.specificite.ToString());
00906                                         item.SubItems.Add(cell.Location.ToString());
00907                                         listView1.Items.Add(item);
00908                                 }
00909                                 else if(cell is Anticorp)
00910                                 {
00911                                         ListViewItem item = new ListViewItem(cell.index.ToString());
00912                                         item.SubItems.Add("Anticorps");
00913                                         item.SubItems.Add(cell.Life.ToString());
00914                                         item.SubItems.Add(cell.specificite.ToString());
00915                                         item.SubItems.Add(cell.Location.ToString());
00916                                         listView1.Items.Add(item);
00917                                 }
00918                                 else if(cell is CellInfect)
00919                                 {
00920                                         ListViewItem item = new ListViewItem(cell.index.ToString());
00921                                         item.SubItems.Add("Cellule infectée");
00922                                         item.SubItems.Add(cell.Life.ToString());
00923                                         item.SubItems.Add(cell.specificite.ToString());
00924                                         item.SubItems.Add(cell.Location.ToString());
00925                                         listView1.Items.Add(item);
00926                                 }
00927                                 else if(cell is CI)
00928                                 {
00929                                         ListViewItem item = new ListViewItem(cell.index.ToString());
00930                                         item.SubItems.Add("Complexe Immun");
00931                                         item.SubItems.Add(cell.Life.ToString());
00932                                         item.SubItems.Add("Aucune");
00933                                         item.SubItems.Add(cell.Location.ToString());
00934                                         listView1.Items.Add(item);
00935                                 }
00936                                 else if(cell is Debris)
00937                                 {
00938                                         ListViewItem item = new ListViewItem(cell.index.ToString());
00939                                         item.SubItems.Add("Débris");
00940                                         item.SubItems.Add(cell.Life.ToString());
00941                                         item.SubItems.Add("Aucune");
00942                                         item.SubItems.Add(cell.Location.ToString());
00943                                         listView1.Items.Add(item);
00944                                 }
00945                                 else if(cell is LB)
00946                                 {
00947                                         ListViewItem item = new ListViewItem(cell.index.ToString());
00948                                         item.SubItems.Add("Lymphocyte B");
00949                                         item.SubItems.Add(cell.Life.ToString());
00950                                         item.SubItems.Add(cell.specificite.ToString());
00951                                         item.SubItems.Add(cell.Location.ToString());
00952                                         listView1.Items.Add(item);
00953                                 }
00954                                 else if(cell is LBm)
00955                                 {
00956                                         ListViewItem item = new ListViewItem(cell.index.ToString());
00957                                         item.SubItems.Add("LB à mémoire");
00958                                         item.SubItems.Add(cell.Life.ToString());
00959                                         item.SubItems.Add(cell.specificite.ToString());
00960                                         item.SubItems.Add(cell.Location.ToString());
00961                                         listView1.Items.Add(item);
00962                                 }
00963                                 else if(cell is LT4)
00964                                 {
00965                                         ListViewItem item = new ListViewItem(cell.index.ToString());
00966                                         item.SubItems.Add("Lymphocyte T4");
00967                                         item.SubItems.Add(cell.Life.ToString());
00968                                         item.SubItems.Add(cell.specificite.ToString());
00969                                         item.SubItems.Add(cell.Location.ToString());
00970                                         listView1.Items.Add(item);
00971                                 }
00972                                 else if(cell is LT8)
00973                                 {
00974                                         ListViewItem item = new ListViewItem(cell.index.ToString());
00975                                         item.SubItems.Add("Lymphocyte T8");
00976                                         item.SubItems.Add(cell.Life.ToString());
00977                                         item.SubItems.Add(cell.specificite.ToString());
00978                                         item.SubItems.Add(cell.Location.ToString());
00979                                         listView1.Items.Add(item);
00980                                 }
00981                                 else if(cell is LTc)
00982                                 {
00983                                         ListViewItem item = new ListViewItem(cell.index.ToString());
00984                                         item.SubItems.Add("Lymphocyte Tc");
00985                                         item.SubItems.Add(cell.Life.ToString());
00986                                         item.SubItems.Add(cell.specificite.ToString());
00987                                         item.SubItems.Add(cell.Location.ToString());
00988                                         listView1.Items.Add(item);
00989                                 }
00990                                 else if(cell is LT4m)
00991                                 {
00992                                         ListViewItem item = new ListViewItem(cell.index.ToString());
00993                                         item.SubItems.Add("LT4 mémoire");
00994                                         item.SubItems.Add(cell.Life.ToString());
00995                                         item.SubItems.Add(cell.specificite.ToString());
00996                                         item.SubItems.Add(cell.Location.ToString());
00997                                         listView1.Items.Add(item);
00998                                 }
00999                                 else if(cell is LT8m)
01000                                 {
01001                                         ListViewItem item = new ListViewItem(cell.index.ToString());
01002                                         item.SubItems.Add("LT8 mémoire");
01003                                         item.SubItems.Add(cell.Life.ToString());
01004                                         item.SubItems.Add(cell.specificite.ToString());
01005                                         item.SubItems.Add(cell.Location.ToString());
01006                                         listView1.Items.Add(item);
01007                                 }
01008                                 else if(cell is Phagocyte)
01009                                 {
01010                                         ListViewItem item = new ListViewItem(cell.index.ToString());
01011                                         item.SubItems.Add("Phagocyte");
01012                                         item.SubItems.Add(cell.Life.ToString());
01013                                         item.SubItems.Add("Aucune");
01014                                         item.SubItems.Add(cell.Location.ToString());
01015                                         listView1.Items.Add(item);
01016                                 }
01017                                 else if(cell is Plasmocyte)
01018                                 {
01019                                         ListViewItem item = new ListViewItem(cell.index.ToString());
01020                                         item.SubItems.Add("Plasmocyte");
01021                                         item.SubItems.Add(cell.Life.ToString());
01022                                         item.SubItems.Add(cell.specificite.ToString());
01023                                         item.SubItems.Add(cell.Location.ToString());
01024                                         listView1.Items.Add(item);
01025                                 }
01026                                 else if(cell is VIH)
01027                                 {
01028                                         ListViewItem item = new ListViewItem(cell.index.ToString());
01029                                         item.SubItems.Add("VIH");
01030                                         item.SubItems.Add(cell.Life.ToString());
01031                                         item.SubItems.Add(cell.specificite.ToString());
01032                                         item.SubItems.Add(cell.Location.ToString());
01033                                         listView1.Items.Add(item);
01034                                 }
01035                                 else if(cell is InfectVIH)
01036                                 {
01037                                         ListViewItem item = new ListViewItem(cell.index.ToString());
01038                                         item.SubItems.Add("Cellule infectée VIH");
01039                                         item.SubItems.Add(cell.Life.ToString());
01040                                         item.SubItems.Add(cell.specificite.ToString());
01041                                         item.SubItems.Add(cell.Location.ToString());
01042                                         listView1.Items.Add(item);
01043                                 }
01044                                 else
01045                                 {
01046                                         ListViewItem item = new ListViewItem(cell.index.ToString());
01047                                         item.SubItems.Add("Cellule normale");
01048                                         item.SubItems.Add(cell.Life.ToString());
01049                                         item.SubItems.Add("Aucune");
01050                                         item.SubItems.Add(cell.Location.ToString());
01051                                         listView1.Items.Add(item);
01052                                 }
01053                         }
01054                 }
01055                 #endregion
01056 
01057                 #region Bouttons
01058                 private void button1_Click(object sender, System.EventArgs e)
01059                 {
01060                         //Fermeture
01061                         this.Hide();
01062                 }
01063 
01064                 private void button2_Click(object sender, System.EventArgs e)
01065                 {
01066                         //Ajout
01067                         contextMenu1.Show((Control)button2,new Point(button2.Left-30,button2.Top-10));
01068                 }
01069 
01070                 private void button4_Click(object sender, System.EventArgs e)
01071                 {
01072                         //Modif
01073                         try
01074                         {
01075                                 ListView.SelectedListViewItemCollection icell = listView1.SelectedItems;
01076                                 if(listView1.SelectedItems.Count == 1)
01077                                 {
01078                                         GestGroup(2,Convert.ToInt16(listView1.SelectedItems[0].SubItems[0].Text),listView1.SelectedItems[0].SubItems[3].Text);
01079                                 }
01080                                 else if(listView1.SelectedItems.Count == 0)
01081                                 {
01082                                         MessageBox.Show("Erreur : aucun élément n'a été selectionné","SimImmuno",MessageBoxButtons.OK,MessageBoxIcon.Error);
01083                                 }
01084                                 else
01085                                 {
01086                                         MessageBox.Show("Erreur : vous ne pouvez modifier qu'un élément à la fois","SimImmuno",MessageBoxButtons.OK,MessageBoxIcon.Error);
01087                                 }
01088                         }
01089                         catch(Exception exx)
01090                         {
01091                                 MessageBox.Show("Erreur : " + exx.Message.ToString() + ")","SimImmuno",MessageBoxButtons.OK,MessageBoxIcon.Error);
01092                         }
01093                 }
01094 
01095                 private void button3_Click(object sender, System.EventArgs e)
01096                 {
01097                         //Remplissage aleatoire
01098                         groupBox4.Visible = false;
01099                         groupBox3.Visible = true;
01100                 }
01101 
01102                 private void button10_Click(object sender, System.EventArgs e)
01103                 {
01104                         //Actualiser
01105                         update();
01106                 }
01107 
01108                 private void button5_Click(object sender, System.EventArgs e)
01109                 {
01110                         //Supression
01111                         try
01112                         {
01113                                 ListView.SelectedListViewItemCollection cell = listView1.SelectedItems;
01114                                 if(listView1.SelectedItems.Count == 0)
01115                                 {
01116                                         MessageBox.Show("Erreur: aucun élément n'a été selectionné","SimImmuno",MessageBoxButtons.OK,MessageBoxIcon.Error);
01117                                 }
01118                                 else
01119                                 {
01120                                         foreach(ListViewItem icell in listView1.SelectedItems)
01121                                         {
01122                                                 int index_to_delete = Convert.ToInt16(icell.Text[0]);
01123                                                 //frmMain.ccol.RemoveAt(index_to_delete);
01124                                                 frmMain.log.NewEvent("Suppression de l'élément n°" + index_to_delete);
01125                                         }
01126                                         update();
01127                                 }
01128                         }
01129                         catch(Exception exx)
01130                         {
01131                                 MessageBox.Show("Erreur lors de la suppression d'un élément (Message : " + exx.Message.ToString() + ")","SimImmuno",MessageBoxButtons.OK,MessageBoxIcon.Error);
01132                         }
01133                 }
01134 
01135                 private void button11_Click(object sender, System.EventArgs e)
01136                 {
01137                         //reinit
01138                         frmMain.titre_sim = "";
01139                         frmMain.boucle_count = 0;
01140                         frmMain.boucle_per_seconde = 0;
01141                         frmMain.ResetTimer();
01142                         frmMain.ccol.Clear();
01143                         frmMain.log.clear();
01144                         frmMain.log.NewEvent("Réinitialisation");
01145                         update();
01146 
01147 //                      boucle_count = 0;
01148 //                      boucle_per_seconde = 0;
01149 
01150                 }
01151                 #endregion
01152 
01153                 #region Menu
01154                 private void menuItem1_Click(object sender, System.EventArgs e)
01155                 {
01156                         //cell
01157                         GestGroup(1,0,"cell");
01158                 }
01159 
01160                 private void menuItem2_Click(object sender, System.EventArgs e)
01161                 {
01162                         //cellinfect
01163                         GestGroup(1,0,"infect");
01164                 }
01165 
01166                 private void menuItem3_Click(object sender, System.EventArgs e)
01167                 {
01168                         //ag
01169                         GestGroup(1,0,"ag");
01170                 }
01171 
01172                 private void menuItem4_Click(object sender, System.EventArgs e)
01173                 {
01174                         //ac
01175                         GestGroup(1,0,"ac");
01176                 }
01177 
01178                 private void menuItem5_Click(object sender, System.EventArgs e)
01179                 {
01180                         //ci
01181                         GestGroup(1,0,"ci");
01182                 }
01183 
01184                 private void menuItem6_Click(object sender, System.EventArgs e)
01185                 {
01186                         //debris
01187                         GestGroup(1,0,"debris");
01188                 }
01189 
01190                 private void menuItem7_Click(object sender, System.EventArgs e)
01191                 {
01192                         //lb
01193                         GestGroup(1,0,"lb");
01194                 }
01195 
01196                 private void menuItem8_Click(object sender, System.EventArgs e)
01197                 {
01198                         //lbm
01199                         GestGroup(1,0,"lbm");
01200                 }
01201 
01202                 private void menuItem9_Click(object sender, System.EventArgs e)
01203                 {
01204                         //lt4
01205                         GestGroup(1,0,"lt4");
01206                 }
01207 
01208                 private void menuItem10_Click(object sender, System.EventArgs e)
01209                 {
01210                         //lt4m
01211                         GestGroup(1,0,"lt4m");
01212                 }
01213 
01214                 private void menuItem11_Click(object sender, System.EventArgs e)
01215                 {
01216                         //lt8
01217                         GestGroup(1,0,"lt8");
01218                 }
01219 
01220                 private void menuItem12_Click(object sender, System.EventArgs e)
01221                 {
01222                         //lt8m
01223                         GestGroup(1,0,"lt8m");
01224                 }
01225 
01226                 private void menuItem13_Click(object sender, System.EventArgs e)
01227                 {
01228                         //ltc
01229                         GestGroup(1,0,"ltc");
01230                 }
01231 
01232                 private void menuItem14_Click(object sender, System.EventArgs e)
01233                 {
01234                         //phago
01235                         GestGroup(1,0,"phago");
01236                 }
01237 
01238                 private void menuItem15_Click(object sender, System.EventArgs e)
01239                 {
01240                         //plasmo
01241                         GestGroup(1,0,"plasmo");
01242                 }
01243 
01244                 private void menuItem16_Click(object sender, System.EventArgs e)
01245                 {
01246                         //VIH
01247                         GestGroup(1,0,"vih");
01248                 }
01249 
01250                 private void menuItem17_Click(object sender, System.EventArgs e)
01251                 {
01252                         //Cellule infectée du VIH
01253                         GestGroup(1,0,"infectvih");
01254                 }
01255                 #endregion
01256 
01257                 #region Groupe Remplissage Aleatoire
01258                 private void button9_Click_1(object sender, System.EventArgs e)
01259                 {
01260                         //anuler
01261                         groupBox3.Visible = false;
01262                 }
01263 
01264                 private void button8_Click_1(object sender, System.EventArgs e)
01265                 {
01266                         //valider
01267                         ran = new Random();
01268                         int x;
01269                         int nb_cell = Convert.ToInt16(numericUpDown2.Value);
01270                         int nb_ag = Convert.ToInt16(numericUpDown3.Value);
01271                         int nb_lb = Convert.ToInt16(numericUpDown1.Value);
01272                         int nb_lt4 = Convert.ToInt16(numericUpDown4.Value);
01273                         int nb_lt8 = Convert.ToInt16(numericUpDown5.Value);
01274                         int nb_phago = Convert.ToInt16(numericUpDown6.Value);
01275                         for(x = 0;x<nb_cell;x++)
01276                         {
01277                                 Cellule cell1 = new Cellule(ran.Next(800),ran.Next(600));
01278                                 frmMain.ccol.Add(cell1);
01279                         }
01280                         frmMain.log.NewEvent("Ajout de " + nb_cell.ToString() + " cellule(s) normale(s)");
01281                         for(x = 0;x<nb_ag;x++)
01282                         {
01283                                 Antigen ag1 = new Antigen(ran.Next(800),ran.Next(600));
01284                                 frmMain.ccol.Add(ag1);
01285                         }
01286                         frmMain.log.NewEvent("Ajout de " + nb_ag.ToString() + " antigène(s)");
01287                         for(x = 0;x<nb_lb;x++)
01288                         {
01289                                 LB lb1 = new LB(ran.Next(800),ran.Next(600));
01290                                 frmMain.ccol.Add(lb1);
01291                         }
01292                         frmMain.log.NewEvent("Ajout de " + nb_lb.ToString() + " LB(s)");
01293                         for(x = 0;x<nb_lt4;x++)
01294                         {
01295                                 LT4 lt4_1 = new LT4(ran.Next(800),ran.Next(600));
01296                                 frmMain.ccol.Add(lt4_1);
01297                         }
01298                         frmMain.log.NewEvent("Ajout de " + nb_lt4.ToString() + " LT4(s)");
01299                         for(x = 0;x<nb_lt8;x++)
01300                         {
01301                                 LT8 lt8_1 = new LT8(ran.Next(800),ran.Next(600));
01302                                 frmMain.ccol.Add(lt8_1);
01303                         }
01304                         frmMain.log.NewEvent("Ajout de " + nb_lt8.ToString() + " LT8(s)");
01305                         for(x = 0;x<nb_phago;x++)
01306                         {
01307                                 Phagocyte ph1 = new Phagocyte(ran.Next(800),ran.Next(600));
01308                                 frmMain.ccol.Add(ph1);
01309                         }
01310                         frmMain.log.NewEvent("Ajout de " + nb_phago.ToString() + " phagocyte(s)");
01311                         groupBox3.Visible = false;
01312                         update();
01313                 }
01314                 #endregion
01315 
01316                 #region Groupe Ajout/Modif
01317                 public void GestGroup(int action,int index, string type)
01318                 {
01319                         //action :      1 = ajout
01320                         //                      2 = modif
01321                         //type :        nom de l'element
01322                         am_action = action;
01323                         am_index = index;
01324                         am_type = type;
01325                         groupBox3.Visible = false;
01326                         if(action == 1)
01327                         {
01328                                 numericUpDown7.Value = 0;
01329                                 numericUpDown8.Value = 0;
01330                                 numericUpDown9.Value = 0;
01331                                 numericUpDown10.Value = 0;
01332                                 numericUpDown11.Value = 1;
01333                                 numericUpDown10.Maximum = 5;
01334                                 numericUpDown11.Visible = true;
01335                                 groupBox4.Visible = true;
01336                                 numericUpDown10.Enabled = true;
01337                                 numericUpDown7.Enabled = true;
01338                                 numericUpDown8.Enabled = false;
01339                                 numericUpDown9.Enabled = false;
01340                                 checkBox1.Visible = true;
01341                                 checkBox1.Enabled = true;
01342                                 checkBox1.Checked = true;
01343                                 groupBox4.Visible = true;
01344                                 button7.Enabled = true;
01345                                 label12.Visible = true;
01346                 //
01347                                 label10.Top = 115;
01348                                 label12.Top = 72;
01349                                 numericUpDown8.Top = 115;
01350                                 numericUpDown9.Top = 136;
01351                                 button6.Top = 160;
01352                                 button7.Top =  160;
01353                                 groupBox4.Height = 192;
01354                                 //
01355                                 switch(type)
01356                                 {
01357                                         case "cell":
01358                                                 groupBox4.Text = "Ajout de cellule normale";
01359                                                 numericUpDown7.Value = 1000;
01360                                                 numericUpDown10.Enabled = false;
01361                                                 break;
01362                                         case "infect":
01363                                                 groupBox4.Text = "Ajout de cellule infectée";
01364                                                 numericUpDown10.Maximum = 4;
01365                                                 numericUpDown7.Value = 1000;
01366                                                 break;
01367                                         case "ac":
01368                                                 groupBox4.Text = "Ajout d'Anticorps";
01369                                                 numericUpDown7.Value = 1000;
01370                                                 break;
01371                                         case "ag":
01372                                                 groupBox4.Text = "Ajout d'Antigène";
01373                                                 numericUpDown10.Maximum = 4;
01374                                                 numericUpDown7.Value = 10000;
01375                                                 break;
01376                                         case "ci":
01377                                                 groupBox4.Text = "Ajout de Complexe Immun";
01378                                                 numericUpDown7.Value = 99999999;
01379                                                 numericUpDown10.Enabled = false;
01380                                                 break;
01381                                         case "debris":
01382                                                 groupBox4.Text = "Ajout de Debris";
01383                                                 numericUpDown7.Value = 1000;
01384                                                 numericUpDown10.Enabled = false;
01385                                                 break;
01386                                         case "lb":
01387                                                 groupBox4.Text = "Ajout de LB";
01388                                                 numericUpDown7.Value = 10000;
01389                                                 break;
01390                                         case "lbm":
01391                                                 groupBox4.Text = "Ajout de LBm";
01392                                                 numericUpDown7.Value = 99999999;
01393                                                 break;
01394                                         case "lt4":
01395                                                 groupBox4.Text = "Ajout de LT4";
01396                                                 numericUpDown7.Value = 10000;
01397                                                 break;
01398                                         case "lt4m":
01399                                                 groupBox4.Text = "Ajout de LT4m";
01400                                                 numericUpDown7.Value = 99999999;
01401                                                 break;
01402                                         case "lt8":
01403                                                 groupBox4.Text = "Ajout de LT8";
01404                                                 numericUpDown7.Value = 10000;
01405                                                 break;
01406                                         case "lt8m":
01407                                                 groupBox4.Text = "Ajout de LT8m";
01408                                                 numericUpDown7.Value = 99999999;
01409                                                 break;
01410                                         case "ltc":
01411                                                 groupBox4.Text = "Ajout de LTc";
01412                                                 numericUpDown7.Value = 2000;
01413                                                 break;
01414                                         case "phago":
01415                                                 groupBox4.Text = "Ajout de Phagocyte";
01416                                                 numericUpDown7.Value = 99999999;
01417                                                 numericUpDown10.Enabled = false;
01418                                                 break;
01419                                         case "plasmo":
01420                                                 groupBox4.Text = "Ajout de Plasmocyte";
01421                                                 numericUpDown7.Value = 10000;
01422                                                 break;
01423                                         case "vih":
01424                                                 groupBox4.Text = "Ajout de virus VIH";
01425                                                 numericUpDown10.Enabled = false;
01426                                                 numericUpDown7.Value = 99999999;
01427                                                 break;
01428                                         case "infectvih":
01429                                                 groupBox4.Text = "Ajout de cellule infectée VIH";
01430                                                 numericUpDown10.Enabled = false;
01431                                                 numericUpDown7.Value = 10000;
01432                                                 break;
01433                                 }
01434                         }
01435                         else if(action == 2)
01436                         {
01437                                 groupBox4.Text = "Modification de l'élément " + index.ToString();
01438                                 numericUpDown8.Enabled = true;
01439                                 numericUpDown9.Enabled = true;
01440                                 numericUpDown10.Enabled = true;
01441                                 numericUpDown10.Maximum = 5;
01442                                 numericUpDown7.Enabled = true;
01443                                 button7.Enabled = true;
01444                                 checkBox1.Enabled = true;
01445                                 checkBox1.Visible = false;
01446                                 groupBox4.Visible = true;
01447                                 numericUpDown11.Visible = false;
01448                                 label12.Visible = false;
01449                                 // ------
01450                                 label10.Top = 115;
01451                                 label12.Top = 72;
01452                                 numericUpDown8.Top = 115;
01453                                 numericUpDown9.Top = 136;
01454                                 button6.Top = 160;
01455                                 button7.Top =  160;
01456                                 groupBox4.Height = 192;
01457                                 //
01458                                 label10.Top = label10.Top - 40;
01459                                 label11.Top = label11.Top - 40;
01460                                 numericUpDown8.Top = numericUpDown8.Top - 40;
01461                                 numericUpDown9.Top = numericUpDown9.Top - 40;
01462                                 button6.Top = button6.Top - 40;
01463                                 button7.Top = button7.Top - 40;
01464                                 groupBox4.Height = 157;
01465                                 // -------
01466                                 numericUpDown7.Value = frmMain.ccol[index].Life;
01467                                 numericUpDown10.Value = frmMain.ccol[index].specificite;
01468                                 numericUpDown8.Value = frmMain.ccol[index].Location.X;
01469                                 numericUpDown9.Value = frmMain.ccol[index].Location.Y;
01470                                 if(type == "Aucune")
01471                     numericUpDown10.Enabled = false;
01472                                 if(frmMain.ccol[index] is VIH)
01473                                         numericUpDown10.Enabled = false;
01474                                 else if(frmMain.ccol[index] is InfectVIH)
01475                                         numericUpDown10.Enabled = false;
01476                                 else if(frmMain.ccol[index] is Antigen)
01477                                         numericUpDown10.Maximum = 4;
01478                                 else if(frmMain.ccol[index] is CellInfect)
01479                                         numericUpDown10.Maximum = 4;
01480                         }
01481                 }
01482 
01483                 private void button6_Click(object sender, System.EventArgs e)
01484                 {
01485                         //Annuler
01486                         groupBox4.Visible = false;
01487                 }
01488 
01489                 private void button7_Click(object sender, System.EventArgs e)
01490                 {
01491                         ran = new Random();
01492                         // VALIDER
01493                         if(am_action == 1)
01494                         {
01495                                 try
01496                                 {
01497                                         for(int a=0;a<numericUpDown11.Value;a++)
01498                                         {
01499                                                 int ax;
01500                                                 int ay;
01501                                                 int aspe = Convert.ToInt16(numericUpDown10.Value);
01502                                                 int alife = Convert.ToInt32(numericUpDown7.Value);
01503                                                 if(checkBox1.Checked)
01504                                                 {
01505                                                         ax = ran.Next(800);
01506                                                         ay = ran.Next(600);
01507                                                 }
01508                                                 else
01509                                                 {
01510                                                         ax = Convert.ToInt16(numericUpDown8.Value);
01511                                                         ay = Convert.ToInt16(numericUpDown9.Value);
01512                                                 }
01513                                                 switch(am_type)
01514                                                 {
01515                                                         case "cell":
01516                                                                 Cellule cell1 = new Cellule(ax,ay,alife);
01517                                                                 frmMain.ccol.Add(cell1);
01518                                                                 frmMain.log.NewEvent("Ajout de cellule normale");
01519                                                                 break;
01520                                                         case "infect":
01521                                                                 CellInfect infect1 = new CellInfect(ax,ay,aspe,alife);
01522                                                                 frmMain.ccol.Add(infect1);
01523                                                                 frmMain.log.NewEvent("Ajout de cellule infectée");
01524                                                                 break;
01525                                                         case "ac":
01526                                                                 Anticorp ac1 = new Anticorp(ax,ay,aspe,alife);
01527                                                                 frmMain.ccol.Add(ac1);
01528                                                                 frmMain.log.NewEvent("Ajout d'anticorps");
01529                                                                 break;
01530                                                         case "ag":
01531                                                                 Antigen ag1 = new Antigen(ax,ay,aspe,alife);
01532                                                                 frmMain.ccol.Add(ag1);
01533                                                                 frmMain.log.NewEvent("Ajout d'antigène");
01534                                                                 break;
01535                                                         case "ci":
01536                                                                 CI ci1 = new CI(ax,ay,alife);
01537                                                                 frmMain.ccol.Add(ci1);
01538                                                                 frmMain.log.NewEvent("Ajout de complexe immun");
01539                                                                 break;
01540                                                         case "debris":
01541                                                                 Debris deb1 = new Debris(ax,ay,alife);
01542                                                                 frmMain.ccol.Add(deb1);
01543                                                                 frmMain.log.NewEvent("Ajout de débris");
01544                                                                 break;
01545                                                         case "lb":
01546                                                                 LB lb1 = new LB(ax,ay,aspe,alife);
01547                                                                 frmMain.ccol.Add(lb1);
01548                                                                 frmMain.log.NewEvent("Ajout de LB");
01549                                                                 break;
01550                                                         case "lbm":
01551                                                                 LBm lbm1 = new LBm(ax,ay,aspe,alife);
01552                                                                 frmMain.ccol.Add(lbm1);
01553                                                                 frmMain.log.NewEvent("Ajout de LBm");
01554                                                                 break;
01555                                                         case "lt4":
01556                                                                 LT4 lt4_1 = new LT4(ax,ay,aspe,alife);
01557                                                                 frmMain.ccol.Add(lt4_1);
01558                                                                 frmMain.log.NewEvent("Ajout de LT4");
01559                                                                 break;
01560                                                         case "lt4m":
01561                                                                 LT4m lt4m1 = new LT4m(ax,ay,aspe,alife);
01562                                                                 frmMain.ccol.Add(lt4m1);
01563                                                                 frmMain.log.NewEvent("Ajout de LT4m");
01564                                                                 break;
01565                                                         case "lt8":
01566                                                                 LT8 lt8_1 = new LT8(ax,ay,aspe,alife);
01567                                                                 frmMain.ccol.Add(lt8_1);
01568                                                                 frmMain.log.NewEvent("Ajout de LT8");
01569                                                                 break;
01570                                                         case "lt8m":
01571                                                                 LT8m lt8m1 = new LT8m(ax,ay,aspe,alife);
01572                                                                 frmMain.ccol.Add(lt8m1);
01573                                                                 frmMain.log.NewEvent("Ajout de LT8m");
01574                                                                 break;
01575                                                         case "ltc":
01576                                                                 LTc ltc1 = new LTc(ax,ay,aspe,alife);
01577                                                                 frmMain.ccol.Add(ltc1);
01578                                                                 frmMain.log.NewEvent("Ajout de LTc");
01579                                                                 break;
01580                                                         case "phago":
01581                                                                 Phagocyte ph1 = new Phagocyte(ax,ay,alife);
01582                                                                 frmMain.ccol.Add(ph1);
01583                                                                 frmMain.log.NewEvent("Ajout de phagocyte");
01584                                                                 break;
01585                                                         case "plasmo":
01586                                                                 Plasmocyte pl1 = new Plasmocyte(ax,ay,aspe,alife);
01587                                                                 frmMain.ccol.Add(pl1);
01588                                                                 frmMain.log.NewEvent("Ajout de plasmocyte");
01589                                                                 break;
01590                                                         case "vih":
01591                                                                 VIH vih1 = new VIH(ax,ay,alife);
01592                                                                 frmMain.ccol.Add(vih1);
01593                                                                 frmMain.log.NewEvent("Ajout de VIH");
01594                                                                 break;
01595                                                         case "infectvih":
01596                                                                 InfectVIH infvih1 = new InfectVIH(ax,ay,alife);
01597                                                                 frmMain.ccol.Add(infvih1);
01598                                                                 frmMain.log.NewEvent("Ajout de cellule infectée VIH");
01599                                                                 break;
01600                                                 }
01601                                         }
01602                                 }
01603                                 catch(Exception exx)
01604                                 {
01605                                         MessageBox.Show("Erreur : " + exx.Message,"SimImmuno",MessageBoxButtons.OK,MessageBoxIcon.Error);
01606                                 }
01607                                 finally
01608                                 {
01609                                         update();
01610                                         groupBox4.Visible = false;
01611                                 }
01612                         }
01613                         else if(am_action == 2)
01614                         {
01615                                 try
01616                                 {
01617                                         frmMain.ccol[am_index].Location.X = Convert.ToInt16(numericUpDown8.Value);
01618                                         frmMain.ccol[am_index].Location.Y = Convert.ToInt16(numericUpDown9.Value);
01619                                         frmMain.ccol[am_index].Life = Convert.ToInt32(numericUpDown7.Value);
01620                                         if(numericUpDown10.Enabled == true)
01621                                                 frmMain.ccol[am_index].specificite = Convert.ToInt16(numericUpDown10.Value);
01622                                         frmMain.log.NewEvent("Modification de l'élément n°" + am_index.ToString());
01623                                 }
01624                                 catch(Exception exx)
01625                                 {
01626                                         MessageBox.Show("Erreur : " + exx.Message,"SimImmuno",MessageBoxButtons.OK,MessageBoxIcon.Error);
01627                                 }
01628                                 finally
01629                                 {
01630                                         groupBox4.Visible = false;
01631                                         update();
01632                                 }
01633                         }
01634                 }
01635 
01636                 private void checkBox1_CheckedChanged(object sender, System.EventArgs e)
01637                 {
01638                         //random pos
01639                         numericUpDown8.Enabled = !checkBox1.Checked;
01640                         numericUpDown9.Enabled = !checkBox1.Checked;
01641                 }
01642                 #endregion
01643 
01644         }
01645 
01646         #region Classe de Comparaison
01647         class ListViewItemComparer : IComparer
01648         {
01649                 //Classe de comparaison (tri dans le tableau)
01650                 private int col;
01651                 public ListViewItemComparer()
01652                 {
01653                         col = 0;
01654                 }
01655                 public ListViewItemComparer(int column)
01656                 {
01657                         col = column;
01658                 }
01659                 public int Compare(object x, object y)
01660                 {
01661                         return String.Compare(((ListViewItem)x).SubItems[col].Text, ((ListViewItem)y).SubItems[col].Text);
01662                 }
01663         }
01664         #endregion
01665 }

Generated on Sat Jun 4 15:03:40 2005 for SimImmuno by  doxygen 1.4.2