View unanswered posts | View active topics



Reply to topic  [ 3 posts ] 
How to get the current build configuration of the project 
Author Message
Member

Joined: Fri Mar 06, 2015 6:33 pm
Posts: 26
Reply with quote
In the FlashDevelop project toolbar there's a dropdown where you can select the Debug or Release configuration. I'm writing a plugin that needs to know the value of this dropdown. How do I get to it? I've been searching everywhere and I can't find any information on how to get to it.

I assume I have to use PluginBase.MainForm.FindMenuItem() to somehow find it and then get its current value, but I have no idea what it's called so I can't really look it up.


Fri Jul 24, 2015 7:32 pm
Profile
Admin

Joined: Tue Aug 30, 2005 6:14 pm
Posts: 3046
Location: Finland
Reply with quote
Correct. The id of that item is ProjectMenu.ConfigurationSelectorToggle. I think :)


Sat Jul 25, 2015 8:09 pm
Profile WWW
Member

Joined: Fri Mar 06, 2015 6:33 pm
Posts: 26
Reply with quote
Hmm, that doesn't seem to be it. Is there some way to get that toolbar and iterate through its components to find it?

EDIT: Figured it out. It's a little ugly, but this is what I have so far:

Code:
string configuration = null;

System.Collections.IEnumerator enumer = PluginBase.MainForm.ToolStrip.Items.GetEnumerator();

while (enumer.MoveNext())
{
   ToolStripItem item = enumer.Current as ToolStripItem;

   if (item.Name == "ConfigurationSelector")
   {
      ToolStripComboBox comboBox = item as ToolStripComboBox;
      configuration = comboBox.Text.ToLower();
      break;
   }
}


Mon Jul 27, 2015 6:01 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.