Topic du Ctrl + V
244 messages · 19 968 vues · qui a participé ?
Mercredi 29 Octobre 2008 à 20:41
#32
Le 29/10/2008, Dr-Tenma avait écrit ...
06 43 88 92 **
J'ai volontairement mis les deux **^^
C'est pas le truc sur msn là ?
Mercredi 29 Octobre 2008 à 21:07
#34
Archmage_Fou : tu es responsable de mc6 smc?
Mercredi 29 Octobre 2008 à 21:34
#35
[dice="Attaque 1][/dice]
Marrant ce topic... J'avais rien tout à l'heure. Maintenant si.
[ Dernière modification par Sovelis le 29 oct 2008 à 21h35 ]
Marrant ce topic... J'avais rien tout à l'heure. Maintenant si.
[ Dernière modification par Sovelis le 29 oct 2008 à 21h35 ]
Mercredi 29 Octobre 2008 à 21:46
#37
Je sais pas trop pour Nokiou et ceux qui t'ont rencontré IRL, mais pour le reste nous sortir le coup du " j'ai un personnage je joue un rôle tellement subtil que je suis le seul à comprendre vous êtes tous bien niqués hein ", je sais pas si t'es au courant, mais la Cour de cassation a rejeté la jurisprudence Milamber VS Lironea ( traduction, ça fait quinze fois qu'on nous fait le coup et en général ça cachait pas une grande maturité ).
Mercredi 29 Octobre 2008 à 22:01
#38
(que dalle)

ji ti fé les saucisses en poudres pour 3€ di moin avec la livraison a domicile.
Mercredi 29 Octobre 2008 à 22:27
#39
Voila la 16eme... Toshop forever
Je vous promet que la prochaine je la fait avec un design perso. Beldou est un peu comme... Un rival pour moi et il commence a faire des trucs jolis. Je vais pas me laisser distancer...
La carte en foil et en HD (je m'essaye a la creation d'un calque foil... C'est pas gagne) :
J'ai essaye de donner un peu de couleur a ma carte, il faut pas m'en vouloir . Enfin c'etait surtout pour faire comme une vrai carte promo foil...
Bref bref. Je voulais tester mon psd "Champs" et voila le resultat. Voyons voir... Autocritique? C'est trop sombre, trop terne. L'effet foil que j'essaye de faire est nul... La capacite est pas trop mal mais n'a rien d'extraordinaire. L'image est vraiment jolie, le fond est joli aussi (mais pas assez colore).
Bon. Sinon, tout le monde s'en fiche, mais j'ai eu un petit tremblement de terre, ici, a Los Angeles...
Tout sa pour dire que j'ai du utiliser un clavier anglais pour creer cette carte (donc pas d'accent et touches inversees...). Sa n'a pas ete de tout repos. Pour les accents sur la carte, bah j'ai fait des copier/coller des accents du fofo... Je remercie donc tout les utilisateurs du forum qui utilisent des accents!... Enfin pour mon commentaire j'allais pas faire la meme chose. Donc desole pour l'absence d'accents ici... J'ai hesite a rediger le tout en anglais mais me suis dis que sa serait plus simple pour vous comme pour moi de l'ecrire en francais sans accent...
Allez hop c'est parti. Je me reveille juste, j'ai encore mon ptit dej' dans le ventre (trois verres de jus d'orange a vrai dire... Sa fait pas du bien ) mais je suis d'attaque pour un commentaire tout beau tout propre (Ou pas... )
Maintenant la description pas a pas...
Le fond :
Deviantart forever?... Bref. Trouvee sur deviantart, a premiere vue elle etait joli. Mais elle se confond trop avec l'image, et sa ne donne pas super bien au final. Par contre sa fait bien "marais" je trouve...
Le titre :
J'aime bien. Je sais pas trop comment sa m'est venu. En voyant l'image, je me suis dit qu'il fallait un petit homme qui pourrait faire de grandes choses (urgh!)... Bref. Un Zombie qui peux controler d'autres creatures. Et puisque je l'ai mis legendaire, pour equilibrer un peu, il fallait quelque chose qui sonne bien... Et pouf! Baron des ames est sorti de ma tete comme sa...
Le cout de mana :
Je voulais que la creature puisse etre jouee tot dans la partie. Je ne voulais pas faire un gros thon avec des supers capacites mais qui n'arrivera en jeu qu'en fin de partie... J'aurais surement du la faire pour 5 ccm mais je ne voulais pas que le terrible "mana de la surete" me rattrape... Arg! Ssa faisait une creature fragile, plutot cher a jouer, pour un effet utile uniquement contre un jeu creature... 4 ccm c'est bien. Surtout par rapport a la parte de points de vie encourue.
L'illustration et l'illustrateur :
Combien de fois je vais le faire : deviantart forever. Voici encore un illustrateur tres doue : Barontieri (je ne chercherais pas son vrai nom, je vous dis...). Je trouve que l'effet "decoupage" ne fait pas tres magic, mais c'est ce qui fait le charme de l'illustration. J'ai d'ailleurs choisi d'utiliser le psd "Champs" a cause de l'illustration, qui est toute en longueur. Le probleme est surement qu'om voit plus la creature que le petit bonhomme... Donc on ne comprend pas bien qui la carte represente vraiment.
Le type :
Notre joli msieur a l'air... D'un zombie ou d'un humain. Puisqu'il a l'air d'un zombie (sa je l'ai choisi dans ma tete... Je suis un peu attarde des fois faut m'excuser), il faut choisir sa profession. Sorcier ou Shamane? Shamane sa fait plus noir et sa va mieux avec un zombie... Sorcier c'est pour les humains bleus (bravo les stereotypes...). Et puis un shamane sa a l'air de faire plus de "je te tue puis je te reanime" qu'un sorcier qui ferais plutot "je te contrecarre ou je te boomerang"...
Le SE :
Allez hop! Y en a pas. Car sur le Niv Mizzet promo que j'ai (foil avec ce design) y a pas de SE... Sa fait moins de boulot
Les capacités :
Voila deux capacites purement noires. Un anti-creature et un peu de reanimation. Le tout sur un zombie shamane... Et jouables tour 5 sans mana less.
Deux capacites synergiques entre elles, et qui vont avec la couleur de la carte. La premiere ressemble a une terreur a volonte, avec 2 points de vie a payer en plus... J'ai garde les contraintes de terreur pour equilibrer la carte. La deuxieme a une reanimation mais jouable avec "messe noire". La deuxieme capacite etant plutot forte, trois manas colores et une perte de points de vie etaient de rigueur. Et puis qu'est-ce que j'aime voir trois manas noirs a cote... Nan! Je ne passerais pas du cote obscur de la force! J'ai jamais joue noir pourquoi sa changerais...
La formulation de la seconde capacite est tiree d'un anti-creature de time spiral (me souviens plus exactement lequel). Cet anti-creature coutait exactement la meme chose que la premire capacite. J'ai fait un petit mix entre terreur, reanimation et cette carte. Chaque capacite prise separement, c'est deja bien. Les deux en meme temps sa devient enorme... Pour et ma creature ne bouge pas, je te pique une creature non-noire, non-artefact et je perd plein de pvs...
J'ai remarque que depuis que le symbole de degagement existe, il est enormement utilise par les funcardeurs
Copyrights :
1993/2008, mon année de naissance et l'année actuelle. Bizarrement sa coïncide avec le copyright de Magic (j'ai eu 15 ans le 25 juillet... Ouhou trop cool...). Sovelis pour laisser mon pseudo sur la carte. 16/** car c'est ma 16ème funcard sur un nombre encore inconnu aujourd'hui (si je depasse les 100 funcards un jour, il n'aura plus aucun sens mais bon... Il faut y arriver aussi).
La force et l'endurance :
Capcite enorme merite F/E faible par rapport au CCM. Pas trop non plus sinon c'est trop fragile...
Remerciements :
Remerciements à tout ceux du forums, et aux commentateur (commenteurs comme dirait Beldou) qui critiquent mes cartes et qui me permettent de les améliorer.
Remerciements à moi pour mon psd et mes idees...
Remerciements aux modérateurs pour leur gentillesse (ou pas... Ils savent etre dur quand il faut) et pour le temps qu'ils prennent à lire tout nos commentaires.
Remerciements a ceux qui utilisent mon psd et qui me citent (sa me fait vraiment plaisir).
Remerciements a ceux qui m'ont souhaite mon anniversaire (trop peu de gens... Vous me revaudrez sa )
Remerciements a eux qui m'hebergent et a leur clavier anglais bidon... Et a leur souris qui marche pas.
Remerciements a mon premier tremblement de terre.
Remerciements au soleil et a la nature.
Remerciements a mes coups de soleil, don du ciel donne par l'astre divin.
Et en tout particulier, remerciements a... Bon allez. Hop! c'est fini les conneries... Bon votes et bon commentaires. Soyez clements et sympathiques. Ne mettez pas des notes horribles et injustifiees...
Allez, a+ les gens...
Je vous promet que la prochaine je la fait avec un design perso. Beldou est un peu comme... Un rival pour moi et il commence a faire des trucs jolis. Je vais pas me laisser distancer...
La carte en foil et en HD (je m'essaye a la creation d'un calque foil... C'est pas gagne) :
J'ai essaye de donner un peu de couleur a ma carte, il faut pas m'en vouloir . Enfin c'etait surtout pour faire comme une vrai carte promo foil...
Bref bref. Je voulais tester mon psd "Champs" et voila le resultat. Voyons voir... Autocritique? C'est trop sombre, trop terne. L'effet foil que j'essaye de faire est nul... La capacite est pas trop mal mais n'a rien d'extraordinaire. L'image est vraiment jolie, le fond est joli aussi (mais pas assez colore).
Bon. Sinon, tout le monde s'en fiche, mais j'ai eu un petit tremblement de terre, ici, a Los Angeles...
Tout sa pour dire que j'ai du utiliser un clavier anglais pour creer cette carte (donc pas d'accent et touches inversees...). Sa n'a pas ete de tout repos. Pour les accents sur la carte, bah j'ai fait des copier/coller des accents du fofo... Je remercie donc tout les utilisateurs du forum qui utilisent des accents!... Enfin pour mon commentaire j'allais pas faire la meme chose. Donc desole pour l'absence d'accents ici... J'ai hesite a rediger le tout en anglais mais me suis dis que sa serait plus simple pour vous comme pour moi de l'ecrire en francais sans accent...
Allez hop c'est parti. Je me reveille juste, j'ai encore mon ptit dej' dans le ventre (trois verres de jus d'orange a vrai dire... Sa fait pas du bien ) mais je suis d'attaque pour un commentaire tout beau tout propre (Ou pas... )
Maintenant la description pas a pas...
Le fond :
Deviantart forever?... Bref. Trouvee sur deviantart, a premiere vue elle etait joli. Mais elle se confond trop avec l'image, et sa ne donne pas super bien au final. Par contre sa fait bien "marais" je trouve...
Le titre :
J'aime bien. Je sais pas trop comment sa m'est venu. En voyant l'image, je me suis dit qu'il fallait un petit homme qui pourrait faire de grandes choses (urgh!)... Bref. Un Zombie qui peux controler d'autres creatures. Et puisque je l'ai mis legendaire, pour equilibrer un peu, il fallait quelque chose qui sonne bien... Et pouf! Baron des ames est sorti de ma tete comme sa...
Le cout de mana :
Je voulais que la creature puisse etre jouee tot dans la partie. Je ne voulais pas faire un gros thon avec des supers capacites mais qui n'arrivera en jeu qu'en fin de partie... J'aurais surement du la faire pour 5 ccm mais je ne voulais pas que le terrible "mana de la surete" me rattrape... Arg! Ssa faisait une creature fragile, plutot cher a jouer, pour un effet utile uniquement contre un jeu creature... 4 ccm c'est bien. Surtout par rapport a la parte de points de vie encourue.
L'illustration et l'illustrateur :
Combien de fois je vais le faire : deviantart forever. Voici encore un illustrateur tres doue : Barontieri (je ne chercherais pas son vrai nom, je vous dis...). Je trouve que l'effet "decoupage" ne fait pas tres magic, mais c'est ce qui fait le charme de l'illustration. J'ai d'ailleurs choisi d'utiliser le psd "Champs" a cause de l'illustration, qui est toute en longueur. Le probleme est surement qu'om voit plus la creature que le petit bonhomme... Donc on ne comprend pas bien qui la carte represente vraiment.
Le type :
Notre joli msieur a l'air... D'un zombie ou d'un humain. Puisqu'il a l'air d'un zombie (sa je l'ai choisi dans ma tete... Je suis un peu attarde des fois faut m'excuser), il faut choisir sa profession. Sorcier ou Shamane? Shamane sa fait plus noir et sa va mieux avec un zombie... Sorcier c'est pour les humains bleus (bravo les stereotypes...). Et puis un shamane sa a l'air de faire plus de "je te tue puis je te reanime" qu'un sorcier qui ferais plutot "je te contrecarre ou je te boomerang"...
Le SE :
Allez hop! Y en a pas. Car sur le Niv Mizzet promo que j'ai (foil avec ce design) y a pas de SE... Sa fait moins de boulot
Les capacités :
Voila deux capacites purement noires. Un anti-creature et un peu de reanimation. Le tout sur un zombie shamane... Et jouables tour 5 sans mana less.
Deux capacites synergiques entre elles, et qui vont avec la couleur de la carte. La premiere ressemble a une terreur a volonte, avec 2 points de vie a payer en plus... J'ai garde les contraintes de terreur pour equilibrer la carte. La deuxieme a une reanimation mais jouable avec "messe noire". La deuxieme capacite etant plutot forte, trois manas colores et une perte de points de vie etaient de rigueur. Et puis qu'est-ce que j'aime voir trois manas noirs a cote... Nan! Je ne passerais pas du cote obscur de la force! J'ai jamais joue noir pourquoi sa changerais...
La formulation de la seconde capacite est tiree d'un anti-creature de time spiral (me souviens plus exactement lequel). Cet anti-creature coutait exactement la meme chose que la premire capacite. J'ai fait un petit mix entre terreur, reanimation et cette carte. Chaque capacite prise separement, c'est deja bien. Les deux en meme temps sa devient enorme... Pour et ma creature ne bouge pas, je te pique une creature non-noire, non-artefact et je perd plein de pvs...
J'ai remarque que depuis que le symbole de degagement existe, il est enormement utilise par les funcardeurs
Copyrights :
1993/2008, mon année de naissance et l'année actuelle. Bizarrement sa coïncide avec le copyright de Magic (j'ai eu 15 ans le 25 juillet... Ouhou trop cool...). Sovelis pour laisser mon pseudo sur la carte. 16/** car c'est ma 16ème funcard sur un nombre encore inconnu aujourd'hui (si je depasse les 100 funcards un jour, il n'aura plus aucun sens mais bon... Il faut y arriver aussi).
La force et l'endurance :
Capcite enorme merite F/E faible par rapport au CCM. Pas trop non plus sinon c'est trop fragile...
Remerciements :
Remerciements à tout ceux du forums, et aux commentateur (commenteurs comme dirait Beldou) qui critiquent mes cartes et qui me permettent de les améliorer.
Remerciements à moi pour mon psd et mes idees...
Remerciements aux modérateurs pour leur gentillesse (ou pas... Ils savent etre dur quand il faut) et pour le temps qu'ils prennent à lire tout nos commentaires.
Remerciements a ceux qui utilisent mon psd et qui me citent (sa me fait vraiment plaisir).
Remerciements a ceux qui m'ont souhaite mon anniversaire (trop peu de gens... Vous me revaudrez sa )
Remerciements a eux qui m'hebergent et a leur clavier anglais bidon... Et a leur souris qui marche pas.
Remerciements a mon premier tremblement de terre.
Remerciements au soleil et a la nature.
Remerciements a mes coups de soleil, don du ciel donne par l'astre divin.
Et en tout particulier, remerciements a... Bon allez. Hop! c'est fini les conneries... Bon votes et bon commentaires. Soyez clements et sympathiques. Ne mettez pas des notes horribles et injustifiees...
Allez, a+ les gens...
Jeudi 30 Octobre 2008 à 00:16
#41

ji ti fé les saucisses en poudres pour 3€ di moin avec la livraison a domicile.
Jeudi 30 Octobre 2008 à 01:09
#42
Female
Age: 27
France
Last log on: 10/29/08
no comments... je sais même plus d'où ça sort.
Age: 27
France
Last log on: 10/29/08
no comments... je sais même plus d'où ça sort.
- Dictionnaire/correcteur pour Firefox Respectons notre langue et ceux qui nous lisent.
Jeudi 30 Octobre 2008 à 01:46
#43
Public Class ListeCarte
'=============================================================
' Gestion du programme
'=============================================================
Public Sub New()
' Cet appel est requis par le Concepteur Windows Form.
InitializeComponent()
Me.Visible = False
Me.DoubleBuffered = True
' Options des menus
Preferences()
' Options de display de la fenetre
Dim workingRectangle As System.Drawing.Rectangle = _
Screen.PrimaryScreen.WorkingArea
Me.Size = New System.Drawing.Size(615, workingRectangle.Height)
Me.StartPosition = FormStartPosition.Manual
Me.Location = New Point(0, 0)
' Ajoutez une initialisation quelconque après l'appel InitializeComponent().
End Sub
Public Sub Preferences()
'========================
' Gestion des Préférences
'========================
' Taux de conversion Euro/Dollar pour les cotations
If FileExists(Chemappli + "settingsEuroDollar.cfg") = False Then
EuroDollar = 1.25
Else
FileOpen(1, Chemappli + "settingsEuroDollar.cfg", OpenMode.Input)
EuroDollar = Val(Replace(LineInput(1), ",", "."))
FileClose(1)
End If
' Chemin des decks par défaut
'------------------------------------------------
If FileExists(Chemappli + "settingsChemDeck.cfg") = False Then
CheminDeck = Chemappli + "Decks"
Else
FileOpen(1, Chemappli + "settingsChemDeck.cfg", OpenMode.Input)
CheminDeck = LineInput(1)
FileClose(1)
End If
' Récemment ouverts
'------------------------------------------------
If FileExists(Chemappli + "settingsRecent1.cfg") = True Then
FileOpen(1, Chemappli + "settingsRecent1.cfg", OpenMode.Input)
Récent1ToolStripMenuItem.Text = LineInput(1)
Récent1ToolStripMenuItem.Tag = LineInput(1)
FileClose(1)
End If
If FileExists(Chemappli + "settingsRecent2.cfg") = True Then
FileOpen(1, Chemappli + "settingsRecent2.cfg", OpenMode.Input)
Récent2ToolStripMenuItem.Text = LineInput(1)
Récent2ToolStripMenuItem.Tag = LineInput(1)
FileClose(1)
End If
If FileExists(Chemappli + "settingsRecent3.cfg") = True Then
FileOpen(1, Chemappli + "settingsRecent3.cfg", OpenMode.Input)
Récent3ToolStripMenuItem.Text = LineInput(1)
Récent3ToolStripMenuItem.Tag = LineInput(1)
FileClose(1)
End If
' Message d'erreur si carte pas trouvée
'------------------------------------------------
If FileExists(Chemappli + "settingsMessCartPasTrouve.cfg") = False Then
AvoirUnMessageDerreurSiAucuneCarteTrouvéeToolStripMenuItem.Checked = False
Else
FileOpen(1, Chemappli + "settingsMessCartPasTrouve.cfg", OpenMode.Input)
AvoirUnMessageDerreurSiAucuneCarteTrouvéeToolStripMenuItem.Checked = LineInput(1)
FileClose(1)
End If
' A La Saisie / Au bouton
'------------------------------------------------
If FileExists(Chemappli + "settingsALaSaisie.cfg") = False Then
ÀLaSaisieToolStripMenuItem.Checked = False
Else
FileOpen(1, Chemappli + "settingsALaSaisie.cfg", OpenMode.Input)
ÀLaSaisieToolStripMenuItem.Checked = LineInput(1)
FileClose(1)
End If
If FileExists(Chemappli + "settingsAuBouton.cfg") = False Then
AuBoutonToolStripMenuItem.Checked = True
Else
FileOpen(1, Chemappli + "settingsAuBouton.cfg", OpenMode.Input)
AuBoutonToolStripMenuItem.Checked = LineInput(1)
FileClose(1)
End If
' Image des cartes
'------------------------------------------------
If FileExists(Chemappli + "settingsImStyle.cfg") = False Then
SansIllustrationsToolStripMenuItem.Checked = True
HybrideToolStripMenuItem.Checked = False
SurInternetToolStripMenuItem.Checked = False
EnLocalToolStripMenuItem.Checked = False
Else
FileOpen(1, Chemappli + "settingsImStyle.cfg", OpenMode.Input)
SansIllustrationsToolStripMenuItem.Checked = LineInput(1)
HybrideToolStripMenuItem.Checked = LineInput(1)
SurInternetToolStripMenuItem.Checked = LineInput(1)
EnLocalToolStripMenuItem.Checked = LineInput(1)
FileClose(1)
Dim e As New System.EventArgs
If SansIllustrationsToolStripMenuItem.Checked = True Then
SansIllustrationsToolStripMenuItem_Click(Me, e)
End If
End If
'Sur internet
If FileExists(Chemappli + "settingsChemInt.cfg") = False Then
CheminInternet = "http://www.wizards.com/global/images/magic/"
Else
FileOpen(1, Chemappli + "settingsChemInt.cfg", OpenMode.Input)
CheminInternet = LineInput(1)
FileClose(1)
End If
'En Local
If FileExists(Chemappli + "settingsChemIm.cfg") = False Then
CheminIm.ChemTxt.Text = Chemappli + "Pics"
CheminImage = Chemappli + "Pics"
Else
FileOpen(1, Chemappli + "settingsChemIm.cfg", OpenMode.Input)
CheminIm.ChemTxt.Text = LineInput(1)
CheminIm.CBFormt.SelectedItem = LineInput(1)
FileClose(1)
End If
If EnLocalToolStripMenuItem.Checked = True Then
CheminImage = CheminIm.ChemTxt.Text
CheminImageExt = CheminIm.CBFormt.SelectedItem
End If
End Sub
Private Sub ListeCarte_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
Dim i As Integer = Listdeck.Length
While i > 0
Listdeck(0).Close()
i = i - 1
End While
' Termine le programme
End
End Sub
Public Sub ListeCarte_Resize(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Resize
Dim i As Integer
Dim workingRectangle As System.Drawing.Rectangle = Screen.PrimaryScreen.WorkingArea
If Me.ButtonLock.Tag = True Then
If WindowState = FormWindowState.Minimized Then
For i = 0 To Listdeck.Length - 1
Listdeck(i).WindowState = FormWindowState.Minimized
Next
End If
If WindowState = FormWindowState.Normal Then
Try
If Listdeck(0).WindowState = FormWindowState.Minimized Then Listdeck(0).WindowState = FormWindowState.Maximized 'correction bug menu
Catch ex As Exception
End Try
For i = 0 To Listdeck.Length - 1
Listdeck(i).WindowState = FormWindowState.Normal
Listdeck(i).Size = New System.Drawing.Size((1150 - Me.Width), workingRectangle.Height)
Listdeck(i).Location = New Point(Me.Width, 0)
Next
Try
Listdeck(ComboBoxDeck.SelectedIndex).BringToFront()
Catch ex As Exception
End Try
End If
End If
PictureBoxCarte.Width = 200 '271
PictureBoxCarte.Height = 285 '379
Dim LargeurBord As Integer = 10
PictureBoxfond.Width = PictureBoxCarte.Width + LargeurBord * 2
PictureBoxfond.Height = PictureBoxCarte.Height + LargeurBord * 2
PanelTxtCapa.Width = PictureBoxfond.Width
PictureBoxCarte.Location = New System.Drawing.Point(PictureBoxfond.Location.X + LargeurBord, PictureBoxfond.Location.Y + LargeurBord)
CardTitle.Width = PictureBoxfond.Width - LargeurBord
CardType.Width = PictureBoxfond.Width - LargeurBord
CardEd.Width = PictureBoxfond.Width - LargeurBord
CardCout.Width = 5 / 6 * (PictureBoxfond.Width - LargeurBord)
CardCapa.Width = PictureBoxfond.Width - 16
CardFE.Width = PictureBoxfond.Width - LargeurBord
DataGridList.Width = Me.Width - PictureBoxfond.Width - LargeurBord * 4 - 40
DataGridList.Height = Me.Height - GroupBxList.Location.Y - 93
GroupBxList.Width = DataGridList.Width + 2 * 8
GroupBxList.Height = DataGridList.Height
RechRapCarte.Width = GroupBxList.Width - RechOK.Width - LargeurBord
CmBoxFormat.Width = 125
GrBoxDeck.Location = New System.Drawing.Point(GroupBxImgCarte.Width + 23, 27)
GrBoxFormat.Location = New System.Drawing.Point(GroupBxImgCarte.Width + 23, GrBoxDeck.Location.Y + GrBoxDeck.Height + 7)
ButtonRechAv.Location = New System.Drawing.Point(GrBoxFormat.Location.X + GrBoxFormat.Width + LargeurBord, GrBoxFormat.Location.Y + GrBoxFormat.Height - ButtonRechAv.Height)
ButtonAnnulFiltr.Location = New System.Drawing.Point(GrBoxFormat.Location.X + GrBoxFormat.Width + LargeurBord, ButtonRechAv.Location.Y - ButtonAnnulFiltr.Height - 2)
ButtonUp.Location = New System.Drawing.Point(ButtonAnnulFiltr.Location.X + ButtonAnnulFiltr.Width + 2, ButtonAnnulFiltr.Location.Y)
ButtonDown.Location = New System.Drawing.Point(ButtonRechAv.Location.X + ButtonRechAv.Width + 2, ButtonRechAv.Location.Y)
ButtonToSide.Location = New System.Drawing.Point(ButtonDown.Location.X + ButtonDown.Width + 9, ButtonDown.Location.Y + ButtonDown.Height - ButtonToSide.Height)
ButtonToSide4.Location = New System.Drawing.Point(ButtonToSide.Location.X + ButtonToSide.Width + 2, ButtonToSide.Location.Y)
ButtonToDeck.Location = New System.Drawing.Point(ButtonToSide.Location.X, ButtonToSide.Location.Y - ButtonToDeck.Height - 2)
ButtonToDeck4.Location = New System.Drawing.Point(ButtonToDeck.Location.X + ButtonToDeck.Width + 2, ButtonToDeck.Location.Y)
ButtonToCollection.Location = New System.Drawing.Point(ButtonToSide.Location.X, ButtonToDeck.Location.Y - ButtonToCollection.Height - 2)
RechRapCarte.Location = New System.Drawing.Point(GrBoxFormat.Location.X, GrBoxFormat.Location.Y + GrBoxFormat.Height + 9)
RechOK.Location = New System.Drawing.Point(GrBoxFormat.Location.X + RechRapCarte.Width + 10, GrBoxFormat.Location.Y + GrBoxFormat.Height + 7)
GroupBxList.Location = New System.Drawing.Point(GrBoxFormat.Location.X, RechOK.Location.Y + RechOK.Height + 7)
GroupBxImgCarte.Location = New System.Drawing.Point(12, 27)
GrpBoxLegal.Location = New System.Drawing.Point(GroupBxImgCarte.Location.X, GroupBxImgCarte.Location.Y + GroupBxImgCarte.Height + LargeurBord)
GroupBxInfoCarte.Location = New System.Drawing.Point(GrpBoxLegal.Location.X, GrpBoxLegal.Location.Y + GrpBoxLegal.Height + LargeurBord)
' Gestion espacement dans BoxLegal
GrpBoxLegal.Width = GroupBxImgCarte.Width
Dim LargeurBord2 = (GrpBoxLegal.Width - 5 * 27 - 4 * LargeurBord) 2
PictBoxB.Location = New System.Drawing.Point(LargeurBord2, 19)
PictBoxT2.Location = New System.Drawing.Point(27 + LargeurBord + LargeurBord2, 19)
PictBoxT1X.Location = New System.Drawing.Point(2 * (27 + LargeurBord) + LargeurBord2, 19)
PictBoxT15.Location = New System.Drawing.Point(3 * (27 + LargeurBord) + LargeurBord2, 19)
PictBoxT1.Location = New System.Drawing.Point(4 * (27 + LargeurBord) + LargeurBord2, 19)
PanelTxtCapa.Height = (GroupBxList.Location.Y - 28) + GroupBxList.Height - (GroupBxImgCarte.Height + LargeurBord + GrpBoxLegal.Height + LargeurBord) - CardRegle.Height - CardCote.Height - 5
GroupBxInfoCarte.Height = PanelTxtCapa.Height
CardCapa.Height = PanelTxtCapa.Height - CardCapa.Location.Y - CardRegle.Height - CardCote.Height - 20
CardFE.Location = New Point(CardType.Location.X, CardCapa.Location.Y + 18 + min(CardCapa.Font.Height * CardCapa.GetLineFromCharIndex(Len(CardCapa.Text)), CardCapa.Height - 10))
CardRegle.Location = New Point(CardType.Location.X, CardCapa.Location.Y + 18 + min(CardCapa.Font.Height * CardCapa.GetLineFromCharIndex(Len(CardCapa.Text)), CardCapa.Height - 10))
CardCote.Location = New Point(CardRegle.Location.X, CardRegle.Location.Y + CardRegle.Height + 4)
CardCotelk.Location = CardCote.Location
CardFE.BackColor = Color.White
Me.Refresh()
End Sub
Private Sub ListeCarte_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Icone
Me.Icon = New System.Drawing.Icon(ChemAppli + "MW RessourcesMagic Wizard_32.ico")
Dim langue As String
'==========================
' Paramètres linguistiques
'==========================
If FileExists(ChemAppli + "settingslanguageChoixLang.cfg") = True Then
FileOpen(1, ChemAppli + "settingslanguageChoixLang.cfg", OpenMode.Input)
langue = LineInput(1)
FileClose(1)
Else
langue = FrançaisToolStripMenuItem.Tag
FileOpen(1, ChemAppli + "settingslanguageChoixLang.cfg", OpenMode.Output)
Print(1, langue)
WriteLine(1)
FileClose(1)
End If
' Enabled = True pour les fichiers langues présents
If FileExists(ChemAppli + "settingslanguageFR.lang") Then FrançaisToolStripMenuItem.Enabled = True
If FileExists(ChemAppli + "settingslanguageEN.lang") Then EnglishToolStripMenuItem.Enabled = True
If FileExists(ChemAppli + "settingslanguageES.lang") Then SpanishToolStripMenuItem.Enabled = True
If FileExists(ChemAppli + "settingslanguageDE.lang") Then DeutschToolStripMenuItem.Enabled = True
If FileExists(ChemAppli + "settingslanguageIT.lang") Then ItalianoToolStripMenuItem.Enabled = True
If FileExists(ChemAppli + "settingslanguagePT.lang") Then PortuguêsToolStripMenuItem.Enabled = True
If FileExists(ChemAppli + "settingslanguageNL.lang") Then NederlandsToolStripMenuItem.Enabled = True
If FileExists(ChemAppli + "settingslanguageNO.lang") Then NorskToolStripMenuItem.Enabled = True
If FileExists(ChemAppli + "settingslanguageRU.lang") Then RussianToolStripMenuItem.Enabled = True
If FileExists(Chemappli + "settingslanguageCN.lang") Then ChineseToolStripMenuItem.Enabled = True
If FileExists(Chemappli + "settingslanguageJP.lang") Then JapaneseToolStripMenuItem.Enabled = True
If FileExists(Chemappli + "settingslanguageKR.lang") Then KoreanToolStripMenuItem.Enabled = True
'image drapeau
Try
FrançaisToolStripMenuItem.Image = Image.FromFile(Chemappli + "MW RessourcesflagsFR" + extension)
Catch ex As Exception
End Try
Try
EnglishToolStripMenuItem.Image = Image.FromFile(Chemappli + "MW RessourcesflagsEN" + extension)
Catch ex As Exception
End Try
Try
SpanishToolStripMenuItem.Image = Image.FromFile(Chemappli + "MW RessourcesflagsES" + extension)
Catch ex As Exception
End Try
Try
DeutschToolStripMenuItem.Image = Image.FromFile(Chemappli + "MW RessourcesflagsDE" + extension)
Catch ex As Exception
End Try
Try
ItalianoToolStripMenuItem.Image = Image.FromFile(Chemappli + "MW RessourcesflagsIT" + extension)
Catch ex As Exception
End Try
Try
PortuguêsToolStripMenuItem.Image = Image.FromFile(Chemappli + "MW RessourcesflagsPT" + extension)
Catch ex As Exception
End Try
Try
NorskToolStripMenuItem.Image = Image.FromFile(Chemappli + "MW RessourcesflagsNO" + extension)
Catch ex As Exception
End Try
Try
RussianToolStripMenuItem.Image = Image.FromFile(Chemappli + "MW RessourcesflagsRU" + extension)
Catch ex As Exception
End Try
Try
ChineseToolStripMenuItem.Image = Image.FromFile(Chemappli + "MW RessourcesflagsCN" + extension)
Catch ex As Exception
End Try
Try
JapaneseToolStripMenuItem.Image = Image.FromFile(Chemappli + "MW RessourcesflagsJP" + extension)
Catch ex As Exception
End Try
Try
KoreanToolStripMenuItem.Image = Image.FromFile(Chemappli + "MW RessourcesflagsKR" + extension)
Catch ex As Exception
End Try
' test sur la langue
If FrançaisToolStripMenuItem.Tag = langue Then FrançaisToolStripMenuItem.Checked = True
If EnglishToolStripMenuItem.Tag = langue Then EnglishToolStripMenuItem.Checked = True
If SpanishToolStripMenuItem.Tag = langue Then SpanishToolStripMenuItem.Checked = True
If DeutschToolStripMenuItem.Tag = langue Then DeutschToolStripMenuItem.Checked = True
If ItalianoToolStripMenuItem.Tag = langue Then ItalianoToolStripMenuItem.Checked = True
If PortuguêsToolStripMenuItem.Tag = langue Then PortuguêsToolStripMenuItem.Checked = True
If NederlandsToolStripMenuItem.Tag = langue Then NederlandsToolStripMenuItem.Checked = True
If NorskToolStripMenuItem.Tag = langue Then NorskToolStripMenuItem.Checked = True
If RussianToolStripMenuItem.Tag = langue Then RussianToolStripMenuItem.Checked = True
If ChineseToolStripMenuItem.Tag = langue Then ChineseToolStripMenuItem.Checked = True
If JapaneseToolStripMenuItem.Tag = langue Then JapaneseToolStripMenuItem.Checked = True
If KoreanToolStripMenuItem.Tag = langue Then KoreanToolStripMenuItem.Checked = True
'Lang txt
FichierToolStripMenuItem.Text = LanguageTxt(11, 3)
ActionToolStripMenuItem.Text = LanguageTxt(11, 4)
JouerToolStripMenuItem.Text = LanguageTxt(11, 5)
OptionsToolStripMenuItem.Text = LanguageTxt(11, 6)
NouveauToolStripMenuItem.Text = LanguageTxt(11, 7)
OuvrirToolStripMenuItem.Text = LanguageTxt(11, 8)
ToolStripMenuItem1.Text = LanguageTxt(11, 9)
MettreÀJourLesCotationsToolStripMenuItem.Text = LanguageTxt(11, 10)
ImporterDeckToolStripMenuItem.Text = LanguageTxt(11, 11)
GestionnaireDeDecksToolStripMenuItem.Text = LanguageTxt(11, 12)
FermerToolStripMenuItem.Text = LanguageTxt(11, 13)
OutilsToolStripMenuItem.Text = LanguageTxt(3, 3)
RechercheAvancéeDuneCarteToolStripMenuItem.Text = LanguageTxt(11, 14)
RemettreLesFiltresÀZéroToolStripMenuItem.Text = LanguageTxt(11, 15)
AjoutezLaCarteAuDeckToolStripMenuItem.Text = LanguageTxt(11, 16)
AjoutezLePlaysetAuDeckToolStripMenuItem.Text = LanguageTxt(11, 17)
AjoutezLaCarteÀLaRéserveToolStripMenuItem.Text = LanguageTxt(11, 18)
AjoutezLePlaysetÀLaRéserveToolStripMenuItem.Text = LanguageTxt(11, 19)
AjouterÀLaCollectionToolStripMenuItem.Text = LanguageTxt(11, 20)
GestionnaireDeCollectionToolStripMenuItem.Text = LanguageTxt(11, 21)
CollectionDeJetonsToolStripMenuItem.Text = LanguageTxt(11, 22)
ConsulterLeLivretDeRèglesToolStripMenuItem.Text = LanguageTxt(11, 23)
JouerEnModeSoloToolStripMenuItem.Text = LanguageTxt(11, 24)
JouerEnLigneToolStripMenuItem.Text = LanguageTxt(11, 25)
RechercheRapideDuneCarteToolStripMenuItem.Text = LanguageTxt(11, 26)
ÀLaSaisieToolStripMenuItem.Text = LanguageTxt(11, 27)
AuBoutonToolStripMenuItem.Text = LanguageTxt(11, 28)
AvoirUnMessageDerreurSiAucuneCarteTrouvéeToolStripMenuItem.Text = LanguageTxt(11, 29)
RésultatDeLaRechercheToolStripMenuItem.Text = LanguageTxt(11, 30)
SurlignerToolStripMenuItem.Text = LanguageTxt(11, 31)
MasquerToolStripMenuItem.Text = LanguageTxt(11, 32)
IllustrationsDesCartesToolStripMenuItem.Text = LanguageTxt(11, 33)
SurInternetToolStripMenuItem.Text = LanguageTxt(11, 34)
EnLocalToolStripMenuItem.Text = LanguageTxt(11, 35)
HybrideToolStripMenuItem.Text = LanguageTxt(11, 36)
SansIllustrationsToolStripMenuItem.Text = LanguageTxt(11, 37)
DispositionDesFenêtresToolStripMenuItem.Text = LanguageTxt(11, 38)
LiéesToolStripMenuItem.Text = LanguageTxt(11, 39)
NonLiéesToolStripMenuItem.Text = LanguageTxt(11, 40)
ParamètresLinguistiquesToolStripMenuItem.Text = LanguageTxt(11, 41)
GroupBxImgCarte.Text = LanguageTxt(11, 42)
GrBoxDeck.Text = LanguageTxt(11, 43)
ComboBoxDeck.Text = LanguageTxt(11, 44)
GrBoxFormat.Text = LanguageTxt(11, 48)
CmBoxFormat.Items.Item(0) = LanguageTxt(11, 49)
CmBoxFormat.Items.Item(5) = LanguageTxt(11, 50)
RechOK.Text = LanguageTxt(11, 51)
GrpBoxLegal.Text = LanguageTxt(11, 52)
GroupBxInfoCarte.Text = LanguageTxt(11, 53)
CardRegle.Text = LanguageTxt(11, 56)
' Tooltip
ToolTip1.SetToolTip(ButtonToCollection, LanguageTxt(11, 20))
ToolTip1.SetToolTip(ButtonToDeck, LanguageTxt(11, 16))
ToolTip1.SetToolTip(ButtonToDeck4, LanguageTxt(11, 17))
ToolTip1.SetToolTip(ButtonToSide, LanguageTxt(11, 18))
ToolTip1.SetToolTip(ButtonToSide4, LanguageTxt(11, 19))
ToolTip1.SetToolTip(ButtonLock, LanguageTxt(11, 57))
ToolTip1.SetToolTip(ButtonRechAv, LanguageTxt(11, 14))
ToolTip1.SetToolTip(ButtonAnnulFiltr, LanguageTxt(11, 15))
ToolTip1.SetToolTip(PictBoxB, LanguageTxt(11, 58))
ToolTip1.SetToolTip(PictBoxT2, LanguageTxt(11, 59))
ToolTip1.SetToolTip(PictBoxT1X, LanguageTxt(11, 60))
ToolTip1.SetToolTip(PictBoxT15, LanguageTxt(11, 61))
ToolTip1.SetToolTip(PictBoxT1, LanguageTxt(11, 62))
ToolTip1.SetToolTip(ButtonUp, LanguageTxt(11, 63))
ToolTip1.SetToolTip(ButtonDown, LanguageTxt(11, 64))
' Menu contextuel
TailleAutomatiqueToolStripMenuItem.Text = LanguageTxt(11, 65)
AffichageDesColonnesToolStripMenuItem.Text = LanguageTxt(11, 66)
ÉditionToolStripMenuItem.Text = LanguageTxt(11, 67)
CoûtDeManaToolStripMenuItem.Text = LanguageTxt(11, 68)
CoûtConvertiDeManaToolStripMenuItem.Text = LanguageTxt(11, 69)
TypeToolStripMenuItem.Text = LanguageTxt(11, 70)
CouleurToolStripMenuItem.Text = LanguageTxt(11, 71)
ManaProduitToolStripMenuItem.Text = LanguageTxt(11, 72)
ForceEnduranceToolStripMenuItem.Text = LanguageTxt(11, 73)
RaretéToolStripMenuItem.Text = LanguageTxt(11, 74)
CotationToolStripMenuItem.Text = LanguageTxt(11, 75)
FermerEtAppliquerToolStripMenuItem.Text = LanguageTxt(11, 76)
ToolStripMenuItemD.Text = LanguageTxt(11, 16)
ToolStripMenuItemD4.Text = LanguageTxt(11, 17)
ToolStripMenuItemS.Text = LanguageTxt(11, 18)
ToolStripMenuItemS4.Text = LanguageTxt(11, 19)
AjouterLaCarteÀLaCollectionToolStripMenuItem.Text = LanguageTxt(11, 20)
If FileExists(Chemappli + "settingslock.cfg") = True Then
FileOpen(1, Chemappli + "settingslock.cfg", OpenMode.Input)
ButtonLock.Tag = LineInput(1)
FileClose(1)
Else
FileOpen(1, Chemappli + "settingslock.cfg", OpenMode.Output)
ButtonLock.Tag = True
Print(1, ButtonLock.Tag)
WriteLine(1)
FileClose(1)
End If
ButtonLock_Click(sender, e)
Me.Text = "Magic Wizard " + Numversion
nCartesVis = nCartes
GroupBxList.Text = LanguageTxt(11, 1) + " (" + CStr(nCartesVis) + " " + LanguageTxt(11, 2) + " " + CStr(nCartes) + ")"
' Ouverture automatique
Dim ext() As String = Split(ACLA, "")
Dim extf() As String = Split(ext(ext.Length - 1), ".")
If extf(extf.Length - 1) = "mwd" Then
Ouvrir(ACLA)
End If
If extf(extf.Length - 1) = "mwc" Then
Dim sender_temp As New Object
Dim e_temp As New System.EventArgs
GestionnaireDeCollectionToolStripMenuItem_Click_1(sender_temp, e_temp)
GestionnaireCollection.ouvrir(ACLA)
End If
End Sub
Private Sub ListeCarte_Shown(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Shown
ListeCarte_Resize(sender, e)
Accueil.Close()
End Sub
Private Sub DataGridList_SelectionChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DataGridList.SelectionChanged, DataGridList.SelectionChanged
Actualise(DataGridList.CurrentRow.Index, DataGridList)
End Sub
Private Sub ButtonRechAv_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRechAv.Click
RerchercheAv.Show()
End Sub
Private Sub ButtonAnnulFiltr_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonAnnulFiltr.Click
CmBoxFormat_TextChanged(CmBoxFormat, e)
End Sub
Private Sub ButtonDown_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ButtonDown.MouseDown
Dim nloop As Integer = DataGridList.CurrentRow.Index + 1
If nloop = nCartes Then
Exit Sub
End If
While DataGridList.Rows(nloop).DefaultCellStyle.BackColor = Color.FromArgb(255, 221, 221) And nloop < nCartes
nloop = nloop + 1
If nloop = nCartes Then
nloop = DataGridList.CurrentRow.Index
Exit While
End If
End While
DataGridList.FirstDisplayedScrollingRowIndex = max(nloop - Int(DataGridList.DisplayedRowCount(False) / 2), 0)
DataGridList.Item(1, nloop).Selected = True
DataGridList.Refresh()
Actualise(nloop, DataGridList)
End Sub
Private Sub ButtonUp_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ButtonUp.MouseDown
Dim nloop As Integer = DataGridList.CurrentRow.Index - 1
If nloop = -1 Then
Exit Sub
End If
While DataGridList.Rows(nloop).DefaultCellStyle.BackColor = Color.FromArgb(255, 221, 221) And nloop > -1
nloop = nloop - 1
If nloop = -1 Then
nloop = DataGridList.CurrentRow.Index
Exit While
End If
End While
DataGridList.FirstDisplayedScrollingRowIndex = max(nloop - Int(DataGridList.DisplayedRowCount(False) / 2), 0)
DataGridList.Item(1, nloop).Selected = True
DataGridList.Refresh()
Actualise(nloop, DataGridList)
End Sub
Private Sub ComboBoxDeck_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxDeck.SelectedIndexChanged
' mise à jour de la boite combobox du load pour le jeu online
If LoadOnline.Visible = True Then
LoadOnline.MAJComboboxDeck()
End If
If Listdeck.Length > 0 Then
Dim i As Integer = 0
For i = 0 To Listdeck.Length - 1
If Listdeck(i).Name = ComboBoxDeck.SelectedItem Then Exit For
Next
Listdeck(i).BringToFront()
End If
End Sub
Private Sub ButtonToDeck_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonToDeck.Click
If Listdeck.Length > 0 Then
Dim i As Integer = 0
For i = 0 To Listdeck.Length
If Listdeck(i).Name = ComboBoxDeck.SelectedItem Then Exit For
Next
addcarte(Listdeck(i), Listdeck(i).DataGridDeck, Me.DataGridList, 1, Me.DataGridList.CurrentRow.Index)
End If
End Sub
Private Sub ButtonToDeck4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonToDeck4.Click
If Listdeck.Length > 0 Then
Dim i As Integer = 0
For i = 0 To Listdeck.Length
If Listdeck(i).Name = ComboBoxDeck.SelectedItem Then Exit For
Next
addcarte(Listdeck(i), Listdeck(i).DataGridDeck, Me.DataGridList, 4, Me.DataGridList.CurrentRow.Index)
End If
End Sub
Private Sub ButtonToSide_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonToSide.Click
If Listdeck.Length > 0 Then
Dim i As Integer = 0
For i = 0 To Listdeck.Length
If Listdeck(i).Name = ComboBoxDeck.SelectedItem Then Exit For
Next
addcarte(Listdeck(i), Listdeck(i).DataGridSide, Me.DataGridList, 1, Me.DataGridList.CurrentRow.Index)
End If
End Sub
Private Sub ButtonToSide4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonToSide4.Click
If Listdeck.Length > 0 Then
Dim i As Integer = 0
For i = 0 To Listdeck.Length
If Listdeck(i).Name = ComboBoxDeck.SelectedItem Then Exit For
Next
addcarte(Listdeck(i), Listdeck(i).DataGridSide, Me.DataGridList, 4, Me.DataGridList.CurrentRow.Index)
End If
End Sub
Private Sub CardRegle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CardRegle.Click
' Recherche de la carte / dichotomie
Dim cardname As String
cardname = CardTitle.Text
Dim pos As Integer
Dim pos_min As Integer = 0
Dim pos_max As Integer = NomCartes.Length - 1
If InStr(cardname, "/") = 0 Then
While pos_max <> pos_min + 1
pos = Int(1 / 2 * (pos_max + pos_min))
If LCase(Replace(Replace(Replace(Replace(Replace(Replace(NomCartes(pos), ", ", ""), "_", "0"), "The ", ""), " ", ""), "'", ""), "-", "")) > LCase(Replace(Replace(Replace(Replace(Replace(Replace(cardname, ", ", ""), "The ", ""), " ", ""), "'", ""), "_", "0"), "-", "")) Then
pos_max = pos
Else
pos_min = pos
End If
End While
pos = pos_min
If LCase(Replace(Replace(Replace(Replace(NomCartes(pos), ", ", ""), "_", "0"), "'", ""), "-", "")) <> LCase(Replace(Replace(Replace(Replace(cardname, ", ", ""), "'", ""), "_", "0"), "-", "")) Then
pos = pos_max
End If
If LCase(Replace(Replace(Replace(Replace(NomCartes(pos), ", ", ""), "_", "0"), "'", ""), "-", "")) = LCase(Replace(Replace(Replace(Replace(cardname, ", ", ""), "'", ""), "_", "0"), "-", "")) Then
ComplementRegles.RTBCR.Rtf = "{rtf1ansi " + Replace(Replace(Replace(RulesCartes(pos), "Note -", "b Note -b0 "), "[", "i ["), "]", "] i0 ") + "}"
End If
Else 'carte double
Dim nomdouble() As String
Dim txttortbf As String = ""
Dim ii As Integer
nomdouble = Split(cardname, "/")
For ii = 0 To 1
pos_min = 0
pos_max = NomCartes.Length - 1
While pos_max <> pos_min + 1
pos = Int(1 / 2 * (pos_max + pos_min))
If LCase(Replace(Replace(Replace(Replace(Replace(Replace(NomCartes(pos), ", ", ""), "_", "0"), "The ", ""), " ", ""), "'", ""), "-", "")) > LCase(Replace(Replace(Replace(Replace(Replace(Replace(nomdouble(ii) + " (" + cardname + ")", ", ", ""), "The ", ""), " ", ""), "'", ""), "_", "0"), "-", "")) Then
pos_max = pos
Else
pos_min = pos
End If
End While
pos = pos_min
If LCase(Replace(Replace(Replace(Replace(NomCartes(pos), ", ", ""), "_", "0"), "'", ""), "-", "")) <> LCase(Replace(Replace(Replace(Replace(nomdouble(ii) + " (" + cardname + ")", ", ", ""), "'", ""), "_", "0"), "-", "")) Then
pos = pos_max
End If
If LCase(Replace(Replace(Replace(Replace(NomCartes(pos), ", ", ""), "_", "0"), "'", ""), "-", "")) = LCase(Replace(Replace(Replace(Replace(nomdouble(ii) + " (" + cardname + ")", ", ", ""), "'", ""), "_", "0"), "-", "")) Then
txttortbf = txttortbf + Replace(Replace(Replace(RulesCartes(pos), "Note -", "b Note -b0 "), "[", "i ["), "]", "] i0 ") + "par par "
End If
Next
ComplementRegles.RTBCR.Rtf = "{rtf1ansi " + Replace(Replace(Replace(txttortbf, "Note -", "b Note -b0 "), "[", "i ["), "]", "] i0 ") + "}"
End If
ComplementRegles.storecard(cardname, ComplementRegles.RTBCR.Rtf)
ConsulterLeLivretDeRèglesToolStripMenuItem.Enabled = False
CardRegle.Enabled = False
ComplementRegles.Show()
End Sub
'=============================================================
' Gestion du menu du programme principal
'=============================================================
' menu fichier
Private Sub NouveauToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NouveauToolStripMenuItem.Click
NomDeck.Show()
End Sub
Public Sub OuvrirToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OuvrirToolStripMenuItem.Click
Dim odlg As OpenFileDialog
odlg = New OpenFileDialog
odlg.DefaultExt = ".mwd"
odlg.InitialDirectory = Chemappli + "Decks"
odlg.Filter = "Magic Wizard Deck (*.mwd)|*.mwd"
odlg.RestoreDirectory = True
If odlg.ShowDialog = System.Windows.Forms.DialogResult.OK Then
Ouvrir(odlg.FileName)
End If
End Sub
Private Sub FermerToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FermerToolStripMenuItem.Click
End
End Sub
Private Sub ImporterDeckToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ImporterDeckToolStripMenuItem.Click
Dim odlg As OpenFileDialog
odlg = New OpenFileDialog
odlg.DefaultExt = ".mwd"
odlg.InitialDirectory = Chemappli + "Decks"
odlg.Filter = "MagicWorkstation (*.mwDeck)|*.mwDeck"
odlg.RestoreDirectory = True
If odlg.ShowDialog = System.Windows.Forms.DialogResult.OK Then
Importer(odlg.FileName)
End If
End Sub
Private Sub Récent1ToolStripMenuItem_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Récent1ToolStripMenuItem.TextChanged
If Récent1ToolStripMenuItem.Text <> "" And Récent1ToolStripMenuItem.Text <> Nothing Then
Récent1ToolStripMenuItem.Visible = True
ToolStripSeparator3.Visible = True
End If
End Sub
Private Sub Récent1ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Récent1ToolStripMenuItem.Click
Ouvrir(Récent1ToolStripMenuItem.Tag)
End Sub
Private Sub Récent2ToolStripMenuItem_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Récent2ToolStripMenuItem.TextChanged
If Récent2ToolStripMenuItem.Text <> "" And Récent2ToolStripMenuItem.Text <> Nothing Then
Récent2ToolStripMenuItem.Visible = True
End If
End Sub
Private Sub Récent2ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Récent2ToolStripMenuItem.Click
Ouvrir(Récent2ToolStripMenuItem.Tag)
End Sub
Private Sub Récent3ToolStripMenuItem_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Récent3ToolStripMenuItem.TextChanged
If Récent3ToolStripMenuItem.Text <> "" And Récent3ToolStripMenuItem.Text <> Nothing Then
Récent3ToolStripMenuItem.Visible = True
End If
End Sub
Private Sub Récent3ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Récent3ToolStripMenuItem.Click
Ouvrir(Récent3ToolStripMenuItem.Tag)
End Sub
Private Sub GestionnaireDeDecksToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GestionnaireDeDecksToolStripMenuItem.Click
Gestionnaire.Show()
End Sub
' menu jouer
Private Sub JouerEnLigneToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles JouerEnLigneToolStripMenuItem.Click
LoadOnline.ShowDialog()
End Sub
' menu action
Private Sub CollectionDeJetonsToolStripMenuItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CollectionDeJetonsToolStripMenuItem.Click
GestionnaireToken.Show()
End Sub
Private Sub GestionnaireDeCollectionToolStripMenuItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GestionnaireDeCollectionToolStripMenuItem.Click
AjouterÀLaCollectionToolStripMenuItem.Enabled = True
AjouterLaCarteÀLaCollectionToolStripMenuItem.Enabled = True
ButtonToCollection.Enabled = True
GestionnaireCollection.Show()
End Sub
Private Sub RemettreLesFiltresÀZéroToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RemettreLesFiltresÀZéroToolStripMenuItem.Click
CmBoxFormat_TextChanged(CmBoxFormat, e)
End Sub
Private Sub RechercheAvancéeDuneCarteToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RechercheAvancéeDuneCarteToolStripMenuItem.Click
RerchercheAv.Show()
End Sub
Private Sub AjoutezLaCarteAuDeckToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AjoutezLaCarteAuDeckToolStripMenuItem.Click
ButtonToDeck_Click(sender, e)
End Sub
Private Sub AjoutezLePlaysetAuDeckToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AjoutezLePlaysetAuDeckToolStripMenuItem.Click
ButtonToDeck4_Click(sender, e)
End Sub
Private Sub AjoutezLaCarteÀLaRéserveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AjoutezLaCarteÀLaRéserveToolStripMenuItem.Click
ButtonToSide_Click(sender, e)
End Sub
Private Sub AjoutezLePlaysetÀLaRéserveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AjoutezLePlaysetÀLaRéserveToolStripMenuItem.Click
ButtonToSide4_Click(sender, e)
End Sub
Private Sub ToolStripMenuItemD_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItemD.Click
AjoutezLaCarteAuDeckToolStripMenuItem_Click(sender, e)
End Sub
Private Sub ToolStripMenuItemD4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItemD4.Click
AjoutezLePlaysetAuDeckToolStripMenuItem_Click(sender, e)
End Sub
Private Sub ToolStripMenuItemS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItemS.Click
AjoutezLaCarteÀLaRéserveToolStripMenuItem_Click(sender, e)
End Sub
Private Sub ToolStripMenuItemS4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItemS4.Click
AjoutezLePlaysetÀLaRéserveToolStripMenuItem_Click(sender, e)
End Sub
Private Sub ConsulterLeLivretDeRèglesToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ConsulterLeLivretDeRèglesToolStripMenuItem.Click
CardRegle_Click(sender, e)
End Sub
' menu options
Private Sub SurInternetToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SurInternetToolStripMenuItem.Click
SurInternetToolStripMenuItem.Tag = True
ChemInt.ShowDialog()
End Sub
Private Sub EnLocalToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EnLocalToolStripMenuItem.Click
CheminIm.ShowDialog()
End Sub
Private Sub HybrideToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HybrideToolStripMenuItem.Click
' Sauvegarde dans fichier des settings
FileOpen(1, ChemAppli + "settingsALaSaisie.cfg", OpenMode.Output)
Print(1, "False") 'ÀLaSaisieToolStripMenuItem
FileClose(1)
FileOpen(1, ChemAppli + "settingsAuBouton.cfg", OpenMode.Output)
Print(1, "True") 'AuBoutonToolStripMenuItem
FileClose(1)
ÀLaSaisieToolStripMenuItem.Checked = False
SansIllustrationsToolStripMenuItem.Checked = False
AuBoutonToolStripMenuItem.Checked = True
HybrideToolStripMenuItem.Tag = True
ChemInt.ShowDialog()
End Sub
Private Sub SansIllustrationsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SansIllustrationsToolStripMenuItem.Click
' Sauvegarde dans fichier des settings
FileOpen(1, ChemAppli + "settingsImStyle.cfg", OpenMode.Output)
Print(1, "True") 'SansIllustrationsToolStripMenuItem
WriteLine(1)
Print(1, "False") ' HybrideToolStripMenuItem
WriteLine(1)
Print(1, "False") ' SurInternetToolStripMenuItem
WriteLine(1)
Print(1, "False") ' EnLocalToolStripMenuItem
FileClose(1)
SansIllustrationsToolStripMenuItem.Checked = True
HybrideToolStripMenuItem.Checked = False
SurInternetToolStripMenuItem.Checked = False
EnLocalToolStripMenuItem.Checked = False
PictureBoxCarte.WaitOnLoad = False
PictureBoxCarte.Load(ChemAppli + "MW RessourcesImCarte_no_picture.jpg")
PictureBoxfond.WaitOnLoad = False
PictureBoxfond.Load(ChemAppli + "MW RessourcesFond_noir.png")
End Sub
Private Sub ÀLaSaisieToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ÀLaSaisieToolStripMenuItem.Click
If HybrideToolStripMenuItem.Checked = False Then
' Sauvegarde dans fichier des settings
FileOpen(1, ChemAppli + "settingsALaSaisie.cfg", OpenMode.Output)
Print(1, "True") 'ÀLaSaisieToolStripMenuItem
FileClose(1)
FileOpen(1, ChemAppli + "settingsAuBouton.cfg", OpenMode.Output)
Print(1, "False") 'AuBoutonToolStripMenuItem
FileClose(1)
ÀLaSaisieToolStripMenuItem.Checked = True
AuBoutonToolStripMenuItem.Checked = False
Else
MsgBox("Synchronisation à la saisie impossible en mode d'illustration hybride.", MsgBoxStyle.Exclamation)
' Sauvegarde dans fichier des settings
FileOpen(1, ChemAppli + "settingsALaSaisie.cfg", OpenMode.Output)
Print(1, "False") 'ÀLaSaisieToolStripMenuItem
FileClose(1)
FileOpen(1, ChemAppli + "settingsAuBouton.cfg", OpenMode.Output)
Print(1, "True") 'AuBoutonToolStripMenuItem
FileClose(1)
ÀLaSaisieToolStripMenuItem.Checked = False
AuBoutonToolStripMenuItem.Checked = True
End If
End Sub
Private Sub AuBoutonToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AuBoutonToolStripMenuItem.Click
' Sauvegarde dans fichier des settings
FileOpen(1, ChemAppli + "settingsALaSaisie.cfg", OpenMode.Output)
Print(1, "False") 'ÀLaSaisieToolStripMenuItem
FileClose(1)
FileOpen(1, ChemAppli + "settingsAuBouton.cfg", OpenMode.Output)
Print(1, "True") 'AuBoutonToolStripMenuItem
FileClose(1)
ÀLaSaisieToolStripMenuItem.Checked = False
AuBoutonToolStripMenuItem.Checked = True
End Sub
Private Sub AvoirUnMessageDerreurSiAucuneCarteTrouvéeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AvoirUnMessageDerreurSiAucuneCarteTrouvéeToolStripMenuItem.Click
If AvoirUnMessageDerreurSiAucuneCarteTrouvéeToolStripMenuItem.Checked = True Then
' Sauvegarde dans fichier des settings
FileOpen(1, ChemAppli + "settingsMessCartPasTrouve.cfg", OpenMode.Output)
Print(1, "False") ' AvoirUnMessageDerreurSiAucuneCarteTrouvéeToolStripMenuItem
FileClose(1)
AvoirUnMessageDerreurSiAucuneCarteTrouvéeToolStripMenuItem.Checked = False
Else
' Sauvegarde dans fichier des settings
FileOpen(1, ChemAppli + "settingsMessCartPasTrouve.cfg", OpenMode.Output)
Print(1, "True") ' AvoirUnMessageDerreurSiAucuneCarteTrouvéeToolStripMenuItem
FileClose(1)
AvoirUnMessageDerreurSiAucuneCarteTrouvéeToolStripMenuItem.Checked = True
End If
End Sub
'=============================================================
'Gestion de la recherche rapide de carte et choix du format
'=============================================================
Private Sub RechRapCarte_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles RechRapCarte.KeyDown
If e.KeyCode = Keys.Enter Then
RechOK_Click(RechOK, e)
End If
End Sub
Private Sub RechRapCarte_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RechRapCarte.TextChanged
If ÀLaSaisieToolStripMenuItem.Checked = True Then RechOK_Click(RechOK, e)
End Sub
Private Sub RechOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RechOK.Click
AlgoRecherche(RechRapCarte.Text)
End Sub
Public Sub AlgoRecherche(ByVal txt As String)
Dim pos As Integer
Dim pos_min As Integer = 0
Dim pos_max As Integer = nCartes - 1
While pos_max <> pos_min + 1
pos = Int(1 / 2 * (pos_max + pos_min))
If LCase(Replace(Replace(DataGridList.Item(0, pos).Value, "'", ""), "-", "")) > LCase(Replace(Replace(Replace(txt, "'", ""), "_", "0"), "-", "")) Then
pos_max = pos
Else
pos_min = pos
End If
End While
pos = pos_min
If Microsoft.VisualBasic.Left(LCase(DataGridList.Item(0, pos_min).Value), txt.Length) <> LCase(txt) Then
pos = pos_max
End If
If AvoirUnMessageDerreurSiAucuneCarteTrouvéeToolStripMenuItem.Checked = True And Microsoft.VisualBasic.Left(LCase(DataGridList.Item(0, pos).Value), txt.Length) <> LCase(txt) Then
MsgBox(LanguageTxt(11, 77) + " """ + txt + """ " + LanguageTxt(11, 78) + ".", MsgBoxStyle.Exclamation)
Else
If DataGridList.Rows(pos).Visible = True Then
DataGridList.FirstDisplayedScrollingRowIndex = max(pos - Int(DataGridList.DisplayedRowCount(False) / 2), 0)
DataGridList.Rows(pos).Selected = True
DataGridList.Item(1, pos).Selected = True
Actualise(pos, DataGridList)
Else
MsgBox(LanguageTxt(11, 77) + " """ + txt + """ " + LanguageTxt(11, 78) + " " + LanguageTxt(11, 79) + ".", MsgBoxStyle.Exclamation)
End If
End If
If AuBoutonToolStripMenuItem.Checked = True Then DataGridList.Select()
End Sub
Private Sub CmBoxFormat_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmBoxFormat.TextChanged
nCartesVis = nCartes
Dim frmt As String = ""
If CmBoxFormat.Text = LanguageTxt(11, 49) Then frmt = "tlf"
If CmBoxFormat.Text = "T1 [Vintage]" Then frmt = " T1 "
If CmBoxFormat.Text = "T1.5 [Legacy]" Then frmt = " T1.5 "
If CmBoxFormat.Text = "T1.X [Extended]" Then frmt = " T1.x "
If CmBoxFormat.Text = "T2 [Standard]" Then frmt = " T2 "
If CmBoxFormat.Text = LanguageTxt(11, 50) Then frmt = " B "
Dim nloop As Integer
Dim ARougir() As Integer
Dim AJaunir() As Integer
Dim nrouge As Integer = 0
Dim njaune As Integer = 0
If frmt <> "tlf" Then filtragebar.Show()
filtragebar.Fbar.Style = ProgressBarStyle.Continuous
filtragebar.Fbar.Value = 0
' DataGridList.Hide()
If frmt = "tlf" Then
blanchirAll()
End If
If frmt <> "tlf" Then
For nloop = 0 To nCartes - 1
If InStr(DataGridList.Item(15, nloop).Value, frmt) = 0 And InStr(DataGridList.Item(15, nloop).Value, " r" + Replace(frmt, " ", "") + " ") = 0 Then
ReDim Preserve ARougir(nrouge)
ARougir(nrouge) = nloop
nrouge = nrouge + 1
End If
If InStr(DataGridList.Item(15, nloop).Value, " r" + Replace(frmt, " ", "") + " ") > 0 Then
ReDim Preserve AJaunir(njaune)
AJaunir(njaune) = nloop
njaune = njaune + 1
End If
filtragebar.Fbar.Value = Int(100 * nloop / nCartes)
Next
End If
blanchirAll()
If nrouge > 0 Then
surligner(ARougir, Color.FromArgb(255, 221, 221))
End If
If njaune > 0 Then
surligner(AJaunir, Color.FromArgb(255, 255, 221))
End If
nCartesVis = nCartes - nrouge
GroupBxList.Text = LanguageTxt(11, 1) + " (" + CStr(nCartesVis) + " " + LanguageTxt(11, 2) + " " + CStr(nCartes) + ")"
If frmt <> "tlf" Then filtragebar.Close()
DataGridList.Select()
End Sub
'=============================================================
' Gestion du menu clic droit sur les header des colonnes
'=============================================================
Private Sub DataGridList_ColumnHeaderMouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles DataGridList.ColumnHeaderMouseClick, DataGridList.ColumnHeaderMouseClick
Dim i As Integer = 0
Dim Length As Integer = 0
DataGridList.ContextMenuStrip = Me.MenuColonne
For i = 0 To DataGridList.ColumnCount - 1
If DataGridList.Columns(i).Displayed = True And DataGridList.Columns(i).DisplayIndex < DataGridList.Columns(e.ColumnIndex).DisplayIndex Then
Length = Length + DataGridList.Columns(i).Width
End If
Next
DataGridList.ContextMenuStrip.Show(sender, Length + e.Location.X, e.Location.Y)
DataGridList.ContextMenuStrip = Me.MenuCarte
End Sub
Private Sub TailleAutomatiqueToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TailleAutomatiqueToolStripMenuItem.Click
If TailleAutomatiqueToolStripMenuItem.Checked = False Then
TailleAutomatiqueToolStripMenuItem.Checked = True
DataGridList.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
Else
TailleAutomatiqueToolStripMenuItem.Checked = False
DataGridList.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.None
End If
End Sub
Private Sub AffichageDesColonnesToolStripMenuItem_DropDownOpened(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AffichageDesColonnesToolStripMenuItem.DropDownOpened
MenuColonne.AutoClose = False
AffichageDesColonnesToolStripMenuItem.DropDown.AutoClose = False
End Sub
' Menu déroulant de affichage colonne
Private Sub ÉditionToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ÉditionToolStripMenuItem.Click
If ÉditionToolStripMenuItem.Checked = False Then
ÉditionToolStripMenuItem.Checked = True
Else
ÉditionToolStripMenuItem.Checked = False
End If
End Sub
Private Sub CoûtDeManaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CoûtDeManaToolStripMenuItem.Click
If CoûtDeManaToolStripMenuItem.Checked = False Then
CoûtDeManaToolStripMenuItem.Checked = True
Else
CoûtDeManaToolStripMenuItem.Checked = False
End If
End Sub
Private Sub CoûtConvertiDeManaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CoûtConvertiDeManaToolStripMenuItem.Click
If CoûtConvertiDeManaToolStripMenuItem.Checked = False Then
CoûtConvertiDeManaToolStripMenuItem.Checked = True
Else
CoûtConvertiDeManaToolStripMenuItem.Checked = False
End If
End Sub
Private Sub TypeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TypeToolStripMenuItem.Click
If TypeToolStripMenuItem.Checked = False Then
TypeToolStripMenuItem.Checked = True
Else
TypeToolStripMenuItem.Checked = False
End If
End Sub
Private Sub CouleurToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CouleurToolStripMenuItem.Click
If CouleurToolStripMenuItem.Checked = False Then
CouleurToolStripMenuItem.Checked = True
Else
CouleurToolStripMenuItem.Checked = False
End If
End Sub
Private Sub ManaProduitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ManaProduitToolStripMenuItem.Click
If ManaProduitToolStripMenuItem.Checked = False Then
ManaProduitToolStripMenuItem.Checked = True
Else
ManaProduitToolStripMenuItem.Checked = False
End If
End Sub
Private Sub ForceEnduranceToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ForceEnduranceToolStripMenuItem.Click
If ForceEnduranceToolStripMenuItem.Checked = False Then
ForceEnduranceToolStripMenuItem.Checked = True
Else
ForceEnduranceToolStripMenuItem.Checked = False
End If
End Sub
Private Sub RaretéToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RaretéToolStripMenuItem.Click
If RaretéToolStripMenuItem.Checked = False Then
RaretéToolStripMenuItem.Checked = True
Else
RaretéToolStripMenuItem.Checked = False
End If
End Sub
Private Sub CotationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CotationToolStripMenuItem.Click
If CotationToolStripMenuItem.Checked = False Then
CotationToolStripMenuItem.Checked = True
Else
CotationToolStripMenuItem.Checked = False
End If
End Sub
Private Sub FermerEtAppliquerToolStripMenuItem_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles FermerEtAppliquerToolStripMenuItem.MouseDown
MenuColonne.AutoClose = True
AffichageDesColonnesToolStripMenuItem.DropDown.AutoClose = True
End Sub
Private Sub FermerEtAppliquerToolStripMenuItem_MouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles FermerEtAppliquerToolStripMenuItem.MouseUp
If ÉditionToolStripMenuItem.Checked = True Then
DataGridList.Columns(1).Visible = True
Else
DataGridList.Columns(1).Visible = False
End If
If CoûtDeManaToolStripMenuItem.Checked = True Then
DataGridList.Columns(13).Visible = True
Else
DataGridList.Columns(13).Visible = False
End If
If CoûtConvertiDeManaToolStripMenuItem.Checked = True Then
DataGridList.Columns(11).Visible = True
Else
DataGridList.Columns(11).Visible = False
End If
If TypeToolStripMenuItem.Checked = True Then
DataGridList.Columns(3).Visible = True
Else
DataGridList.Columns(3).Visible = False
End If
If CouleurToolStripMenuItem.Checked = True Then
DataGridList.Columns(2).Visible = True
Else
DataGridList.Columns(2).Visible = False
End If
If ManaProduitToolStripMenuItem.Checked = True Then
DataGridList.Columns(14).Visible = True
Else
DataGridList.Columns(14).Visible = False
End If
If ForceEnduranceToolStripMenuItem.Checked = True Then
DataGridList.Columns(4).Visible = True
Else
DataGridList.Columns(4).Visible = False
End If
If RaretéToolStripMenuItem.Checked = True Then
DataGridList.Columns(6).Visible = True
Else
DataGridList.Columns(6).Visible = False
End If
If CotationToolStripMenuItem.Checked = True Then
DataGridList.Columns(10).Visible = True
Else
DataGridList.Columns(10).Visible = False
End If
' AffichageDesColonnesToolStripMenuItem.DropDown.Close()
' MenuColonne.Close()
End Sub
Private Sub DataGridList_CellMouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles DataGridList.CellMouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
If e.RowIndex >= 0 Then
DataGridList.Item(1, e.RowIndex).Selected = True
Actualise(DataGridList.CurrentRow.Index, DataGridList)
End If
End If
End Sub
Private Sub DataGridList_CellMouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles DataGridList.CellMouseUp
If e.Button = Windows.Forms.MouseButtons.Right Then
If e.RowIndex = -1 Then DataGridList_ColumnHeaderMouseClick(sender, e)
End If
End Sub
' Fonctions locales
Private Sub Importer(ByVal odlgfilename As String)
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor
Dim TextBoxNDeck As String = ""
Dim frmt(), Txt() As String
'Importation du deck
frmt = Split(odlgfilename, ".")
'=======================
'MWS
'=======================
If frmt(frmt.Length - 1) = "mwDeck" Then
Txt = Split(odlgfilename, "")
TextBoxNDeck = Replace(Txt(Txt.Length - 1), ".mwDeck", "")
Dim DeckTemp As New ListeDeck
DeckTemp.Text = TextBoxNDeck
DeckTemp.Name = TextBoxNDeck
Me.ComboBoxDeck.Enabled = True
Me.ComboBoxDeck.Items.Add(TextBoxNDeck)
ReDim Preserve Listdeck(Me.ComboBoxDeck.Items.Count - 1)
Listdeck(Me.ComboBoxDeck.Items.Count - 1) = DeckTemp
' Importation Cartes
Dim pos As Integer
Dim pos_min As Integer = 0
Dim pos_max As Integer = nCartes - 1
Dim sptline() As String
Dim sptline0() As String
Dim isdeck As Boolean = False
Dim isside As Boolean = False
Dim skip As Boolean = False
Dim PasOK() As String = New String() {}
FileOpen(1, odlgfilename, OpenMode.Input)
While Not EOF(1)
skip = False
sptline = Split(LineInput(1), "]")
sptline0 = Split(Replace(sptline(0), "SB:", ""), "[")
If sptline(0) = "" Then
skip = True
End If
If InStr(sptline(0), "// Deck file for Magic Workstation") > 0 Or InStr(sptline(0), "// NAME:") > 0 Or InStr(sptline(0), "// COMMENT:") > 0 Or InStr(sptline(0), "// AUTHOR:") > 0 Then
skip = True
End If
If InStr(sptline(0), "// Lands") > 0 Then
sptline = Split(LineInput(1), "]")
sptline0 = Split(Replace(sptline(0), "SB:", ""), "[")
isdeck = True
End If
If InStr(sptline(0), "// Creatures") > 0 Then
sptline = Split(LineInput(1), "]")
sptline0 = Split(Replace(sptline(0), "SB:", ""), "[")
isdeck = True
End If
If InStr(sptline(0), "// Spells") > 0 Then
sptline = Split(LineInput(1), "]")
sptline0 = Split(Replace(sptline(0), "SB:", ""), "[")
isdeck = True
End If
If InStr(sptline(0), "// Sideboard") > 0 Then
isdeck = False
isside = False
End If
If (isdeck = True Or isside = True) And skip = False Then
Dim findOK As Boolean = False
Dim nbre_illus() As String
Dim illus As Integer = Nothing
nbre_illus = Split(sptline(1), "(")
If nbre_illus.Length > 1 Then
illus = Val(Replace(nbre_illus(nbre_illus.Length - 1), ")", ""))
End If
pos_min = 0
pos_max = nCartes - 1
While pos_max <> pos_min + 1
pos = Int(1 / 2 * (pos_max + pos_min))
If LCase(Replace(Replace(DataGridList.Item(0, pos).Value, "'", ""), "-", "")) > RTrim(LTrim(LCase(Replace(Replace(Replace(Replace(Replace(Replace(Replace(sptline(1), "(1)", ""), "(2)", ""), "(3)", ""), "(4)", ""), "'", ""), "_", "0"), "-", "")))) Then
pos_max = pos
Else
pos_min = pos
End If
End While
pos = pos_min
If LCase(Replace(Replace(sptline(1), "'", ""), "-", "")) = LCase(Replace(Replace(DataGridList.Item(0, nCartes - 1).Value, "'", ""), "-", "")) Then
pos = nCartes - 1
End If
While DataGridList.Item(0, pos).Value = DataGridList.Item(0, CInt(max(pos - 1, 0))).Value And pos > 0
pos = pos - 1
If pos < 0 Then
pos = 0
Exit While
End If
pos_min = pos
End While
If pos < nCartes - 1 Then
While DataGridList.Item(0, pos + 1).Value = DataGridList.Item(0, pos).Value
pos = pos + 1
If pos > nCartes - 1 Then
pos = nCartes - 1
Exit While
End If
End While
End If
If sptline0(1) = "JSS" Or sptline0(1) = "ARE" Or sptline0(1) = "PRE" Or sptline0(1) = "REW" Or sptline0(1) = "GTW" Or sptline0(1) = "CHP" Or sptline0(1) = "JGC" Or sptline0(1) = "REL" Or sptline0(1) = "MPS" Or sptline0(1) = "GUR" Or sptline0(1) = "EUL" Or sptline0(1) = "APL" Then
sptline0(1) = "PR"
End If
While pos > pos_min - 1
If DataGridList.Item(1, pos).Value = RTrim(LTrim(sptline0(1))) And DataGridList.Item(9, pos).Value = illus Then
If isdeck = True Then addcarte(Listdeck(Me.ComboBoxDeck.Items.Count - 1), Listdeck(Me.ComboBoxDeck.Items.Count - 1).DataGridDeck, Me.DataGridList, Val(sptline0(0)), pos)
If isside = True Then addcarte(Listdeck(Me.ComboBoxDeck.Items.Count - 1), Listdeck(Me.ComboBoxDeck.Items.Count - 1).DataGridSide, Me.DataGridList, Val(sptline0(0)), pos)
findOK = True
End If
'=============================================================
' Gestion du programme
'=============================================================
Public Sub New()
' Cet appel est requis par le Concepteur Windows Form.
InitializeComponent()
Me.Visible = False
Me.DoubleBuffered = True
' Options des menus
Preferences()
' Options de display de la fenetre
Dim workingRectangle As System.Drawing.Rectangle = _
Screen.PrimaryScreen.WorkingArea
Me.Size = New System.Drawing.Size(615, workingRectangle.Height)
Me.StartPosition = FormStartPosition.Manual
Me.Location = New Point(0, 0)
' Ajoutez une initialisation quelconque après l'appel InitializeComponent().
End Sub
Public Sub Preferences()
'========================
' Gestion des Préférences
'========================
' Taux de conversion Euro/Dollar pour les cotations
If FileExists(Chemappli + "settingsEuroDollar.cfg") = False Then
EuroDollar = 1.25
Else
FileOpen(1, Chemappli + "settingsEuroDollar.cfg", OpenMode.Input)
EuroDollar = Val(Replace(LineInput(1), ",", "."))
FileClose(1)
End If
' Chemin des decks par défaut
'------------------------------------------------
If FileExists(Chemappli + "settingsChemDeck.cfg") = False Then
CheminDeck = Chemappli + "Decks"
Else
FileOpen(1, Chemappli + "settingsChemDeck.cfg", OpenMode.Input)
CheminDeck = LineInput(1)
FileClose(1)
End If
' Récemment ouverts
'------------------------------------------------
If FileExists(Chemappli + "settingsRecent1.cfg") = True Then
FileOpen(1, Chemappli + "settingsRecent1.cfg", OpenMode.Input)
Récent1ToolStripMenuItem.Text = LineInput(1)
Récent1ToolStripMenuItem.Tag = LineInput(1)
FileClose(1)
End If
If FileExists(Chemappli + "settingsRecent2.cfg") = True Then
FileOpen(1, Chemappli + "settingsRecent2.cfg", OpenMode.Input)
Récent2ToolStripMenuItem.Text = LineInput(1)
Récent2ToolStripMenuItem.Tag = LineInput(1)
FileClose(1)
End If
If FileExists(Chemappli + "settingsRecent3.cfg") = True Then
FileOpen(1, Chemappli + "settingsRecent3.cfg", OpenMode.Input)
Récent3ToolStripMenuItem.Text = LineInput(1)
Récent3ToolStripMenuItem.Tag = LineInput(1)
FileClose(1)
End If
' Message d'erreur si carte pas trouvée
'------------------------------------------------
If FileExists(Chemappli + "settingsMessCartPasTrouve.cfg") = False Then
AvoirUnMessageDerreurSiAucuneCarteTrouvéeToolStripMenuItem.Checked = False
Else
FileOpen(1, Chemappli + "settingsMessCartPasTrouve.cfg", OpenMode.Input)
AvoirUnMessageDerreurSiAucuneCarteTrouvéeToolStripMenuItem.Checked = LineInput(1)
FileClose(1)
End If
' A La Saisie / Au bouton
'------------------------------------------------
If FileExists(Chemappli + "settingsALaSaisie.cfg") = False Then
ÀLaSaisieToolStripMenuItem.Checked = False
Else
FileOpen(1, Chemappli + "settingsALaSaisie.cfg", OpenMode.Input)
ÀLaSaisieToolStripMenuItem.Checked = LineInput(1)
FileClose(1)
End If
If FileExists(Chemappli + "settingsAuBouton.cfg") = False Then
AuBoutonToolStripMenuItem.Checked = True
Else
FileOpen(1, Chemappli + "settingsAuBouton.cfg", OpenMode.Input)
AuBoutonToolStripMenuItem.Checked = LineInput(1)
FileClose(1)
End If
' Image des cartes
'------------------------------------------------
If FileExists(Chemappli + "settingsImStyle.cfg") = False Then
SansIllustrationsToolStripMenuItem.Checked = True
HybrideToolStripMenuItem.Checked = False
SurInternetToolStripMenuItem.Checked = False
EnLocalToolStripMenuItem.Checked = False
Else
FileOpen(1, Chemappli + "settingsImStyle.cfg", OpenMode.Input)
SansIllustrationsToolStripMenuItem.Checked = LineInput(1)
HybrideToolStripMenuItem.Checked = LineInput(1)
SurInternetToolStripMenuItem.Checked = LineInput(1)
EnLocalToolStripMenuItem.Checked = LineInput(1)
FileClose(1)
Dim e As New System.EventArgs
If SansIllustrationsToolStripMenuItem.Checked = True Then
SansIllustrationsToolStripMenuItem_Click(Me, e)
End If
End If
'Sur internet
If FileExists(Chemappli + "settingsChemInt.cfg") = False Then
CheminInternet = "http://www.wizards.com/global/images/magic/"
Else
FileOpen(1, Chemappli + "settingsChemInt.cfg", OpenMode.Input)
CheminInternet = LineInput(1)
FileClose(1)
End If
'En Local
If FileExists(Chemappli + "settingsChemIm.cfg") = False Then
CheminIm.ChemTxt.Text = Chemappli + "Pics"
CheminImage = Chemappli + "Pics"
Else
FileOpen(1, Chemappli + "settingsChemIm.cfg", OpenMode.Input)
CheminIm.ChemTxt.Text = LineInput(1)
CheminIm.CBFormt.SelectedItem = LineInput(1)
FileClose(1)
End If
If EnLocalToolStripMenuItem.Checked = True Then
CheminImage = CheminIm.ChemTxt.Text
CheminImageExt = CheminIm.CBFormt.SelectedItem
End If
End Sub
Private Sub ListeCarte_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
Dim i As Integer = Listdeck.Length
While i > 0
Listdeck(0).Close()
i = i - 1
End While
' Termine le programme
End
End Sub
Public Sub ListeCarte_Resize(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Resize
Dim i As Integer
Dim workingRectangle As System.Drawing.Rectangle = Screen.PrimaryScreen.WorkingArea
If Me.ButtonLock.Tag = True Then
If WindowState = FormWindowState.Minimized Then
For i = 0 To Listdeck.Length - 1
Listdeck(i).WindowState = FormWindowState.Minimized
Next
End If
If WindowState = FormWindowState.Normal Then
Try
If Listdeck(0).WindowState = FormWindowState.Minimized Then Listdeck(0).WindowState = FormWindowState.Maximized 'correction bug menu
Catch ex As Exception
End Try
For i = 0 To Listdeck.Length - 1
Listdeck(i).WindowState = FormWindowState.Normal
Listdeck(i).Size = New System.Drawing.Size((1150 - Me.Width), workingRectangle.Height)
Listdeck(i).Location = New Point(Me.Width, 0)
Next
Try
Listdeck(ComboBoxDeck.SelectedIndex).BringToFront()
Catch ex As Exception
End Try
End If
End If
PictureBoxCarte.Width = 200 '271
PictureBoxCarte.Height = 285 '379
Dim LargeurBord As Integer = 10
PictureBoxfond.Width = PictureBoxCarte.Width + LargeurBord * 2
PictureBoxfond.Height = PictureBoxCarte.Height + LargeurBord * 2
PanelTxtCapa.Width = PictureBoxfond.Width
PictureBoxCarte.Location = New System.Drawing.Point(PictureBoxfond.Location.X + LargeurBord, PictureBoxfond.Location.Y + LargeurBord)
CardTitle.Width = PictureBoxfond.Width - LargeurBord
CardType.Width = PictureBoxfond.Width - LargeurBord
CardEd.Width = PictureBoxfond.Width - LargeurBord
CardCout.Width = 5 / 6 * (PictureBoxfond.Width - LargeurBord)
CardCapa.Width = PictureBoxfond.Width - 16
CardFE.Width = PictureBoxfond.Width - LargeurBord
DataGridList.Width = Me.Width - PictureBoxfond.Width - LargeurBord * 4 - 40
DataGridList.Height = Me.Height - GroupBxList.Location.Y - 93
GroupBxList.Width = DataGridList.Width + 2 * 8
GroupBxList.Height = DataGridList.Height
RechRapCarte.Width = GroupBxList.Width - RechOK.Width - LargeurBord
CmBoxFormat.Width = 125
GrBoxDeck.Location = New System.Drawing.Point(GroupBxImgCarte.Width + 23, 27)
GrBoxFormat.Location = New System.Drawing.Point(GroupBxImgCarte.Width + 23, GrBoxDeck.Location.Y + GrBoxDeck.Height + 7)
ButtonRechAv.Location = New System.Drawing.Point(GrBoxFormat.Location.X + GrBoxFormat.Width + LargeurBord, GrBoxFormat.Location.Y + GrBoxFormat.Height - ButtonRechAv.Height)
ButtonAnnulFiltr.Location = New System.Drawing.Point(GrBoxFormat.Location.X + GrBoxFormat.Width + LargeurBord, ButtonRechAv.Location.Y - ButtonAnnulFiltr.Height - 2)
ButtonUp.Location = New System.Drawing.Point(ButtonAnnulFiltr.Location.X + ButtonAnnulFiltr.Width + 2, ButtonAnnulFiltr.Location.Y)
ButtonDown.Location = New System.Drawing.Point(ButtonRechAv.Location.X + ButtonRechAv.Width + 2, ButtonRechAv.Location.Y)
ButtonToSide.Location = New System.Drawing.Point(ButtonDown.Location.X + ButtonDown.Width + 9, ButtonDown.Location.Y + ButtonDown.Height - ButtonToSide.Height)
ButtonToSide4.Location = New System.Drawing.Point(ButtonToSide.Location.X + ButtonToSide.Width + 2, ButtonToSide.Location.Y)
ButtonToDeck.Location = New System.Drawing.Point(ButtonToSide.Location.X, ButtonToSide.Location.Y - ButtonToDeck.Height - 2)
ButtonToDeck4.Location = New System.Drawing.Point(ButtonToDeck.Location.X + ButtonToDeck.Width + 2, ButtonToDeck.Location.Y)
ButtonToCollection.Location = New System.Drawing.Point(ButtonToSide.Location.X, ButtonToDeck.Location.Y - ButtonToCollection.Height - 2)
RechRapCarte.Location = New System.Drawing.Point(GrBoxFormat.Location.X, GrBoxFormat.Location.Y + GrBoxFormat.Height + 9)
RechOK.Location = New System.Drawing.Point(GrBoxFormat.Location.X + RechRapCarte.Width + 10, GrBoxFormat.Location.Y + GrBoxFormat.Height + 7)
GroupBxList.Location = New System.Drawing.Point(GrBoxFormat.Location.X, RechOK.Location.Y + RechOK.Height + 7)
GroupBxImgCarte.Location = New System.Drawing.Point(12, 27)
GrpBoxLegal.Location = New System.Drawing.Point(GroupBxImgCarte.Location.X, GroupBxImgCarte.Location.Y + GroupBxImgCarte.Height + LargeurBord)
GroupBxInfoCarte.Location = New System.Drawing.Point(GrpBoxLegal.Location.X, GrpBoxLegal.Location.Y + GrpBoxLegal.Height + LargeurBord)
' Gestion espacement dans BoxLegal
GrpBoxLegal.Width = GroupBxImgCarte.Width
Dim LargeurBord2 = (GrpBoxLegal.Width - 5 * 27 - 4 * LargeurBord) 2
PictBoxB.Location = New System.Drawing.Point(LargeurBord2, 19)
PictBoxT2.Location = New System.Drawing.Point(27 + LargeurBord + LargeurBord2, 19)
PictBoxT1X.Location = New System.Drawing.Point(2 * (27 + LargeurBord) + LargeurBord2, 19)
PictBoxT15.Location = New System.Drawing.Point(3 * (27 + LargeurBord) + LargeurBord2, 19)
PictBoxT1.Location = New System.Drawing.Point(4 * (27 + LargeurBord) + LargeurBord2, 19)
PanelTxtCapa.Height = (GroupBxList.Location.Y - 28) + GroupBxList.Height - (GroupBxImgCarte.Height + LargeurBord + GrpBoxLegal.Height + LargeurBord) - CardRegle.Height - CardCote.Height - 5
GroupBxInfoCarte.Height = PanelTxtCapa.Height
CardCapa.Height = PanelTxtCapa.Height - CardCapa.Location.Y - CardRegle.Height - CardCote.Height - 20
CardFE.Location = New Point(CardType.Location.X, CardCapa.Location.Y + 18 + min(CardCapa.Font.Height * CardCapa.GetLineFromCharIndex(Len(CardCapa.Text)), CardCapa.Height - 10))
CardRegle.Location = New Point(CardType.Location.X, CardCapa.Location.Y + 18 + min(CardCapa.Font.Height * CardCapa.GetLineFromCharIndex(Len(CardCapa.Text)), CardCapa.Height - 10))
CardCote.Location = New Point(CardRegle.Location.X, CardRegle.Location.Y + CardRegle.Height + 4)
CardCotelk.Location = CardCote.Location
CardFE.BackColor = Color.White
Me.Refresh()
End Sub
Private Sub ListeCarte_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Icone
Me.Icon = New System.Drawing.Icon(ChemAppli + "MW RessourcesMagic Wizard_32.ico")
Dim langue As String
'==========================
' Paramètres linguistiques
'==========================
If FileExists(ChemAppli + "settingslanguageChoixLang.cfg") = True Then
FileOpen(1, ChemAppli + "settingslanguageChoixLang.cfg", OpenMode.Input)
langue = LineInput(1)
FileClose(1)
Else
langue = FrançaisToolStripMenuItem.Tag
FileOpen(1, ChemAppli + "settingslanguageChoixLang.cfg", OpenMode.Output)
Print(1, langue)
WriteLine(1)
FileClose(1)
End If
' Enabled = True pour les fichiers langues présents
If FileExists(ChemAppli + "settingslanguageFR.lang") Then FrançaisToolStripMenuItem.Enabled = True
If FileExists(ChemAppli + "settingslanguageEN.lang") Then EnglishToolStripMenuItem.Enabled = True
If FileExists(ChemAppli + "settingslanguageES.lang") Then SpanishToolStripMenuItem.Enabled = True
If FileExists(ChemAppli + "settingslanguageDE.lang") Then DeutschToolStripMenuItem.Enabled = True
If FileExists(ChemAppli + "settingslanguageIT.lang") Then ItalianoToolStripMenuItem.Enabled = True
If FileExists(ChemAppli + "settingslanguagePT.lang") Then PortuguêsToolStripMenuItem.Enabled = True
If FileExists(ChemAppli + "settingslanguageNL.lang") Then NederlandsToolStripMenuItem.Enabled = True
If FileExists(ChemAppli + "settingslanguageNO.lang") Then NorskToolStripMenuItem.Enabled = True
If FileExists(ChemAppli + "settingslanguageRU.lang") Then RussianToolStripMenuItem.Enabled = True
If FileExists(Chemappli + "settingslanguageCN.lang") Then ChineseToolStripMenuItem.Enabled = True
If FileExists(Chemappli + "settingslanguageJP.lang") Then JapaneseToolStripMenuItem.Enabled = True
If FileExists(Chemappli + "settingslanguageKR.lang") Then KoreanToolStripMenuItem.Enabled = True
'image drapeau
Try
FrançaisToolStripMenuItem.Image = Image.FromFile(Chemappli + "MW RessourcesflagsFR" + extension)
Catch ex As Exception
End Try
Try
EnglishToolStripMenuItem.Image = Image.FromFile(Chemappli + "MW RessourcesflagsEN" + extension)
Catch ex As Exception
End Try
Try
SpanishToolStripMenuItem.Image = Image.FromFile(Chemappli + "MW RessourcesflagsES" + extension)
Catch ex As Exception
End Try
Try
DeutschToolStripMenuItem.Image = Image.FromFile(Chemappli + "MW RessourcesflagsDE" + extension)
Catch ex As Exception
End Try
Try
ItalianoToolStripMenuItem.Image = Image.FromFile(Chemappli + "MW RessourcesflagsIT" + extension)
Catch ex As Exception
End Try
Try
PortuguêsToolStripMenuItem.Image = Image.FromFile(Chemappli + "MW RessourcesflagsPT" + extension)
Catch ex As Exception
End Try
Try
NorskToolStripMenuItem.Image = Image.FromFile(Chemappli + "MW RessourcesflagsNO" + extension)
Catch ex As Exception
End Try
Try
RussianToolStripMenuItem.Image = Image.FromFile(Chemappli + "MW RessourcesflagsRU" + extension)
Catch ex As Exception
End Try
Try
ChineseToolStripMenuItem.Image = Image.FromFile(Chemappli + "MW RessourcesflagsCN" + extension)
Catch ex As Exception
End Try
Try
JapaneseToolStripMenuItem.Image = Image.FromFile(Chemappli + "MW RessourcesflagsJP" + extension)
Catch ex As Exception
End Try
Try
KoreanToolStripMenuItem.Image = Image.FromFile(Chemappli + "MW RessourcesflagsKR" + extension)
Catch ex As Exception
End Try
' test sur la langue
If FrançaisToolStripMenuItem.Tag = langue Then FrançaisToolStripMenuItem.Checked = True
If EnglishToolStripMenuItem.Tag = langue Then EnglishToolStripMenuItem.Checked = True
If SpanishToolStripMenuItem.Tag = langue Then SpanishToolStripMenuItem.Checked = True
If DeutschToolStripMenuItem.Tag = langue Then DeutschToolStripMenuItem.Checked = True
If ItalianoToolStripMenuItem.Tag = langue Then ItalianoToolStripMenuItem.Checked = True
If PortuguêsToolStripMenuItem.Tag = langue Then PortuguêsToolStripMenuItem.Checked = True
If NederlandsToolStripMenuItem.Tag = langue Then NederlandsToolStripMenuItem.Checked = True
If NorskToolStripMenuItem.Tag = langue Then NorskToolStripMenuItem.Checked = True
If RussianToolStripMenuItem.Tag = langue Then RussianToolStripMenuItem.Checked = True
If ChineseToolStripMenuItem.Tag = langue Then ChineseToolStripMenuItem.Checked = True
If JapaneseToolStripMenuItem.Tag = langue Then JapaneseToolStripMenuItem.Checked = True
If KoreanToolStripMenuItem.Tag = langue Then KoreanToolStripMenuItem.Checked = True
'Lang txt
FichierToolStripMenuItem.Text = LanguageTxt(11, 3)
ActionToolStripMenuItem.Text = LanguageTxt(11, 4)
JouerToolStripMenuItem.Text = LanguageTxt(11, 5)
OptionsToolStripMenuItem.Text = LanguageTxt(11, 6)
NouveauToolStripMenuItem.Text = LanguageTxt(11, 7)
OuvrirToolStripMenuItem.Text = LanguageTxt(11, 8)
ToolStripMenuItem1.Text = LanguageTxt(11, 9)
MettreÀJourLesCotationsToolStripMenuItem.Text = LanguageTxt(11, 10)
ImporterDeckToolStripMenuItem.Text = LanguageTxt(11, 11)
GestionnaireDeDecksToolStripMenuItem.Text = LanguageTxt(11, 12)
FermerToolStripMenuItem.Text = LanguageTxt(11, 13)
OutilsToolStripMenuItem.Text = LanguageTxt(3, 3)
RechercheAvancéeDuneCarteToolStripMenuItem.Text = LanguageTxt(11, 14)
RemettreLesFiltresÀZéroToolStripMenuItem.Text = LanguageTxt(11, 15)
AjoutezLaCarteAuDeckToolStripMenuItem.Text = LanguageTxt(11, 16)
AjoutezLePlaysetAuDeckToolStripMenuItem.Text = LanguageTxt(11, 17)
AjoutezLaCarteÀLaRéserveToolStripMenuItem.Text = LanguageTxt(11, 18)
AjoutezLePlaysetÀLaRéserveToolStripMenuItem.Text = LanguageTxt(11, 19)
AjouterÀLaCollectionToolStripMenuItem.Text = LanguageTxt(11, 20)
GestionnaireDeCollectionToolStripMenuItem.Text = LanguageTxt(11, 21)
CollectionDeJetonsToolStripMenuItem.Text = LanguageTxt(11, 22)
ConsulterLeLivretDeRèglesToolStripMenuItem.Text = LanguageTxt(11, 23)
JouerEnModeSoloToolStripMenuItem.Text = LanguageTxt(11, 24)
JouerEnLigneToolStripMenuItem.Text = LanguageTxt(11, 25)
RechercheRapideDuneCarteToolStripMenuItem.Text = LanguageTxt(11, 26)
ÀLaSaisieToolStripMenuItem.Text = LanguageTxt(11, 27)
AuBoutonToolStripMenuItem.Text = LanguageTxt(11, 28)
AvoirUnMessageDerreurSiAucuneCarteTrouvéeToolStripMenuItem.Text = LanguageTxt(11, 29)
RésultatDeLaRechercheToolStripMenuItem.Text = LanguageTxt(11, 30)
SurlignerToolStripMenuItem.Text = LanguageTxt(11, 31)
MasquerToolStripMenuItem.Text = LanguageTxt(11, 32)
IllustrationsDesCartesToolStripMenuItem.Text = LanguageTxt(11, 33)
SurInternetToolStripMenuItem.Text = LanguageTxt(11, 34)
EnLocalToolStripMenuItem.Text = LanguageTxt(11, 35)
HybrideToolStripMenuItem.Text = LanguageTxt(11, 36)
SansIllustrationsToolStripMenuItem.Text = LanguageTxt(11, 37)
DispositionDesFenêtresToolStripMenuItem.Text = LanguageTxt(11, 38)
LiéesToolStripMenuItem.Text = LanguageTxt(11, 39)
NonLiéesToolStripMenuItem.Text = LanguageTxt(11, 40)
ParamètresLinguistiquesToolStripMenuItem.Text = LanguageTxt(11, 41)
GroupBxImgCarte.Text = LanguageTxt(11, 42)
GrBoxDeck.Text = LanguageTxt(11, 43)
ComboBoxDeck.Text = LanguageTxt(11, 44)
GrBoxFormat.Text = LanguageTxt(11, 48)
CmBoxFormat.Items.Item(0) = LanguageTxt(11, 49)
CmBoxFormat.Items.Item(5) = LanguageTxt(11, 50)
RechOK.Text = LanguageTxt(11, 51)
GrpBoxLegal.Text = LanguageTxt(11, 52)
GroupBxInfoCarte.Text = LanguageTxt(11, 53)
CardRegle.Text = LanguageTxt(11, 56)
' Tooltip
ToolTip1.SetToolTip(ButtonToCollection, LanguageTxt(11, 20))
ToolTip1.SetToolTip(ButtonToDeck, LanguageTxt(11, 16))
ToolTip1.SetToolTip(ButtonToDeck4, LanguageTxt(11, 17))
ToolTip1.SetToolTip(ButtonToSide, LanguageTxt(11, 18))
ToolTip1.SetToolTip(ButtonToSide4, LanguageTxt(11, 19))
ToolTip1.SetToolTip(ButtonLock, LanguageTxt(11, 57))
ToolTip1.SetToolTip(ButtonRechAv, LanguageTxt(11, 14))
ToolTip1.SetToolTip(ButtonAnnulFiltr, LanguageTxt(11, 15))
ToolTip1.SetToolTip(PictBoxB, LanguageTxt(11, 58))
ToolTip1.SetToolTip(PictBoxT2, LanguageTxt(11, 59))
ToolTip1.SetToolTip(PictBoxT1X, LanguageTxt(11, 60))
ToolTip1.SetToolTip(PictBoxT15, LanguageTxt(11, 61))
ToolTip1.SetToolTip(PictBoxT1, LanguageTxt(11, 62))
ToolTip1.SetToolTip(ButtonUp, LanguageTxt(11, 63))
ToolTip1.SetToolTip(ButtonDown, LanguageTxt(11, 64))
' Menu contextuel
TailleAutomatiqueToolStripMenuItem.Text = LanguageTxt(11, 65)
AffichageDesColonnesToolStripMenuItem.Text = LanguageTxt(11, 66)
ÉditionToolStripMenuItem.Text = LanguageTxt(11, 67)
CoûtDeManaToolStripMenuItem.Text = LanguageTxt(11, 68)
CoûtConvertiDeManaToolStripMenuItem.Text = LanguageTxt(11, 69)
TypeToolStripMenuItem.Text = LanguageTxt(11, 70)
CouleurToolStripMenuItem.Text = LanguageTxt(11, 71)
ManaProduitToolStripMenuItem.Text = LanguageTxt(11, 72)
ForceEnduranceToolStripMenuItem.Text = LanguageTxt(11, 73)
RaretéToolStripMenuItem.Text = LanguageTxt(11, 74)
CotationToolStripMenuItem.Text = LanguageTxt(11, 75)
FermerEtAppliquerToolStripMenuItem.Text = LanguageTxt(11, 76)
ToolStripMenuItemD.Text = LanguageTxt(11, 16)
ToolStripMenuItemD4.Text = LanguageTxt(11, 17)
ToolStripMenuItemS.Text = LanguageTxt(11, 18)
ToolStripMenuItemS4.Text = LanguageTxt(11, 19)
AjouterLaCarteÀLaCollectionToolStripMenuItem.Text = LanguageTxt(11, 20)
If FileExists(Chemappli + "settingslock.cfg") = True Then
FileOpen(1, Chemappli + "settingslock.cfg", OpenMode.Input)
ButtonLock.Tag = LineInput(1)
FileClose(1)
Else
FileOpen(1, Chemappli + "settingslock.cfg", OpenMode.Output)
ButtonLock.Tag = True
Print(1, ButtonLock.Tag)
WriteLine(1)
FileClose(1)
End If
ButtonLock_Click(sender, e)
Me.Text = "Magic Wizard " + Numversion
nCartesVis = nCartes
GroupBxList.Text = LanguageTxt(11, 1) + " (" + CStr(nCartesVis) + " " + LanguageTxt(11, 2) + " " + CStr(nCartes) + ")"
' Ouverture automatique
Dim ext() As String = Split(ACLA, "")
Dim extf() As String = Split(ext(ext.Length - 1), ".")
If extf(extf.Length - 1) = "mwd" Then
Ouvrir(ACLA)
End If
If extf(extf.Length - 1) = "mwc" Then
Dim sender_temp As New Object
Dim e_temp As New System.EventArgs
GestionnaireDeCollectionToolStripMenuItem_Click_1(sender_temp, e_temp)
GestionnaireCollection.ouvrir(ACLA)
End If
End Sub
Private Sub ListeCarte_Shown(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Shown
ListeCarte_Resize(sender, e)
Accueil.Close()
End Sub
Private Sub DataGridList_SelectionChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DataGridList.SelectionChanged, DataGridList.SelectionChanged
Actualise(DataGridList.CurrentRow.Index, DataGridList)
End Sub
Private Sub ButtonRechAv_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRechAv.Click
RerchercheAv.Show()
End Sub
Private Sub ButtonAnnulFiltr_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonAnnulFiltr.Click
CmBoxFormat_TextChanged(CmBoxFormat, e)
End Sub
Private Sub ButtonDown_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ButtonDown.MouseDown
Dim nloop As Integer = DataGridList.CurrentRow.Index + 1
If nloop = nCartes Then
Exit Sub
End If
While DataGridList.Rows(nloop).DefaultCellStyle.BackColor = Color.FromArgb(255, 221, 221) And nloop < nCartes
nloop = nloop + 1
If nloop = nCartes Then
nloop = DataGridList.CurrentRow.Index
Exit While
End If
End While
DataGridList.FirstDisplayedScrollingRowIndex = max(nloop - Int(DataGridList.DisplayedRowCount(False) / 2), 0)
DataGridList.Item(1, nloop).Selected = True
DataGridList.Refresh()
Actualise(nloop, DataGridList)
End Sub
Private Sub ButtonUp_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ButtonUp.MouseDown
Dim nloop As Integer = DataGridList.CurrentRow.Index - 1
If nloop = -1 Then
Exit Sub
End If
While DataGridList.Rows(nloop).DefaultCellStyle.BackColor = Color.FromArgb(255, 221, 221) And nloop > -1
nloop = nloop - 1
If nloop = -1 Then
nloop = DataGridList.CurrentRow.Index
Exit While
End If
End While
DataGridList.FirstDisplayedScrollingRowIndex = max(nloop - Int(DataGridList.DisplayedRowCount(False) / 2), 0)
DataGridList.Item(1, nloop).Selected = True
DataGridList.Refresh()
Actualise(nloop, DataGridList)
End Sub
Private Sub ComboBoxDeck_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxDeck.SelectedIndexChanged
' mise à jour de la boite combobox du load pour le jeu online
If LoadOnline.Visible = True Then
LoadOnline.MAJComboboxDeck()
End If
If Listdeck.Length > 0 Then
Dim i As Integer = 0
For i = 0 To Listdeck.Length - 1
If Listdeck(i).Name = ComboBoxDeck.SelectedItem Then Exit For
Next
Listdeck(i).BringToFront()
End If
End Sub
Private Sub ButtonToDeck_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonToDeck.Click
If Listdeck.Length > 0 Then
Dim i As Integer = 0
For i = 0 To Listdeck.Length
If Listdeck(i).Name = ComboBoxDeck.SelectedItem Then Exit For
Next
addcarte(Listdeck(i), Listdeck(i).DataGridDeck, Me.DataGridList, 1, Me.DataGridList.CurrentRow.Index)
End If
End Sub
Private Sub ButtonToDeck4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonToDeck4.Click
If Listdeck.Length > 0 Then
Dim i As Integer = 0
For i = 0 To Listdeck.Length
If Listdeck(i).Name = ComboBoxDeck.SelectedItem Then Exit For
Next
addcarte(Listdeck(i), Listdeck(i).DataGridDeck, Me.DataGridList, 4, Me.DataGridList.CurrentRow.Index)
End If
End Sub
Private Sub ButtonToSide_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonToSide.Click
If Listdeck.Length > 0 Then
Dim i As Integer = 0
For i = 0 To Listdeck.Length
If Listdeck(i).Name = ComboBoxDeck.SelectedItem Then Exit For
Next
addcarte(Listdeck(i), Listdeck(i).DataGridSide, Me.DataGridList, 1, Me.DataGridList.CurrentRow.Index)
End If
End Sub
Private Sub ButtonToSide4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonToSide4.Click
If Listdeck.Length > 0 Then
Dim i As Integer = 0
For i = 0 To Listdeck.Length
If Listdeck(i).Name = ComboBoxDeck.SelectedItem Then Exit For
Next
addcarte(Listdeck(i), Listdeck(i).DataGridSide, Me.DataGridList, 4, Me.DataGridList.CurrentRow.Index)
End If
End Sub
Private Sub CardRegle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CardRegle.Click
' Recherche de la carte / dichotomie
Dim cardname As String
cardname = CardTitle.Text
Dim pos As Integer
Dim pos_min As Integer = 0
Dim pos_max As Integer = NomCartes.Length - 1
If InStr(cardname, "/") = 0 Then
While pos_max <> pos_min + 1
pos = Int(1 / 2 * (pos_max + pos_min))
If LCase(Replace(Replace(Replace(Replace(Replace(Replace(NomCartes(pos), ", ", ""), "_", "0"), "The ", ""), " ", ""), "'", ""), "-", "")) > LCase(Replace(Replace(Replace(Replace(Replace(Replace(cardname, ", ", ""), "The ", ""), " ", ""), "'", ""), "_", "0"), "-", "")) Then
pos_max = pos
Else
pos_min = pos
End If
End While
pos = pos_min
If LCase(Replace(Replace(Replace(Replace(NomCartes(pos), ", ", ""), "_", "0"), "'", ""), "-", "")) <> LCase(Replace(Replace(Replace(Replace(cardname, ", ", ""), "'", ""), "_", "0"), "-", "")) Then
pos = pos_max
End If
If LCase(Replace(Replace(Replace(Replace(NomCartes(pos), ", ", ""), "_", "0"), "'", ""), "-", "")) = LCase(Replace(Replace(Replace(Replace(cardname, ", ", ""), "'", ""), "_", "0"), "-", "")) Then
ComplementRegles.RTBCR.Rtf = "{rtf1ansi " + Replace(Replace(Replace(RulesCartes(pos), "Note -", "b Note -b0 "), "[", "i ["), "]", "] i0 ") + "}"
End If
Else 'carte double
Dim nomdouble() As String
Dim txttortbf As String = ""
Dim ii As Integer
nomdouble = Split(cardname, "/")
For ii = 0 To 1
pos_min = 0
pos_max = NomCartes.Length - 1
While pos_max <> pos_min + 1
pos = Int(1 / 2 * (pos_max + pos_min))
If LCase(Replace(Replace(Replace(Replace(Replace(Replace(NomCartes(pos), ", ", ""), "_", "0"), "The ", ""), " ", ""), "'", ""), "-", "")) > LCase(Replace(Replace(Replace(Replace(Replace(Replace(nomdouble(ii) + " (" + cardname + ")", ", ", ""), "The ", ""), " ", ""), "'", ""), "_", "0"), "-", "")) Then
pos_max = pos
Else
pos_min = pos
End If
End While
pos = pos_min
If LCase(Replace(Replace(Replace(Replace(NomCartes(pos), ", ", ""), "_", "0"), "'", ""), "-", "")) <> LCase(Replace(Replace(Replace(Replace(nomdouble(ii) + " (" + cardname + ")", ", ", ""), "'", ""), "_", "0"), "-", "")) Then
pos = pos_max
End If
If LCase(Replace(Replace(Replace(Replace(NomCartes(pos), ", ", ""), "_", "0"), "'", ""), "-", "")) = LCase(Replace(Replace(Replace(Replace(nomdouble(ii) + " (" + cardname + ")", ", ", ""), "'", ""), "_", "0"), "-", "")) Then
txttortbf = txttortbf + Replace(Replace(Replace(RulesCartes(pos), "Note -", "b Note -b0 "), "[", "i ["), "]", "] i0 ") + "par par "
End If
Next
ComplementRegles.RTBCR.Rtf = "{rtf1ansi " + Replace(Replace(Replace(txttortbf, "Note -", "b Note -b0 "), "[", "i ["), "]", "] i0 ") + "}"
End If
ComplementRegles.storecard(cardname, ComplementRegles.RTBCR.Rtf)
ConsulterLeLivretDeRèglesToolStripMenuItem.Enabled = False
CardRegle.Enabled = False
ComplementRegles.Show()
End Sub
'=============================================================
' Gestion du menu du programme principal
'=============================================================
' menu fichier
Private Sub NouveauToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NouveauToolStripMenuItem.Click
NomDeck.Show()
End Sub
Public Sub OuvrirToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OuvrirToolStripMenuItem.Click
Dim odlg As OpenFileDialog
odlg = New OpenFileDialog
odlg.DefaultExt = ".mwd"
odlg.InitialDirectory = Chemappli + "Decks"
odlg.Filter = "Magic Wizard Deck (*.mwd)|*.mwd"
odlg.RestoreDirectory = True
If odlg.ShowDialog = System.Windows.Forms.DialogResult.OK Then
Ouvrir(odlg.FileName)
End If
End Sub
Private Sub FermerToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FermerToolStripMenuItem.Click
End
End Sub
Private Sub ImporterDeckToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ImporterDeckToolStripMenuItem.Click
Dim odlg As OpenFileDialog
odlg = New OpenFileDialog
odlg.DefaultExt = ".mwd"
odlg.InitialDirectory = Chemappli + "Decks"
odlg.Filter = "MagicWorkstation (*.mwDeck)|*.mwDeck"
odlg.RestoreDirectory = True
If odlg.ShowDialog = System.Windows.Forms.DialogResult.OK Then
Importer(odlg.FileName)
End If
End Sub
Private Sub Récent1ToolStripMenuItem_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Récent1ToolStripMenuItem.TextChanged
If Récent1ToolStripMenuItem.Text <> "" And Récent1ToolStripMenuItem.Text <> Nothing Then
Récent1ToolStripMenuItem.Visible = True
ToolStripSeparator3.Visible = True
End If
End Sub
Private Sub Récent1ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Récent1ToolStripMenuItem.Click
Ouvrir(Récent1ToolStripMenuItem.Tag)
End Sub
Private Sub Récent2ToolStripMenuItem_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Récent2ToolStripMenuItem.TextChanged
If Récent2ToolStripMenuItem.Text <> "" And Récent2ToolStripMenuItem.Text <> Nothing Then
Récent2ToolStripMenuItem.Visible = True
End If
End Sub
Private Sub Récent2ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Récent2ToolStripMenuItem.Click
Ouvrir(Récent2ToolStripMenuItem.Tag)
End Sub
Private Sub Récent3ToolStripMenuItem_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Récent3ToolStripMenuItem.TextChanged
If Récent3ToolStripMenuItem.Text <> "" And Récent3ToolStripMenuItem.Text <> Nothing Then
Récent3ToolStripMenuItem.Visible = True
End If
End Sub
Private Sub Récent3ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Récent3ToolStripMenuItem.Click
Ouvrir(Récent3ToolStripMenuItem.Tag)
End Sub
Private Sub GestionnaireDeDecksToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GestionnaireDeDecksToolStripMenuItem.Click
Gestionnaire.Show()
End Sub
' menu jouer
Private Sub JouerEnLigneToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles JouerEnLigneToolStripMenuItem.Click
LoadOnline.ShowDialog()
End Sub
' menu action
Private Sub CollectionDeJetonsToolStripMenuItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CollectionDeJetonsToolStripMenuItem.Click
GestionnaireToken.Show()
End Sub
Private Sub GestionnaireDeCollectionToolStripMenuItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GestionnaireDeCollectionToolStripMenuItem.Click
AjouterÀLaCollectionToolStripMenuItem.Enabled = True
AjouterLaCarteÀLaCollectionToolStripMenuItem.Enabled = True
ButtonToCollection.Enabled = True
GestionnaireCollection.Show()
End Sub
Private Sub RemettreLesFiltresÀZéroToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RemettreLesFiltresÀZéroToolStripMenuItem.Click
CmBoxFormat_TextChanged(CmBoxFormat, e)
End Sub
Private Sub RechercheAvancéeDuneCarteToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RechercheAvancéeDuneCarteToolStripMenuItem.Click
RerchercheAv.Show()
End Sub
Private Sub AjoutezLaCarteAuDeckToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AjoutezLaCarteAuDeckToolStripMenuItem.Click
ButtonToDeck_Click(sender, e)
End Sub
Private Sub AjoutezLePlaysetAuDeckToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AjoutezLePlaysetAuDeckToolStripMenuItem.Click
ButtonToDeck4_Click(sender, e)
End Sub
Private Sub AjoutezLaCarteÀLaRéserveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AjoutezLaCarteÀLaRéserveToolStripMenuItem.Click
ButtonToSide_Click(sender, e)
End Sub
Private Sub AjoutezLePlaysetÀLaRéserveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AjoutezLePlaysetÀLaRéserveToolStripMenuItem.Click
ButtonToSide4_Click(sender, e)
End Sub
Private Sub ToolStripMenuItemD_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItemD.Click
AjoutezLaCarteAuDeckToolStripMenuItem_Click(sender, e)
End Sub
Private Sub ToolStripMenuItemD4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItemD4.Click
AjoutezLePlaysetAuDeckToolStripMenuItem_Click(sender, e)
End Sub
Private Sub ToolStripMenuItemS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItemS.Click
AjoutezLaCarteÀLaRéserveToolStripMenuItem_Click(sender, e)
End Sub
Private Sub ToolStripMenuItemS4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItemS4.Click
AjoutezLePlaysetÀLaRéserveToolStripMenuItem_Click(sender, e)
End Sub
Private Sub ConsulterLeLivretDeRèglesToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ConsulterLeLivretDeRèglesToolStripMenuItem.Click
CardRegle_Click(sender, e)
End Sub
' menu options
Private Sub SurInternetToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SurInternetToolStripMenuItem.Click
SurInternetToolStripMenuItem.Tag = True
ChemInt.ShowDialog()
End Sub
Private Sub EnLocalToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EnLocalToolStripMenuItem.Click
CheminIm.ShowDialog()
End Sub
Private Sub HybrideToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HybrideToolStripMenuItem.Click
' Sauvegarde dans fichier des settings
FileOpen(1, ChemAppli + "settingsALaSaisie.cfg", OpenMode.Output)
Print(1, "False") 'ÀLaSaisieToolStripMenuItem
FileClose(1)
FileOpen(1, ChemAppli + "settingsAuBouton.cfg", OpenMode.Output)
Print(1, "True") 'AuBoutonToolStripMenuItem
FileClose(1)
ÀLaSaisieToolStripMenuItem.Checked = False
SansIllustrationsToolStripMenuItem.Checked = False
AuBoutonToolStripMenuItem.Checked = True
HybrideToolStripMenuItem.Tag = True
ChemInt.ShowDialog()
End Sub
Private Sub SansIllustrationsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SansIllustrationsToolStripMenuItem.Click
' Sauvegarde dans fichier des settings
FileOpen(1, ChemAppli + "settingsImStyle.cfg", OpenMode.Output)
Print(1, "True") 'SansIllustrationsToolStripMenuItem
WriteLine(1)
Print(1, "False") ' HybrideToolStripMenuItem
WriteLine(1)
Print(1, "False") ' SurInternetToolStripMenuItem
WriteLine(1)
Print(1, "False") ' EnLocalToolStripMenuItem
FileClose(1)
SansIllustrationsToolStripMenuItem.Checked = True
HybrideToolStripMenuItem.Checked = False
SurInternetToolStripMenuItem.Checked = False
EnLocalToolStripMenuItem.Checked = False
PictureBoxCarte.WaitOnLoad = False
PictureBoxCarte.Load(ChemAppli + "MW RessourcesImCarte_no_picture.jpg")
PictureBoxfond.WaitOnLoad = False
PictureBoxfond.Load(ChemAppli + "MW RessourcesFond_noir.png")
End Sub
Private Sub ÀLaSaisieToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ÀLaSaisieToolStripMenuItem.Click
If HybrideToolStripMenuItem.Checked = False Then
' Sauvegarde dans fichier des settings
FileOpen(1, ChemAppli + "settingsALaSaisie.cfg", OpenMode.Output)
Print(1, "True") 'ÀLaSaisieToolStripMenuItem
FileClose(1)
FileOpen(1, ChemAppli + "settingsAuBouton.cfg", OpenMode.Output)
Print(1, "False") 'AuBoutonToolStripMenuItem
FileClose(1)
ÀLaSaisieToolStripMenuItem.Checked = True
AuBoutonToolStripMenuItem.Checked = False
Else
MsgBox("Synchronisation à la saisie impossible en mode d'illustration hybride.", MsgBoxStyle.Exclamation)
' Sauvegarde dans fichier des settings
FileOpen(1, ChemAppli + "settingsALaSaisie.cfg", OpenMode.Output)
Print(1, "False") 'ÀLaSaisieToolStripMenuItem
FileClose(1)
FileOpen(1, ChemAppli + "settingsAuBouton.cfg", OpenMode.Output)
Print(1, "True") 'AuBoutonToolStripMenuItem
FileClose(1)
ÀLaSaisieToolStripMenuItem.Checked = False
AuBoutonToolStripMenuItem.Checked = True
End If
End Sub
Private Sub AuBoutonToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AuBoutonToolStripMenuItem.Click
' Sauvegarde dans fichier des settings
FileOpen(1, ChemAppli + "settingsALaSaisie.cfg", OpenMode.Output)
Print(1, "False") 'ÀLaSaisieToolStripMenuItem
FileClose(1)
FileOpen(1, ChemAppli + "settingsAuBouton.cfg", OpenMode.Output)
Print(1, "True") 'AuBoutonToolStripMenuItem
FileClose(1)
ÀLaSaisieToolStripMenuItem.Checked = False
AuBoutonToolStripMenuItem.Checked = True
End Sub
Private Sub AvoirUnMessageDerreurSiAucuneCarteTrouvéeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AvoirUnMessageDerreurSiAucuneCarteTrouvéeToolStripMenuItem.Click
If AvoirUnMessageDerreurSiAucuneCarteTrouvéeToolStripMenuItem.Checked = True Then
' Sauvegarde dans fichier des settings
FileOpen(1, ChemAppli + "settingsMessCartPasTrouve.cfg", OpenMode.Output)
Print(1, "False") ' AvoirUnMessageDerreurSiAucuneCarteTrouvéeToolStripMenuItem
FileClose(1)
AvoirUnMessageDerreurSiAucuneCarteTrouvéeToolStripMenuItem.Checked = False
Else
' Sauvegarde dans fichier des settings
FileOpen(1, ChemAppli + "settingsMessCartPasTrouve.cfg", OpenMode.Output)
Print(1, "True") ' AvoirUnMessageDerreurSiAucuneCarteTrouvéeToolStripMenuItem
FileClose(1)
AvoirUnMessageDerreurSiAucuneCarteTrouvéeToolStripMenuItem.Checked = True
End If
End Sub
'=============================================================
'Gestion de la recherche rapide de carte et choix du format
'=============================================================
Private Sub RechRapCarte_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles RechRapCarte.KeyDown
If e.KeyCode = Keys.Enter Then
RechOK_Click(RechOK, e)
End If
End Sub
Private Sub RechRapCarte_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RechRapCarte.TextChanged
If ÀLaSaisieToolStripMenuItem.Checked = True Then RechOK_Click(RechOK, e)
End Sub
Private Sub RechOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RechOK.Click
AlgoRecherche(RechRapCarte.Text)
End Sub
Public Sub AlgoRecherche(ByVal txt As String)
Dim pos As Integer
Dim pos_min As Integer = 0
Dim pos_max As Integer = nCartes - 1
While pos_max <> pos_min + 1
pos = Int(1 / 2 * (pos_max + pos_min))
If LCase(Replace(Replace(DataGridList.Item(0, pos).Value, "'", ""), "-", "")) > LCase(Replace(Replace(Replace(txt, "'", ""), "_", "0"), "-", "")) Then
pos_max = pos
Else
pos_min = pos
End If
End While
pos = pos_min
If Microsoft.VisualBasic.Left(LCase(DataGridList.Item(0, pos_min).Value), txt.Length) <> LCase(txt) Then
pos = pos_max
End If
If AvoirUnMessageDerreurSiAucuneCarteTrouvéeToolStripMenuItem.Checked = True And Microsoft.VisualBasic.Left(LCase(DataGridList.Item(0, pos).Value), txt.Length) <> LCase(txt) Then
MsgBox(LanguageTxt(11, 77) + " """ + txt + """ " + LanguageTxt(11, 78) + ".", MsgBoxStyle.Exclamation)
Else
If DataGridList.Rows(pos).Visible = True Then
DataGridList.FirstDisplayedScrollingRowIndex = max(pos - Int(DataGridList.DisplayedRowCount(False) / 2), 0)
DataGridList.Rows(pos).Selected = True
DataGridList.Item(1, pos).Selected = True
Actualise(pos, DataGridList)
Else
MsgBox(LanguageTxt(11, 77) + " """ + txt + """ " + LanguageTxt(11, 78) + " " + LanguageTxt(11, 79) + ".", MsgBoxStyle.Exclamation)
End If
End If
If AuBoutonToolStripMenuItem.Checked = True Then DataGridList.Select()
End Sub
Private Sub CmBoxFormat_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmBoxFormat.TextChanged
nCartesVis = nCartes
Dim frmt As String = ""
If CmBoxFormat.Text = LanguageTxt(11, 49) Then frmt = "tlf"
If CmBoxFormat.Text = "T1 [Vintage]" Then frmt = " T1 "
If CmBoxFormat.Text = "T1.5 [Legacy]" Then frmt = " T1.5 "
If CmBoxFormat.Text = "T1.X [Extended]" Then frmt = " T1.x "
If CmBoxFormat.Text = "T2 [Standard]" Then frmt = " T2 "
If CmBoxFormat.Text = LanguageTxt(11, 50) Then frmt = " B "
Dim nloop As Integer
Dim ARougir() As Integer
Dim AJaunir() As Integer
Dim nrouge As Integer = 0
Dim njaune As Integer = 0
If frmt <> "tlf" Then filtragebar.Show()
filtragebar.Fbar.Style = ProgressBarStyle.Continuous
filtragebar.Fbar.Value = 0
' DataGridList.Hide()
If frmt = "tlf" Then
blanchirAll()
End If
If frmt <> "tlf" Then
For nloop = 0 To nCartes - 1
If InStr(DataGridList.Item(15, nloop).Value, frmt) = 0 And InStr(DataGridList.Item(15, nloop).Value, " r" + Replace(frmt, " ", "") + " ") = 0 Then
ReDim Preserve ARougir(nrouge)
ARougir(nrouge) = nloop
nrouge = nrouge + 1
End If
If InStr(DataGridList.Item(15, nloop).Value, " r" + Replace(frmt, " ", "") + " ") > 0 Then
ReDim Preserve AJaunir(njaune)
AJaunir(njaune) = nloop
njaune = njaune + 1
End If
filtragebar.Fbar.Value = Int(100 * nloop / nCartes)
Next
End If
blanchirAll()
If nrouge > 0 Then
surligner(ARougir, Color.FromArgb(255, 221, 221))
End If
If njaune > 0 Then
surligner(AJaunir, Color.FromArgb(255, 255, 221))
End If
nCartesVis = nCartes - nrouge
GroupBxList.Text = LanguageTxt(11, 1) + " (" + CStr(nCartesVis) + " " + LanguageTxt(11, 2) + " " + CStr(nCartes) + ")"
If frmt <> "tlf" Then filtragebar.Close()
DataGridList.Select()
End Sub
'=============================================================
' Gestion du menu clic droit sur les header des colonnes
'=============================================================
Private Sub DataGridList_ColumnHeaderMouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles DataGridList.ColumnHeaderMouseClick, DataGridList.ColumnHeaderMouseClick
Dim i As Integer = 0
Dim Length As Integer = 0
DataGridList.ContextMenuStrip = Me.MenuColonne
For i = 0 To DataGridList.ColumnCount - 1
If DataGridList.Columns(i).Displayed = True And DataGridList.Columns(i).DisplayIndex < DataGridList.Columns(e.ColumnIndex).DisplayIndex Then
Length = Length + DataGridList.Columns(i).Width
End If
Next
DataGridList.ContextMenuStrip.Show(sender, Length + e.Location.X, e.Location.Y)
DataGridList.ContextMenuStrip = Me.MenuCarte
End Sub
Private Sub TailleAutomatiqueToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TailleAutomatiqueToolStripMenuItem.Click
If TailleAutomatiqueToolStripMenuItem.Checked = False Then
TailleAutomatiqueToolStripMenuItem.Checked = True
DataGridList.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
Else
TailleAutomatiqueToolStripMenuItem.Checked = False
DataGridList.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.None
End If
End Sub
Private Sub AffichageDesColonnesToolStripMenuItem_DropDownOpened(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AffichageDesColonnesToolStripMenuItem.DropDownOpened
MenuColonne.AutoClose = False
AffichageDesColonnesToolStripMenuItem.DropDown.AutoClose = False
End Sub
' Menu déroulant de affichage colonne
Private Sub ÉditionToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ÉditionToolStripMenuItem.Click
If ÉditionToolStripMenuItem.Checked = False Then
ÉditionToolStripMenuItem.Checked = True
Else
ÉditionToolStripMenuItem.Checked = False
End If
End Sub
Private Sub CoûtDeManaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CoûtDeManaToolStripMenuItem.Click
If CoûtDeManaToolStripMenuItem.Checked = False Then
CoûtDeManaToolStripMenuItem.Checked = True
Else
CoûtDeManaToolStripMenuItem.Checked = False
End If
End Sub
Private Sub CoûtConvertiDeManaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CoûtConvertiDeManaToolStripMenuItem.Click
If CoûtConvertiDeManaToolStripMenuItem.Checked = False Then
CoûtConvertiDeManaToolStripMenuItem.Checked = True
Else
CoûtConvertiDeManaToolStripMenuItem.Checked = False
End If
End Sub
Private Sub TypeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TypeToolStripMenuItem.Click
If TypeToolStripMenuItem.Checked = False Then
TypeToolStripMenuItem.Checked = True
Else
TypeToolStripMenuItem.Checked = False
End If
End Sub
Private Sub CouleurToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CouleurToolStripMenuItem.Click
If CouleurToolStripMenuItem.Checked = False Then
CouleurToolStripMenuItem.Checked = True
Else
CouleurToolStripMenuItem.Checked = False
End If
End Sub
Private Sub ManaProduitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ManaProduitToolStripMenuItem.Click
If ManaProduitToolStripMenuItem.Checked = False Then
ManaProduitToolStripMenuItem.Checked = True
Else
ManaProduitToolStripMenuItem.Checked = False
End If
End Sub
Private Sub ForceEnduranceToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ForceEnduranceToolStripMenuItem.Click
If ForceEnduranceToolStripMenuItem.Checked = False Then
ForceEnduranceToolStripMenuItem.Checked = True
Else
ForceEnduranceToolStripMenuItem.Checked = False
End If
End Sub
Private Sub RaretéToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RaretéToolStripMenuItem.Click
If RaretéToolStripMenuItem.Checked = False Then
RaretéToolStripMenuItem.Checked = True
Else
RaretéToolStripMenuItem.Checked = False
End If
End Sub
Private Sub CotationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CotationToolStripMenuItem.Click
If CotationToolStripMenuItem.Checked = False Then
CotationToolStripMenuItem.Checked = True
Else
CotationToolStripMenuItem.Checked = False
End If
End Sub
Private Sub FermerEtAppliquerToolStripMenuItem_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles FermerEtAppliquerToolStripMenuItem.MouseDown
MenuColonne.AutoClose = True
AffichageDesColonnesToolStripMenuItem.DropDown.AutoClose = True
End Sub
Private Sub FermerEtAppliquerToolStripMenuItem_MouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles FermerEtAppliquerToolStripMenuItem.MouseUp
If ÉditionToolStripMenuItem.Checked = True Then
DataGridList.Columns(1).Visible = True
Else
DataGridList.Columns(1).Visible = False
End If
If CoûtDeManaToolStripMenuItem.Checked = True Then
DataGridList.Columns(13).Visible = True
Else
DataGridList.Columns(13).Visible = False
End If
If CoûtConvertiDeManaToolStripMenuItem.Checked = True Then
DataGridList.Columns(11).Visible = True
Else
DataGridList.Columns(11).Visible = False
End If
If TypeToolStripMenuItem.Checked = True Then
DataGridList.Columns(3).Visible = True
Else
DataGridList.Columns(3).Visible = False
End If
If CouleurToolStripMenuItem.Checked = True Then
DataGridList.Columns(2).Visible = True
Else
DataGridList.Columns(2).Visible = False
End If
If ManaProduitToolStripMenuItem.Checked = True Then
DataGridList.Columns(14).Visible = True
Else
DataGridList.Columns(14).Visible = False
End If
If ForceEnduranceToolStripMenuItem.Checked = True Then
DataGridList.Columns(4).Visible = True
Else
DataGridList.Columns(4).Visible = False
End If
If RaretéToolStripMenuItem.Checked = True Then
DataGridList.Columns(6).Visible = True
Else
DataGridList.Columns(6).Visible = False
End If
If CotationToolStripMenuItem.Checked = True Then
DataGridList.Columns(10).Visible = True
Else
DataGridList.Columns(10).Visible = False
End If
' AffichageDesColonnesToolStripMenuItem.DropDown.Close()
' MenuColonne.Close()
End Sub
Private Sub DataGridList_CellMouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles DataGridList.CellMouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
If e.RowIndex >= 0 Then
DataGridList.Item(1, e.RowIndex).Selected = True
Actualise(DataGridList.CurrentRow.Index, DataGridList)
End If
End If
End Sub
Private Sub DataGridList_CellMouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles DataGridList.CellMouseUp
If e.Button = Windows.Forms.MouseButtons.Right Then
If e.RowIndex = -1 Then DataGridList_ColumnHeaderMouseClick(sender, e)
End If
End Sub
' Fonctions locales
Private Sub Importer(ByVal odlgfilename As String)
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor
Dim TextBoxNDeck As String = ""
Dim frmt(), Txt() As String
'Importation du deck
frmt = Split(odlgfilename, ".")
'=======================
'MWS
'=======================
If frmt(frmt.Length - 1) = "mwDeck" Then
Txt = Split(odlgfilename, "")
TextBoxNDeck = Replace(Txt(Txt.Length - 1), ".mwDeck", "")
Dim DeckTemp As New ListeDeck
DeckTemp.Text = TextBoxNDeck
DeckTemp.Name = TextBoxNDeck
Me.ComboBoxDeck.Enabled = True
Me.ComboBoxDeck.Items.Add(TextBoxNDeck)
ReDim Preserve Listdeck(Me.ComboBoxDeck.Items.Count - 1)
Listdeck(Me.ComboBoxDeck.Items.Count - 1) = DeckTemp
' Importation Cartes
Dim pos As Integer
Dim pos_min As Integer = 0
Dim pos_max As Integer = nCartes - 1
Dim sptline() As String
Dim sptline0() As String
Dim isdeck As Boolean = False
Dim isside As Boolean = False
Dim skip As Boolean = False
Dim PasOK() As String = New String() {}
FileOpen(1, odlgfilename, OpenMode.Input)
While Not EOF(1)
skip = False
sptline = Split(LineInput(1), "]")
sptline0 = Split(Replace(sptline(0), "SB:", ""), "[")
If sptline(0) = "" Then
skip = True
End If
If InStr(sptline(0), "// Deck file for Magic Workstation") > 0 Or InStr(sptline(0), "// NAME:") > 0 Or InStr(sptline(0), "// COMMENT:") > 0 Or InStr(sptline(0), "// AUTHOR:") > 0 Then
skip = True
End If
If InStr(sptline(0), "// Lands") > 0 Then
sptline = Split(LineInput(1), "]")
sptline0 = Split(Replace(sptline(0), "SB:", ""), "[")
isdeck = True
End If
If InStr(sptline(0), "// Creatures") > 0 Then
sptline = Split(LineInput(1), "]")
sptline0 = Split(Replace(sptline(0), "SB:", ""), "[")
isdeck = True
End If
If InStr(sptline(0), "// Spells") > 0 Then
sptline = Split(LineInput(1), "]")
sptline0 = Split(Replace(sptline(0), "SB:", ""), "[")
isdeck = True
End If
If InStr(sptline(0), "// Sideboard") > 0 Then
isdeck = False
isside = False
End If
If (isdeck = True Or isside = True) And skip = False Then
Dim findOK As Boolean = False
Dim nbre_illus() As String
Dim illus As Integer = Nothing
nbre_illus = Split(sptline(1), "(")
If nbre_illus.Length > 1 Then
illus = Val(Replace(nbre_illus(nbre_illus.Length - 1), ")", ""))
End If
pos_min = 0
pos_max = nCartes - 1
While pos_max <> pos_min + 1
pos = Int(1 / 2 * (pos_max + pos_min))
If LCase(Replace(Replace(DataGridList.Item(0, pos).Value, "'", ""), "-", "")) > RTrim(LTrim(LCase(Replace(Replace(Replace(Replace(Replace(Replace(Replace(sptline(1), "(1)", ""), "(2)", ""), "(3)", ""), "(4)", ""), "'", ""), "_", "0"), "-", "")))) Then
pos_max = pos
Else
pos_min = pos
End If
End While
pos = pos_min
If LCase(Replace(Replace(sptline(1), "'", ""), "-", "")) = LCase(Replace(Replace(DataGridList.Item(0, nCartes - 1).Value, "'", ""), "-", "")) Then
pos = nCartes - 1
End If
While DataGridList.Item(0, pos).Value = DataGridList.Item(0, CInt(max(pos - 1, 0))).Value And pos > 0
pos = pos - 1
If pos < 0 Then
pos = 0
Exit While
End If
pos_min = pos
End While
If pos < nCartes - 1 Then
While DataGridList.Item(0, pos + 1).Value = DataGridList.Item(0, pos).Value
pos = pos + 1
If pos > nCartes - 1 Then
pos = nCartes - 1
Exit While
End If
End While
End If
If sptline0(1) = "JSS" Or sptline0(1) = "ARE" Or sptline0(1) = "PRE" Or sptline0(1) = "REW" Or sptline0(1) = "GTW" Or sptline0(1) = "CHP" Or sptline0(1) = "JGC" Or sptline0(1) = "REL" Or sptline0(1) = "MPS" Or sptline0(1) = "GUR" Or sptline0(1) = "EUL" Or sptline0(1) = "APL" Then
sptline0(1) = "PR"
End If
While pos > pos_min - 1
If DataGridList.Item(1, pos).Value = RTrim(LTrim(sptline0(1))) And DataGridList.Item(9, pos).Value = illus Then
If isdeck = True Then addcarte(Listdeck(Me.ComboBoxDeck.Items.Count - 1), Listdeck(Me.ComboBoxDeck.Items.Count - 1).DataGridDeck, Me.DataGridList, Val(sptline0(0)), pos)
If isside = True Then addcarte(Listdeck(Me.ComboBoxDeck.Items.Count - 1), Listdeck(Me.ComboBoxDeck.Items.Count - 1).DataGridSide, Me.DataGridList, Val(sptline0(0)), pos)
findOK = True
End If
Jeudi 30 Octobre 2008 à 03:14
#44
L'intelligence de l'animal
Rien à voir avec le TQSAR, hein !
Rien à voir avec le TQSAR, hein !
T'as raison. Je vais pas flipper pour ça. La vie continue.
— Le Duc.
Jeudi 30 Octobre 2008 à 05:03
#45
Répondre
Connectez-vous
ou créez un compte pour écrire sur le forum.
Les comptes de l'ancien site fonctionnent avec leur mot de passe.






