//        public MainViewModel(IFileDialogService fds, HelixViewport3D hv, ModelVisual3D rootModel)
        public MainViewModel(IFileDialogService fds, HelixViewport3D hv, MainWindow window)
        {
            Expansion = 1;
            FileDialogService = fds;
            HelixView = hv;
            FileOpenCommand = new DelegateCommand(FileOpen);
            FileOpenRawCommand = new DelegateCommand(FileOpenRaw);
            FileExportCommand = new DelegateCommand(FileExport);
            FileExportRawCommand = new DelegateCommand(FileExportRaw);
            FileExitCommand = new DelegateCommand(FileExit);
            ViewZoomExtentsCommand = new DelegateCommand(ViewZoomExtents);
            EditCopyXamlCommand = new DelegateCommand(CopyXaml);
            EditClearAreaCommand = new DelegateCommand(ClearArea);
            FileExportStlCommand = new DelegateCommand(StlFileExport);            


            ApplicationTitle = "Dental.Smile - 3D Viewer";

            ModelToBaseMarker = new Dictionary<Model3D, BaseMarker>();
            OriginalMaterial = new Dictionary<Model3D, Material>();

            //Elements = new List<VisualElement>();
            //foreach (var c in hv.Children) Elements.Add(new VisualElement(c));

            DB = DentalSmileDBFactory.GetInstance();
            Treatment = new Treatment();
            SmileFile = new SmileFile();
            Patient = new Patient();
            JawVisual = new JawVisual3D(Patient);
            RootVisual = window.vmodel;
            app = Application.Current as App;

            RootVisual.Children.Add(JawVisual);
            this.window = window;

        }
        //INTEGRATION
        public MainViewModel(IFileDialogService fds, HelixViewport3D hv, Treatment treatment, SmileFile file, bool duplicate, MainWindow window)
        {
            Expansion = 1;
            FileDialogService = fds;
            HelixView = hv;
            FileOpenCommand = new DelegateCommand(FileOpen);
            FileOpenRawCommand = new DelegateCommand(FileOpenRaw);
            //FileExportCommand = new DelegateCommand(FileExport);
            FileExportCommand = new DelegateCommand(ConfirmDirectFileExport);            
            FileExportRawCommand = new DelegateCommand(FileExportRaw);
            FileExitCommand = new DelegateCommand(FileExit);
            ViewZoomExtentsCommand = new DelegateCommand(ViewZoomExtents);
            EditCopyXamlCommand = new DelegateCommand(CopyXaml);
            EditClearAreaCommand = new DelegateCommand(ClearArea);
            FileExportStlCommand = new DelegateCommand(StlFileExport);            

            
            ApplicationTitle = "Dental Smile - 3D Viewer";

            ModelToBaseMarker = new Dictionary<Model3D, BaseMarker>();
            OriginalMaterial = new Dictionary<Model3D, Material>();

            //Elements = new List<VisualElement>();
            //foreach (var c in hv.Children) Elements.Add(new VisualElement(c));

            this.window = window;
            RootVisual = window.vmodel;
            
            handleManipulationData(treatment, file, duplicate);
            
            //JawVisual = new JawVisual3D(Patient);
            //RootVisual.Children.Add(JawVisual);
        }
 public MeasurementForm(MainWindow main)
 {
     InitializeComponent();
     this.main = main;
 }