Skip to content

Commit

Permalink
Merge branch 'clovett/net48'
Browse files Browse the repository at this point in the history
  • Loading branch information
clovett committed Oct 23, 2023
2 parents d1a0b6f + 3aa5318 commit edd76bf
Show file tree
Hide file tree
Showing 14 changed files with 315 additions and 263 deletions.
2 changes: 1 addition & 1 deletion docs/dev/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

You can build and test XML Notepad using [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/). It uses
.NET frameworks, so be sure to install the ".NET desktop development" feature when using the Visual Studio Installer.
XML Notepad targets .NET Framework version 4.7.2 which is the default target for VS 2022.
XML Notepad targets .NET Framework version 4.8.

### Coding Guidelines

Expand Down
1 change: 1 addition & 0 deletions docs/help/menus.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ The edit menu contains the following commands:
- **Redo** Reverses the last undo operation.
- **Cut** Copy the selected node to the clipboard (and its children) and remove that node from the tree. See [Clipboard support](clipboard.md).
- **Copy** Copy the selected node to the clipboard (and its children).
- **Copy XPath** Copy the XPath expression that locates the selected node.
- **Paste** Parse the XML in the clipboard and create new nodes in the tree under the selected node.
- **Delete** Delete the selected node.
- **Insert** Insert a new node of the same type (element, attribute, processing instruction, comment, etc) as the currently selected node. This makes it easy to build a list of nodes that have the same type.
Expand Down
4 changes: 2 additions & 2 deletions src/Application/Application.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,9 @@
</Content>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
<BootstrapperPackage Include=".NETFramework,Version=v4.8">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 and x64%29</ProductName>
<ProductName>Microsoft .NET Framework 4.8 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
Expand Down
28 changes: 23 additions & 5 deletions src/Application/FormMain.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion src/Application/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1654,7 +1654,7 @@ protected virtual void UpdateMenuState()

this.toolStripButtonCut.Enabled = this.cutToolStripMenuItem.Enabled = this.ctxcutToolStripMenuItem.Enabled = hasXmlNode;
this.toolStripButtonDelete.Enabled = this.deleteToolStripMenuItem.Enabled = hasSelection;
this.toolStripButtonCopy.Enabled = this.copyToolStripMenuItem.Enabled = this.ctxMenuItemCopy.Enabled = hasXmlNode;
this.toolStripButtonCopy.Enabled = this.copyToolStripMenuItem.Enabled = this.ctxMenuItemCopy.Enabled = this.copyXPathToolStripMenuItem.Enabled = this.ctxMenuItemCopyXPath.Enabled = hasXmlNode;
this.duplicateToolStripMenuItem.Enabled = hasXmlNode;

this.changeToAttributeContextMenuItem.Enabled = this.changeToAttributeToolStripMenuItem1.Enabled = hasSelection;
Expand Down Expand Up @@ -2230,6 +2230,16 @@ private void toolStripButtonCopy_Click(object sender, EventArgs e)
this.xmlTreeView1.Copy();
}

private void copyXPathToolStripMenuItem_Click(object sender, EventArgs e)
{
this.xmlTreeView1.CopyXPath();
}

private void ctxMenuItemCopyXPath_Click(object sender, EventArgs e)
{
this.xmlTreeView1.CopyXPath();
}

private void toolStripButtonPaste_Click(object sender, EventArgs e)
{
SelectTreeView();
Expand Down
Loading

0 comments on commit edd76bf

Please sign in to comment.