private void OnMenuStripClickBuild(object sender, EventArgs e) { TabPage tab = GetCurrentTabPage(); if (tab != null) { string pathToFile = ProjectUtils.GetFilePathForTreeNodeItem(tab.Name, tab.Text); if (!string.IsNullOrEmpty(pathToFile)) { CompilerUtils.AddToQueue(pathToFile); } } }
private void MenuStripFileOnBuild(object sender, EventArgs e) { TreeNode node = projectTreeView.GetNodeAt(projectTreeView.PointToClient(fileMenuStrip.Bounds.Location)); if (node == null) { return; } if (node.Parent == null || (node.Nodes.Count > 0)) { return; } string path = ProjectUtils.GetFilePathForTreeNodeItem(node.Parent.Text, node.Text); if (!string.IsNullOrEmpty(path) && File.Exists(path)) { CompilerUtils.AddToQueue(path); } }
public void BuildActiveFile() { if (!tabEditor.Visible) { return; } TabPage tab = tabEditor.SelectedTab; if (tab == null) { return; } string pathToFile = ProjectUtils.GetFilePathForTreeNodeItem(tab.Name, tab.Text); if (!string.IsNullOrEmpty(pathToFile)) { CompilerUtils.AddToQueue(pathToFile); } }