コード例 #1
0
ファイル: FileListVM.cs プロジェクト: haise0/reAtomizer
 public FileListVM(OpenFileListVM owner, FileList fileList, bool isExistingList, bool isUserList)
 {
     this.owner          = owner;
     this.fileList       = fileList;
     this.isExistingList = isExistingList;
     this.isUserList     = isUserList;
 }
コード例 #2
0
ファイル: FileListVM.cs プロジェクト: GreenDamTan/dnSpy
 public FileListVM(OpenFileListVM owner, FileList fileList, bool isExistingList, bool isUserList)
 {
     this.owner = owner;
     this.fileList = fileList;
     this.isExistingList = isExistingList;
     this.isUserList = isUserList;
 }
コード例 #3
0
ファイル: Commands.cs プロジェクト: kulminati/dnSpy
        public override void Execute(IMenuItemContext context)
        {
            if (!fileListLoader.CanLoad)
                return;

            fileListLoader.SaveCurrentFilesToList();

            var win = new OpenFileListDlg();
            const bool syntaxHighlight = true;
            var vm = new OpenFileListVM(syntaxHighlight, fileListManager, labelMsg => messageBoxManager.Ask<string>(labelMsg, ownerWindow: win, verifier: s => string.IsNullOrEmpty(s) ? dnSpy_Resources.OpenList_MissingName : string.Empty));
            win.DataContext = vm;
            win.Owner = appWindow.MainWindow;
            if (win.ShowDialog() != true)
                return;

            var flvm = win.SelectedItems.FirstOrDefault();
            var oldSelected = fileListManager.SelectedFileList;
            if (flvm != null) {
                fileListLoader.SaveCurrentFilesToList();
                fileListManager.Add(flvm.FileList);
                fileListManager.SelectedFileList = flvm.FileList;
            }

            vm.Save();

            if (flvm == null)
                return;
            var fileList = flvm.FileList;
            if (fileList == oldSelected)
                return;

            fileListLoader.Load(fileList, new FileLoader(fileManager, appWindow.MainWindow));
        }