Skip to content

Commit

Permalink
Surround with improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-visual-studio committed Jun 11, 2023
1 parent bc6b1a1 commit 90ca6b0
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 19 deletions.
3 changes: 2 additions & 1 deletion DPackRx/Features/CodeBrowser/CodeBrowserControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
xmlns:converters="clr-namespace:DPackRx.UI.Converters"
xmlns:behaviors="clr-namespace:DPackRx.UI.Behaviors"
mc:Ignorable="d"
behaviors:UserControlFocusOnLoad.Enabled="True"
d:DesignHeight="300" d:DesignWidth="600"
behaviors:UserControlFocusOnLoad.Enabled="True">
d:DataContext="{d:DesignInstance Type=local:CodeBrowserViewModel, IsDesignTimeCreatable=True}">

<UserControl.Resources>
<ResourceDictionary>
Expand Down
7 changes: 3 additions & 4 deletions DPackRx/Features/CodeBrowser/CodeBrowserWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DPackRx.Features.CodeBrowser"
xmlns:behaviors="clr-namespace:DPackRx.UI.Behaviors"
xmlns:ui="clr-namespace:DPackRx.UI"
xmlns:platformUI="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.15.0"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=local:CodeBrowserViewModel, IsDesignTimeCreatable=True}"
Icon="Images/CodeBrowser.ico"
Height="400" Width="600" MinHeight="200" MinWidth="400"
Title="{Binding Title}" WindowStartupLocation="CenterOwner" ResizeMode="CanResizeWithGrip" ShowInTaskbar="False"
behaviors:WindowCloseOnEsc.Enabled="True"
behaviors:WindowClose.DialogResult="{Binding CloseWindow}">
behaviors:WindowClose.DialogResult="{Binding CloseWindow}"
d:DataContext="{d:DesignInstance Type=local:CodeBrowserViewModel, IsDesignTimeCreatable=True}">

<local:CodeBrowserControl />
<local:CodeBrowserControl />
</platformUI:DialogWindow>
3 changes: 2 additions & 1 deletion DPackRx/Features/FileBrowser/FileBrowserControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
xmlns:behaviors="clr-namespace:DPackRx.UI.Behaviors"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="600"
d:DataContext="{d:DesignInstance Type=local:FileBrowserViewModel, IsDesignTimeCreatable=True}"
behaviors:UserControlFocusOnLoad.Enabled="True">

<UserControl.Resources>
Expand Down Expand Up @@ -154,7 +155,7 @@
<ListView behaviors:ListViewAutoSizeColumn.Column="1"
behaviors:ListViewMatchItemComparer.Enabled="True"
VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.VirtualizationMode="Recycling"
ItemsSource="{Binding Files, Mode=OneTime}" IsSynchronizedWithCurrentItem="True" x:Name="items"
ItemsSource="{Binding Files}" IsSynchronizedWithCurrentItem="True" x:Name="items"
Style="{StaticResource SearchResults}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseDoubleClick">
Expand Down
9 changes: 4 additions & 5 deletions DPackRx/Features/FileBrowser/FileBrowserWindow.xaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
<platformUI:DialogWindow x:Class="DPackRx.Features.FileBrowser.FileBrowserWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DPackRx.Features.FileBrowser"
xmlns:behaviors="clr-namespace:DPackRx.UI.Behaviors"
xmlns:ui="clr-namespace:DPackRx.UI"
xmlns:platformUI="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.15.0"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=local:FileBrowserViewModel, IsDesignTimeCreatable=True}"
mc:Ignorable="d"
Icon="Images/FileBrowser.ico"
Height="400" Width="600" MinHeight="200" MinWidth="400"
Title="File Browser" WindowStartupLocation="CenterOwner" ResizeMode="CanResizeWithGrip" ShowInTaskbar="False"
behaviors:WindowCloseOnEsc.Enabled="True"
behaviors:WindowClose.DialogResult="{Binding CloseWindow}">
behaviors:WindowClose.DialogResult="{Binding CloseWindow}"
d:DataContext="{d:DesignInstance Type=local:FileBrowserViewModel, IsDesignTimeCreatable=True}">

<local:FileBrowserControl />
</platformUI:DialogWindow>
8 changes: 4 additions & 4 deletions DPackRx/Features/SurroundWith/SurroundWith.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
{
"Language": "CSharp",
"Type": "Region",
"StartingCode": "#region Name",
"EndingCode": "#endregion",
"StartingCode": "#region Name\r\n\r\n",
"EndingCode": "\r\n#endregion",
"WordOffset": 2
},
{
Expand Down Expand Up @@ -66,8 +66,8 @@
{
"Language": "VB",
"Type": "Region",
"StartingCode": "#Region \"Name\"",
"EndingCode": "#End Region",
"StartingCode": "#Region \"Name\"\r\n\r\n",
"EndingCode": "\r\n#End Region",
"WordOffset": 3
},
{
Expand Down
2 changes: 1 addition & 1 deletion DPackRx/Package/Beta.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace DPackRx.Package
/// </summary>
internal static class Beta
{
public static readonly DateTime ExpirationDate = new DateTime(2023, 4, 3).AddHours(12);
public static readonly DateTime ExpirationDate = new DateTime(2023, 7, 3).AddHours(12);
}
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ private InstalledProductRegistrationAttribute GetAttribute()
var productId = version.Revision == 0 ? version.ToString(3) : version.ToString(4);

#if BETA
productId = $"{productId} - Beta expires on {Beta.ExpirationDate:d}";
if (version.Major == 0)
productId = $"Beta expires on {Beta.ExpirationDate:d}";
else
productId = $"{productId} - Beta expires on {Beta.ExpirationDate:d}";
#endif

var attrib = new InstalledProductRegistrationAttribute(_productName, _productDetails, productId)
Expand Down
2 changes: 1 addition & 1 deletion DPackRx/Services/ShellService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,7 @@ public bool CompileBuildAction(object projectItemOrProject)
return true;

var value = buildActionProp.Value;
return (value is int) && ((int)value == (int)prjBuildAction.prjBuildActionCompile);
return (value is int) && (((int)value == (int)vsBuildAction.vsBuildActionBuild) || ((int)value == (int)vsBuildAction.vsBuildActionRebuildAll));
}
catch (Exception ex)
{
Expand Down
2 changes: 1 addition & 1 deletion DPackRx/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="3D22E261-32E5-46CE-A4B0-B884FA49A9A2.2022" Version="4.5.3" Language="en-US" Publisher="Sergey M" />
<Identity Id="3D22E261-32E5-46CE-A4B0-B884FA49A9A2.2022" Version="4.5.5" Language="en-US" Publisher="Sergey M" />
<DisplayName>DPack Rx 2022</DisplayName>
<Description xml:space="preserve">FREE tools collection designed to greatly increase developer's productivity, automate repetitive processes and expand upon some of Microsoft Visual Studio features.</Description>
<MoreInfo>https://github.com/sergey-visual-studio/dpack</MoreInfo>
Expand Down

0 comments on commit 90ca6b0

Please sign in to comment.