示例#1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            LoadLanguage();

            if (!DpiUtils.CheckHighDpiEnvironment())
            {
                MessageBox.Show(I18N.GetString(@"TCPingInfoView may not be able to adapt to your high DPI environment properly!"), I18N.GetString(@"High DPI Environment Check"), MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }

            LoadSetting();

            SetMiniSize();

            ChangedRatio();

            LoadControlsByDpi();

            MainList.AutoGenerateColumns = false;
            MainList.DataSource          = MainTable;
            LoadMainList();

            DateList.AutoGenerateColumns = false;
            DateList.DataSource          = DateTable;
            LoadDateList();

            if (File.Exists(ListPath))
            {
                RawString = Read.ReadTextFromFile(ListPath);
                rawTable  = Read.ReadAddressFromString(RawString);
                LoadFromList();
            }
        }
示例#2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            if (!DpiUtils.CheckHighDpiEnvironment())
            {
                MessageBox.Show(@"TCPingInfoView 可能无法正常适配你的高 DPI 环境!", @"High DPI Environment Check", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }

            LoadSetting();

            SetMiniSize();

            ChangedRatio();

            LoadControlsByDpi();

            MainList.AutoGenerateColumns = false;
            MainList.DataSource          = MainTable;
            LoadMainList();

            DateList.AutoGenerateColumns = false;
            DateList.DataSource          = DateTable;
            LoadDateList();

            if (File.Exists(ListPath))
            {
                RawString = Read.ReadTextFromFile(ListPath);
                rawTable  = Read.ReadAddressFromString(RawString);
                LoadFromList();
            }
        }
示例#3
0
        private void DRM_CENCDelivery_Load(object sender, EventArgs e)
        {
            DpiUtils.InitPerMonitorDpi(this);

            groupBoxPlayReady.Enabled = _PlayReadyPackagingEnabled;
            groupBoxWidevine.Enabled  = _WidevinePackagingEnabled;
        }
示例#4
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 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)
                                                             );
            }
        }
示例#6
0
 private void LiveEventInformation_DpiChanged(object sender, DpiChangedEventArgs e)
 {
     // for controls which are not using the default font
     DpiUtils.UpdatedSizeFontAfterDPIChange(new List <Control> {
         labelLEName, contextMenuStripDG
     }, e, this);
 }
 private void Splash_DpiChanged(object sender, DpiChangedEventArgs e)
 {
     // for controls which are not using the default font
     DpiUtils.UpdatedSizeFontAfterDPIChange(new List <Control> {
         labelTitle, labelConnecting
     }, e, this);
 }
示例#8
0
        private void PresetStandardEncoder_DpiChanged(object sender, DpiChangedEventArgs e)
        {
            DpiUtils.UpdatedSizeFontAfterDPIChange(labelMES, e);

            // to scale the bitmap in the buttons
            HighDpiHelper.AdjustControlImagesDpiScale(panel1);
        }
 private void TransformInformation_DpiChanged(object sender, DpiChangedEventArgs e)
 {
     // for controls which are not using the default font
     DpiUtils.UpdatedSizeFontAfterDPIChange(new List <Control> {
         labelJobNameTitle, contextMenuStrip, contextMenuStripInputAsset, contextMenuStripOutputAsset
     }, e, this);
 }
        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();
        }
示例#13
0
 private void StreamingEndpointInformation_DpiChanged(object sender, DpiChangedEventArgs e)
 {
     // for controls which are not using the default font
     DpiUtils.UpdatedSizeFontAfterDPIChange(new List <Control> {
         textBoxClientPolicy, textBoxCrossDomPolicy, labelSEName, contextMenuStripOI
     }, e, this);
 }
        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 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"));
        }
示例#17
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 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();
        }
示例#19
0
        private void Subclipping_DpiChanged(object sender, DpiChangedEventArgs e)
        {
            // for controls which are not using the default font
            DpiUtils.UpdatedSizeFontAfterDPIChange(new List <Control> {
                labelGen, timeControlStart, timeControlEnd, textBoxConfiguration
            }, e, this);

            // to scale the bitmap in the buttons
            HighDpiHelper.AdjustControlImagesAfterDpiChange(panel1, e);
        }
        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 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 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;
        }
示例#26
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));
        }
示例#28
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;
        }
示例#29
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;
        }
示例#30
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;
        }