/// <summary> /// Initializes a new instance of the <see cref="Help_Custom"/> class. /// Adds our command handlers for menu (commands must exist in the command table file) /// </summary> /// <param name="package">Owner package, not null.</param> /// <param name="commandService">Command service to add command to, not null.</param> private Help_Custom(AsyncPackage package, OleMenuCommandService commandService) { this.package = package ?? throw new ArgumentNullException(nameof(package)); commandService = commandService ?? throw new ArgumentNullException(nameof(commandService)); var menuCommandID = new CommandID(CommandSet, CommandId); var menuItem = new MenuCommand(this.Execute, menuCommandID); commandService.AddCommand(menuItem); // retrieve and set file path from options //Create form with path from options BeGood3Package myToolsOptionsPackage = this.package as BeGood3Package; form2 = new Form1(myToolsOptionsPackage.OptionInteger); data = new Request_Data(); //Set Path to static var data.SetValuePath(myToolsOptionsPackage.OptionInteger); // Set the opacity to 75%. form2.Opacity = 0; // Size the form to be 300 pixels in height and width. form2.Size = new Size(1, 1); // Display the form in the center of the screen. form2.StartPosition = FormStartPosition.CenterScreen; }
public Form1(string setstr) { data = new Request_Data(); data.SetValuePath(setstr); }