예제 #1
0
        public string ToString()
        {
            StringBuilder builder = new StringBuilder();

            if (myServiceID != null)
            {
                builder.Append("Service ID: " + myServiceID + "\n");
            }
            builder.Append("This Service is to " + myServiceType.ToString() + " " + myDonationRequest.ToString() + "\n");
            if (myServiceDescription != null)
            {
                builder.Append("User Submitted Description: " + myServiceDescription + "\n");
            }
            builder.Append("Service is Selected: " + isTrue(mySelected) + "\n");
            builder.Append("Service is Completed: " + isTrue(myCompleted) + "\n");
            if (myTimeStart != null)
            {
                builder.Append(myTimeStart + " to " + myTimeStop + "\n");
            }
            if (myReview != null)
            {
                builder.Append("Review of Service:\n" + myReview.ToString() + "\n");
            }
            builder.Append("______________________________________________________\n");

            return(builder.ToString());
        }
예제 #2
0
        /// <summary>
        /// Constructs a MainWindow and hides it.
        /// @Author Karanbir and Ameet
        /// </summary>
        public MainWindow()
        {
            SERVICE_DATABASE = new ServiceDatabase();
            USER_DATABASE    = new UserDatabase();
            this.Hide();
            InitializeComponent();

            Form1 login = new Form1(this);

            login.Show();
            ReviewService review = new ReviewService(4, "the best");

            Console.WriteLine(review.ToString());
        }