コード例 #1
0
 public static new DocumentoGiocatore GetIstance()
 {
     if (_doc == null)
     {
         _doc = new DocumentoGiocatore();
     }
     return(_doc as DocumentoGiocatore);
 }
コード例 #2
0
        protected override void impostazioniToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string newName = DocumentoGiocatore.GetIstance().NomeUtente;

            if (Dialog.InputBox("Impostazioni", "Inserisci il tuo nome utente", ref newName) == DialogResult.OK)
            {
                DocumentoGiocatore.GetIstance().NomeUtente = newName;
            }
        }
コード例 #3
0
        protected virtual void EseguiProva(object sender, EventArgs e)
        {
            String nomeCampo       = (((sender as Button).Tag as Object[])[0] as String[])[1];
            String nomePersonaggio = (((sender as Button).Tag as Object[])[0] as String[])[0];
            String testo           = DocumentoGiocatore.GetIstance().NomeUtente + ": " + nomePersonaggio + " ha effettuato una prova di " + nomeCampo + ": ";
            String argomento       = ((sender as Button).Tag as Object[])[1] as String;

            _output(this, new Utility.Messages.InterpretaMessageEventArgs(testo, argomento));
        }
コード例 #4
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.Run(DocumentoGiocatore.GetIstance().MainForm);
 }