private void menuItemClear_Click(object sender, RoutedEventArgs e) { pf = new PolyFunc(); dih = new Lagranje(); combo = new Newton(); textBoxXMin.Text = "-10"; textBoxXMax.Text = "10"; textBoxYMin.Text = "-10"; textBoxYMax.Text = "10"; textBoxSols.Text = ""; }
public static void Main() { PolyFunc <double, double> l1 = new PolyFunc <double, double>(1); PolyFunc <double, double> l2 = new PolyFunc <double, double>(2); IntegrableFunction <double, double> split = IntegrableFunction <double, double> .SplitAt(l1, 2, l2, false); for (double d = 0; d < 5; d += 0.1) { Console.WriteLine("<{0},{1},{2},{3},{4}>", d, l1.F(d), l2.F(d), split.F(d), split.FI(d)); } Console.ReadKey(); }
private void menuItemClear_Click(object sender, RoutedEventArgs e) { pf = new PolyFunc(); gold = new GoldenAxeEffect(); cubic = new CubicRubic(); textBoxEps.Text = "0,01"; textBoxXMin.Text = "-10"; textBoxXMax.Text = "10"; textBoxYMin.Text = "-10"; textBoxYMax.Text = "10"; textBoxFunc.Text = ""; textBoxSols.Text = ""; }
private void menuItemClear_Click(object sender, RoutedEventArgs e) { pf = new PolyFunc(); dih = new DihMethod(); combo = new CombinedMethod(); textBoxEps.Text = "0,01"; textBoxXMin.Text = "-10"; textBoxXMax.Text = "10"; textBoxYMin.Text = "-10"; textBoxYMax.Text = "10"; textBoxFunc.Text = ""; textBoxSols.Text = ""; }
public MainChar(Drawable d, BulletStyle sty, double x0, double y0, double s = 20, GraphicsStyle g = null) : base(0, null, d, new Point(2), new EntityClass("MainChar", "Character"), null, g) { speed = s; this.x0 = x0; this.y0 = y0; vxf = new PolyFunc <double, double>(0); vyf = new PolyFunc <double, double>(0); xp = t => x0; yp = t => y0; Position = new Particle(t => xp(t), t => yp(t)); BulletEmission em = new BulletEmission(0, 0.25, sty, TrajectoryFactory.SimpleVel(2, -40, 5), TrajectoryFactory.SimpleVel(-2, -40, -5) ); BulletPattern pat = new BulletPattern(new EntityClass("MainCharBullet", "Bullet"), em); Emitter = new BulletEmitter(-1, pat); Time = 0; }
private void menuItemOpen_Click(object sender, RoutedEventArgs e) { try { OpenFileDialog ofd = new OpenFileDialog(); ofd.Multiselect = false; ofd.Filter = "XML data file (*.xml)|*.xml|All files|*.*"; ofd.InitialDirectory = Environment.CurrentDirectory; ofd.DefaultExt = "*.xml"; ofd.CheckPathExists = true; SerializedFunc sf = new SerializedFunc(); if (ofd.ShowDialog() == true) { try { sf.Read(ofd.FileName); filePath = ofd.FileName; } catch (Exception) { MessageBox.Show("Ошибка чтения с файла", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error); } } menuItemClear_Click(sender, new RoutedEventArgs()); pf = sf.pf; textBoxEps.Text = sf.eps; textBoxXMin.Text = sf.xMin; textBoxXMax.Text = sf.xMax; textBoxYMin.Text = sf.yMin; textBoxYMax.Text = sf.yMax; textBoxFunc.Text = pf.StringFunction; textBoxSols.Text = ""; buttonDraw_Click(sender, new RoutedEventArgs()); } catch { } }
public void Clear() { pf = new PolyFunc(); Solutions.Clear(); Log.Clear(); }
public Newton() { pf = new PolyFunc(); Solutions = new List <double>(); Log = new List <string>(); }
public CombinedMethod() { pf = new PolyFunc(); Solutions = new List <double>(); Log = new List <string>(); }