public EditProperties(Project currentProject) { InitializeComponent(); this.currentProject = currentProject; WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; Grid grid = new Grid(); projectProperties = new ProjectPropertiesUserControl(true); grid.Children.Add(projectProperties); groupBoxProjectProperties.Content = grid; if (currentProject != null) { InitializeCurrentProject(); } }
public NewProject(String title, Configuration configuration) { InitializeComponent(); WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; this.Title = title; const string directory = "HousePlans"; housePlansDirectory = System.IO.Path.GetFullPath(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"..\..\", directory)); housePlans = new List <HousePlan>(); InitializeHousePlans(); this.configuration = configuration; currentProject = new Project(new Scene()); currentProject.MeasurementUnit = Project.UnitOfMeasurement.m; WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; projectProperties = new ProjectPropertiesUserControl(false); Grid grid = new Grid(); grid.Children.Add(projectProperties); groupBoxProjectProperties.Content = grid; }