public static new DocumentoGiocatore GetIstance() { if (_doc == null) { _doc = new DocumentoGiocatore(); } return(_doc as DocumentoGiocatore); }
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; } }
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)); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(DocumentoGiocatore.GetIstance().MainForm); }