Exemplo n.º 1
0
 /// Default constructor
 public Writer(CharacterBuffer chb, Random r, string s, Label l)
 {
     charbuffer = chb;
     rand       = r;
     strng      = s;
     sync       = false;
     lbRes      = l;
 }
Exemplo n.º 2
0
 /// Constructor
 public Reader(CharacterBuffer chb, Random r, int chs, Label l)
 {
     rand      = r;
     charBuff  = chb;
     charStrng = chs;
     strng     = string.Empty;
     sync      = false;
     lbRes     = l;
 }
Exemplo n.º 3
0
 public MainForm()
 {
     InitializeComponent();
     asyncBtn.Checked = true;                                        //start no sync as default
     chBuffer         = new CharacterBuffer(listWriter, listReader); //creats a shared resource with lisboxes to write in
     rand             = new Random();
     color            = panBox.BackColor;
     btnClear.Enabled = false;                        //runs only after a session run
 }