internal void removeFragebogen(Fragebogen tmp)
 {
     foreach (Fragebogen item in appFrageboegen)
     {
         if (item.strName.Equals(tmp.strName))
         {
             appFrageboegen.Remove(item);
         }
     }
 }
        /*internal void save()
         * {
         *  FileStream fs = new FileStream("udata1.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", MessageBoxButtons.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", MessageBoxButtons.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);
        }
Esempio n. 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);
        }