private void EnroulBand(GameBandeauV sender) { statusStrip1.Text = ("EnroulBand"); Console.WriteLine("EnroulBand"); // StyleMainFLP(ContRolledWidth); }
/// <summary> /// Rempli chaque flowlayout d'un jeu avec les informations relatives aux paths /// </summary> /// <param name="sender"></param> private void DeroulBand(GameBandeauV sender) { if (_BandActif != null && _BandActif != sender) { _BandActif.Collapse_Fl(); } boxLog.Text += $"Bandactif: {sender.Name}" + Environment.NewLine; toolStripStatusLabel1.Text = $"Bandeau unrolled"; _BandActif = sender; if (sender.flp1.Controls.Count == 0) { MvGame game = (MvGame)sender.Objet; GeneratePaths(sender, game); boxLog.Text += $"Generate graphical elements for '{game.Title}'" + Environment.NewLine; } if (sender.Width > ContUnrolledWidth) { ContUnrolledWidth = sender.Width; } else { sender.Width = ContUnrolledWidth; } // sender.Resize_Me(); // flpGames.Width = sender.flp1.Width + 50; StyleMainFLP(ContUnrolledWidth); SetMainWindow(); }
/// <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); }
/// <summary> /// Création des bandeaux de titre /// </summary> /// <param name="aMvGames"></param> private async Task GenerateTitles(MvGame[] aMvGames) { boxLog.Text += @"Creation of data graphic forms" + Environment.NewLine; Debug.WriteLine("[CGamePaths] GenerateTitles"); Debug.Indent(); flpGames.Controls.Clear(); foreach (var mvGame in aMvGames) { /* * if (!cbHidden.Checked && mvGame.Hide) * { * Debug.WriteLine($"[GenerateTitles] {mvGame.Title} hidden => pass"); * continue; * }*/ toolStripStatusLabel1.Text = $"Création of bandeau: '{mvGame.Title}'"; Debug.WriteLine($"[GenerateTitles] Creation of the '{mvGame.Title}' banner"); GameBandeauV bdTmp = StyleTitles(mvGame.Id); bdTmp.Objet = mvGame; bdTmp.Title = $" {mvGame.Title}"; if (mvGame.Hide) { bdTmp.Title += " (Hidden)"; } if (mvGame.Broken) { bdTmp.Title += " (Broken)"; } bdTmp.Resize_Me(); mvGame.Valide = CheckGame(mvGame); bdTmp.ShowVerif(mvGame.Valide); flpGames.Controls.Add(bdTmp); //bdTmp.Dock = DockStyle.Top; flpGames.Refresh(); //lBandeaux.Add(bdTmp); } StyleMainFLP(ContRolledWidth); SetMainWindow(); Debug.Unindent(); }
/// <summary> /// Style des titres /// </summary> /// <param name="titre"></param> /// <returns></returns> private GameBandeauV StyleTitles(string titre) { int rightSpace = 10; GameBandeauV bdTmp = new GameBandeauV(); bdTmp.Name = titre; bdTmp.DeroulBand += new GameBandeauV.DeroulHandler(DeroulBand); bdTmp.EnroulBand += EnroulBand; bdTmp.BackColor = Color.Crimson; // bdTmp.Height = bdTmp BandHeight = bdTmp.Height + 2; bdTmp.AutoSize = false; // = BandHeight = 54; bdTmp.Width = ContRolledWidth; // bdTmp.Height = 80; return(bdTmp); }