Ejemplo n.º 1
0
        private void InitLogic()
        {
            //Init Dialog
            imageFileChooserDialog = new OpenFileDialog();

            //Create a plan edit manager
            planManager = new PlanEditManager(editorCanvas);

            //Makes the scroll viwer scroll when the mouse gets close to the
            //edge
            editorScroll.MouseMove += new MouseEventHandler(editorCanvas_MouseMove);

            // wallToolBtn.Checked(
            try
            {
                toolsToggleGroup     = new ToggleButtonGroup();
                areaToolBtn.Checked += new RoutedEventHandler(areaToolBtn_Checked);
                wallToolBtn.Checked += new RoutedEventHandler(wallToolBtn_Checked);
                doorToolBtn.Checked += new RoutedEventHandler(doorToolBtn_Checked);
                toolsToggleGroup.Add(PlanEditManager.CurrentTool.AreaRect.ToString(), areaToolBtn);
                toolsToggleGroup.Add(PlanEditManager.CurrentTool.Wall.ToString(), wallToolBtn);
                toolsToggleGroup.Add(PlanEditManager.CurrentTool.Exit.ToString(), doorToolBtn);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
            }
        }
Ejemplo n.º 2
0
 public void newFile()
 {
     this.editorCanvas.Children.Clear();
     planManager = new PlanEditManager(editorCanvas);
 }