Inheritance: IDisposable
Exemple #1
0
        public WorkspaceViewModel(ShellViewModel shell, string path)
            : base(null, path)
        {
            var runtime = Kvm.GetRuntime(shell.SelectedRuntime);
            _host = new Host(path);
            _host.Connected += HostConnected;
            _host.Configurations += HostConfigurations;
            _host.References += HostReferences;
            _host.Start(runtime);

            _watcher = new FileSystemWatcher(path);
            _watcher.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.FileName | NotifyFilters.Size | NotifyFilters.DirectoryName | NotifyFilters.LastAccess;
            _watcher.Filter = "*.*";
            _watcher.Changed += FileChanged;

            _workspace = new CustomWorkspace();
        }
        public WorkspaceViewModel(ShellViewModel shell, string path)
            : base(null, path)
        {
            _host = new Host(path);
            _host.Connected += HostConnected;
            _host.Configurations += HostConfigurations;
            _host.References += HostReferences;

            _watcher = new FileSystemWatcher(path);
            _watcher.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.FileName | NotifyFilters.Size | NotifyFilters.DirectoryName | NotifyFilters.LastAccess;
            _watcher.Filter = "*.*";
            _watcher.Changed += FileChanged;

            _workspace = new CustomWorkspace();
            _shell = shell;

            InitializeWorkspace();
        }