예제 #1
0
        // display method displays current data saved in WorkLogs.txt
        public string display(string[] _date, double[] _hours, int _num)
        {
            WorkLogMethods wl = new WorkLogMethods();

                try
                {
                    StreamReader text = new StreamReader("WorkLogs.txt");
                    string readmetext = text.ReadToEnd();
                    text.Close();
                    return readmetext;
                }
                catch (FileNotFoundException)
                {
                    string notExistsText = "There are no Work Logs created yet!";
                    return notExistsText;
                }
        }
예제 #2
0
파일: frmMain.cs 프로젝트: zeivhann/WorkLog
 private void btnDisplay_MouseClick(object sender, MouseEventArgs e)
 {
     WorkLogMethods w1 = new WorkLogMethods();
     string text = w1.display(date, hours, numEntries);
     txtDisplayArea.Text = text;
 }
예제 #3
0
파일: frmMain.cs 프로젝트: zeivhann/WorkLog
 private void btnAdd_MouseClick(object sender, MouseEventArgs e)
 {
     WorkLogMethods w1 = new WorkLogMethods();
     numEntries = w1.add(date, hours, numEntries);
 }