public static void Main(string[] args) { // Useful for debugging the tool after it starts. //Debugger.Launch(); var toolConnection = args[0]; // Open connection to Skyline. using (_toolClient = new SkylineToolClient(toolConnection, "Test Interactive Tool")) // Not L10N { _toolClient.DocumentChanged += OnDocumentChanged; _testService = new TestToolService(toolConnection + "-test"); Console.WriteLine("Test service running"); _testService.Run(); } }
protected override void OnClosed(EventArgs e) { base.OnClosed(e); try { _toolClient.DocumentChanged -= OnDocumentChanged; _toolClient.SelectionChanged -= OnSelectionChanged; _toolClient.Dispose(); } // ReSharper disable once EmptyGeneralCatchClause catch { } _toolClient = null; }
static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); _toolClient = new SkylineToolClient(args[0], "Example Interactive Tool"); // Not L10N OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = "All Files (*.*)|*.*"; ofd.FilterIndex = 1; ofd.Multiselect = false; if (ofd.ShowDialog() == DialogResult.OK) { _inputFile = ofd.FileName; } else { Console.WriteLine("Cancelled"); } if (_inputFile != null) { var res = runCommand(); // res = "PrecursorName\tPrecursorMz\tProductMz\tPrecursorCharge\tProductCharge\tMoleculeGroup\tProductName\r\n" + res; if (res.Item1 != 0) { return; } var input = res.Item2.Replace("\t", ","); try { _toolClient.InsertSmallMoleculeTransitionList(input); } catch (Exception ex) { Console.WriteLine(ex); } } _toolClient.Dispose(); Application.Exit(); }
public MainForm(string[] args) { InitializeComponent(); // Create tool client and register for events. if (args.Length > 0) { _toolClient = new SkylineToolClient(args[0], "Example Interactive Tool"); // Not L10N _toolClient.DocumentChanged += OnDocumentChanged; _toolClient.SelectionChanged += OnSelectionChanged; } _selectedReplicate = "All"; // Not L10N replicatesToolStripMenuItem.DropDownItemClicked += ItemClicked; // Create a graph and fill it with data. _graph = new Graph(graph, "Peptide", "Peak Area"); // Not L10N _graph.Click += GraphClick; CreateGraph(); // Create chromatogram graph. _chromatogramGraph = new ChromatogramGraph(chromatogramGraph, "Retention Time", "Intensity"); // Not L10N }