Ejemplo n.º 1
0
		bool Validate (DebugApplicationDialog dlg)
		{
			if (String.IsNullOrEmpty (dlg.SelectedFile)) {
				MessageService.ShowError (GettextCatalog.GetString ("Please select the application to debug"));
				return false;
			}

			if (!File.Exists (dlg.SelectedFile)) {
				MessageService.ShowError (GettextCatalog.GetString ("The file '{0}' does not exist", dlg.SelectedFile));
				return false;
			}

			if (!IdeApp.ProjectOperations.CanDebugFile (dlg.SelectedFile)) {
				MessageService.ShowError (GettextCatalog.GetString ("The file '{0}' can't be debugged", dlg.SelectedFile));
				return false;
			}

			return true;
		}
Ejemplo n.º 2
0
		protected override void Run ()
		{
			var dlg = new DebugApplicationDialog ();

			try {
				bool isOK;

				while ((isOK = (MessageService.RunCustomDialog (dlg) == (int)Gtk.ResponseType.Ok)) 
					&& !Validate (dlg));

				if (isOK)
					IdeApp.ProjectOperations.DebugApplication (dlg.SelectedFile, dlg.Arguments, dlg.WorkingDirectory, dlg.EnvironmentVariables);

			} finally {
				dlg.Destroy ();
				dlg.Dispose ();
			}


		}
Ejemplo n.º 3
0
		bool Validate (DebugApplicationDialog dlg)
		{
			if (String.IsNullOrEmpty (dlg.SelectedFile)) {
				MessageService.ShowError (GettextCatalog.GetString ("Please select the application to debug"));
				return false;
			}

			if (!File.Exists (dlg.SelectedFile)) {
				MessageService.ShowError (GettextCatalog.GetString ("The file '{0}' does not exist", dlg.SelectedFile));
				return false;
			}

			if (!IdeApp.ProjectOperations.CanDebugFile (dlg.SelectedFile)) {
				MessageService.ShowError (GettextCatalog.GetString ("The file '{0}' can't be debugged", dlg.SelectedFile));
				return false;
			}

			return true;
		}
Ejemplo n.º 4
0
		protected override void Run ()
		{
			var dlg = new DebugApplicationDialog ();

			try {
				bool isOK;

				while ((isOK = (MessageService.RunCustomDialog (dlg) == (int)Gtk.ResponseType.Ok)) 
					&& !Validate (dlg));

				if (isOK)
					IdeApp.ProjectOperations.DebugApplication (dlg.SelectedFile, dlg.Arguments, dlg.WorkingDirectory, dlg.EnvironmentVariables);

			} finally {
				dlg.Destroy ();
				dlg.Dispose ();
			}


		}