public Compression()
 {
     this.InitializeComponent();
     ZipModel zip = new ZipModel();
     ZipViewModel model = new ZipViewModel(zip);
     DataContext = model;
 }
Esempio n. 2
0
        public ZipViewModel(ZipModel zipModel)
        {
            _zipModel = zipModel;
            _filePicker = InitFilePicker();
            _folderPicker = new FolderPicker();
            _folderPicker.ViewMode = PickerViewMode.List;
            _folderPicker.FileTypeFilter.Add("*");

            // commands initialized
            ZipCommand = new ZipCommand(()=>Compress(),()=>true);
            FolderSelectCommand = new ZipCommand(()=> SelectFolderToZip(),()=>true);
            FilesSelectCommand = new ZipCommand(() => SelectMultipleFile(), () => true);
            //CompressionLevelChange = new ZipCommand(()=>SetCompressionLevel(SelectedItem),()=>true);

        }