public MainWindow() { InitializeComponent(); string FName = "qbase.dat"; BinaryFormatter formatter = new BinaryFormatter(); if (File.Exists(FName)) { using (FileStream fs = new FileStream(FName, FileMode.OpenOrCreate)) { QLearning = (TQLearning)formatter.Deserialize(fs); } } else { QLearning = new TQLearning(textBox); using (FileStream fs = new FileStream(FName, FileMode.OpenOrCreate)) { formatter.Serialize(fs, QLearning); } } Base = new TBase(); Pole = new TPole(gPole, textBox, textBox1, Base, QLearning); }
public MainWindow() { InitializeComponent(); Base = new TBase(); Pole = new TPole(gPole, Base); }
public TPole(Canvas g, TextBox tb, TextBox tbCount, TBase Base, TQLearning QL) { this.Base = Base; this.QL = QL; this.g = g; this.tb = tb; this.tbCount = tbCount; H = g.Height; g.Width = H; Init(); }
public TPole(Canvas g, TBase Base) { this.Base = Base; this.g = g; H = g.Height; g.Width = H; g.Children.Clear(); DrawPole(); Pos = new TPosition(); V = 'X'; }