C
C#•2y ago
Jordan Belfort

Unsupported statement value type: Microsoft.DotNet.DesignTools.Client.CodeDom.CodeBodyTextStatement

https://github.com/Jordan-Belfort-88/Audio-Player-1.0/blob/master/Audio%20Player/Form1.Designer.cs I was replacing the buttons with new ones, went from the Design tab to the main code, changed some names then went to the designer and changed some functions there too. Something really weird happened, some buttons were OK, but a few had errors everywhere, even that I copy paste everything. Now I can't open the Design tab to check the buttons because that WEIRD error that I couldn't find anywhere. Another weird thing is that these lines have Error CS1061 and the other buttons like this one were OK with it:
Stop2.IconChar = FontAwesome.Sharp.IconChar.Stop;
Stop2.IconColor = SystemColors.ControlDark;
Stop2.IconFont = FontAwesome.Sharp.IconFont.Auto;
Stop2.IconSize = 20;
Stop2.IconChar = FontAwesome.Sharp.IconChar.Stop;
Stop2.IconColor = SystemColors.ControlDark;
Stop2.IconFont = FontAwesome.Sharp.IconFont.Auto;
Stop2.IconSize = 20;
I tried C + Z to delete all the changes but couldn't help. Cleaning the solution neither. It compiles and the program opens like the image attached. (I didn't deleted the Record buttons because I was doing the changes) Any help would be appreaciated a lot
GitHub
Audio-Player-1.0/Form1.Designer.cs at master · Jordan-Belfort-88/Au...
Contribute to Jordan-Belfort-88/Audio-Player-1.0 development by creating an account on GitHub.
3 Replies
Tvde1
Tvde1•2y ago
Commit often when it works, so you can undo your changes when it stops working 😬
Jordan Belfort
Jordan BelfortOP•2y ago
I don't have many good practices, and wasn't expecting something like this at all I was replacing buttons before and had some errors that I was able to solve, but now... I was able to solve everything with the designer but still I can't open the Design tab Tell me how in the earth could this happen:
private void InitializeComponent()
{
InitializeComponent(Grabar3);
}

#region Windows Form Designer generated code

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent(FontAwesome.Sharp.IconButton grabar3)
private void InitializeComponent()
{
InitializeComponent(Grabar3);
}

#region Windows Form Designer generated code

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent(FontAwesome.Sharp.IconButton grabar3)
That was the problem How could this FontAwesome.Sharp.IconButton grabar3 end up there and
private void InitializeComponent()
{
InitializeComponent(Grabar3);
}
private void InitializeComponent()
{
InitializeComponent(Grabar3);
}
from where did this came from
Accord
Accord•2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server