private void openButton_Click(object sender, EventArgs e) { if (!FileHandling.SaveFileExists()) { label1.Text = "Status: Error, no save file found."; return; } FileHandling.Load(); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (FileHandling.SaveFileExists()) { DoubleWeekView.Double_Week_View dwv = new DoubleWeekView.Double_Week_View(); AppWideInfo.doubleWeekView = dwv; FileHandling.Load(); Application.Run(dwv); } else { DoubleWeekView.Double_Week_View dwv = new DoubleWeekView.Double_Week_View(); AppWideInfo.doubleWeekView = dwv; Application.Run(dwv); } }