public MainWindow() { InitializeComponent(); Containers.Read_Players(); Containers.Read_Championships(); Containers.Read_Employees(); Containers.Read_Clubs(); Containers.Read_Teams(); Containers.Read_Coach(); // AGE a = new SFS.AGE(); // a.Show(); // mainqueryform f = new mainqueryform(); // f.Show(); // Options o = new Options(); // o.Show(); TeamPlayers n = new TeamPlayers(); n.Show(); Display_Club z = new Display_Club(); z.Show(); Display_Coaches c = new Display_Coaches(); c.Show(); }
public MainWindow() { InitializeComponent(); if (File.Exists("Championships.xml")) { Containers.Read_Championships(); } if (File.Exists("Players.xml")) { Containers.Read_Players(); } if (File.Exists("Employees.xml")) { Containers.Read_Employees(); } if (File.Exists("Clubs.xml")) { Containers.Read_Clubs(); } if (File.Exists("Teams.xml")) { Containers.Read_Teams(); } if (File.Exists("Coaches.xml")) { Containers.Read_Coach(); } if (File.Exists("Results.xml")) { Containers.read_players_results(); } if (File.Exists("Sponsers.xml")) { Containers.Read_Sponsor(); } if (File.Exists("Admins.xml")) { Containers.Read_Admin(); } if (File.Exists("Expenses.xml")) { Expense.read_expense(); } if (File.Exists("Counter1.xml")) { Containers.Read_count1(); } if (File.Exists("Counter2.xml")) { Containers.Read_count2(); } }
public ChartDemo() { // Demo Data if (File.Exists("Employees.xml")) { Containers.Read_Employees(); } Dictionary <string, float> departmentSalaries = new Dictionary <string, float>(); Dictionary <string, int> departmentFrequency = new Dictionary <string, int>(); // Initializing Each Department Accumulative Salary foreach (Employee employee in Containers.Employee_list) { if (departmentSalaries.ContainsKey(employee.GetDepartment())) { departmentSalaries[employee.GetDepartment()] += employee.getSalary(); departmentFrequency[employee.GetDepartment()]++; } else { departmentSalaries.Add(employee.GetDepartment(), employee.getSalary()); departmentFrequency.Add(employee.GetDepartment(), 1); } } // Calculating the Median of the Salaries List <string> Keys = new List <string>(departmentSalaries.Keys); foreach (string department in Keys) { departmentSalaries[department] /= departmentFrequency[department]; } Data = new SeriesCollection { new LineSeries { Values = new ChartValues <float>(departmentSalaries.Values) } }; Labels = new List <string>(departmentSalaries.Keys); InitializeComponent(); MainChart.Series = Data; HorizontalAxis.Labels = Labels; }
public MainWindow() { InitializeComponent(); Containers.Read_Players(); Containers.Read_Championships(); Containers.Read_Employees(); Containers.Read_Clubs(); Containers.Read_Teams(); AGE a = new SFS.AGE(); a.Show(); mainqueryform f = new mainqueryform(); f.Show(); Options o = new Options(); o.Show(); }
public departmentstat() { if (File.Exists("Employees.xml")) { Containers.Read_Employees(); } Dictionary <string, float> departmentSalaries = new Dictionary <string, float>(); Dictionary <string, int> departmentFrequency = new Dictionary <string, int>(); foreach (Employee employee in Containers.Employee_list) { if (departmentSalaries.ContainsKey(employee.GetDepartment())) { departmentSalaries[employee.GetDepartment()] += employee.getSalary(); departmentFrequency[employee.GetDepartment()]++; } else { departmentSalaries.Add(employee.GetDepartment(), employee.getSalary()); departmentFrequency.Add(employee.GetDepartment(), 1); } List <string> Keys = new List <string>(departmentSalaries.Keys); foreach (string department in Keys) { departmentSalaries[department] = departmentFrequency[department]; } Data = new SeriesCollection { new LineSeries { Values = new ChartValues <float>(departmentSalaries.Values) } }; Labels = new List <string>(departmentSalaries.Keys); InitializeComponent(); dep.Series = Data; horizontalAxis.Labels = Labels; } }
public DoughnutChartExample() { InitializeComponent(); if (File.Exists("Employees.xml")) { Containers.Read_Employees(); } Dictionary <string, float> departmentSalaries = new Dictionary <string, float>(); Dictionary <string, int> departmentFrequency = new Dictionary <string, int>(); // Initializing Each Department Accumulative Salary foreach (Employee employee in Containers.Employee_list) { if (departmentSalaries.ContainsKey(employee.GetDepartment())) { departmentSalaries[employee.GetDepartment()] += employee.getSalary(); departmentFrequency[employee.GetDepartment()]++; } else { departmentSalaries.Add(employee.GetDepartment(), employee.getSalary()); departmentFrequency.Add(employee.GetDepartment(), 1); } } // Calculating the Median of the Salaries List <string> Keys = new List <string>(departmentSalaries.Keys); foreach (string department in Keys) { departmentSalaries[department] = departmentFrequency[department]; } SeriesCollection = new SeriesCollection { new PieSeries { Title = "HR", Values = new ChartValues <ObservableValue> { new ObservableValue(departmentFrequency["HR"]) }, DataLabels = true }, new PieSeries { Title = "Coach", Values = new ChartValues <ObservableValue> { new ObservableValue(departmentFrequency["Coach"]) }, DataLabels = true }, new PieSeries { Title = "Accounting", Values = new ChartValues <ObservableValue> { new ObservableValue(departmentFrequency["Accounting"]) }, DataLabels = true }, }; //adding values or series will update and animate the chart automatically //SeriesCollection.Add(new PieSeries()); //SeriesCollection[0].Values.Add(5); DataContext = this; }