public CircleWindow() { viewModel = new PlotWindowModel(CanonicalDomain.Circular); DataContext = viewModel; InitializeComponent(); Settings.PlotGeomParams.hVertical = 0.5; Settings.PlotGeomParamsConstant.hVertical = 0.5; #if !HELP_FOR_GROUP_LEADER w = new Hydrodynamics_Sources.Potential(1, 0, 1, 0, new Hydrodynamics_Sources.Conformal_Maps.IdentityTransform()); s = new Hydrodynamics_Sources.CircleStreamLinesBuilder(w, viewModel); #endif mapsList.SelectionChanged += MapsList_SelectionChanged; #if !HELP_FOR_GROUP_LEADER mapsList.Items.Add("Тождественное отображение"); mapsList.Items.Add("Обтекание пластины"); mapsList.Items.Add("Профиль Жуковского"); #else mapsList.Items.Add("Help"); #endif mapsList.SelectedIndex = 0; viewModel.PlotModel.MouseMove += PlotModel_MouseMove; viewModel.PlotModel.MouseDown += PlotModel_MouseDown; plot.Controller = new PlotController(); plot.Controller.UnbindMouseDown(OxyMouseButton.Left); }
internal SaveWindow(PlotWindowModel vm) { InitializeComponent(); viewModel = vm; Deactivated += OnWindowDeactivated; WidthDividedOnHeight = (vm.PlotModel.Width) / (vm.PlotModel.Height); widthSlider.Minimum = widthSlider.Value = vm.PlotModel.Width; heightSlider.Minimum = heightSlider.Value = vm.PlotModel.Height; formatList.SelectionChanged += FormatList_SelectionChanged; formatList.SelectedIndex = 0; path = pathTextBox.Text = AppDomain.CurrentDomain.BaseDirectory + @"Saved Plots\"; pathTextBox.TextChanged += (sender, e) => { path = pathTextBox.Text; }; }
public ZoneWindow() { viewModel = new PlotWindowModel(CanonicalDomain.Zone); DataContext = viewModel; InitializeComponent(); Settings.PlotGeomParams.hVertical = 2 * Math.PI / 16.0; Settings.PlotGeomParamsConstant.hVertical = Settings.PlotGeomParams.hVertical; w = new Hydrodynamics_Sources.Potential(1, 0, 0, 0, new Hydrodynamics_Sources.Conformal_Maps.IdentityTransform()); s = new Hydrodynamics_Sources.HalfPlaneAndZoneStreamLinesBuilder(w, viewModel, CanonicalDomain.Zone); mapsList.SelectionChanged += MapsList_SelectionChanged; mapsList.Items.Add("Тождественное\nотображение"); mapsList.Items.Add("Плоскость с двумя\nотброшенными лучами"); mapsList.Items.Add("Диффузор"); mapsList.SelectedIndex = 0; viewModel.PlotModel.MouseMove += PlotModel_MouseMove; viewModel.PlotModel.MouseDown += PlotModel_MouseDown; plot.Controller = new PlotController(); plot.Controller.UnbindMouseDown(OxyMouseButton.Left); }
public HalfPlane() { viewModel = new PlotWindowModel(CanonicalDomain.HalfPlane); DataContext = viewModel; InitializeComponent(); Settings.PlotGeomParams.hVertical = 0.5; Settings.PlotGeomParamsConstant.hVertical = 0.5; w = new Hydrodynamics_Sources.Potential(1, 0, 0, 0, new Hydrodynamics_Sources.Conformal_Maps.IdentityTransform()); s = new Hydrodynamics_Sources.HalfPlaneAndZoneStreamLinesBuilder(w, viewModel, CanonicalDomain.HalfPlane); mapsList.SelectionChanged += MapsList_SelectionChanged; mapsList.Items.Add("Тождественное\nотображение"); mapsList.Items.Add("Треугольник 1"); mapsList.Items.Add("Полуплоскость с\nвыброшенным\nотрезком"); mapsList.Items.Add("Треугольник 2"); mapsList.Items.Add("Треугольник 3"); mapsList.Items.Add("Четырёхугольник 1"); mapsList.Items.Add("Полуплоскость с\nвыброшенным\nравнобедренным\nтреугольником"); mapsList.Items.Add("Треугольник 4"); mapsList.SelectedIndex = 0; viewModel.PlotModel.MouseMove += PlotModel_MouseMove; viewModel.PlotModel.MouseDown += PlotModel_MouseDown; plot.Controller = new PlotController(); plot.Controller.UnbindMouseDown(OxyMouseButton.Left); }