Esempio n. 1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            TextFile       sharedfile = new TextFile();
            FileController fc         = new FileController(sharedfile);

            // start threads for readers and writers:
            new Thread(R).Start(fc);
            new Thread(R).Start(fc);
            new Thread(W).Start(fc);
        }
Esempio n. 2
0
 public WThread(FileController b)
 {
     this.b = b;
     InitializeComponent();
 }
 public RThread(FileController b)
 {
     this.b  = b;
     reading = false;
     InitializeComponent();
 }