public DiagramViewModel()
        {
            AddItemCommand = new SimpleCommand(ExecuteAddItemCommand);
            RemoveItemCommand = new SimpleCommand(ExecuteRemoveItemCommand);
            ClearSelectedItemsCommand = new SimpleCommand(ExecuteClearSelectedItemsCommand);
            CreateNewDiagramCommand = new SimpleCommand(ExecuteCreateNewDiagramCommand);

            Mediator.Instance.Register(this);
        }
        public MainWindowViewModel()
        {
            _databaseAccessService = ApplicationServicesProvider.Instance.Provider.DatabaseAccessService;
            _savedDiagrams =  _databaseAccessService.ListAllDiagramIds();

            ToolBoxViewModel = new ToolBoxViewModel();
            DiagramViewModel = new DiagramViewModel();
            DeleteSelectedItemsCommand = new SimpleCommand(ExecuteDeleteSelectedItemsCommand);
            CreateNewDiagramCommand = new SimpleCommand(ExecuteCreateNewDiagramCommand);
            SaveDiagramCommand = new SimpleCommand(ExecuteSaveDiagramCommand);
            LoadDiagramCommand = new SimpleCommand(ExecuteLoadDiagramCommand);
            DeleteDiagramCommand = new SimpleCommand(ExecuteDeleteDiagramCommand);

            ConnectorViewModel.PathFinder = new OrthogonalPathFinder();
        }
 private void Init()
 {
     SelectItemCommand = new SimpleCommand(ExecuteSelectItemCommand);
 }
 private void Init()
 {
     TypeOfObject = (int) ViewModelType.Light;
     SetResistanceCommand = new SimpleCommand(ExecuteSetResistanceCommand);
     ChangeData = new SimpleCommand(ExecuteChangeData);
     ShowConnectors = true;
     Textbox = "";
     //Image = new BitmapImage(new Uri("../../Images/lightbulb.png", UriKind.Relative));
     Value = false;
 }
 private void Init()
 {
     TypeOfObject = (int) ViewModelType.Resistor;
     ShowConnectors = true;
     ChangeData = new SimpleCommand(ExecuteChangeData);
 }