Ошибка сериализации Listbox в Windows Form C#
Код:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.Serialization.Formatters.Binary;
using System.Xml.Serialization;
using System.IO;
using System.Runtime.Serialization;
[Serializable]
public struct SerData
{
public string tab1S1, tab1S2, tab2KustS1, tab2KustS2, tab2TonS1, tab2TonS2, tab2TonS3, tab3S1, tab3S2, tab3S3, tab4S1, tab4S2, tab4S3;
public List<string> tab1List1;
public SerData(string s)
{
tab1S1 = s;
tab1S2 = s;
tab2KustS1 = s;
tab2KustS2 = s;
tab2TonS1 = s;
tab2TonS2 = s;
tab2TonS3 =s;
tab3S1 = s;
tab3S2 = s;
tab3S3 = s;
tab4S1 = s;
tab4S2 = s;
tab4S3 = s;
tab1List1 = new List<string>();
}
}
namespace Открытие_банок_3_Dev_
{
public partial class Form1 : Form
{
public string tab1S1, tab1S2, tab2KustS1, tab2KustS2, tab2TonS1, tab2TonS2, tab3S1, tab2TonS3, tab3S2, tab3S3, tab4S1, tab4S2, tab4S3;
public Form1()
{
InitializeComponent();
}
public void SerFS()
{
SerData ser=new SerData("");
ser.tab1S1 = tab1S1;
ser.tab1S2 = tab1S2;
ser.tab2KustS1 = tab2KustS1;
ser.tab2KustS2 = tab2KustS2;
ser.tab2TonS1 = tab2TonS1;
ser.tab2TonS2 = tab2TonS2;
ser.tab2TonS3 = tab2TonS3;
ser.tab3S1 = tab3S1;
ser.tab3S2 = tab3S2;
ser.tab3S3 = tab3S3;
ser.tab4S1 = tab4S1;
ser.tab4S2 = tab4S2;
ser.tab4S3 = tab4S3;
foreach (string s in Tab1ListBox1.SelectedItems)
ser.tab1List1.Add((string)s);
StreamWriter sr = new StreamWriter(".\\banki_save.xml");
XmlSerializer xr = new XmlSerializer(typeof(SerData));
xr.Serialize(sr,ser);
sr.Close();
}
public void DeSerFS()
{
SerData ser = new SerData();
XmlSerializer xr = new XmlSerializer(typeof(SerData));
TextReader r = new StreamReader(".\\banki_save.xml");
ser = (SerData)xr.Deserialize(r);
Tab1ComboBox1.SelectedItem = ser.tab1S2;
Tab1ComboBox2.SelectedItem = ser.tab1S1;
Tab2KustComboBox1.SelectedItem = ser.tab2KustS1;
Tab2KustComboBox2.SelectedItem = ser.tab2KustS2;
Tab2TonComboBox1.SelectedItem = ser.tab2TonS1;
Tab2TonComboBox2.SelectedItem = ser.tab2TonS3;
Tab2TonComboBox3.SelectedItem = ser.tab2TonS2;
Tab3ComboBox1.SelectedItem = ser.tab3S1;
Tab3ComboBox2.SelectedItem = ser.tab3S3;
Tab3ComboBox3.SelectedItem = ser.tab3S2;
Tab4ComboBox1.SelectedItem = ser.tab4S1;
Tab4ComboBox2.SelectedItem = ser.tab4S3;
Tab4ComboBox3.SelectedItem = ser.tab4S2;
foreach (string s in ser.tab1List1)
Tab1ListBox1.Items.Add(s);
r.Close();
}
private void Tab1ComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab1ComboBox2.Items.Count < 6)
Tab1ComboBox2.Items.Add(tab1S2);
tab1S2 = (string)Tab1ComboBox1.SelectedItem;
Tab1ComboBox2.Items.Remove(tab1S2);
}
private void Tab1ComboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab1ComboBox1.Items.Count < 6)
Tab1ComboBox1.Items.Add(tab1S1);
tab1S1 = (string)Tab1ComboBox2.SelectedItem;
Tab1ComboBox1.Items.Remove(tab1S1);
}
private void Tab1ButtAdd_Click(object sender, EventArgs e)
{
if ((Tab1ListBox1.FindString(tab1S1 + "-" + tab1S2) < 0) && (Tab1ListBox1.FindString(tab1S2 + "-" + tab1S1) < 0 && (Tab1ComboBox1.Items.Count < 6) && (Tab1ComboBox2.Items.Count < 6)))
Tab1ListBox1.Items.Add(tab1S2 + "-" +tab1S1);
}
private void Tab1ButtDel_Click(object sender, EventArgs e)
{
Tab1ListBox1.Items.Remove(Tab1ListBox1.SelectedItem);
}
private void Tab1ButtClear_Click(object sender, EventArgs e)
{
Tab1ListBox1.Items.Clear();
}
public void Tab1ButtSave_Click(object sender, EventArgs e)
{
SerFS();
}
private void Tab2KustComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
tab2KustS1 = (string)Tab2KustComboBox1.SelectedItem;
}
private void Tab2KustComboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
tab2KustS2 = (string)Tab2KustComboBox2.SelectedItem;
}
private void Tab2KustButtAdd_Click(object sender, EventArgs e)
{
if ((Tab2KustListBox1.FindString(tab2KustS1 + "-" + tab2KustS2) < 0) && (Tab2KustListBox1.FindString(tab2KustS2 + "-" + tab2KustS1) < 0 && (Tab2KustComboBox1.Items.Count < 2) && (Tab2KustComboBox2.Items.Count < 7)))
Tab2KustListBox1.Items.Add(tab2KustS1 + "-" + tab2KustS2);
}
private void Tab2KustButtDel_Click(object sender, EventArgs e)
{
Tab2KustListBox1.Items.Remove(Tab2KustListBox1.SelectedItem);
}
private void Tab2KustButtClear_Click(object sender, EventArgs e)
{
Tab2KustListBox1.Items.Clear();
}
private void Tab2KustButtSave_Click(object sender, EventArgs e)
{
SerFS();
}
private void Tab2TonComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
tab2TonS1 = (string)Tab2TonComboBox1.SelectedItem;
}
private void Tab2TonComboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab2TonComboBox3.Items.Count < 6)
Tab2TonComboBox3.Items.Add(tab2TonS3);
tab2TonS3 = (string)Tab2TonComboBox2.SelectedItem;
Tab2TonComboBox3.Items.Remove(tab2TonS3);
}
private void Tab2TonComboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab2TonComboBox2.Items.Count < 6)
Tab2TonComboBox2.Items.Add(tab2TonS2);
tab2TonS2 = (string)Tab2TonComboBox3.SelectedItem;
Tab2TonComboBox2.Items.Remove(tab2TonS2);
}
private void Tab2TonButtAdd_Click(object sender, EventArgs e)
{
if ((((Tab2TonListBox2.FindString(tab2TonS1 + "-" + tab2TonS2 + "-" + tab2TonS3) < 0) && (Tab2TonListBox2.FindString(tab2TonS1 + "-" + tab2TonS3 + "-" + tab2TonS2)) < 0 && ((Tab2TonComboBox1.SelectedIndex >-1) && (Tab2TonComboBox2.Items.Count < 6) && (Tab2TonComboBox3.Items.Count < 6)))))
Tab2TonListBox2.Items.Add(tab2TonS1 + "-" + tab2TonS3 + "-" + tab2TonS2);
}
private void Tab2TonButtDel_Click(object sender, EventArgs e)
{
Tab2TonListBox2.Items.Remove(Tab2TonListBox2.SelectedItem);
}
private void Tab2TonButtClear_Click(object sender, EventArgs e)
{
Tab2TonListBox2.Items.Clear();
}
private void Tab2TonButtSave_Click(object sender, EventArgs e)
{
SerFS();
}
private void Tab3ComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
tab3S1 = (string)Tab3ComboBox1.SelectedItem;
}
private void Tab3ComboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab3ComboBox3.Items.Count < 6)
Tab3ComboBox3.Items.Add(tab3S3);
tab3S3 = (string)Tab3ComboBox2.SelectedItem;
Tab3ComboBox3.Items.Remove(tab3S3);
}
private void Tab3ComboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab3ComboBox2.Items.Count < 6)
Tab3ComboBox2.Items.Add(tab3S2);
tab3S2 = (string)Tab3ComboBox3.SelectedItem;
Tab3ComboBox2.Items.Remove(tab3S2);
}
private void Tab3ButtAdd_Click(object sender, EventArgs e)
{
if ((Tab3ListBox1.FindString(tab3S1 + "-" + tab3S2 + "-" + tab3S3) < 0) && (Tab3ListBox1.FindString(tab3S1 + "-" + tab3S3 + "-" + tab3S2) < 0 && (Tab3ComboBox1.SelectedIndex > -1) && (Tab3ComboBox2.Items.Count < 6) && (Tab3ComboBox3.Items.Count < 6)))
Tab3ListBox1.Items.Add(tab3S1 + "-" + tab3S3 + "-" + tab3S2);
}
private void Tab3ButtDel_Click(object sender, EventArgs e)
{
Tab3ListBox1.Items.Remove(Tab3ListBox1.SelectedItem);
}
private void Tab3ButtClear_Click(object sender, EventArgs e)
{
Tab3ListBox1.Items.Clear();
}
private void Tab3ButtSave_Click(object sender, EventArgs e)
{
SerFS();
}
private void Tab4ComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
tab4S1 = (string)Tab4ComboBox1.SelectedItem;
}
private void Tab4ComboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab4ComboBox3.Items.Count < 6)
Tab4ComboBox3.Items.Add(tab4S3);
tab4S3 = (string)Tab4ComboBox2.SelectedItem;
Tab4ComboBox3.Items.Remove(tab4S3);
}
private void Tab4ComboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab4ComboBox2.Items.Count < 6)
Tab4ComboBox2.Items.Add(tab4S2);
tab4S2 = (string)Tab4ComboBox3.SelectedItem;
Tab4ComboBox2.Items.Remove(tab4S2);
}
private void Tab4ButtAdd_Click(object sender, EventArgs e)
{
if ((Tab4ListBox1.FindString(tab4S1 + "-" + tab4S2 + "-" + tab4S3) < 0) && (Tab4ListBox1.FindString(tab4S1 + "-" + tab4S3 + "-" + tab4S2) < 0 && (Tab4ComboBox1.SelectedIndex > -1)&&(Tab4ComboBox2.Items.Count < 6) && (Tab4ComboBox3.Items.Count < 6)))
Tab4ListBox1.Items.Add(tab4S1+ "-" + tab4S3 + "-" + tab4S2);
}
private void Tab4ButtDel_Click(object sender, EventArgs e)
{
Tab4ListBox1.Items.Remove(Tab4ListBox1.SelectedItem);
}
private void Tab4ButtClear_Click(object sender, EventArgs e)
{
Tab4ListBox1.Items.Clear();
}
private void Tab4ButtSave_Click(object sender, EventArgs e)
{
SerFS();
}
private void Form1_Load(object sender, EventArgs e)
{
if (File.Exists(".\\banki_save.xml"))
DeSerFS();
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.Serialization.Formatters.Binary;
using System.Xml.Serialization;
using System.IO;
using System.Runtime.Serialization;
[Serializable]
public struct SerData
{
public string tab1S1, tab1S2, tab2KustS1, tab2KustS2, tab2TonS1, tab2TonS2, tab2TonS3, tab3S1, tab3S2, tab3S3, tab4S1, tab4S2, tab4S3;
public List<string> tab1List1;
public SerData(string s)
{
tab1S1 = s;
tab1S2 = s;
tab2KustS1 = s;
tab2KustS2 = s;
tab2TonS1 = s;
tab2TonS2 = s;
tab2TonS3 =s;
tab3S1 = s;
tab3S2 = s;
tab3S3 = s;
tab4S1 = s;
tab4S2 = s;
tab4S3 = s;
tab1List1 = new List<string>();
}
}
namespace Открытие_банок_3_Dev_
{
public partial class Form1 : Form
{
public string tab1S1, tab1S2, tab2KustS1, tab2KustS2, tab2TonS1, tab2TonS2, tab3S1, tab2TonS3, tab3S2, tab3S3, tab4S1, tab4S2, tab4S3;
public Form1()
{
InitializeComponent();
}
public void SerFS()
{
SerData ser=new SerData("");
ser.tab1S1 = tab1S1;
ser.tab1S2 = tab1S2;
ser.tab2KustS1 = tab2KustS1;
ser.tab2KustS2 = tab2KustS2;
ser.tab2TonS1 = tab2TonS1;
ser.tab2TonS2 = tab2TonS2;
ser.tab2TonS3 = tab2TonS3;
ser.tab3S1 = tab3S1;
ser.tab3S2 = tab3S2;
ser.tab3S3 = tab3S3;
ser.tab4S1 = tab4S1;
ser.tab4S2 = tab4S2;
ser.tab4S3 = tab4S3;
foreach (string s in Tab1ListBox1.SelectedItems)
ser.tab1List1.Add((string)s);
StreamWriter sr = new StreamWriter(".\\banki_save.xml");
XmlSerializer xr = new XmlSerializer(typeof(SerData));
xr.Serialize(sr,ser);
sr.Close();
}
public void DeSerFS()
{
SerData ser = new SerData();
XmlSerializer xr = new XmlSerializer(typeof(SerData));
TextReader r = new StreamReader(".\\banki_save.xml");
ser = (SerData)xr.Deserialize(r);
Tab1ComboBox1.SelectedItem = ser.tab1S2;
Tab1ComboBox2.SelectedItem = ser.tab1S1;
Tab2KustComboBox1.SelectedItem = ser.tab2KustS1;
Tab2KustComboBox2.SelectedItem = ser.tab2KustS2;
Tab2TonComboBox1.SelectedItem = ser.tab2TonS1;
Tab2TonComboBox2.SelectedItem = ser.tab2TonS3;
Tab2TonComboBox3.SelectedItem = ser.tab2TonS2;
Tab3ComboBox1.SelectedItem = ser.tab3S1;
Tab3ComboBox2.SelectedItem = ser.tab3S3;
Tab3ComboBox3.SelectedItem = ser.tab3S2;
Tab4ComboBox1.SelectedItem = ser.tab4S1;
Tab4ComboBox2.SelectedItem = ser.tab4S3;
Tab4ComboBox3.SelectedItem = ser.tab4S2;
foreach (string s in ser.tab1List1)
Tab1ListBox1.Items.Add(s);
r.Close();
}
private void Tab1ComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab1ComboBox2.Items.Count < 6)
Tab1ComboBox2.Items.Add(tab1S2);
tab1S2 = (string)Tab1ComboBox1.SelectedItem;
Tab1ComboBox2.Items.Remove(tab1S2);
}
private void Tab1ComboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab1ComboBox1.Items.Count < 6)
Tab1ComboBox1.Items.Add(tab1S1);
tab1S1 = (string)Tab1ComboBox2.SelectedItem;
Tab1ComboBox1.Items.Remove(tab1S1);
}
private void Tab1ButtAdd_Click(object sender, EventArgs e)
{
if ((Tab1ListBox1.FindString(tab1S1 + "-" + tab1S2) < 0) && (Tab1ListBox1.FindString(tab1S2 + "-" + tab1S1) < 0 && (Tab1ComboBox1.Items.Count < 6) && (Tab1ComboBox2.Items.Count < 6)))
Tab1ListBox1.Items.Add(tab1S2 + "-" +tab1S1);
}
private void Tab1ButtDel_Click(object sender, EventArgs e)
{
Tab1ListBox1.Items.Remove(Tab1ListBox1.SelectedItem);
}
private void Tab1ButtClear_Click(object sender, EventArgs e)
{
Tab1ListBox1.Items.Clear();
}
public void Tab1ButtSave_Click(object sender, EventArgs e)
{
SerFS();
}
private void Tab2KustComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
tab2KustS1 = (string)Tab2KustComboBox1.SelectedItem;
}
private void Tab2KustComboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
tab2KustS2 = (string)Tab2KustComboBox2.SelectedItem;
}
private void Tab2KustButtAdd_Click(object sender, EventArgs e)
{
if ((Tab2KustListBox1.FindString(tab2KustS1 + "-" + tab2KustS2) < 0) && (Tab2KustListBox1.FindString(tab2KustS2 + "-" + tab2KustS1) < 0 && (Tab2KustComboBox1.Items.Count < 2) && (Tab2KustComboBox2.Items.Count < 7)))
Tab2KustListBox1.Items.Add(tab2KustS1 + "-" + tab2KustS2);
}
private void Tab2KustButtDel_Click(object sender, EventArgs e)
{
Tab2KustListBox1.Items.Remove(Tab2KustListBox1.SelectedItem);
}
private void Tab2KustButtClear_Click(object sender, EventArgs e)
{
Tab2KustListBox1.Items.Clear();
}
private void Tab2KustButtSave_Click(object sender, EventArgs e)
{
SerFS();
}
private void Tab2TonComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
tab2TonS1 = (string)Tab2TonComboBox1.SelectedItem;
}
private void Tab2TonComboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab2TonComboBox3.Items.Count < 6)
Tab2TonComboBox3.Items.Add(tab2TonS3);
tab2TonS3 = (string)Tab2TonComboBox2.SelectedItem;
Tab2TonComboBox3.Items.Remove(tab2TonS3);
}
private void Tab2TonComboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab2TonComboBox2.Items.Count < 6)
Tab2TonComboBox2.Items.Add(tab2TonS2);
tab2TonS2 = (string)Tab2TonComboBox3.SelectedItem;
Tab2TonComboBox2.Items.Remove(tab2TonS2);
}
private void Tab2TonButtAdd_Click(object sender, EventArgs e)
{
if ((((Tab2TonListBox2.FindString(tab2TonS1 + "-" + tab2TonS2 + "-" + tab2TonS3) < 0) && (Tab2TonListBox2.FindString(tab2TonS1 + "-" + tab2TonS3 + "-" + tab2TonS2)) < 0 && ((Tab2TonComboBox1.SelectedIndex >-1) && (Tab2TonComboBox2.Items.Count < 6) && (Tab2TonComboBox3.Items.Count < 6)))))
Tab2TonListBox2.Items.Add(tab2TonS1 + "-" + tab2TonS3 + "-" + tab2TonS2);
}
private void Tab2TonButtDel_Click(object sender, EventArgs e)
{
Tab2TonListBox2.Items.Remove(Tab2TonListBox2.SelectedItem);
}
private void Tab2TonButtClear_Click(object sender, EventArgs e)
{
Tab2TonListBox2.Items.Clear();
}
private void Tab2TonButtSave_Click(object sender, EventArgs e)
{
SerFS();
}
private void Tab3ComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
tab3S1 = (string)Tab3ComboBox1.SelectedItem;
}
private void Tab3ComboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab3ComboBox3.Items.Count < 6)
Tab3ComboBox3.Items.Add(tab3S3);
tab3S3 = (string)Tab3ComboBox2.SelectedItem;
Tab3ComboBox3.Items.Remove(tab3S3);
}
private void Tab3ComboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab3ComboBox2.Items.Count < 6)
Tab3ComboBox2.Items.Add(tab3S2);
tab3S2 = (string)Tab3ComboBox3.SelectedItem;
Tab3ComboBox2.Items.Remove(tab3S2);
}
private void Tab3ButtAdd_Click(object sender, EventArgs e)
{
if ((Tab3ListBox1.FindString(tab3S1 + "-" + tab3S2 + "-" + tab3S3) < 0) && (Tab3ListBox1.FindString(tab3S1 + "-" + tab3S3 + "-" + tab3S2) < 0 && (Tab3ComboBox1.SelectedIndex > -1) && (Tab3ComboBox2.Items.Count < 6) && (Tab3ComboBox3.Items.Count < 6)))
Tab3ListBox1.Items.Add(tab3S1 + "-" + tab3S3 + "-" + tab3S2);
}
private void Tab3ButtDel_Click(object sender, EventArgs e)
{
Tab3ListBox1.Items.Remove(Tab3ListBox1.SelectedItem);
}
private void Tab3ButtClear_Click(object sender, EventArgs e)
{
Tab3ListBox1.Items.Clear();
}
private void Tab3ButtSave_Click(object sender, EventArgs e)
{
SerFS();
}
private void Tab4ComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
tab4S1 = (string)Tab4ComboBox1.SelectedItem;
}
private void Tab4ComboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab4ComboBox3.Items.Count < 6)
Tab4ComboBox3.Items.Add(tab4S3);
tab4S3 = (string)Tab4ComboBox2.SelectedItem;
Tab4ComboBox3.Items.Remove(tab4S3);
}
private void Tab4ComboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab4ComboBox2.Items.Count < 6)
Tab4ComboBox2.Items.Add(tab4S2);
tab4S2 = (string)Tab4ComboBox3.SelectedItem;
Tab4ComboBox2.Items.Remove(tab4S2);
}
private void Tab4ButtAdd_Click(object sender, EventArgs e)
{
if ((Tab4ListBox1.FindString(tab4S1 + "-" + tab4S2 + "-" + tab4S3) < 0) && (Tab4ListBox1.FindString(tab4S1 + "-" + tab4S3 + "-" + tab4S2) < 0 && (Tab4ComboBox1.SelectedIndex > -1)&&(Tab4ComboBox2.Items.Count < 6) && (Tab4ComboBox3.Items.Count < 6)))
Tab4ListBox1.Items.Add(tab4S1+ "-" + tab4S3 + "-" + tab4S2);
}
private void Tab4ButtDel_Click(object sender, EventArgs e)
{
Tab4ListBox1.Items.Remove(Tab4ListBox1.SelectedItem);
}
private void Tab4ButtClear_Click(object sender, EventArgs e)
{
Tab4ListBox1.Items.Clear();
}
private void Tab4ButtSave_Click(object sender, EventArgs e)
{
SerFS();
}
private void Form1_Load(object sender, EventArgs e)
{
if (File.Exists(".\\banki_save.xml"))
DeSerFS();
}
}
}
При запуске программы я вношу данные с[ B] ab1ComboBox1 и Tab1ComboBox2 при помощи кнопки Добавить в Tab1ListBox1.Я хочу сериализовать Tab1ListBox1[/B в ] в ser.tab1List1.
Код:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.Serialization.Formatters.Binary;
using System.Xml.Serialization;
using System.IO;
using System.Runtime.Serialization;
[Serializable]
public struct SerData
{
public string tab1S1, tab1S2, tab2KustS1, tab2KustS2, tab2TonS1, tab2TonS2, tab2TonS3, tab3S1, tab3S2, tab3S3, tab4S1, tab4S2, tab4S3;
public List<string> tab1List1;
public List<string> tab2KustList1;
public List<string> tab2TonList2;
public List<string> tab3List1;
public List<string> tab4List1;
public SerData(string s)
{
tab1S1 = s;
tab1S2 = s;
tab2KustS1 = s;
tab2KustS2 = s;
tab2TonS1 = s;
tab2TonS2 = s;
tab2TonS3 =s;
tab3S1 = s;
tab3S2 = s;
tab3S3 = s;
tab4S1 = s;
tab4S2 = s;
tab4S3 = s;
tab1List1 = new List<string>();
tab2KustList1 = new List<string>();
tab2TonList2 = new List<string>();
tab3List1 = new List<string>();
tab4List1 = new List<string>();
}
}
namespace Открытие_банок_3_Dev_
{
public partial class Form1 : Form
{
public string tab1S1, tab1S2, tab2KustS1, tab2KustS2, tab2TonS1, tab2TonS2, tab3S1, tab2TonS3, tab3S2, tab3S3, tab4S1, tab4S2, tab4S3;
public Form1()
{
InitializeComponent();
}
public void SerFS()
{
SerData ser=new SerData("");
ser.tab1S1 = tab1S1;
ser.tab1S2 = tab1S2;
ser.tab2KustS1 = tab2KustS1;
ser.tab2KustS2 = tab2KustS2;
ser.tab2TonS1 = tab2TonS1;
ser.tab2TonS2 = tab2TonS2;
ser.tab2TonS3 = tab2TonS3;
ser.tab3S1 = tab3S1;
ser.tab3S2 = tab3S2;
ser.tab3S3 = tab3S3;
ser.tab4S1 = tab4S1;
ser.tab4S2 = tab4S2;
ser.tab4S3 = tab4S3;
foreach (string s in Tab1ListBox1.Items)
ser.tab1List1.Add((string)s);
foreach (string s in Tab2KustListBox1.Items)
ser.tab2KustList1.Add((string)s);
foreach (string s in Tab1ListBox1.Items)
ser.tab2TonList2.Add((string)s);
foreach (string s in Tab3ListBox1.Items)
ser.tab3List1.Add((string)s);
foreach (string s in Tab4ListBox1.Items)
ser.tab4List1.Add((string)s);
StreamWriter sr = new StreamWriter(".\\banki_save.xml");
XmlSerializer xr = new XmlSerializer(typeof(SerData));
xr.Serialize(sr,ser);
sr.Close();
}
public void DeSerFS()
{
SerData ser = new SerData();
XmlSerializer xr = new XmlSerializer(typeof(SerData));
TextReader r = new StreamReader(".\\banki_save.xml");
ser = (SerData)xr.Deserialize(r);
Tab1ComboBox1.SelectedItem = ser.tab1S2;
Tab1ComboBox2.SelectedItem = ser.tab1S1;
Tab2KustComboBox1.SelectedItem = ser.tab2KustS1;
Tab2KustComboBox2.SelectedItem = ser.tab2KustS2;
Tab2TonComboBox1.SelectedItem = ser.tab2TonS1;
Tab2TonComboBox2.SelectedItem = ser.tab2TonS3;
Tab2TonComboBox3.SelectedItem = ser.tab2TonS2;
Tab3ComboBox1.SelectedItem = ser.tab3S1;
Tab3ComboBox2.SelectedItem = ser.tab3S3;
Tab3ComboBox3.SelectedItem = ser.tab3S2;
Tab4ComboBox1.SelectedItem = ser.tab4S1;
Tab4ComboBox2.SelectedItem = ser.tab4S3;
Tab4ComboBox3.SelectedItem = ser.tab4S2;
foreach (object s in ser.tab1List1)
{
Tab1ListBox1.Items.Add(s);
}
foreach (object s in ser.tab2KustList1)
{
Tab2KustListBox1.Items.Add(s);
}
foreach (object s in ser.tab2TonList2)
{
Tab2TonListBox2.Items.Add(s);
}
foreach (object s in ser.tab3List1)
{
Tab3ListBox1.Items.Add(s);
}
foreach (object s in ser.tab4List1)
{
Tab4ListBox1.Items.Add(s);
}
r.Close();
}
private void Tab1ComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab1ComboBox2.Items.Count < 6)
Tab1ComboBox2.Items.Add(tab1S2);
tab1S2 = (string)Tab1ComboBox1.SelectedItem;
Tab1ComboBox2.Items.Remove(tab1S2);
}
private void Tab1ComboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab1ComboBox1.Items.Count < 6)
Tab1ComboBox1.Items.Add(tab1S1);
tab1S1 = (string)Tab1ComboBox2.SelectedItem;
Tab1ComboBox1.Items.Remove(tab1S1);
}
private void Tab1ButtAdd_Click(object sender, EventArgs e)
{
if ((Tab1ListBox1.FindString(tab1S1 + "-" + tab1S2) < 0) && (Tab1ListBox1.FindString(tab1S2 + "-" + tab1S1) < 0 && (Tab1ComboBox1.Items.Count < 6) && (Tab1ComboBox2.Items.Count < 6)))
Tab1ListBox1.Items.Add(tab1S2 + "-" +tab1S1);
}
private void Tab1ButtDel_Click(object sender, EventArgs e)
{
Tab1ListBox1.Items.Remove(Tab1ListBox1.SelectedItem);
}
private void Tab1ButtClear_Click(object sender, EventArgs e)
{
Tab1ListBox1.Items.Clear();
}
public void Tab1ButtSave_Click(object sender, EventArgs e)
{
SerFS();
}
private void Tab2KustComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
tab2KustS1 = (string)Tab2KustComboBox1.SelectedItem;
}
private void Tab2KustComboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
tab2KustS2 = (string)Tab2KustComboBox2.SelectedItem;
}
private void Tab2KustButtAdd_Click(object sender, EventArgs e)
{
if ((Tab2KustListBox1.FindString(tab2KustS1 + "-" + tab2KustS2) < 0) && (Tab2KustListBox1.FindString(tab2KustS2 + "-" + tab2KustS1) < 0 && (Tab2KustComboBox1.Items.Count < 2) && (Tab2KustComboBox2.Items.Count < 7)))
Tab2KustListBox1.Items.Add(tab2KustS1 + "-" + tab2KustS2);
}
private void Tab2KustButtDel_Click(object sender, EventArgs e)
{
Tab2KustListBox1.Items.Remove(Tab2KustListBox1.SelectedItem);
}
private void Tab2KustButtClear_Click(object sender, EventArgs e)
{
Tab2KustListBox1.Items.Clear();
}
private void Tab2KustButtSave_Click(object sender, EventArgs e)
{
SerFS();
}
private void Tab2TonComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
tab2TonS1 = (string)Tab2TonComboBox1.SelectedItem;
}
private void Tab2TonComboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab2TonComboBox3.Items.Count < 6)
Tab2TonComboBox3.Items.Add(tab2TonS3);
tab2TonS3 = (string)Tab2TonComboBox2.SelectedItem;
Tab2TonComboBox3.Items.Remove(tab2TonS3);
}
private void Tab2TonComboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab2TonComboBox2.Items.Count < 6)
Tab2TonComboBox2.Items.Add(tab2TonS2);
tab2TonS2 = (string)Tab2TonComboBox3.SelectedItem;
Tab2TonComboBox2.Items.Remove(tab2TonS2);
}
private void Tab2TonButtAdd_Click(object sender, EventArgs e)
{
if ((((Tab2TonListBox2.FindString(tab2TonS1 + "-" + tab2TonS2 + "-" + tab2TonS3) < 0) && (Tab2TonListBox2.FindString(tab2TonS1 + "-" + tab2TonS3 + "-" + tab2TonS2)) < 0 && ((Tab2TonComboBox1.SelectedIndex >-1) && (Tab2TonComboBox2.Items.Count < 6) && (Tab2TonComboBox3.Items.Count < 6)))))
Tab2TonListBox2.Items.Add(tab2TonS1 + "-" + tab2TonS3 + "-" + tab2TonS2);
}
private void Tab2TonButtDel_Click(object sender, EventArgs e)
{
Tab2TonListBox2.Items.Remove(Tab2TonListBox2.SelectedItem);
}
private void Tab2TonButtClear_Click(object sender, EventArgs e)
{
Tab2TonListBox2.Items.Clear();
}
private void Tab2TonButtSave_Click(object sender, EventArgs e)
{
SerFS();
}
private void Tab3ComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
tab3S1 = (string)Tab3ComboBox1.SelectedItem;
}
private void Tab3ComboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab3ComboBox3.Items.Count < 6)
Tab3ComboBox3.Items.Add(tab3S3);
tab3S3 = (string)Tab3ComboBox2.SelectedItem;
Tab3ComboBox3.Items.Remove(tab3S3);
}
private void Tab3ComboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab3ComboBox2.Items.Count < 6)
Tab3ComboBox2.Items.Add(tab3S2);
tab3S2 = (string)Tab3ComboBox3.SelectedItem;
Tab3ComboBox2.Items.Remove(tab3S2);
}
private void Tab3ButtAdd_Click(object sender, EventArgs e)
{
if ((Tab3ListBox1.FindString(tab3S1 + "-" + tab3S2 + "-" + tab3S3) < 0) && (Tab3ListBox1.FindString(tab3S1 + "-" + tab3S3 + "-" + tab3S2) < 0 && (Tab3ComboBox1.SelectedIndex > -1) && (Tab3ComboBox2.Items.Count < 6) && (Tab3ComboBox3.Items.Count < 6)))
Tab3ListBox1.Items.Add(tab3S1 + "-" + tab3S3 + "-" + tab3S2);
}
private void Tab3ButtDel_Click(object sender, EventArgs e)
{
Tab3ListBox1.Items.Remove(Tab3ListBox1.SelectedItem);
}
private void Tab3ButtClear_Click(object sender, EventArgs e)
{
Tab3ListBox1.Items.Clear();
}
private void Tab3ButtSave_Click(object sender, EventArgs e)
{
SerFS();
}
private void Tab4ComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
tab4S1 = (string)Tab4ComboBox1.SelectedItem;
}
private void Tab4ComboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab4ComboBox3.Items.Count < 6)
Tab4ComboBox3.Items.Add(tab4S3);
tab4S3 = (string)Tab4ComboBox2.SelectedItem;
Tab4ComboBox3.Items.Remove(tab4S3);
}
private void Tab4ComboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab4ComboBox2.Items.Count < 6)
Tab4ComboBox2.Items.Add(tab4S2);
tab4S2 = (string)Tab4ComboBox3.SelectedItem;
Tab4ComboBox2.Items.Remove(tab4S2);
}
private void Tab4ButtAdd_Click(object sender, EventArgs e)
{
if ((Tab4ListBox1.FindString(tab4S1 + "-" + tab4S2 + "-" + tab4S3) < 0) && (Tab4ListBox1.FindString(tab4S1 + "-" + tab4S3 + "-" + tab4S2) < 0 && (Tab4ComboBox1.SelectedIndex > -1)&&(Tab4ComboBox2.Items.Count < 6) && (Tab4ComboBox3.Items.Count < 6)))
Tab4ListBox1.Items.Add(tab4S1+ "-" + tab4S3 + "-" + tab4S2);
}
private void Tab4ButtDel_Click(object sender, EventArgs e)
{
Tab4ListBox1.Items.Remove(Tab4ListBox1.SelectedItem);
}
private void Tab4ButtClear_Click(object sender, EventArgs e)
{
Tab4ListBox1.Items.Clear();
}
private void Tab4ButtSave_Click(object sender, EventArgs e)
{
SerFS();
}
private void Form1_Load(object sender, EventArgs e)
{
if (File.Exists(".\\banki_save.xml"))
DeSerFS();
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.Serialization.Formatters.Binary;
using System.Xml.Serialization;
using System.IO;
using System.Runtime.Serialization;
[Serializable]
public struct SerData
{
public string tab1S1, tab1S2, tab2KustS1, tab2KustS2, tab2TonS1, tab2TonS2, tab2TonS3, tab3S1, tab3S2, tab3S3, tab4S1, tab4S2, tab4S3;
public List<string> tab1List1;
public List<string> tab2KustList1;
public List<string> tab2TonList2;
public List<string> tab3List1;
public List<string> tab4List1;
public SerData(string s)
{
tab1S1 = s;
tab1S2 = s;
tab2KustS1 = s;
tab2KustS2 = s;
tab2TonS1 = s;
tab2TonS2 = s;
tab2TonS3 =s;
tab3S1 = s;
tab3S2 = s;
tab3S3 = s;
tab4S1 = s;
tab4S2 = s;
tab4S3 = s;
tab1List1 = new List<string>();
tab2KustList1 = new List<string>();
tab2TonList2 = new List<string>();
tab3List1 = new List<string>();
tab4List1 = new List<string>();
}
}
namespace Открытие_банок_3_Dev_
{
public partial class Form1 : Form
{
public string tab1S1, tab1S2, tab2KustS1, tab2KustS2, tab2TonS1, tab2TonS2, tab3S1, tab2TonS3, tab3S2, tab3S3, tab4S1, tab4S2, tab4S3;
public Form1()
{
InitializeComponent();
}
public void SerFS()
{
SerData ser=new SerData("");
ser.tab1S1 = tab1S1;
ser.tab1S2 = tab1S2;
ser.tab2KustS1 = tab2KustS1;
ser.tab2KustS2 = tab2KustS2;
ser.tab2TonS1 = tab2TonS1;
ser.tab2TonS2 = tab2TonS2;
ser.tab2TonS3 = tab2TonS3;
ser.tab3S1 = tab3S1;
ser.tab3S2 = tab3S2;
ser.tab3S3 = tab3S3;
ser.tab4S1 = tab4S1;
ser.tab4S2 = tab4S2;
ser.tab4S3 = tab4S3;
foreach (string s in Tab1ListBox1.Items)
ser.tab1List1.Add((string)s);
foreach (string s in Tab2KustListBox1.Items)
ser.tab2KustList1.Add((string)s);
foreach (string s in Tab1ListBox1.Items)
ser.tab2TonList2.Add((string)s);
foreach (string s in Tab3ListBox1.Items)
ser.tab3List1.Add((string)s);
foreach (string s in Tab4ListBox1.Items)
ser.tab4List1.Add((string)s);
StreamWriter sr = new StreamWriter(".\\banki_save.xml");
XmlSerializer xr = new XmlSerializer(typeof(SerData));
xr.Serialize(sr,ser);
sr.Close();
}
public void DeSerFS()
{
SerData ser = new SerData();
XmlSerializer xr = new XmlSerializer(typeof(SerData));
TextReader r = new StreamReader(".\\banki_save.xml");
ser = (SerData)xr.Deserialize(r);
Tab1ComboBox1.SelectedItem = ser.tab1S2;
Tab1ComboBox2.SelectedItem = ser.tab1S1;
Tab2KustComboBox1.SelectedItem = ser.tab2KustS1;
Tab2KustComboBox2.SelectedItem = ser.tab2KustS2;
Tab2TonComboBox1.SelectedItem = ser.tab2TonS1;
Tab2TonComboBox2.SelectedItem = ser.tab2TonS3;
Tab2TonComboBox3.SelectedItem = ser.tab2TonS2;
Tab3ComboBox1.SelectedItem = ser.tab3S1;
Tab3ComboBox2.SelectedItem = ser.tab3S3;
Tab3ComboBox3.SelectedItem = ser.tab3S2;
Tab4ComboBox1.SelectedItem = ser.tab4S1;
Tab4ComboBox2.SelectedItem = ser.tab4S3;
Tab4ComboBox3.SelectedItem = ser.tab4S2;
foreach (object s in ser.tab1List1)
{
Tab1ListBox1.Items.Add(s);
}
foreach (object s in ser.tab2KustList1)
{
Tab2KustListBox1.Items.Add(s);
}
foreach (object s in ser.tab2TonList2)
{
Tab2TonListBox2.Items.Add(s);
}
foreach (object s in ser.tab3List1)
{
Tab3ListBox1.Items.Add(s);
}
foreach (object s in ser.tab4List1)
{
Tab4ListBox1.Items.Add(s);
}
r.Close();
}
private void Tab1ComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab1ComboBox2.Items.Count < 6)
Tab1ComboBox2.Items.Add(tab1S2);
tab1S2 = (string)Tab1ComboBox1.SelectedItem;
Tab1ComboBox2.Items.Remove(tab1S2);
}
private void Tab1ComboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab1ComboBox1.Items.Count < 6)
Tab1ComboBox1.Items.Add(tab1S1);
tab1S1 = (string)Tab1ComboBox2.SelectedItem;
Tab1ComboBox1.Items.Remove(tab1S1);
}
private void Tab1ButtAdd_Click(object sender, EventArgs e)
{
if ((Tab1ListBox1.FindString(tab1S1 + "-" + tab1S2) < 0) && (Tab1ListBox1.FindString(tab1S2 + "-" + tab1S1) < 0 && (Tab1ComboBox1.Items.Count < 6) && (Tab1ComboBox2.Items.Count < 6)))
Tab1ListBox1.Items.Add(tab1S2 + "-" +tab1S1);
}
private void Tab1ButtDel_Click(object sender, EventArgs e)
{
Tab1ListBox1.Items.Remove(Tab1ListBox1.SelectedItem);
}
private void Tab1ButtClear_Click(object sender, EventArgs e)
{
Tab1ListBox1.Items.Clear();
}
public void Tab1ButtSave_Click(object sender, EventArgs e)
{
SerFS();
}
private void Tab2KustComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
tab2KustS1 = (string)Tab2KustComboBox1.SelectedItem;
}
private void Tab2KustComboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
tab2KustS2 = (string)Tab2KustComboBox2.SelectedItem;
}
private void Tab2KustButtAdd_Click(object sender, EventArgs e)
{
if ((Tab2KustListBox1.FindString(tab2KustS1 + "-" + tab2KustS2) < 0) && (Tab2KustListBox1.FindString(tab2KustS2 + "-" + tab2KustS1) < 0 && (Tab2KustComboBox1.Items.Count < 2) && (Tab2KustComboBox2.Items.Count < 7)))
Tab2KustListBox1.Items.Add(tab2KustS1 + "-" + tab2KustS2);
}
private void Tab2KustButtDel_Click(object sender, EventArgs e)
{
Tab2KustListBox1.Items.Remove(Tab2KustListBox1.SelectedItem);
}
private void Tab2KustButtClear_Click(object sender, EventArgs e)
{
Tab2KustListBox1.Items.Clear();
}
private void Tab2KustButtSave_Click(object sender, EventArgs e)
{
SerFS();
}
private void Tab2TonComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
tab2TonS1 = (string)Tab2TonComboBox1.SelectedItem;
}
private void Tab2TonComboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab2TonComboBox3.Items.Count < 6)
Tab2TonComboBox3.Items.Add(tab2TonS3);
tab2TonS3 = (string)Tab2TonComboBox2.SelectedItem;
Tab2TonComboBox3.Items.Remove(tab2TonS3);
}
private void Tab2TonComboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab2TonComboBox2.Items.Count < 6)
Tab2TonComboBox2.Items.Add(tab2TonS2);
tab2TonS2 = (string)Tab2TonComboBox3.SelectedItem;
Tab2TonComboBox2.Items.Remove(tab2TonS2);
}
private void Tab2TonButtAdd_Click(object sender, EventArgs e)
{
if ((((Tab2TonListBox2.FindString(tab2TonS1 + "-" + tab2TonS2 + "-" + tab2TonS3) < 0) && (Tab2TonListBox2.FindString(tab2TonS1 + "-" + tab2TonS3 + "-" + tab2TonS2)) < 0 && ((Tab2TonComboBox1.SelectedIndex >-1) && (Tab2TonComboBox2.Items.Count < 6) && (Tab2TonComboBox3.Items.Count < 6)))))
Tab2TonListBox2.Items.Add(tab2TonS1 + "-" + tab2TonS3 + "-" + tab2TonS2);
}
private void Tab2TonButtDel_Click(object sender, EventArgs e)
{
Tab2TonListBox2.Items.Remove(Tab2TonListBox2.SelectedItem);
}
private void Tab2TonButtClear_Click(object sender, EventArgs e)
{
Tab2TonListBox2.Items.Clear();
}
private void Tab2TonButtSave_Click(object sender, EventArgs e)
{
SerFS();
}
private void Tab3ComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
tab3S1 = (string)Tab3ComboBox1.SelectedItem;
}
private void Tab3ComboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab3ComboBox3.Items.Count < 6)
Tab3ComboBox3.Items.Add(tab3S3);
tab3S3 = (string)Tab3ComboBox2.SelectedItem;
Tab3ComboBox3.Items.Remove(tab3S3);
}
private void Tab3ComboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab3ComboBox2.Items.Count < 6)
Tab3ComboBox2.Items.Add(tab3S2);
tab3S2 = (string)Tab3ComboBox3.SelectedItem;
Tab3ComboBox2.Items.Remove(tab3S2);
}
private void Tab3ButtAdd_Click(object sender, EventArgs e)
{
if ((Tab3ListBox1.FindString(tab3S1 + "-" + tab3S2 + "-" + tab3S3) < 0) && (Tab3ListBox1.FindString(tab3S1 + "-" + tab3S3 + "-" + tab3S2) < 0 && (Tab3ComboBox1.SelectedIndex > -1) && (Tab3ComboBox2.Items.Count < 6) && (Tab3ComboBox3.Items.Count < 6)))
Tab3ListBox1.Items.Add(tab3S1 + "-" + tab3S3 + "-" + tab3S2);
}
private void Tab3ButtDel_Click(object sender, EventArgs e)
{
Tab3ListBox1.Items.Remove(Tab3ListBox1.SelectedItem);
}
private void Tab3ButtClear_Click(object sender, EventArgs e)
{
Tab3ListBox1.Items.Clear();
}
private void Tab3ButtSave_Click(object sender, EventArgs e)
{
SerFS();
}
private void Tab4ComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
tab4S1 = (string)Tab4ComboBox1.SelectedItem;
}
private void Tab4ComboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab4ComboBox3.Items.Count < 6)
Tab4ComboBox3.Items.Add(tab4S3);
tab4S3 = (string)Tab4ComboBox2.SelectedItem;
Tab4ComboBox3.Items.Remove(tab4S3);
}
private void Tab4ComboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
if (Tab4ComboBox2.Items.Count < 6)
Tab4ComboBox2.Items.Add(tab4S2);
tab4S2 = (string)Tab4ComboBox3.SelectedItem;
Tab4ComboBox2.Items.Remove(tab4S2);
}
private void Tab4ButtAdd_Click(object sender, EventArgs e)
{
if ((Tab4ListBox1.FindString(tab4S1 + "-" + tab4S2 + "-" + tab4S3) < 0) && (Tab4ListBox1.FindString(tab4S1 + "-" + tab4S3 + "-" + tab4S2) < 0 && (Tab4ComboBox1.SelectedIndex > -1)&&(Tab4ComboBox2.Items.Count < 6) && (Tab4ComboBox3.Items.Count < 6)))
Tab4ListBox1.Items.Add(tab4S1+ "-" + tab4S3 + "-" + tab4S2);
}
private void Tab4ButtDel_Click(object sender, EventArgs e)
{
Tab4ListBox1.Items.Remove(Tab4ListBox1.SelectedItem);
}
private void Tab4ButtClear_Click(object sender, EventArgs e)
{
Tab4ListBox1.Items.Clear();
}
private void Tab4ButtSave_Click(object sender, EventArgs e)
{
SerFS();
}
private void Form1_Load(object sender, EventArgs e)
{
if (File.Exists(".\\banki_save.xml"))
DeSerFS();
}
}
}