Ejemplo n.º 1
0
 public FloorPlanVisualiser(MainWindow mainWindow)
 {
     InitializeComponent();
     Person.OnPersonMoved += UpdateVisualsOnEvacuatableMoved;
     UserInterface.OnReset += UpdateVisualOnReset;
     _mainWindow = mainWindow;
     AllRectangles = new Dictionary<string, Rectangle>();
 }
Ejemplo n.º 2
0
        public Zoom(MainWindow parentWindow) {
            InitializeComponent();

            ParentWindow = parentWindow;
            FloorPlanVisualRepresentation = ParentWindow.FloorPlanVisualiserControl;
            ParentWindow.TheUserInterface.OnBuildingPlanSuccessfullLoaded += ZoomToFit;

            SetupZoom();
        }
Ejemplo n.º 3
0
 public SimulationControls(MainWindow parentWindow)
 {
     InitializeComponent();
     _parentWindow = parentWindow;
     StartSimulationButton.Click += OnSimulationStartClick;
     Data.OnTick += ChangeSimulationControls;
     PauseSimulationButton.Click += OnPauseAndContinueButtonClick;
     ResetSimulationButton.Click += OnResetButtonClick;
 }
Ejemplo n.º 4
0
 public CP_SimulationStats(MainWindow parentWindow)
 {
     InitializeComponent();
     Person.OnPersonMoved += UpdateSimulationStats;
     Data.OnTick += UpdateTicksAndTime;
     UserInterface.OnReset += ResetPeopleAndSimulationInformation;
     SimulationSpeed.ValueChanged += ChangeSimSpeed;
     _parentWindow = parentWindow;
 }
Ejemplo n.º 5
0
 public ControlPanel(MainWindow parentWindow)
 {
     InitializeComponent();
     ParentWindow = parentWindow;
     FloorPlanControls = new CP_FloorPlanControls(ParentWindow);
     SimulationStats = new CP_SimulationStats(ParentWindow);
     ImportExport = new CP_ImportExport(ParentWindow);
     Import.OnImportFeedBack += OnImportedFloorPlan;
     SetupUserControlTabs();
 }
Ejemplo n.º 6
0
        public CP_FloorPlanControls(MainWindow parentWindow)
        {
            InitializeComponent();
            MakeWall.Click += OnRadioButtonClicked;
            MakeDoor.Click += OnRadioButtonClicked;
            MakeFree.Click += OnRadioButtonClicked;
            MakePath.Click += OnRadioButtonClicked;
            MakePerson.Click += OnRadioButtonClicked;
            MakeStair.Click += OnRadioButtonClicked;
            parentWindow.FloorPlanVisualiserControl.OnBuildingBlockTypeFetch += OnFetchType;

            MakeWall.IsChecked = true;
            OnRadioButtonClicked(MakeWall, null);
        }
Ejemplo n.º 7
0
        public ExportWindow(MainWindow parentWindow) {
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            InitializeComponent();

            ParentWindow = parentWindow;
            Extension = Settings.Extension;
            FileName = string.Empty;
            Path = Settings.GridDirectoryPath;
            WindowBaseHeight = Height;
            BrowseButton.Click += BrowseDirectory;
            ExportButton.Click += ExportBuilding;

            Export.OnExportFeedBack += OnExportFeedBack;
            Closing += OnWindowClosing;
        }
Ejemplo n.º 8
0
        public CP_ImportExport(MainWindow parentWindow)
        {
            InitializeComponent();
            ParentWindow = parentWindow;

            ExportButton.Click += OnExport;
            ImportButton.Click += OnImport;
            NewButton.Click += OnNew;
            HeaderComboBox.SelectionChanged += OnSelectionChanged;
            HeaderTextBox.TextChanged += OnHeaderTextChanged;
            ParentWindow.TheUserInterface.OnBuildingPlanSuccessfullLoaded += OnSuccessfullBuildingLoadUp;
            HeaderComboBox.SelectedIndex = 0;
            FileInformationGroup.Visibility = Visibility.Collapsed;
            DimensionsGroup.Visibility = Visibility.Collapsed;
            FileNamePanel.Visibility = Visibility.Collapsed;
        }
Ejemplo n.º 9
0
        public NewImportWindow(MainWindow parentWindow, NewOrImport window = NewOrImport.New) {
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            InitializeComponent();

            ParentWindow = parentWindow;

            /* Initial setup for the window */
            NewImportTabControl.SelectedIndex = (int)window;
            ResetFields(null, null);

            BuildingWidthTextBox.PreviewTextInput += NumberValidationTextBox;
            BuildingHeightTextBox.PreviewTextInput += NumberValidationTextBox;
            BuildingFloorAmountTextBox.PreviewTextInput += NumberValidationTextBox;
            PropertyChanged += SetButtonActiveOrDeactive;
            BrowseButton.Click += BrowseFiles;
            BrowsePngFiles.Click += BrowseImages;
            CreateNewButton.Click += CreateNewBuilding;
            ResetToDefaultButton.Click += ResetFields;
            Closing += OnWindowClosing;
        }
Ejemplo n.º 10
0
 public UserInterface() {
     TheMainWindow = new MainWindow(this);
 }