public Servis() { InitializeComponent(); ServisLoad.Pocetna(this); path = _user + "/servis.txt"; //ako ne postoji taj file if (File.Exists(path)) { ServisLoad.AddServisListBox(this, path); } }
private void btOTK_Click(object sender, EventArgs e) { if (listBox1.SelectedIndex == -1) { MessageBox.Show("Odaberite auto!"); return; } ServisLoad.RemoveFromListbox(this, path); listBox1.Items.Clear(); if (File.Exists(path)) { ServisLoad.AddServisListBox(this, path); } }
private void btPRIHV_Click(object sender, EventArgs e) { //deaktiviranje checkboxova ServisLoad.Deactivate1(this); //ako ne postoji taj file if (!File.Exists(path)) { Directory.CreateDirectory(_user); } ServisLoad.AddServis(this, path, _model, tBcij.Text); btPRIHV.Enabled = false; btPRIHV.Visible = false; btNOVI.Visible = true; btNOVI.Enabled = true; }
private void btODA_Click(object sender, EventArgs e) { if (rBsas.Checked == true) //ako idemo po sasiji { //provjera if (tBsas.TextLength != 17 || cBgar.Text == "") { MessageBox.Show("Neispravan unos!"); return; } if (cBgar.Text == "Da") { ifGarancija = true; } else { ifGarancija = false; } ifDiesel = ServisLoad.OdrediTipPoSasiji(this); _model = ServisLoad.OdrediModelPoSasiji(this); //pozivanje forme prepoznato! Form fServis2 = new Servis2(_model, ifDiesel); fServis2.Show(); fServis2.Location = this.Location; ServisLoad.Activate1(this, ifDiesel); } else //ako idemo manualno { //provjera if (cBgar.Text == "" || cBmod.Text == "" || cBtip.Text == "") { MessageBox.Show("Neispravan unos!"); return; } if (cBgar.Text == "Da") { ifGarancija = true; } else { ifGarancija = false; } if (cBtip.Text == "Diesel") { ifDiesel = true; } else { ifDiesel = false; } _model = cBmod.Text; ServisLoad.Activate2(this, ifDiesel); } }
private void rBman_CheckedChanged(object sender, EventArgs e) { ServisLoad.Checked1(this); }
private void btNOVI_Click(object sender, EventArgs e) { ServisLoad.Pocetna(this); }
private void checkBox9_CheckedChanged(object sender, EventArgs e) { tBcij.Text = ServisLoad.ReturnCijena(this, _model, ifGarancija); }