private void CreateButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         Result = new Rule(FunctionNameTextBox.Text, PEFunctionControl.CreateMembershipFunction(41, -5, 5),
                           CPEFunctionControl.CreateMembershipFunction(41, -5, 5),
                           DHFunctionControl.CreateMembershipFunction(41, -5, 5));
         this.Close();
     }
     catch (FormatException exception)
     {
         MessageBox.Show("The values you have given are invalid. Plese recheck them");
         Console.Out.WriteLine(exception);
     }
 }