/* * private PlatformBandeau StylePaths(string MediaType, Dictionary<string,int> columns) * { * 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 = columns["MediaType"] + rightSpace; ; * * bdTmp.UCPath1.TopFont = bHardFont; * bdTmp.UCPath1.BottomFont = bRelatFont; * bdTmp.UCPath1.Width = columns["UCP1"] + rightSpace; ; * * bdTmp.UCPath2.TopFont = bHardFont; * bdTmp.UCPath2.BottomFont = bRelatFont; * bdTmp.UCPath2.Width = columns["UCP2"] + rightSpace; ; * * return bdTmp; * } */ /// <summary> /// Style des chemins /// </summary> /// <param name="MediaType"></param> /// <param name="lCols"></param> /// <returns></returns> private DualBandV StylePaths(string MediaType, int lCols) { int rightSpace = 10; DualBandV bdTmp = new DualBandV(); bdTmp.Name = $"Bandeau - {MediaType}"; bdTmp.Title = MediaType; bdTmp.Padding = new Padding(0, 1, 0, 1); bdTmp.BackColor = Color.AliceBlue; bdTmp.ElementsBgd = Color.White; //bdTmp.ElementsHeight = BandHeight = 60; // bdTmp.Height = BandHeight * 1; //bdTmp.BackColor = Color.FromArgb(50); // bdTmp.CategWidth = columns["MediaType"] + rightSpace; ; bdTmp.ucPaths21.TopFont = bHardFont; bdTmp.ucPaths21.BottomFont = bRelatFont; bdTmp.ucPaths22.TopFont = bHardFont; bdTmp.ucPaths22.BottomFont = bRelatFont; // int witdhMax = columns["UCP1"] > columns["UCP2"] ? columns["UCP1"] : columns["UCP2"]; bdTmp.ucPaths21.Width = lCols + rightSpace;; bdTmp.ucPaths22.Width = lCols + rightSpace;; return(bdTmp); }
/// <summary> /// Genère les bandeaux de paths /// </summary> /// <param name="folders"></param> /// <returns></returns> private async Task GeneratePaths(GameBandeauV gameBand, MvGame game) { Debug.WriteLine($"[GeneratePaths] Creation of the banner for {game.Title}"); boxLog.Text += $"Creation of the banner for { game.Title}" + Environment.NewLine; //int largeurBandeau = AnalyseVPrinciple(game.GetPaths); //largeurBandeau = 850; foreach (var pathO in game.GetPaths) { Debug.WriteLine($"[GeneratePaths] Path {pathO.Type}: {pathO.Original_RLink}"); if (string.IsNullOrEmpty(pathO.Original_RLink)) { continue; } DualBandV dbV = StylePaths(pathO.Type, PathsWidth); gameBand.flp1.Controls.Add(dbV); dbV.ucPaths21.RelatPath = pathO.Original_RLink; dbV.ucPaths21.FullPath = pathO.Original_HLink; dbV.ucPaths22.RelatPath = pathO.Destination_RLink; dbV.ucPaths22.FullPath = pathO.Destination_HLink; } gameBand.Resize_Me(); // games.Add(bdTmp); }