Ejemplo n.º 1
0
        void RemoveFile(object sender, EventArgs e)
        {
            BuildItem file = (SelectedNode.Tag) as BuildItem;

            if (file != null)
            {
                if (DialogResult.OK == MessageBox.Show(this, "Remove '" + file + "' from project?",
                                                       "Confirmation", MessageBoxButtons.OKCancel))
                {
                    Project proj = ServiceHost.Project.Current;
                    SelectedNode.Remove();
                    proj.RemoveFile(file.Include);
                }
            }
        }
Ejemplo n.º 2
0
        void ChangeAction(object sender, EventArgs e)
        {
            BuildItem file   = SelectedNode.Tag as BuildItem;
            string    action = (sender as ToolStripMenuItem).Text as string;

            Project proj = ServiceHost.Project.Current;

            proj.RemoveFile(file.Include);

            if (SelectedNode.Nodes.Count == 0)
            {
                SelectedNode.Remove();
            }

            proj.AddFile(file.Include, action, true);
        }