Exemplo n.º 1
0
 public Compression()
 {
     this.InitializeComponent();
     ZipModel zip = new ZipModel();
     ZipViewModel model = new ZipViewModel(zip);
     DataContext = model;
 }
Exemplo 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);

        }