Example #1
0
 private void btnSerialize_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         Serialisointi.SerialisoiXml(txtFileName.Text, mittaukset);
         MessageBox.Show("Serialisointi onnistui");
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Example #2
0
 private void btnDeserialize_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         mittaukset = Serialisointi.DeSerialisoiXml(txtFileName.Text);
         ApplyChanges();
         MessageBox.Show("Deserialisointi onnistui");
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Example #3
0
        private void btnDeserializeBin_Click(object sender, RoutedEventArgs e)
        {
            object obj = new object();

            try
            {
                Serialisointi.DeSerialisoi(txtFileName.Text, ref obj);
                mittaukset = obj as List <MittausData>;
                ApplyChanges();
                MessageBox.Show("Deserialisointi onnistui");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }