public ShopingBag(MyQueue femaleQ, MyQueue maleQ, CircularList Books, TwoWayLinkedList soldB)
 {
     femaleQueue = femaleQ;
     maleQueue   = maleQ;
     books       = Books;
     soldBooks   = soldB;
     InitializeComponent();
 }
 public static void writeSoldBooks2File(TwoWayLinkedList soldBooks)
 {
     File.WriteAllText("soldBookFile.txt", string.Empty);
     for (int i = 0; i < soldBooks.Lenght; i++)
     {
         Book temp = (Book)soldBooks[i];
         temp.writeSoldBooks2File();
     }
 }
        public static void readSoldBooksFromFile(TwoWayLinkedList soldBooks)
        {
            StreamReader sr = new StreamReader("soldBookFile.txt");

            for (int i = 0; !sr.EndOfStream; i++)
            {
                Book temp = new Book();
                temp.BookName        = sr.ReadLine();
                temp.WriterName      = sr.ReadLine();
                temp.PublicationYear = Convert.ToInt32(sr.ReadLine());
                temp.Price           = Convert.ToInt32(sr.ReadLine());
                soldBooks.InsertAtBack(temp);
                sr.ReadLine();//baraye rad kardane yek khat setare
            }
            sr.Close();
        }
 public SoldBooks(TwoWayLinkedList books)
 {
     soldBooks = books;
     InitializeComponent();
 }