B
BradleyWard
Hello,
I am developing an add-in for Project Professional 2007 and in that add-in I
need to determine whether the user chose to connect to the backend server
(Project Server 2007) or not. It would seem that the
Application.Profiles.ActiveProfile.ConnectionState should give me exactly
what I want, but I am not seeing it ever give me anything but pjProfileOnline.
Here is how I am determining that:
1. I start Project Professional 2007 by running my add-in project inside
Visual Studio 2007.
2. I have a breakpoint just inside the ThisAddIn_Startup() method so that I
can check the setting of the
Application.Profiles.ActiveProfile.ConnectionState property.
3. I see the Login dialog appear, and I select the desired profile and click
on the OK button to connect to PS2007 on that server.
4. I hit my breakpoint and I check the ConnectionState property and it is
set to pjProfileOnline, as I would expect.
5. I exit Project Professional to end the debug session, then I re-run the
project to start a new debug session.
6. This time, on the Login dialog I hit the Work Offline button.
7. I hit my breakpoint and check the value of the ConnectionState. But it
still has a value of pjProfileOnline, NOT pjProfileOffline as I would expect!
Note that when I turn on the status bar on Project Professional, I see a
"Connected" in the first test scenario and a "Offline" in the 2nd scenario,
which is exactly what I would expect to see. I'm just not seeing that in the
ConnectionState property.
Any ideas?
Thanks
I am developing an add-in for Project Professional 2007 and in that add-in I
need to determine whether the user chose to connect to the backend server
(Project Server 2007) or not. It would seem that the
Application.Profiles.ActiveProfile.ConnectionState should give me exactly
what I want, but I am not seeing it ever give me anything but pjProfileOnline.
Here is how I am determining that:
1. I start Project Professional 2007 by running my add-in project inside
Visual Studio 2007.
2. I have a breakpoint just inside the ThisAddIn_Startup() method so that I
can check the setting of the
Application.Profiles.ActiveProfile.ConnectionState property.
3. I see the Login dialog appear, and I select the desired profile and click
on the OK button to connect to PS2007 on that server.
4. I hit my breakpoint and I check the ConnectionState property and it is
set to pjProfileOnline, as I would expect.
5. I exit Project Professional to end the debug session, then I re-run the
project to start a new debug session.
6. This time, on the Login dialog I hit the Work Offline button.
7. I hit my breakpoint and check the value of the ConnectionState. But it
still has a value of pjProfileOnline, NOT pjProfileOffline as I would expect!
Note that when I turn on the status bar on Project Professional, I see a
"Connected" in the first test scenario and a "Offline" in the 2nd scenario,
which is exactly what I would expect to see. I'm just not seeing that in the
ConnectionState property.
Any ideas?
Thanks