public static O2.XRules.Database.Utils.ascx_Simple_Script_Editor open_ScriptEditor_With_VisualStudio_CodeSample(this VisualStudio_2010 visualStudio) { var defaultCode = @"//get a reference to the VisualStudio API var visualStudio = new VisualStudio_2010(); //write an Error and Warning messages to the 'Error List' VisualStudio Window visualStudio.errorList().add_Error(""I'm an Error""); visualStudio.errorList().add_Warning(""I'm an Warning""); //open a text file visualStudio.open_Document(""a text file"".saveWithExtension("".exe"")); //open a C# file visualStudio.open_Document(@""VS_Scripts\O2_Platform_Gui.cs"".local()); //open a WebBrowser visualStudio.open_WebBrowser(@""http://www.google.com""); //add a top Menu visualStudio.dte().add_TopMenu(""A new Menu"") .add_Menu_Button(""Ask me a question"", ()=> ""Hi {0}"".alert(""What is your name?"".askUser())); //change the main title visualStudio.mainWindow().title(visualStudio.mainWindow().title() + "" - Now with REPL""); //change the status bar visualStudio.statusBar(""C# script example complete""); //return the EnvDTE object return visualStudio.dte();"; return(visualStudio.open_ScriptEditor().set_Code(defaultCode)); }
public static O2.XRules.Database.Utils.ascx_Simple_Script_Editor open_ScriptEditor_With_VisualStudio_API(this VisualStudio_2010 visualStudio) { var defaultCode = @"var visualStudio = new VisualStudio_2010(); return visualStudio.dte();"; return(visualStudio.open_ScriptEditor().set_Code(defaultCode)); }