Пример #1
0
 public MainPage()
 {
     this.InitializeComponent();
     comboBoxPartOfPolynomial.Items.Add("Up");
     comboBoxPartOfPolynomial.Items.Add("Down");
     plotView.Model = PlotModelDefine.ZeroCrossingForOFN(30);
     ApplicationView.GetForCurrentView().TryEnterFullScreenMode();
     var    bounds      = ApplicationView.GetForCurrentView().VisibleBounds;
     double scaleFactor = DisplayInformation.GetForCurrentView().RawPixelsPerViewPixel;
     var    size        = new Size(bounds.Width * scaleFactor, bounds.Height * scaleFactor);
 }
Пример #2
0
 private void ButtonChangeMode_Click(object sender, RoutedEventArgs e)
 {
     if (isPolynomialMode)
     {
         PolynomialFNGrid.Margin              = new Thickness(960, 0, 0, 0);
         PlotViewGrid.Margin                  = new Thickness(0, 540, 0, 0);
         plotView.Width                       = 1920;
         plotView.Height                      = 540;
         PlotViewGrid.Height                  = 540;
         PlotViewGrid.Width                   = 1920;
         plotView.Model                       = PlotModelDefine.ZeroCrossingForOFN(30);
         isPolynomialMode                     = false;
         buttonAddPolynomials.IsEnabled       = false;
         buttonSubstractPolynomials.IsEnabled = false;
         buttonMultiplyPolynomials.IsEnabled  = false;
         buttonDividePolynomials.IsEnabled    = false;
         buttonAdd.IsEnabled                  = true;
         buttonSubtract.IsEnabled             = true;
         buttonMultiply.IsEnabled             = true;
         buttonDivide.IsEnabled               = true;
     }
     else
     {
         PolynomialFNGrid.Margin              = new Thickness(0, 400, 0, 0);
         PlotViewGrid.Margin                  = new Thickness(960, 0, 0, 0);
         plotView.Width                       = 960;
         plotView.Height                      = 1080;
         PlotViewGrid.Height                  = 1080;
         PlotViewGrid.Width                   = 960;
         plotView.Model                       = PlotModelDefine.ZeroCrossingForPolynomial(30);
         isPolynomialMode                     = true;
         buttonAddPolynomials.IsEnabled       = true;
         buttonSubstractPolynomials.IsEnabled = true;
         buttonMultiplyPolynomials.IsEnabled  = true;
         buttonDividePolynomials.IsEnabled    = true;
         buttonAdd.IsEnabled                  = false;
         buttonSubtract.IsEnabled             = false;
         buttonMultiply.IsEnabled             = false;
         buttonDivide.IsEnabled               = false;
     }
 }