This repository has been archived by the owner on Jan 23, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #156 from Azure/netcore6
AMSE Update to v 5.5.0.0
- Loading branch information
Showing
31 changed files
with
4,904 additions
and
3,223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 94 additions & 0 deletions
94
AMSExplorer/Forms-DynamicEncryption/DRM_CreateOrSelectCKPolicy.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
//---------------------------------------------------------------------------------------------- | ||
// Copyright 2022 Microsoft Corporation | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
//--------------------------------------------------------------------------------------------- | ||
|
||
using System; | ||
using System.Windows.Forms; | ||
|
||
namespace AMSExplorer | ||
{ | ||
public partial class DRM_CreateOrSelectCKPolicy : Form | ||
{ | ||
private AMSClientV3 _client; | ||
|
||
public bool CreateNewPolicy => radioButtonCreate.Checked; | ||
|
||
public string PolicyNameToUse | ||
{ | ||
get | ||
{ | ||
if (!CreateNewPolicy) | ||
return listViewContentKeyPolicies.GetSelectedContentKeyPolicy.Name; | ||
else | ||
return textBoxPolicyName.Text; | ||
} | ||
} | ||
|
||
|
||
public DRM_CreateOrSelectCKPolicy(AMSClientV3 client) | ||
{ | ||
InitializeComponent(); | ||
Icon = Bitmaps.Azure_Explorer_ico; | ||
_client = client; | ||
|
||
} | ||
|
||
private void DRM_CreateOrSelectCKPolicy_Load(object sender, EventArgs e) | ||
{ | ||
// DpiUtils.InitPerMonitorDpi(this); | ||
} | ||
|
||
|
||
private void DRM_CreateOrSelectCKPolicy_DpiChanged(object sender, DpiChangedEventArgs e) | ||
{ | ||
// DpiUtils.UpdatedSizeFontAfterDPIChange(labelstep, e); | ||
} | ||
|
||
private void DRM_CreateOrSelectCKPolicy_Shown(object sender, EventArgs e) | ||
{ | ||
Telemetry.TrackPageView(this.Name); | ||
UpdateStatusButtonOk(); | ||
|
||
textBoxPolicyName.Text = "keypolicy-" + Program.GetUniqueness(); | ||
} | ||
|
||
private async void radioButtonSelect_CheckedChanged(object sender, EventArgs e) | ||
{ | ||
listViewContentKeyPolicies.Enabled = radioButtonSelect.Checked; | ||
textBoxPolicyName.Enabled = !radioButtonSelect.Checked; | ||
|
||
if (radioButtonSelect.Checked) | ||
{ | ||
// let's list the asset | ||
await listViewContentKeyPolicies.LoadContentKeyPoliciesAsync(_client); | ||
} | ||
else | ||
{ | ||
} | ||
UpdateStatusButtonOk(); | ||
} | ||
|
||
private void listViewContentKeyPolicies_SelectedIndexChanged(object sender, EventArgs e) | ||
{ | ||
UpdateStatusButtonOk(); | ||
} | ||
|
||
|
||
private void UpdateStatusButtonOk(bool additionalCondition = true) | ||
{ | ||
buttonOk.Enabled = (radioButtonCreate.Checked || (radioButtonSelect.Checked && listViewContentKeyPolicies.SelectedItems.Count > 0)) && additionalCondition; | ||
} | ||
} | ||
} |
136 changes: 136 additions & 0 deletions
136
AMSExplorer/Forms-DynamicEncryption/DRM_CreateOrSelectCKPolicy.designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.