Exemplo n.º 1
0
		public void ShowAssemblyMissingWarning(string assemblyPath)
		{
			if (!Project.Instance.IsAssemblyLoaded(assemblyPath))
			{
				bool loadAssembly = false;

				if (LoadUnloadedAssembly == ExtendedDialogResult.YesToAll)
				{
					loadAssembly = true;
				}
				else if (LoadUnloadedAssembly != ExtendedDialogResult.NoToAll)
				{
					Activate();
					string message = string.Format("The following assembly is not loaded: {0}\r\n\r\nWould you like to load it now?\r\n\r\nNote: if an assembly is not loaded in DILE then during the debugging you might not see correct call stack/object values as DILE will have not have enough information about the debuggee.", assemblyPath);

					ExtendedMessageBox messageBox = new ExtendedMessageBox();
					messageBox.ShowMessage("DILE - Load assembly?", message);
					LoadUnloadedAssembly = messageBox.ExtendedDialogResult;

					if (LoadUnloadedAssembly == ExtendedDialogResult.Yes || LoadUnloadedAssembly == ExtendedDialogResult.YesToAll)
					{
						loadAssembly = true;
					}
				}

				if (loadAssembly)
				{
					AssemblyLoader.Instance.Start(new string[] { assemblyPath });
				}
			}
		}