Example #1
0
 public MainViewModel()
 {
     ExitApplicationCmd          = new RelayCommand(ExitApplicationExe);
     SaveDocumentCmd             = new RelayCommand(SaveDocumentExe);
     CreateNewDocumentCmd        = new RelayCommand(CreateNewDocumentExe);
     OpenDocumentCmd             = new RelayCommand(OpenDocumentExe);
     RestoreDefaultComponentsCmd = new RelayCommand(RestoreDefaultComponentsExe);
     SelectedPage = new DefaultEditPage();
 }
Example #2
0
        private void OpenDocumentExe(object obj)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.Filter           = "Linaq files |*.linaq";
            openFileDialog.InitialDirectory = @"C:\";
            openFileDialog.Title            = "Please select file";
            openFileDialog.FileName         = "NewProject.Linaq";
            openFileDialog.Multiselect      = false;
            if (openFileDialog.ShowDialog() == true)
            {
                var dc = JsonService.GetObjectFromFile <Document>(openFileDialog.FileName);
                CurrentSaveLocation = openFileDialog.FileName;
                SelectedPage        = new DefaultEditPage(dc);
            }
        }
Example #3
0
 private void CreateNewDocumentExe(object obj)
 {
     SelectedPage = new DefaultEditPage();
 }