void Main_DuplicateMapView_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
        {
            var vm = e.Parameter as MapViewModel;

            if (vm != null)
            {
                var mapView = new MapView
                {
                    DataContext         = vm,
                    HorizontalAlignment = HorizontalAlignment.Stretch,
                    VerticalAlignment   = VerticalAlignment.Stretch,
                    Margin   = new Thickness(0, 0, 3, 0),
                    MapImage =
                    {
                        Stretch  = Stretch.Uniform,
                        MinWidth = 500
                    }
                };
                var newPlotWindow = new FloatableWindow()
                {
                    Name                = "wndMapView" + _numMapViews++,
                    Content             = mapView,
                    ParentLayoutRoot    = this.layoutRoot,
                    Background          = new SolidColorBrush(Colors.White),
                    VerticalAlignment   = VerticalAlignment.Top,
                    HorizontalAlignment = HorizontalAlignment.Left,
                    Margin              = new Thickness(0),
                    Width               = 700,
                    Height              = 540
                };

                newPlotWindow.Show();
            }
        }
        void Main_DuplicatePlotView_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
        {
            var vm = e.Parameter as PlotViewModel;

            if (vm != null)
            {
                var plotView = new PlotView
                {
                    DataContext         = vm,
                    HorizontalAlignment = HorizontalAlignment.Stretch,
                    VerticalAlignment   = VerticalAlignment.Stretch,
                    Margin = new Thickness(0, 0, 3, 0)
                };
                var newPlotWindow = new FloatableWindow()
                {
                    Name                = "wndPlotView" + _numPlotViews++,
                    Content             = plotView,
                    ParentLayoutRoot    = this.layoutRoot,
                    Background          = new SolidColorBrush(Colors.White),
                    VerticalAlignment   = VerticalAlignment.Top,
                    HorizontalAlignment = HorizontalAlignment.Left
                };

                newPlotWindow.Show();
            }
        }
        void Mesh_PlotMap_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
        {
            var mapData = e.Parameter as MapData;

            if (mapData != null)
            {
                SetBitmapData(mapData);
                UpdateImages(); // why is this called separately?
            }
        }
 private void ExportData_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
 {
     if (_mapData != null && _mapData.RawData != null && _mapData.XValues != null && _mapData.YValues != null)
     {
         using (var stream = StreamFinder.GetLocalFilestreamFromSaveFileDialog("txt"))
         {
             if (stream != null)
             {
                 using (StreamWriter sw = new StreamWriter(stream))
                 {
                     sw.Write("% X Values:\t");
                     _mapData.XValues.ForEach(x => sw.Write(x + "\t"));
                     sw.WriteLine();
                     sw.Write("% Y Values:\t");
                     _mapData.YValues.ForEach(y => sw.Write(y + "\t"));
                     sw.WriteLine();
                     sw.Write("% Map Values:\t");
                     _mapData.RawData.ForEach(val => sw.Write(val + "\t"));
                     sw.WriteLine();
                 }
             }
         }
     }
 }
 void IsoStorage_IncreaseSpaceQuery_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
 {
     _floatableWindow.ShowDialog();
 }
Пример #6
0
 /// <summary>
 /// Execute FEM Sovler
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void FemExecuteFemSolverExecuted(object sender, SLExtensions.Input.ExecutedEventArgs e)
 {
     ExecuteSolver();
 }