예제 #1
0
 internal void removeFragebogen(Fragebogen tmp)
 {
     foreach (Fragebogen item in appFrageboegen)
     {
         if (item.strName.Equals(tmp.strName))
         {
             appFrageboegen.Remove(item);
         }
     }
 }
예제 #2
0
        /*internal void save()
         * {
         *  FileStream fs = new FileStream("udata.dat", FileMode.Create);
         *
         *  // Construct a BinaryFormatter and use it to serialize the data to the stream.
         *  BinaryFormatter formatter = new BinaryFormatter();
         *  try
         *  {
         *      formatter.Serialize(fs, appFrageboegen);
         *  }
         *  catch (SerializationException ec)
         *  {
         *      MessageBox.Show(ec.Message, "Speicherfehler", MessageBoxButton.OK);
         *      //Console.WriteLine("Failed to serialize. Reason: " + ec.Message);
         *      throw;
         *  }
         *  finally
         *  {
         *      fs.Close();
         *  }
         *
         *  fs = new FileStream("udata2.dat", FileMode.Create);
         *
         *  // Construct a BinaryFormatter and use it to serialize the data to the stream.
         *  formatter = new BinaryFormatter();
         *  try
         *  {
         *      formatter.Serialize(fs, appFragen);
         *  }
         *  catch (SerializationException ec)
         *  {
         *      MessageBox.Show(ec.Message, "Speicherfehler", MessageBoxButton.OK);
         *      //Console.WriteLine("Failed to serialize. Reason: " + ec.Message);
         *      throw;
         *  }
         *  finally
         *  {
         *      fs.Close();
         *  }
         * }*/

        internal Boolean isContaining(Fragebogen tmp)
        {
            foreach (Fragebogen item in appFrageboegen)
            {
                if (tmp.strName.Equals(item.strName))
                {
                    return(true);
                }
            }
            return(false);
        }
예제 #3
0
        public bool Equals(Fragebogen obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (obj.strName.Equals(strName))
            {
                return(true);
            }
            else
            {
                return(false);
            }

            //return base.Equals(obj);
        }