コード例 #1
0
        private void button6_Click(object sender, RoutedEventArgs e)
        {
            if (TipTable.SelectedIndex > -1)
            {
                ClassTip type = listatipova[TipTable.SelectedIndex];

                Tip unostip = new Tip(this, true, TipTable.SelectedIndex, type.IDtipa);


                ClassTip tip = listatipova[TipTable.SelectedIndex];

                unostip.textBox1.Text       = tip.IDtipa;
                unostip.textBox1.IsReadOnly = true;
                unostip.textBox2.Text       = tip.imetipa;
                unostip.textBox3.Text       = tip.opistipa;
                unostip.image1.Source       = tip.Ikonica;


                unostip.ShowDialog();
            }
            else
            {
                neuspesnaSelekcija nb = new neuspesnaSelekcija();
                nb.ShowDialog();
            }
        }
コード例 #2
0
        private void OpenFileTip(object sender, RoutedEventArgs e)
        {
            var binaryFormatter = new BinaryFormatter();

            if (File.Exists(pathTip))
            {
                using (FileStream s = File.Open(pathTip, FileMode.Open))
                {
                    while (s.Position != s.Length)
                    {
                        ClassTip obj = (ClassTip)binaryFormatter.Deserialize(s);
                        listatipova.Add(obj);
                    }
                }
            }
        }
コード例 #3
0
 internal void AddList(ClassTip tip)
 {
     this.listatipova.Add(tip);
 }