BBOGameReader NowyTrening2() { Microsoft.Win32.OpenFileDialog lin = new Microsoft.Win32.OpenFileDialog(); BBOGameReader game_ = new BBOGameReader(); lin.Title = "Zaladuj plik lin z Twojej gry"; lin.ShowDialog(); FileStream plik1 = File.OpenRead(lin.FileName); StreamReader reader = new StreamReader(plik1); plik1 = File.OpenRead(lin.FileName); reader = new StreamReader(plik1); game_.data = File.GetCreationTime(plik1.Name); string calosc = ""; while (!reader.EndOfStream) { calosc += reader.ReadLine(); } game_.ReadLinBBO(calosc); reader.Close(); plik1.Close(); return(game_); }
public Printer(VugraphLin vugraph_, BBOGameReader game_) { vugraph = vugraph_; game = game_; document = new Document(); SetProperties(); }
private void buttonprinttest_Copy_Click(object sender, RoutedEventArgs e) { gra = false; game = NowyTrening2(); Treprinter tmp = new Treprinter(game); tmp.CreateTreningDOC(); }
private void Button_Click_4(object sender, RoutedEventArgs e) { bool vu = false; bool ga = false; if (checkDF.IsChecked == true) { Ustawienia.deepfin = true; } try { vugraph = NowyTrening(); vu = true; } catch { MessageBox.Show("cos nie tak z plikiem z vugraphu"); } try { game = NowyTrening2(); ga = true; } catch { MessageBox.Show("cos nie tak z plikiem treningowym"); } if (ga && vu) { Printer print = new Printer(vugraph, game); Document document = print.CreateTreningDOC(); Microsoft.Win32.SaveFileDialog dialog = new Microsoft.Win32.SaveFileDialog(); dialog.FileName = vugraph.tytul; dialog.Filter = "doc|.doc"; dialog.ShowDialog(); string nazwa_pliku = dialog.FileName; RtfDocumentRenderer renderer = new RtfDocumentRenderer(); renderer.Render(document, nazwa_pliku, null); Process.Start(nazwa_pliku); } }
//dwa mecze private void Button_Click_5(object sender, RoutedEventArgs e) { Ustawienia.deepfin = true; game = NowyTrening2(); PrinterMEJ print = new PrinterMEJ(game); Document document = print.CreateTreningDOC(); string nazwa_pliku = "lalal"; RtfDocumentRenderer renderer = new RtfDocumentRenderer(); renderer.Render(document, nazwa_pliku, null); Process.Start(nazwa_pliku); }
public Treprinter(BBOGameReader game_) { game = game_; document = new Document(); SetProperties(); }
private void Button_Click(object sender, RoutedEventArgs e) { vugraph = NowyTrening(); game = NowyTrening2(); }