Example #1
0
        public void LoadEverything(IEnumerable <CorModuleDef> modules)
        {
            var list = modules.ToArray();

            if (list.Length == 0)
            {
                return;
            }

            // We must cache everything in memory because the MD API COM instances can only be
            // called from the UI thread but the decompiler can run on any thread.

            foreach (var mod in list)
            {
                mod.DisableMDAPICalls = false;
            }
            try {
                var data = new LoadEverythingVM(list);
                var win  = new LoadEverythingDlg();
                win.DataContext = data;
                win.Owner       = MainWindow.Instance;
                var res = win.ShowDialog();
                if (res != true)
                {
                    Debug.Fail("User canceled but this is currently impossible...");
                    //TODO: User canceled (can't currently happen though)
                }
            }
            finally {
                foreach (var mod in list)
                {
                    mod.DisableMDAPICalls = true;
                }
            }
        }
Example #2
0
		public void LoadEverything(IEnumerable<CorModuleDef> modules) {
			var list = modules.ToArray();
			if (list.Length == 0)
				return;

			// We must cache everything in memory because the MD API COM instances can only be
			// called from the UI thread but the decompiler can run on any thread.

			foreach (var mod in list)
				mod.DisableMDAPICalls = false;
			try {
				var data = new LoadEverythingVM(list);
				var win = new LoadEverythingDlg();
				win.DataContext = data;
				win.Owner = MainWindow.Instance;
				var res = win.ShowDialog();
				if (res != true) {
					Debug.Fail("User canceled but this is currently impossible...");
					//TODO: User canceled (can't currently happen though)
				}
			}
			finally {
				foreach (var mod in list)
					mod.DisableMDAPICalls = true;
			}
		}