Must be answered in c windows form application The figure be
Must be answered in c#, windows form application
The figure below shows the file Sales.txt contents displayed in Notepad. Create an application that reads this file\'s contents into an array, displays the array\'s contents in a List Box control, and calculates and displays the total of the array\'s values. After you finished part one, modify the program and display the following: The average of the values in the array the largest value in the array the smallest value in the arraySolution
Form1.cs
room_list = []
 room = [] * 5
 room = [\"You are in room 0 bedroom 2 There is a passage to the North\",3,1,None,None]
 room_list.append(room)
 room =[\"you are in room 1 South hall\",4,2,None,0]
 room_list.append(room)
 room = [\"you are in room 2 dining room\",5, 1,None,None]
 room_list.append(room)
 room = [\"you are in room 3 Bedroom 1\",None,4,0,None]
 room_list.append(room)
 room = [\"room 4 North hall\",6,5,1,3]
 room_list.append(room)
 room = [\"room 5 Kitchen\",None,None,2,4]
 room_list.append(room)
 room = [\"room 6 balcony\",None,None,4,None]
 room_list.append(room)
 current_room= 0
 done = False
 while done == False:
     print (room_list[current_room][0])
     x=input(\"what do you want to do?\")
     if x.upper() == \"go north\".upper() or x.upper() == \"n\".upper():
         next_room=room_list[current_room][1]
         if next_room == None:
             print(\"You Can\'t go that way\")
         else:
             current_room = next_room
    elif x.upper() == \"go east\".upper() or x.upper() == \"e\".upper():
         next_room=room_list[current_room][2]
         if next_room == None:
             print(\"You can\'t go that way\")
         else: current_room = next_room
       
     elif x.upper() == \"go south\".upper() or x.upper() == \"s\".upper():
         next_room=room_list[current_room][3]
         if next_room == None:
             print(\"You can\'t go that way\")
         else: current_room = next_room
    elif x.upper() == \"go west\".upper() or x.upper() == \"w\".upper():
         next_room=room_list[current_room][4]
         if next_room == None:
             print(\"You can\'t go that way\")
         else: current_room = next_room
    elif x.upper() == \"quit\".upper():
         end = input(\"Are you sure you want too quit? :\")
         if end.upper()== \"yes\".upper():
             done = True
       
     else: print(\"I don\'t understand what you are trying too do. \")
  
 Form1.Designer.cs
namespace Sales_Analysis
 {
     partial class Form1
     {
         /// <summary>
         /// Required designer variable.
         /// </summary>
         private System.ComponentModel.IContainer components = null;
        /// <summary>
         /// Clean up any resources being used.
         /// </summary>
         /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>
         protected override void Dispose(bool disposing)
         {
             if (disposing && (components != null))
             {
                 components.Dispose();
             }
             base.Dispose(disposing);
         }
#region Windows Form Designer generated code
        /// <summary>
         /// Required method for Designer support - do not modify
         /// the contents of this method with the code editor.
         /// </summary>
         private void InitializeComponent()
         {
             this.outputListBox = new System.Windows.Forms.ListBox();
             this.displayButton = new System.Windows.Forms.Button();
             this.SuspendLayout();
             //
             // outputListBox
             //
             this.outputListBox.FormattingEnabled = true;
             this.outputListBox.Location = new System.Drawing.Point(152, 12);
             this.outputListBox.Name = \"outputListBox\";
             this.outputListBox.Size = new System.Drawing.Size(120, 95);
             this.outputListBox.TabIndex = 0;
             //
             // displayButton
             //
             this.displayButton.Location = new System.Drawing.Point(32, 45);
             this.displayButton.Name = \"displayButton\";
             this.displayButton.Size = new System.Drawing.Size(75, 23);
             this.displayButton.TabIndex = 1;
             this.displayButton.Text = \"Calculate\";
             this.displayButton.UseVisualStyleBackColor = true;
             this.displayButton.Click += new System.EventHandler(this.displayButton_Click);
             //
             // Form1
             //
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(284, 130);
             this.Controls.Add(this.displayButton);
             this.Controls.Add(this.outputListBox);
             this.Name = \"Form1\";
             this.Text = \"Form1\";
             this.ResumeLayout(false);
}
#endregion
        private System.Windows.Forms.ListBox outputListBox;
         private System.Windows.Forms.Button displayButton;
     }
 }
 Program.cs
using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Threading.Tasks;
 using System.Windows.Forms;
namespace Sales_Analysis
 {
     static class Program
     {
         /// <summary>
         /// The main entry point for the application.
         /// </summary>
         [STAThread]
         static void Main()
         {
             Application.EnableVisualStyles();
             Application.SetCompatibleTextRenderingDefault(false);
             Application.Run(new Form1());
         }
     }
 }
sales.txt
1245.67
 1189.55
 1098.72
 1456.88
 2109.34
 1987.55
 1872.36



