public CopyAsset(CloudMediaContext context, int numberofobjectselected, CopyAssetBoxMode mode, string accountname) { InitializeComponent(); _accountname = accountname; this.Icon = Bitmaps.Azure_Explorer_ico; _context = context; Mode = mode; switch (Mode) { case CopyAssetBoxMode.CopyAsset: buttonOk.Text = this.Text = numberofobjectselected > 1 ? AMSExplorer.Properties.Resources.CopyAsset_CopyAsset_CopyAssets : AMSExplorer.Properties.Resources.CopyAsset_CopyAsset_CopyAsset; labelinfo.Text = string.Format(numberofobjectselected > 1 ? AMSExplorer.Properties.Resources.CopyAsset_CopyAsset_0AssetsSelected : AMSExplorer.Properties.Resources.CopyAsset_CopyAsset_0AssetSelected, numberofobjectselected); checkBoxDeleteSource.Text = numberofobjectselected > 1 ? AMSExplorer.Properties.Resources.CopyAsset_CopyAsset_DeleteSourceAssets : AMSExplorer.Properties.Resources.CopyAsset_CopyAsset_DeleteSourceAsset; checkBoxTargetSingleAsset.Enabled = numberofobjectselected > 1; checkBoxCopyDynEnc.Checked = false; checkBoxCloneLocators.Checked = false; checkBoxCloneAssetFilters.Checked = false; break; case CopyAssetBoxMode.CloneChannel: labelAssetCopy.Text = AMSExplorer.Properties.Resources.CopyAsset_CopyAsset_CloneChannel; labelExplanation.Text = numberofobjectselected > 1 ? AMSExplorer.Properties.Resources.CopyAsset_CopyAsset_TheChannelsWillBeClonedWithTheSameNameAndSettingsToTheSelectedAccount : AMSExplorer.Properties.Resources.CopyAsset_CopyAsset_TheChannelWillBeClonedWithTheSameNameAndSettingsToTheSelectedAccount; labelnewassetname.Visible = false; copyassetname.Visible = false; labelinfo.Text = string.Format(numberofobjectselected > 1 ? AMSExplorer.Properties.Resources.CopyAsset_CopyAsset_0ChannelsSelected : AMSExplorer.Properties.Resources.CopyAsset_CopyAsset_0ChannelSelected, numberofobjectselected); buttonOk.Text = this.Text = numberofobjectselected > 1 ? AMSExplorer.Properties.Resources.CopyAsset_CopyAsset_CloneChannels : AMSExplorer.Properties.Resources.CopyAsset_CopyAsset_CloneChannel; panelStorageAccount.Visible = false; groupBoxOptions.Visible = false; checkBoxCopyAltId.Visible = false; break; case CopyAssetBoxMode.CloneProgram: labelAssetCopy.Text = "Clone Program"; labelExplanation.Text = numberofobjectselected > 1 ? AMSExplorer.Properties.Resources.CopyAsset_CopyAsset_TheProgramsWillBeClonedToTheSameChannelNameInTheSelectedAccount : AMSExplorer.Properties.Resources.CopyAsset_CopyAsset_TheProgramWillBeClonedToTheSameChannelNameInTheSelectedAccount; labelinfo.Text = string.Format(numberofobjectselected > 1 ? AMSExplorer.Properties.Resources.CopyAsset_CopyAsset_0ProgramsSelected : AMSExplorer.Properties.Resources.CopyAsset_CopyAsset_0ProgramSelected, numberofobjectselected); buttonOk.Text = this.Text = numberofobjectselected > 1 ? AMSExplorer.Properties.Resources.CopyAsset_CopyAsset_ClonePrograms : AMSExplorer.Properties.Resources.CopyAsset_CopyAsset_CloneProgram; labelnewassetname.Visible = false; copyassetname.Visible = false; checkBoxDeleteSource.Visible = false; checkBoxTargetSingleAsset.Visible = false; checkBoxUnPublishSourceAsset.Visible = false; labelCloneLocatorForPrograms.Visible = true; labelCloneLocators.Visible = false; break; default: break; } }
public CopyAsset(CloudMediaContext context, int numberofobjectselected, CopyAssetBoxMode mode) { InitializeComponent(); this.Icon = Bitmaps.Azure_Explorer_ico; _context = context; Mode = mode; string s = numberofobjectselected > 1 ? "s" : ""; switch (Mode) { case CopyAssetBoxMode.CopyAsset: buttonOk.Text = string.Format(buttonOk.Text, s); labelinfo.Text = string.Format(labelinfo.Text, numberofobjectselected, s); checkBoxDeleteSource.Text = string.Format(checkBoxDeleteSource.Text, s); checkBoxTargetSingleAsset.Enabled = numberofobjectselected > 1; checkBoxCopyDynEnc.Checked = false; checkBoxCloneLocators.Checked = false; checkBoxCloneAssetFilters.Checked = false; labelCloneFilters.Visible = false; // option to clone filter is displayed but we don't want to display that start and end times are removed. This is not the case for asset copy. break; case CopyAssetBoxMode.CloneChannel: labelAssetCopy.Text = "Clone Channel"; labelExplanation.Text = string.Format("The channel{0} will be cloned with the same name and settings to the selected account.", s); labelnewassetname.Visible = false; copyassetname.Visible = false; labelinfo.Text = string.Format("{0} channel{1} selected", numberofobjectselected, s); buttonOk.Text = this.Text = string.Format("Clone channel{0}", s); panelStorageAccount.Visible = false; groupBoxOptions.Visible = false; break; case CopyAssetBoxMode.CloneProgram: labelAssetCopy.Text = "Clone Program"; labelExplanation.Text = string.Format("The program{0} will be cloned to the same channel name in the selected account.", s); labelinfo.Text = string.Format("{0} program{1} selected", numberofobjectselected, s); buttonOk.Text = this.Text = string.Format("Clone program{0}", s); labelnewassetname.Visible = false; copyassetname.Visible = false; checkBoxDeleteSource.Visible = false; checkBoxTargetSingleAsset.Visible = false; checkBoxUnPublishSourceAsset.Visible = false; labelCloneLocatorForPrograms.Visible = true; labelCloneLocators.Visible = false; break; default: break; } }
public CopyAsset(CloudMediaContext context, int numberofobjectselected, CopyAssetBoxMode mode) { InitializeComponent(); this.Icon = Bitmaps.Azure_Explorer_ico; _context = context; Mode = mode; string s = numberofobjectselected > 1 ? "s" : ""; switch (Mode) { case CopyAssetBoxMode.CopyAsset: buttonOk.Text = string.Format(buttonOk.Text, s); labelinfo.Text = string.Format(labelinfo.Text, numberofobjectselected, s); checkBoxDeleteSource.Text = string.Format(checkBoxDeleteSource.Text, s); checkBoxTargetSingleAsset.Enabled = numberofobjectselected > 1; checkBoxCopyDynEnc.Checked = false; checkBoxCloneLocators.Visible = false; labelCloneLocators.Visible = false; checkBoxCloneAssetFilters.Checked = false; labelCloneFilters.Visible = false; // optioon to clone filter is displayed but we don't want to display that start and end times are removed. This is not the case for asset copy. break; case CopyAssetBoxMode.CloneChannel: labelAssetCopy.Text = "Clone Channel"; labelExplanation.Text = string.Format("The channel{0} will be cloned with the same name and settings to the selected account.", s); labelnewassetname.Visible = false; copyassetname.Visible = false; labelinfo.Text = string.Format("{0} channel{1} selected", numberofobjectselected, s); buttonOk.Text = this.Text = string.Format("Clone channel{0}", s); panelStorageAccount.Visible = false; groupBoxOptions.Visible = false; break; case CopyAssetBoxMode.CloneProgram: labelAssetCopy.Text = "Clone Program"; labelExplanation.Text = string.Format("The program{0} will be cloned to the same channel name in the selected account.", s); labelinfo.Text = string.Format("{0} program{1} selected", numberofobjectselected, s); buttonOk.Text = this.Text = string.Format("Clone program{0}", s); labelnewassetname.Visible = false; copyassetname.Visible = false; checkBoxDeleteSource.Visible = false; checkBoxTargetSingleAsset.Visible = false; break; default: break; } }
public CopyAsset(CloudMediaContext context, int numberofobjectselected, CopyAssetBoxMode mode) { InitializeComponent(); this.Icon = Bitmaps.Azure_Explorer_ico; _context = context; Mode = mode; switch (Mode) { case CopyAssetBoxMode.CopyAsset: buttonOk.Text = string.Format(buttonOk.Text, numberofobjectselected > 1 ? "s" : ""); labelinfo.Text = string.Format(labelinfo.Text, numberofobjectselected, numberofobjectselected > 1 ? "s" : ""); checkBoxDeleteSource.Text = string.Format(checkBoxDeleteSource.Text, numberofobjectselected > 1 ? "s" : ""); checkBoxTargetSingleAsset.Enabled = numberofobjectselected > 1; checkBoxCopyDynEnc.Checked = false; break; case CopyAssetBoxMode.CloneChannel: labelExplanation.Text = "The channels(s) will be cloned with the same name and settings to the selected account."; labelnewassetname.Visible = false; copyassetname.Visible = false; labelinfo.Text = string.Format("{0} channel{1} selected", numberofobjectselected, numberofobjectselected > 1 ? "s" : ""); buttonOk.Text = this.Text = string.Format("Clone channel{0}", numberofobjectselected > 1 ? "s" : ""); panelStorageAccount.Visible = false; groupBoxOptions.Visible = false; break; case CopyAssetBoxMode.CloneProgram: labelExplanation.Text = "The program(s) will be cloned to the same channel name in the selected account."; labelinfo.Text = string.Format("{0} program{1} selected", numberofobjectselected, numberofobjectselected > 1 ? "s" : ""); buttonOk.Text = this.Text = string.Format("Clone program{0}", numberofobjectselected > 1 ? "s" : ""); labelnewassetname.Visible = false; copyassetname.Visible = false; checkBoxCopyDynEnc.Visible = true; checkBoxRewriteURL.Visible = true; checkBoxCloneLocators.Visible = true; labelCloneLocators.Visible = true; labelCloneLocators.Visible = true; checkBoxDeleteSource.Visible = false; checkBoxTargetSingleAsset.Visible = false; break; default: break; } }