public static string GetClub() { try { string sysDir = AppDomain.CurrentDomain.BaseDirectory; string filepath = sysDir + "club.txt"; if (!File.Exists(filepath)) { frmSetClub clubform = new frmSetClub(); clubform.ShowDialog(); } else { if (File.Exists(filepath)) { string[] clublist = ReadText.ReadTextFile(filepath); return(clublist[0]); } else { return(""); } } return(""); } catch (Exception ex) { throw ex; } }
private void button4_Click(object sender, EventArgs e) { frmSetClub clubform = new frmSetClub(); clubform.ShowDialog(); string club = Common.GetClub(); if (club != "") { this.Text = "Menu (" + club.ToUpper().Replace(@"\", "") + ")"; } }