public MainWindowState(MainWindow _container)
            {
                container = _container;
                DrawingCanvas.MouseMove += OnDrawingCanvasMouseMove;
                DrawingCanvas.MouseLeftButtonDown += OnDrawingCanvasMouseLeftButtonDown;
                DrawingCanvas.MouseLeftButtonUp += OnDrawingCanvasMouseLeftButtonUp;

                container.ChangeStateCommandBinding.Executed += OnChangeState;
                container.ChangeStateCommandBinding.CanExecute += CanChangeState;
                container.SaveAsCommandBinding.CanExecute += CanChangeState;
                container.OpenCommandBinding.CanExecute += CanChangeState;
            }
            public MainWindowSettingSecondPPipeNode(MainWindow _container, Line _line, Line _originalElement)
                : base(_container)
            {
                if (_line == null)
                    throw new ArgumentNullException("Input line element must not be null!");

                element = _line;
                originalElement = _originalElement;
                container.SetPipeSecondPoint(element, new Point(_line.X1, _line.Y1));
                element.Visibility = Visibility.Visible;
            }
 public MainWindowShiftingScreen(MainWindow _container)
     : base(_container)
 {
 }
 public MainWindowSettingFirstPPipeNode(MainWindow _container, Line _originalElement)
     : base(_container)
 {
     element = container.AddPressurePipe(Visibility.Hidden);
     originalElement = _originalElement;
     if(!IsCreating)
     {
         originalElement.Visibility = Visibility.Hidden;
         element.X1 = originalElement.X1;
         element.Y1 = originalElement.Y1;
         element.X2 = originalElement.X2;
         element.Y2 = originalElement.Y2;
         element.Visibility = Visibility.Visible;
     }
 }
 public MainWindowSelecting(MainWindow _container)
     : base(_container)
 {
 }
 public MainWindowReconnecting(MainWindow _container)
     : base(_container)
 {
 }
 public MainWindowDeleting(MainWindow _container)
     : base(_container)
 {
 }
 public MainWindowAddingCNode(MainWindow _container)
     : base(_container)
 {
 }