示例#1
0
        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);
                }
            }
        }
示例#2
0
        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);
            }
        }
示例#3
0
        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);
            }
        }