public static void Main(string[] args) { Application.Init (); LoginWindow win = new LoginWindow (); win.Show (); Application.Run (); }
/// <summary> /// Ferme la session ouverte dans le menu LoginWindow /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">E.</param> protected void OnCloseSessionsClicked(object sender, EventArgs e) { MessageDialog md = new MessageDialog (this, DialogFlags.Modal, MessageType.Question, ButtonsType.YesNo, "Êtes-vous sûr de vouloir fermer la session"); ResponseType rt = new ResponseType (); rt = (ResponseType)md.Run (); if (rt.ToString () == "Yes") { md.Destroy (); this.Destroy (); LoginWindow lw = new LoginWindow (); lw.Show (); } else { md.Destroy (); } }