Skip to content

Commit

Permalink
P4VS 2024.1 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
shraddhaborate committed Sep 17, 2024
1 parent 1718ecb commit 8443b59
Show file tree
Hide file tree
Showing 10 changed files with 1,194 additions and 223 deletions.
13 changes: 13 additions & 0 deletions P4VS/P4ScmProvider/P4ScmProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4048,6 +4048,19 @@ public P4.Client createClient(P4.Client client, P4.Options options)
return value;
}

public string RenameClient(string oldClientName, string newClientName)
{
string result ;
if (Offline)
{
return string.Empty;
}

result = Connection.Repository.RenameClient(oldClientName, newClientName);

return result;

}
public void deleteClient(P4.Client client, P4.Options options)
{
if (Offline)
Expand Down
10 changes: 10 additions & 0 deletions P4VS/P4VS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,12 @@
<Compile Include="SolutionExplorer\SolutionExplorerResourses2012.Designer.cs" />
<Compile Include="SwarmAPI\Options.cs" />
<Compile Include="SwarmAPI\P4SwarmApi.Net.cs" />
<Compile Include="UI\DlgRenameWorkspace.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\DlgRenameWorkspace.Designer.cs">
<DependentUpon>DlgRenameWorkspace.cs</DependentUpon>
</Compile>
<Compile Include="UI\HASCheckDlg.cs">
<SubType>Form</SubType>
</Compile>
Expand Down Expand Up @@ -1041,6 +1047,10 @@
<EmbeddedResource Include="SolutionExplorer\SolutionExplorerResourses2012.resx">
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="UI\DlgRenameWorkspace.resx">
<DependentUpon>DlgRenameWorkspace.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="UI\HASCheckDlg.resx">
<DependentUpon>HASCheckDlg.cs</DependentUpon>
</EmbeddedResource>
Expand Down
45 changes: 45 additions & 0 deletions P4VS/Resources.Designer.cs

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

15 changes: 15 additions & 0 deletions P4VS/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1600,4 +1600,19 @@ Download and install it to continue.</value>
<data name="HAS_Auth_Fail" xml:space="preserve">
<value>Unable to URL authorize user '{0}' to the server {1}</value>
</data>
<data name="WorkspacesWindowControl_RenameWorkspaceCaption" xml:space="preserve">
<value>Rename Workspace</value>
</data>
<data name="WorkspacesWindowControl_RenameWorkspaceMenuItem_Text" xml:space="preserve">
<value>Rename Workspace '{0}'...</value>
</data>
<data name="WorkspacesWindowControl_RenameWorkspaceNewNameLabel" xml:space="preserve">
<value>New Name: </value>
</data>
<data name="WorkspacesWindowControl_RenameWorkspaceOldClientPrompt_Text" xml:space="preserve">
<value>Rename workspace '{0}'</value>
</data>
<data name="WorlspacesWindowControl_RenameWorkspaceWarningInfo" xml:space="preserve">
<value>Recent Connections and saved Pending Changelist Filters will be updated with the new workspace name.</value>
</data>
</root>
164 changes: 164 additions & 0 deletions P4VS/UI/DlgRenameWorkspace.Designer.cs

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

58 changes: 58 additions & 0 deletions P4VS/UI/DlgRenameWorkspace.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
using System;
using System.Windows.Forms;

namespace Perforce.P4VS
{
public partial class DlgRenameWorkspace : AutoSizeForm
{
public DlgRenameWorkspace(string caption, string prompt, string DefaultValue)
{
PreferenceKey = "DlgRenameWorkspace";

InitializeComponent();

this.Icon = Images.icon_p4vs_16px;
this.Text = caption;
renameWorkspaceLbl.Text = prompt;
getNewNameLbl.Text = Resources.WorkspacesWindowControl_RenameWorkspaceNewNameLabel;
warningLbl.Text = Resources.WorlspacesWindowControl_RenameWorkspaceWarningInfo;
EnableDisableRenameWorkspaceBtn();
}

private DlgRenameWorkspace() {}

public string Value { get { return ValueTB.Text; } }

public static string Show(string Caption, string prompt, string DefaultValue)
{
DlgRenameWorkspace dlg = new DlgRenameWorkspace(Caption, prompt, DefaultValue);

if (dlg.ShowDialog() != DialogResult.Cancel)
{
if (dlg.DialogResult == DialogResult.OK)
{
return dlg.Value;
}
}

return null;
}

private void ValueTB_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Return)
renameWorkspaceBtn.PerformClick();
}

private void ValueTB_TextChanged(object sender, EventArgs e)
{
EnableDisableRenameWorkspaceBtn();
}

private void EnableDisableRenameWorkspaceBtn()
{
renameWorkspaceBtn.Enabled = !(string.IsNullOrWhiteSpace(ValueTB.Text));
}

}
}
Loading

0 comments on commit 8443b59

Please sign in to comment.