public MainWindow() { InitializeComponent(); EQ = new Equations(EquationsTextBox, EquationsAnswerLabel); CL = new Clock(LeftCanvas, ClockDayLabel, SecondCounter, MinuteCounter, MinutePointer, HourCounter, HourPointer); CL.Run(); }
/// <summary> /// FindVariables Method for extracting the variables out of the equation /// </summary> private void FindVariables() { Equations = Equations.Where(eq => eq != "" || eq != string.Empty).ToArray(); VarCoefficients = new Dictionary <char, List <double> >(); foreach (string equation in Equations) { foreach (char ch in equation) { if (char.IsLetter(ch)) { VarCoefficients[ch] = new List <double>(); } } } for (int i = 0; i < VarCoefficients.Keys.Count; i++) { for (int j = 0; j < VarCoefficients.Keys.Count; j++) { VarCoefficients[VarCoefficients.ElementAt(i).Key].Add(0); } } }
private void Button_Click_1(object sender, RoutedEventArgs e) { Equations equation = new Equations(Equation); solution.Text = equation.solve(); }