private void options_Load(object sender, EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);
            checkBoxDisplayAssetID.Checked       = Properties.Settings.Default.DisplayAssetIDinGrid;
            checkBoxDisplayAssetAltId.Checked    = Properties.Settings.Default.DisplayAssetAltIDinGrid;
            checkBoxDisplayAssetStorage.Checked  = Properties.Settings.Default.DisplayAssetStorageinGrid;
            checkBoxAutoRefresh.Checked          = Properties.Settings.Default.AutoRefresh;
            comboBoxAutoRefreshTime.SelectedItem = Properties.Settings.Default.AutoRefreshTime.ToString();

            checkBoxUseAdaptiveStreamingFormat.Checked = Properties.Settings.Default.OutputAssetsAdaptiveStreamingFormat;

            textBoxCustomPlayer.Text           = Properties.Settings.Default.CustomPlayerUrl;
            checkBoxEnableCustomPlayer.Checked = Properties.Settings.Default.CustomPlayerEnabled;
            textBoxCustomPlayer.Enabled        = checkBoxEnableCustomPlayer.Checked;

            numericUpDownLocatorDuration.Value       = Properties.Settings.Default.DefaultLocatorDurationDaysNew;
            numericUpDownSASDuration.Value           = Properties.Settings.Default.DefaultSASDurationInHours;
            checkBoxHideTaskbarNotifications.Checked = Properties.Settings.Default.HideTaskbarNotifications;

            numericUpDownAssetAnalysisStart.Value = Properties.Settings.Default.AssetAnalysisStart;
            numericUpDownAssetAnalysisStep.Value  = Properties.Settings.Default.AssetAnalysisStep;

            textBoxCurrency.Text        = Properties.Settings.Default.Currency;
            numericUpDownMESPrice.Value = Properties.Settings.Default.MESPricePerMin;

            textBoxffmpegPath.Text = Properties.Settings.Default.ffmpegPath;
            textBoxVLCPath.Text    = Properties.Settings.Default.VLCPath;

            amspriceslink.Links.Add(new LinkLabel.Link(0, amspriceslink.Text.Length, "http://azure.microsoft.com/en-us/pricing/details/media-services/"));
        }
        private void TransformInformation_Load(object sender, EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);

            labelJobNameTitle.Text += _transform.Name;

            DGTransform.ColumnCount = 2;
            DGOutputs.ColumnCount   = 2;
            DGOutputs.Columns[0].DefaultCellStyle.BackColor = Color.Gainsboro;

            DGTransform.Columns[0].DefaultCellStyle.BackColor = Color.Gainsboro;
            DGTransform.Rows.Add(AMSExplorer.Properties.Resources.AssetInformation_AssetInformation_Load_Name, _transform.Name);
            DGTransform.Rows.Add("Description", _transform.Description);
            DGTransform.Rows.Add("Id", _transform.Id);
            DGTransform.Rows.Add(AMSExplorer.Properties.Resources.AssetInformation_AssetInformation_Load_Created, _transform.Created.ToLocalTime().ToString("G"));
            DGTransform.Rows.Add(AMSExplorer.Properties.Resources.AssetInformation_AssetInformation_Load_LastModified, _transform.LastModified.ToLocalTime().ToString("G"));

            bool boutoutsintransform = (_transform.Outputs.Count() > 0);

            int index = 1;

            if (boutoutsintransform)
            {
                foreach (TransformOutput output in _transform.Outputs)
                {
                    // listBoxTasks.Items.Add(output..Name ?? Constants.stringNull);
                    string outputLabel = "output #" + index;
                    listBoxOutputs.Items.Add(outputLabel);
                }
                listBoxOutputs.SelectedIndex = 0;
            }
        }
        private void PresetStandardEncoder_Load(object sender, EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);

            // to scale the bitmap in the buttons
            HighDpiHelper.AdjustControlImagesDpiScale(panel1);

            listboxPresets.Items.Add(new Item(EncoderNamedPreset.AdaptiveStreaming, EncoderNamedPreset.AdaptiveStreaming));
            listboxPresets.Items.Add(new Item(EncoderNamedPreset.ContentAwareEncoding, EncoderNamedPreset.ContentAwareEncoding));
            listboxPresets.Items.Add(new Item(EncoderNamedPreset.ContentAwareEncodingExperimental, EncoderNamedPreset.ContentAwareEncodingExperimental));
            listboxPresets.Items.Add(new Item(EncoderNamedPreset.H264MultipleBitrate1080p, EncoderNamedPreset.H264MultipleBitrate1080p));
            listboxPresets.Items.Add(new Item(EncoderNamedPreset.H264MultipleBitrate720p, EncoderNamedPreset.H264MultipleBitrate720p));
            listboxPresets.Items.Add(new Item(EncoderNamedPreset.H264MultipleBitrateSD, EncoderNamedPreset.H264MultipleBitrateSD));
            listboxPresets.Items.Add(new Item(EncoderNamedPreset.H264SingleBitrate1080p, EncoderNamedPreset.H264SingleBitrate1080p));
            listboxPresets.Items.Add(new Item(EncoderNamedPreset.H264SingleBitrate720p, EncoderNamedPreset.H264SingleBitrate720p));
            listboxPresets.Items.Add(new Item(EncoderNamedPreset.H264SingleBitrateSD, EncoderNamedPreset.H264SingleBitrateSD));
            listboxPresets.Items.Add(new Item(EncoderNamedPreset.AACGoodQualityAudio, EncoderNamedPreset.AACGoodQualityAudio));

            listboxPresets.SelectedIndex = 0;

            moreinfoprofilelink.Links.Add(new LinkLabel.Link(0, moreinfoprofilelink.Text.Length, Constants.LinkMoreInfoMediaEncoderBuiltIn));

            textBoxDescription.Text = _existingTransformDesc;

            UpdateTransformLabel();
        }
        private void CopyAsset_Load(object sender, EventArgs e)
        {
            copyassetname.Text = Constants.NameconvAsset + "-copy-" + Program.GetUniqueness();

            DpiUtils.InitPerMonitorDpi(this);

            // Add a dummy column
            ColumnHeader header = new ColumnHeader();

            header.Text = "";
            header.Name = "col1";
            listViewAccounts.Columns.Add(header);
            // Then
            listViewAccounts.Scrollable = true;
            listViewAccounts.View       = System.Windows.Forms.View.Details;


            if (!string.IsNullOrWhiteSpace(Properties.Settings.Default.LoginListRPv3JSON))
            {
                // JSon deserialize
                CredentialList = (ListCredentialsRPv3)JsonConvert.DeserializeObject(Properties.Settings.Default.LoginListRPv3JSON, typeof(ListCredentialsRPv3));


                // Display accounts in the list
                CredentialList.MediaServicesAccounts.ForEach(c =>
                                                             AddItemToListviewAccounts(c)
                                                             );
            }
        }
예제 #5
0
        private void DRM_CENCDelivery_Load(object sender, EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);

            groupBoxPlayReady.Enabled = _PlayReadyPackagingEnabled;
            groupBoxWidevine.Enabled  = _WidevinePackagingEnabled;
        }
예제 #6
0
        private async void BathUploadFrame2_LoadAsync(object sender, EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);

            // to scale the bitmap in the buttons
            HighDpiHelper.AdjustControlImagesDpiScale(panel1);

            if (ErrorConnect)
            {
                Close();
            }
            await _client.RefreshTokenIfNeededAsync();

            foreach (StorageAccount storage in (await _client.AMSclient.Mediaservices.GetAsync(_client.credentialsEntry.ResourceGroup, _client.credentialsEntry.AccountName)).StorageAccounts)
            {
                string sname   = AMSClientV3.GetStorageName(storage.Id);
                bool   primary = (storage.Type == StorageAccountType.Primary);
                comboBoxStorage.Items.Add(new Item(string.Format("{0} {1}", sname, primary ? "(primary)" : ""), sname));
                if (primary)
                {
                    comboBoxStorage.SelectedIndex = comboBoxStorage.Items.Count - 1;
                }
            }

            List <int> listInt = new List <int>()
            {
                1, 2, 4, 8, 16, 32, 64
            };

            comboBoxBlockSize.Items.Clear();
            listInt.ForEach(l => comboBoxBlockSize.Items.Add(l.ToString()));
            comboBoxBlockSize.SelectedIndex = 3;
        }
        private void UploadOptions_Load(object sender, System.EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);

            var sizeText = AssetInfo.FormatByteSize(1024 * 1024L * Properties.Settings.Default.DataMovementBlockSize * 50000);

            labelBlockSize.Text = string.Format(labelBlockSize.Text, Properties.Settings.Default.DataMovementBlockSize, sizeText);
        }
        private void ExportToExcel_Load(object sender, EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);

            string extension = radioButtonFormatExcel.Checked ? "xlsx" : "csv";

            textBoxExcelFile.Text = string.Format("{0}\\Export-{1}-{2}." + extension, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), _amsClient.credentialsEntry.AccountName, DateTime.Now.ToString("yyyy-MM-dd"));
        }
        private void DRM_CENCCBCSDelivery_Load(object sender, EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);

            groupBoxPlayReady.Visible = checkBoxPlayReady.Checked = _PlayReadyPackagingEnabled;
            groupBoxWidevine.Visible  = checkBoxWidevine.Checked = _WidevinePackagingEnabled;
            groupBoxFairPlay.Visible  = checkBoxFairPlay.Checked = _FairPlayPackagingEnabled;
        }
        private void PresetFaceDetector_Load(object sender, EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);

            // to scale the bitmap in the buttons
            HighDpiHelper.AdjustControlImagesDpiScale(panel1);

            moreinfoprofilelink.Links.Add(new LinkLabel.Link(0, moreinfoprofilelink.Text.Length, Constants.LinkMoreInfoVideoAnalyzer));
            UpdateTransformLabel();
        }
예제 #11
0
        private void PresetStandardEncoderThumbnail_Load(object sender, EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);

            // to scale the bitmap in the buttons
            HighDpiHelper.AdjustControlImagesDpiScale(panel1);

            moreinfoprofilelink.Links.Clear();
            moreinfoprofilelink.Links.Add(new LinkLabel.Link(0, moreinfoprofilelink.Text.Length, Constants.LinkMoreInfoMediaEncoderThumbnail));
        }
        private void AddAMSAccount2_Load(object sender, EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);

            _myTenants.ToList().ForEach(t => comboBoxTenants.Items.Add(new Item(string.Format("{0} ({1})", t.DisplayName, t.TenantId), t.TenantId)));

            if (_myTenants.Count() > 0)
            {
                comboBoxTenants.SelectedIndex = 0;
            }
        }
        private void SoftwareUpdate_Load(object sender, EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);
            if (_urlRelNotes != null)
            {
                webBrowser1.Url = _urlRelNotes;
            }

            linkLabelMoreInfoPrice.Links.Add(new LinkLabel.Link(0, linkLabelMoreInfoPrice.Text.Length, Constants.LinkAMSE));
            labelTitle.Text = string.Format(labelTitle.Text, _newVersion);
        }
        private void PresetVideoAnalyzer_Load(object sender, EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);

            // to scale the bitmap in the buttons
            HighDpiHelper.AdjustControlImagesDpiScale(panel1);

            LanguagesIndexV2s.ForEach(c => comboBoxLanguage.Items.Add(new Item((new CultureInfo(c)).DisplayName, c)));
            comboBoxLanguage.SelectedIndex = 0;
            moreinfoprofilelink.Links.Add(new LinkLabel.Link(0, moreinfoprofilelink.Text.Length, Constants.LinkMoreInfoVideoAnalyzer));
            UpdateTransformLabel();
        }
        private void LiveOutputInformation_Load(object sender, EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);

            if (!MultipleSelection)
            {
                labelProgramName.Text  += MyLiveOutput.Name;
                DGLiveEvent.ColumnCount = 2;

                // Program info
                DGLiveEvent.Columns[0].DefaultCellStyle.BackColor = Color.Gainsboro;
                DGLiveEvent.Rows.Add("Name", MyLiveOutput.Name);
                DGLiveEvent.Rows.Add("Id", MyLiveOutput.Id);
                DGLiveEvent.Rows.Add("State", MyLiveOutput.ResourceState);
                DGLiveEvent.Rows.Add("Created", ((DateTime)MyLiveOutput.Created).ToLocalTime().ToString("G"));
                DGLiveEvent.Rows.Add("Last Modified", ((DateTime)MyLiveOutput.LastModified).ToLocalTime().ToString("G"));
                DGLiveEvent.Rows.Add("Description", MyLiveOutput.Description);
                DGLiveEvent.Rows.Add("Archive Window Length", MyLiveOutput.ArchiveWindowLength);
                DGLiveEvent.Rows.Add("Manifest Name", MyLiveOutput.ManifestName);
                DGLiveEvent.Rows.Add("Asset Name", MyLiveOutput.AssetName);
                DGLiveEvent.Rows.Add("Output snap time", MyLiveOutput.OutputSnapTime);
                DGLiveEvent.Rows.Add("Fragments Per Ts Segment", MyLiveOutput.Hls?.FragmentsPerTsSegment);

                /*
                 * ProgramInfo PI = new ProgramInfo(MyLiveOutput, MyContext);
                 * ValidURIs = PI.GetValidURIs();
                 * NotValidURIs = PI.GetNotValidURIs();
                 *
                 * foreach (var t in ValidURIs)
                 * {
                 *  DGChannel.Rows.Add("Url", t.AbsoluteUri);
                 * }
                 * foreach (var t in NotValidURIs)
                 * {
                 *  int i = DGChannel.Rows.Add("Url", t.AbsoluteUri);
                 *  DGChannel.Rows[i].Cells[1].Style.ForeColor = Color.Red;
                 * }
                 */
            }
            else
            {
                labelProgramName.Text = "(multiple programs have been selected)";
                tabControl1.TabPages.Remove(tabPageInfo); // no info as multiple
                buttonDisplayRelatedAsset.Visible = false;
            }


            numericUpDownArchiveHours.Value   = Convert.ToInt16(MyLiveOutput.ArchiveWindowLength.TotalHours);
            numericUpDownArchiveMinutes.Value = MyLiveOutput.ArchiveWindowLength.Minutes;
        }
        private void StorageVersion_Load(object sender, EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);

            List <string> list = new List <string>()
            {
                noversion, "2019-07-07", "2019-02-02", "2018-11-09", "2018-03-28", "2017-11-09", "2017-07-29", "2017-04-17", "2016-05-31", "2015-12-11", "2015-07-08", "2015-04-05", "2015-02-21", "2014-02-14", "2013-08-15", "2012-02-12", "2011-08-18", "2009-09-19", "2009-07-17", "2009-04-14"
            };

            comboBoxVersion.Items.AddRange(list.ToArray());
            comboBoxVersion.Text = _serviceProperties.DefaultServiceVersion ?? noversion;

            moreinfoLiveStreamingProfilelink.Links.Add(new LinkLabel.Link(0, moreinfoLiveStreamingProfilelink.Text.Length, Constants.LinkMoreInfoStorageVersioning));
        }
        private void options_Load(object sender, EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);
            checkBoxDisplayAssetID.Checked       = Properties.Settings.Default.DisplayAssetIDinGrid;
            checkBoxDisplayAssetAltId.Checked    = Properties.Settings.Default.DisplayAssetAltIDinGrid;
            checkBoxDisplayAssetStorage.Checked  = Properties.Settings.Default.DisplayAssetStorageinGrid;
            checkBoxAutoRefresh.Checked          = Properties.Settings.Default.AutoRefresh;
            comboBoxAutoRefreshTime.SelectedItem = Properties.Settings.Default.AutoRefreshTime.ToString();

            checkBoxUseAdaptiveStreamingFormat.Checked = Properties.Settings.Default.OutputAssetsAdaptiveStreamingFormat;

            textBoxCustomPlayer.Text           = Properties.Settings.Default.CustomPlayerUrl;
            checkBoxEnableCustomPlayer.Checked = Properties.Settings.Default.CustomPlayerEnabled;
            textBoxCustomPlayer.Enabled        = checkBoxEnableCustomPlayer.Checked;

            numericUpDownLocatorDuration.Value       = Properties.Settings.Default.DefaultLocatorDurationDaysNew;
            numericUpDownSASDuration.Value           = Properties.Settings.Default.DefaultSASDurationInHours;
            checkBoxHideTaskbarNotifications.Checked = Properties.Settings.Default.HideTaskbarNotifications;

            numericUpDownAssetAnalysisStart.Value = Properties.Settings.Default.AssetAnalysisStart;
            numericUpDownAssetAnalysisStep.Value  = Properties.Settings.Default.AssetAnalysisStep;

            textBoxffmpegPath.Text = Properties.Settings.Default.ffmpegPath;
            textBoxVLCPath.Text    = Properties.Settings.Default.VLCPath;

            if (Properties.Settings.Default.DataMovementParallelOperations == -1)
            {
                checkBoxAutoParOpe.Checked = true;
                numericUpDownDataMovNumbParallelOp.Value = TransferManager.Configurations.ParallelOperations;
            }
            else
            {
                checkBoxAutoParOpe.Checked = false;
                numericUpDownDataMovNumbParallelOp.Value = Properties.Settings.Default.DataMovementParallelOperations;
            }

            List <int> listInt = new List <int>()
            {
                4, 8, 16, 32, 64, 100
            };

            comboBoxBlockSize.Items.Clear();
            listInt.ForEach(l => comboBoxBlockSize.Items.Add(l.ToString()));

            comboBoxBlockSize.SelectedIndex = listInt.IndexOf(Properties.Settings.Default.DataMovementBlockSize);

            checkBoxDisableMD5Check.Checked        = Properties.Settings.Default.DataMovementNoMD5Check;
            checkBoxDoNotIncreaseHTTPLimit.Checked = Properties.Settings.Default.DataMovementDoNotIncreaseHttpLimit;
        }
예제 #18
0
        private void Subclipping_Load(object sender, EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);

            // to scale the bitmap in the buttons
            HighDpiHelper.AdjustControlImagesDpiScale(panel1);

            _buttonOk            = buttonOk.Text;
            _labelAccurate       = labelAccurate.Text;
            _labeloutoutputasset = labeloutputasset.Text;
            moreinfoprofilelink.Links.Add(new LinkLabel.Link(0, moreinfoprofilelink.Text.Length, Constants.LinkMoreInfoSubClipAMSE));
            CheckIfErrorTimeControls();
            DisplayAccuracy();
            GenerateUniqueNamesForJobAndOutput();
        }
        private void AddAMSAccount1_Load(object sender, EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);

            AzureEnvType[] envs = new AzureEnvType[] { AzureEnvType.Azure, AzureEnvType.AzureChina, AzureEnvType.AzureUSGovernment, AzureEnvType.AzureGermany, AzureEnvType.DevTest };

            foreach (AzureEnvType env in envs)
            {
                comboBoxAADMappingList.Items.Add(new Item((new AzureEnvironment(env)).DisplayName, env.ToString()));
            }

            comboBoxAADMappingList.SelectedIndex = 0;

            linkLabelAzCliDoc.Links.Add(new LinkLabel.Link(0, linkLabelAzCliDoc.Text.Length, Constants.LinkAMSAzCli));
        }
예제 #20
0
        private void DRM_Config_TokenClaims_Load(object sender, EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);

            dataGridViewTokenClaims.DataSource = TokenClaimsList;
            moreinfocGenX509.Links.Add(new LinkLabel.Link(0, moreinfocGenX509.Text.Length, "https://msdn.microsoft.com/en-us/library/azure/gg185932.aspx"));
            tabControlTokenType.TabPages.Remove(tabPageTokenX509);
            tabControlTokenType.TabPages.Remove(tabPageOpenId);

            foreach (ExplorerOpenIDSample map in ListOpenIDSampleUris)
            {
                comboBoxMappingList.Items.Add(map.Name);
            }
            comboBoxMappingList.SelectedIndex = 0;

            textBoxIssuer.Text   = Properties.Settings.Default.DynEncTokenIssuerv3;
            textBoxAudience.Text = Properties.Settings.Default.DynEncTokenAudiencev3;
        }
예제 #21
0
        private void StorageVersion_Load(object sender, EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);

            List <string> list = new List <string>()
            {
                noversion, "2018-03-28", "2017-11-09", "2017-07-29", "2017-04-17", "2016-05-31", "2015-12-11", "2015-07-08", "2015-04-05", "2015-02-21", "2014-02-14", "2013-08-15", "2012-02-12", "2011-08-18", "2009-09-19", "2009-07-17", "2009-04-14"
            };

            comboBoxVersion.Items.AddRange(list.ToArray());
            comboBoxVersion.Text = _serviceProperties.DefaultServiceVersion ?? noversion;

            moreinfoLiveStreamingProfilelink.Links.Add(new LinkLabel.Link(0, moreinfoLiveStreamingProfilelink.Text.Length, Constants.LinkMoreInfoStorageVersioning));
            linkLabelStorageAnalytics.Links.Add(new LinkLabel.Link(0, linkLabelStorageAnalytics.Text.Length, Constants.LinkMoreInfoStorageAnalytics));

            comboBoxMetrics.Items.AddRange(Enum.GetNames(typeof(MetricsLevel)).ToArray()); // metrics level
            comboBoxMetrics.Text = _serviceProperties.HourMetrics.MetricsLevel.ToString();

            numericUpDownRetention.Value = _serviceProperties.HourMetrics.RetentionDays ?? 0;
        }
예제 #22
0
        private void AttachStorage_Load(object sender, EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);

            try
            {
                _amsClient.RefreshTokenIfNeeded();

                mediaClient = _amsClient.AMSclient;
                // Set the polling interval for long running operations to 2 seconds.
                // The default value is 30 seconds for the .NET client SDK
                mediaClient.LongRunningOperationRetryTimeout = 2;

                mediaService = mediaClient.Mediaservices.Get(_amsClient.credentialsEntry.ResourceGroup, _amsClient.credentialsEntry.AccountName);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error when connecting", MessageBoxButtons.OK, MessageBoxIcon.Error);
                buttonAttach.Enabled = false;
                return;
            }

            List <StorageAccount> storages = mediaService.StorageAccounts.ToList();

            listViewStorage.Items.Clear();

            storages.ForEach(s =>
            {
                if (s.Type == StorageAccountType.Secondary)
                {
                    string[] names      = s.Id.Split('/');
                    ListViewItem lvitem = new ListViewItem(new string[] { names.Last(), s.Id })
                    {
                        ToolTipText = s.Id
                    };
                    listViewStorage.Items.Add(lvitem);
                }
            }
                             );
            buttonAttach.Enabled = true;
        }
예제 #23
0
        private void AMSLogin_Load(object sender, EventArgs e)
        {
            //Properties.Settings.Default.LoginListRPv3JSON = "";
            DpiUtils.InitPerMonitorDpi(this);

            // Add a dummy column
            ColumnHeader header = new ColumnHeader
            {
                Text = "",
                Name = "col1"
            };

            listViewAccounts.Columns.Add(header);
            // Then
            listViewAccounts.Scrollable = true;
            listViewAccounts.View       = System.Windows.Forms.View.Details;


            if (!string.IsNullOrWhiteSpace(Properties.Settings.Default.LoginListRPv3JSON))
            {
                // JSon deserialize
                CredentialList = (ListCredentialsRPv3)JsonConvert.DeserializeObject(Properties.Settings.Default.LoginListRPv3JSON, typeof(ListCredentialsRPv3));


                // Display accounts in the list
                CredentialList.MediaServicesAccounts.ForEach(c =>
                                                             AddItemToListviewAccounts(c)
                                                             );
            }

            buttonExport.Enabled = (listViewAccounts.Items.Count > 0);

            accountmgtlink.Links.Add(new LinkLabel.Link(0, accountmgtlink.Text.Length, Constants.LinkAMSCreateAccount));
            linkLabelAADAut.Links.Add(new LinkLabel.Link(0, linkLabelAADAut.Text.Length, Constants.LinkAMSAADAut));

            // version
            labelVersion.Text = string.Format(labelVersion.Text, Assembly.GetExecutingAssembly().GetName().Version);

            DoEnableManualFields(false);
        }
예제 #24
0
 private void ExportSettings_Load(object sender, System.EventArgs e)
 {
     DpiUtils.InitPerMonitorDpi(this);
 }
 private void DRM_WidevineLicense_Load(object sender, EventArgs e)
 {
     DpiUtils.InitPerMonitorDpi(this);
 }
예제 #26
0
        private void LiveEventInformation_Load(object sender, EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);

            _radioButtonDefaultPreset = radioButtonDefaultPreset.Text;

            if (!MultipleSelection) // one channel
            {
                labelLEName.Text += MyLiveEvent.Name;

                DGLiveEvent.ColumnCount = 2;

                // live event info
                DGLiveEvent.Columns[0].DefaultCellStyle.BackColor = Color.Gainsboro;
                DGLiveEvent.Rows.Add(AMSExplorer.Properties.Resources.AssetInformation_AssetInformation_Load_Name, MyLiveEvent.Name);
                DGLiveEvent.Rows.Add("Id", MyLiveEvent.Id);
                DGLiveEvent.Rows.Add("Location", MyLiveEvent.Location);
                DGLiveEvent.Rows.Add(AMSExplorer.Properties.Resources.AssetInformation_AssetInformation_Load_State, (LiveEventResourceState)MyLiveEvent.ResourceState);
                DGLiveEvent.Rows.Add(AMSExplorer.Properties.Resources.AssetInformation_AssetInformation_Load_Created, ((DateTime)MyLiveEvent.Created).ToLocalTime().ToString("G"));
                DGLiveEvent.Rows.Add(AMSExplorer.Properties.Resources.AssetInformation_AssetInformation_Load_LastModified, ((DateTime)MyLiveEvent.LastModified).ToLocalTime().ToString("G"));
                DGLiveEvent.Rows.Add(AMSExplorer.Properties.Resources.ChannelInformation_ChannelInformation_Load_Description, MyLiveEvent.Description);
                DGLiveEvent.Rows.Add(AMSExplorer.Properties.Resources.ChannelInformation_ChannelInformation_Load_InputProtocol, MyLiveEvent.Input.StreamingProtocol);

                if (MyLiveEvent.Encoding != null)
                {
                    DGLiveEvent.Rows.Add("Encoding Type", MyLiveEvent.Encoding.EncodingType);
                    DGLiveEvent.Rows.Add("Preset Name", MyLiveEvent.Encoding.PresetName);

                    //  DGChannel.Rows.Add(AMSExplorer.Properties.Resources.ChannelInformation_ChannelInformation_Load_SlateSettings, AMSExplorer.Properties.Resources.ChannelInformation_ChannelInformation_Load_None);
                }


                if (!string.IsNullOrEmpty(MyLiveEvent.Input.KeyFrameIntervalDuration))
                {
                    DGLiveEvent.Rows.Add("Key Frame Interval Duration", MyLiveEvent.Input.KeyFrameIntervalDuration);
                    checkBoxKeyFrameIntDefined.Checked = true;
                    textBoxKeyFrame.Text = (XmlConvert.ToTimeSpan(MyLiveEvent.Input.KeyFrameIntervalDuration)).TotalSeconds.ToString();
                }

                string[] stringnameurl = new string[] { AMSExplorer.Properties.Resources.ChannelInformation_ChannelInformation_Load_Primary, AMSExplorer.Properties.Resources.ChannelInformation_ChannelInformation_Load_Secondary };

                DGLiveEvent.Rows.Add("Vanity Url", MyLiveEvent.VanityUrl);

                int i = 0;
                foreach (LiveEventEndpoint endpoint in MyLiveEvent.Input.Endpoints)
                {
                    DGLiveEvent.Rows.Add(string.Format(AMSExplorer.Properties.Resources.ChannelInformation_ChannelInformation_Load_0InputURL1, MyLiveEvent.Input.Endpoints.Count == 2 ? stringnameurl[i] : string.Empty, endpoint.Protocol), endpoint.Url);
                    if (MyLiveEvent.Input.StreamingProtocol == LiveEventInputProtocol.FragmentedMP4)
                    {
                        DGLiveEvent.Rows.Add(string.Format(AMSExplorer.Properties.Resources.ChannelInformation_ChannelInformation_Load_0InputURL1SSL, MyLiveEvent.Input.Endpoints.Count == 2 ? stringnameurl[i] : string.Empty, endpoint.Protocol), endpoint.Url.ToString().Replace("http://", "https://"));
                    }
                    i++;
                }
                if (i == 0)
                {
                    DGLiveEvent.Rows.Add("Input url(s)", "(None. Start the live event to get them ?)");
                }

                if (MyLiveEvent.Preview != null)
                {
                    foreach (LiveEventEndpoint endpoint in MyLiveEvent.Preview.Endpoints)
                    {
                        DGLiveEvent.Rows.Add(string.Format(AMSExplorer.Properties.Resources.ChannelInformation_ChannelInformation_Load_PreviewURL0, endpoint.Protocol), endpoint.Url);
                    }
                }

                string mode = "Default";
                if (MyLiveEvent.StreamOptions != null && MyLiveEvent.StreamOptions.Contains(StreamOptionsFlag.LowLatency))
                {
                    mode = "Low latency";
                }
                DGLiveEvent.Rows.Add("Latency mode", mode);
            }
            else // multiselect
            {
                labelLEName.Text = AMSExplorer.Properties.Resources.ChannelInformation_ChannelInformation_Load_MultipleChannelsHaveBeenSelected;

                tabControl1.TabPages.Remove(tabPageLiveEventInfo); // no channel info page
                tabControl1.TabPages.Remove(tabPagePreview);       // no channel info page

                if (!string.IsNullOrEmpty(MyLiveEvent.Input.KeyFrameIntervalDuration))
                {
                    checkBoxKeyFrameIntDefined.Checked = true;
                    textBoxKeyFrame.Text = (XmlConvert.ToTimeSpan(MyLiveEvent.Input.KeyFrameIntervalDuration)).TotalSeconds.ToString();
                }
            }

            // comon code - multiselect or only one channel selected
            tabControl1.TabPages.Remove(tabPageEncoding); // no encoding channel


            if (MyLiveEvent.Input != null && MyLiveEvent.Input.AccessControl != null && MyLiveEvent.Input.AccessControl.Ip != null)
            {
                checkBoxInputSet.Checked = true;
                foreach (IPRange endpoint in MyLiveEvent.Input.AccessControl.Ip.Allow)
                {
                    InputEndpointSettingList.Add(endpoint);
                }
            }

            dataGridViewInputIP.DataSource = InputEndpointSettingList;
            dataGridViewInputIP.DataError += new DataGridViewDataErrorEventHandler(dataGridView_DataError);

            if (MyLiveEvent.Preview != null && MyLiveEvent.Preview.AccessControl != null && MyLiveEvent.Preview.AccessControl.Ip != null)
            {
                checkBoxPreviewSet.Checked = true;
                foreach (IPRange endpoint in MyLiveEvent.Preview.AccessControl.Ip.Allow)
                {
                    PreviewEndpointSettingList.Add(endpoint);
                }
            }

            dataGridViewPreviewIP.DataSource = PreviewEndpointSettingList;
            dataGridViewPreviewIP.DataError += new DataGridViewDataErrorEventHandler(dataGridView_DataError);


            if (MyLiveEvent.CrossSiteAccessPolicies != null)
            {
                if (MyLiveEvent.CrossSiteAccessPolicies.ClientAccessPolicy != null)
                {
                    checkBoxclientpolicy.Checked = true;
                    textBoxClientPolicy.Text     = MyLiveEvent.CrossSiteAccessPolicies.ClientAccessPolicy;
                }
                if (MyLiveEvent.CrossSiteAccessPolicies.CrossDomainPolicy != null)
                {
                    checkBoxcrossdomains.Checked = true;
                    textBoxCrossDomPolicy.Text   = MyLiveEvent.CrossSiteAccessPolicies.CrossDomainPolicy;
                }
            }
            textboxchannedesc.Text = MyLiveEvent.Description;

            // Channel is not stopped or running. We cannot update settings
            if (MyLiveEvent.ResourceState != LiveEventResourceState.Stopped && MyLiveEvent.ResourceState != LiveEventResourceState.Running)
            {
                labelLiveEventStoppedOrStartedSettings.Visible = true;
                buttonUpdateClose.Enabled = false;
            }

            // let's track when user edit a setting
            Modifications = new ExplorerLiveEventModifications
            {
                Description        = false,
                ClientAccessPolicy = false,
                CrossDomainPolicy  = false,
                InputIPAllowList   = false,
                KeyFrameInterval   = false,
                PreviewIPAllowList = false,
                SystemPreset       = false,
                Ignore708Captions  = false
            };
        }
 private void NewAsset_Load(object sender, System.EventArgs e)
 {
     DpiUtils.InitPerMonitorDpi(this);
 }
 private void SettingsSelection_Load(object sender, EventArgs e)
 {
     DpiUtils.InitPerMonitorDpi(this);
 }
예제 #29
0
        private async void ChooseStreamingEndpoint_Load(object sender, EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);

            label.Text = string.Format(label.Text, _asset.Name);

            // SE List
            await _amsClient.RefreshTokenIfNeededAsync();

            // StreamingEndpoint BestSE = Task.Run(async () => await AssetInfo.GetBestStreamingEndpointAsync(_client)).Result;
            StreamingEndpoint BestSE = await AssetInfo.GetBestStreamingEndpointAsync(_amsClient);

            var myStreamingEndpoints = Task.Run(() => _amsClient.AMSclient.StreamingEndpoints.ListAsync(_amsClient.credentialsEntry.ResourceGroup, _amsClient.credentialsEntry.AccountName)).GetAwaiter().GetResult();

            foreach (StreamingEndpoint se in myStreamingEndpoints)
            {
                listBoxSE.Items.Add(new Item(string.Format(AMSExplorer.Properties.Resources.AssetInformation_AssetInformation_Load_012ScaleUnit, se.Name, se.ResourceState, StreamingEndpointInformation.ReturnTypeSE(se)), se.Name + "|" + se.HostName));
                if (se.Id == BestSE.Id)
                {
                    listBoxSE.SelectedIndex = listBoxSE.Items.Count - 1;
                }

                foreach (string custom in se.CustomHostNames)
                {
                    listBoxSE.Items.Add(new Item(string.Format(AMSExplorer.Properties.Resources.AssetInformation_AssetInformation_Load_012ScaleUnitCustomHostname3, se.Name, se.ResourceState, StreamingEndpointInformation.ReturnTypeSE(se), custom), se.Name + "|" + custom));
                }
            }


            // Filters

            // asset filters
            Microsoft.Rest.Azure.IPage <AssetFilter> assetFilters = await _amsClient.AMSclient.AssetFilters.ListAsync(_amsClient.credentialsEntry.ResourceGroup, _amsClient.credentialsEntry.AccountName, _asset.Name);

            List <string> afiltersnames = assetFilters.Select(a => a.Name).ToList();

            listViewFilters.BeginUpdate();
            assetFilters.ToList().ForEach(f =>
            {
                ListViewItem lvitem = new ListViewItem(new string[] { AMSExplorer.Properties.Resources.ChooseStreamingEndpoint_ChooseStreamingEndpoint_Load_AssetFilter + f.Name, f.Name });
                if (_filter != null && f.Name == _filter)
                {
                    lvitem.Checked = true;
                }
                listViewFilters.Items.Add(lvitem);
            }
                                          );

            // account filters
            IPage <AccountFilter> acctFilters = await _amsClient.AMSclient.AccountFilters.ListAsync(_amsClient.credentialsEntry.ResourceGroup, _amsClient.credentialsEntry.AccountName);

            acctFilters.ToList().ForEach(f =>
            {
                ListViewItem lvitem = new ListViewItem(new string[] { AMSExplorer.Properties.Resources.ChooseStreamingEndpoint_ChooseStreamingEndpoint_Load_GlobalFilter + f.Name, f.Name });
                if (_filter != null && f.Name == _filter && listViewFilters.CheckedItems.Count == 0) // only if not already selected (asset filter priority > account filter)
                {
                    lvitem.Checked = true;
                }
                if (afiltersnames.Contains(f.Name)) // global filter with same name than asset filter
                {
                    lvitem.ForeColor = Color.Gray;
                }
                listViewFilters.Items.Add(lvitem);
            }
                                         );
            listViewFilters.EndUpdate();


            if (_playertype == PlayerType.DASHIFRefPlayer)
            {
                radioButtonDASHCSF.Checked = true;
            }

            comboBoxBrowser.Items.Add(new Item(AMSExplorer.Properties.Resources.ChooseStreamingEndpoint_ChooseStreamingEndpoint_Load_DefaultBrowser, string.Empty));
            if (_displayBrowserSelection)
            { // let's add the browser options to lplayback the content (IE, Edge, Chrome...)
                if (IsWindows10())
                {
                    comboBoxBrowser.Items.Add(new Item(Constants.BrowserEdge[0], Constants.BrowserEdge[1]));
                }

                comboBoxBrowser.Items.Add(new Item(Constants.BrowserIE[0], Constants.BrowserIE[1]));
                comboBoxBrowser.Items.Add(new Item(Constants.BrowserChrome[0], Constants.BrowserChrome[1]));
                comboBoxBrowser.SelectedIndex = 0;
            }
            comboBoxBrowser.Visible = _displayBrowserSelection;

            UpdatePreviewUrl();

            FillLocatorComboInPolicyTab();
        }
예제 #30
0
 private void DeleteKeyAndPolicy_Load(object sender, EventArgs e)
 {
     DpiUtils.InitPerMonitorDpi(this);
 }