private PlatformBandeau StyleBandeaux(string MediaType) { int rightSpace = 10; PlatformBandeau bdTmp = new PlatformBandeau(); bdTmp.Name = $"Bandeau - {MediaType}"; bdTmp.CategValue = MediaType; bdTmp.ElementsBgd = Color.White; bdTmp.ElementsHeight = BandHeight = 60; bdTmp.Height = BandHeight; bdTmp.BackColor = Color.FromArgb(0); bdTmp.CategWidth = _Cols["MediaType"] + rightSpace;; bdTmp.UCPath1.TopFont = bHardFont; bdTmp.UCPath1.BottomFont = bRelatFont; bdTmp.UCPath1.Width = _Cols["UCP1"] + rightSpace;; bdTmp.UCPath2.TopFont = bHardFont; bdTmp.UCPath2.BottomFont = bRelatFont; bdTmp.UCPath2.Width = _Cols["UCP2"] + rightSpace;; return(bdTmp); }
/// <summary> /// Genère tous les bandeaux - Partie graphique /// </summary> /// <param name="folders"></param> /// <returns></returns> private async Task GenerateInfoPath(MvFolder[] folders) { boxLog.Text += @"Creation of data graphic forms" + Environment.NewLine; flpPaths.Controls.Clear(); lBandeaux.Clear(); /*PlatformBandeau game = StyleBandeaux("Game"); * game.UCPath1.RelatPath = Game.FolderPath; * game.UCPath1.FullPath = Game.HFolderPath; * game.UCPath2.RelatPath = Game.NewFolderPath; * game.UCPath2.FullPath = Game.HNewFolderPath; * * flpPaths.Controls.Add(game); * flpPaths.Refresh(); * lBandeaux.Add(game);*/ foreach (var folder in folders) { PlatformBandeau bdTmp = StyleBandeaux(folder.MediaType); bdTmp.UCPath1.RelatPath = folder.FolderPath; bdTmp.UCPath1.FullPath = folder.HFolderPath; bdTmp.UCPath2.RelatPath = folder.NewFolderPath; bdTmp.UCPath2.FullPath = folder.HNewFolderPath; flpPaths.Controls.Add(bdTmp); lBandeaux.Add(bdTmp); } }