Exemple #1
0
 public FileOperator getFileOperator()
 {
     if (f_operator == null)
     {
         f_operator = new FileOperator();
     }
     return(f_operator);
 }
 private void button4_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Are you sure you want to write student list? ", "Exit",
                         MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         FileOperator f_operator = ObjectFactory.getInstance().getFileOperator();
         f_operator.writeStudents(catalog);
         MessageBox.Show("Student list is wrote to students.txt file.");
     }
 }
Exemple #3
0
        static void Main()
        {
            Application.EnableVisualStyles();
            ObjectFactory factory    = ObjectFactory.getInstance();
            FileOperator  f_operator = factory.getFileOperator();

            ProjectVariables.setDBType(f_operator.readConfig());
            factory.loadDLL();
            Application.Run(new Form1());
        }