Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using System.IO;
- namespace TriedickaSrobov
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- float B1;
- float B2;
- float B3;
- float B4;
- float B5;
- float B6;
- float B7;
- float B8;
- float B9;
- float B10;
- float B11;
- float B12;
- float B13;
- float B14;
- float B15;
- float B16;
- float B17;
- float B18;
- private void Form1_Load(object sender, EventArgs e)
- {
- MessageBox.Show("Vitajte v Triedicke Srobov");
- }
- private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
- {
- }
- private void checkBox1_CheckedChanged(object sender, EventArgs e)
- {
- }
- private void button1_Click(object sender, EventArgs e)
- {
- if (checkBox1.Checked == true)
- {
- float B1 = 1;
- }
- if (checkBox2.Checked == true)
- {
- float B2 = 1;
- }
- if (checkBox3.Checked == true)
- {
- float B3 = 1;
- }
- if (checkBox4.Checked == true)
- {
- float B4 = 1;
- }
- if (checkBox5.Checked == true)
- {
- float B5 = 1;
- }
- if (checkBox6.Checked == true)
- {
- float B6 = 1;
- }
- if (checkBox7.Checked == true)
- {
- float B7 = 1;
- }
- if (checkBox8.Checked == true)
- {
- float B8 = 1;
- }
- if (checkBox9.Checked == true)
- {
- float B9 = 1;
- }
- if (checkBox10.Checked == true)
- {
- float B10 = 1;
- }
- if (checkBox11.Checked == true)
- {
- float B11 = 1;
- }
- if (checkBox12.Checked == true)
- {
- float B12 = 1;
- }
- if (checkBox13.Checked == true)
- {
- float B13 = 1;
- }
- if (checkBox14.Checked == true)
- {
- float B14 = 1;
- }
- if (checkBox15.Checked == true)
- {
- float B15 = 1;
- }
- if (checkBox16.Checked == true)
- {
- float B16 = 1;
- }
- if (checkBox17.Checked == true)
- {
- float B17 = 1;
- }
- if (checkBox18.Checked == true)
- {
- float B18 = 1;
- }
- string sb1 = "" + B1;
- string sb2 = "" + B2;
- string sb3 = "" + B3;
- string sb4 = "" + B4;
- string sb5 = "" + B5;
- string sb6 = "" + B6;
- string sb7 = "" + B7;
- string sb8 = "" + B8;
- string sb9 = "" + B9;
- string sb10 = "" + B10;
- string sb11 = "" + B11;
- string sb12 = "" + B12;
- string sb13 = "" + B13;
- string sb14 = "" + B14;
- string sb15 = "" + B15;
- string sb16 = "" + B16;
- string sb17 = "" + B17;
- string sb18 = "" + B18;
- // zapise text v riadkoch
- string[] lines = { sb1 , sb2,sb3,sb4,sb5,sb6,sb7,sb8,sb9,sb10,sb11,sb12,sb13,sb14,sb15,sb16,sb17,sb18 };
- // nastavenie ukladania
- string docPath =
- Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
- // vytvoti subor
- using (StreamWriter outputFile = new StreamWriter(Path.Combine(docPath, "WriteLines.txt")))
- {
- foreach (string line in lines)
- outputFile.WriteLine(line);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement