Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit 9055aa2

Browse files
committed
Various fixes and improvements
Fixed timeout issue with MjpegStreamManager Buttons in the webUI are now shown/hidden during certain states like the desktop UI Added new GenericDialog to replace built-in message box usage in the codebase Added clear status button to webUI Added new TempControlWindow for bed/extruder temps (desktop UI) Added alwaysOnTop check to UI components that were missing it StatusTimerManager: - Switched to MachineState for tracking printer's current state - Added settings for audio/visual alerts on job completion and cooled (ready for removal)
1 parent 8936bfe commit 9055aa2

32 files changed

Lines changed: 1446 additions & 402 deletions

FlashForgeUI.csproj

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@
105105
<Compile Include="program\util\PrinterDetails.cs" />
106106
<Compile Include="program\util\WebhookHelper.cs" />
107107
<Compile Include="Properties\AssemblyInfo.cs" />
108+
<Compile Include="ui\main\dialog\GenericDialog.cs">
109+
<SubType>Form</SubType>
110+
</Compile>
111+
<Compile Include="ui\main\dialog\GenericDialog.Designer.cs">
112+
<DependentUpon>GenericDialog.cs</DependentUpon>
113+
</Compile>
108114
<Compile Include="ui\main\MainMenu.cs">
109115
<SubType>Form</SubType>
110116
</Compile>
@@ -116,10 +122,12 @@
116122
<Compile Include="ui\main\manager\camera\MjpegStreamManager.cs" />
117123
<Compile Include="ui\main\manager\camera\RtspStreamManager.cs" />
118124
<Compile Include="ui\main\manager\ConnectionManager.cs" />
125+
<Compile Include="ui\main\manager\InteractionManager.cs" />
119126
<Compile Include="ui\main\manager\StatusTimerManager.cs" />
120127
<Compile Include="ui\main\util\Compat.cs" />
121128
<Compile Include="ui\main\util\MjpegClient.cs" />
122129
<Compile Include="ui\main\util\UiHelper.cs" />
130+
<Compile Include="ui\main\util\Utils.cs" />
123131
<Compile Include="ui\window\PrinterPairingWindow.cs">
124132
<SubType>Form</SubType>
125133
</Compile>
@@ -156,6 +164,12 @@
156164
<Compile Include="ui\window\SettingsWindow.Designer.cs">
157165
<DependentUpon>SettingsWindow.cs</DependentUpon>
158166
</Compile>
167+
<Compile Include="ui\window\TempControlWindow.cs">
168+
<SubType>Form</SubType>
169+
</Compile>
170+
<Compile Include="ui\window\TempControlWindow.Designer.cs">
171+
<DependentUpon>TempControlWindow.cs</DependentUpon>
172+
</Compile>
159173
<Compile Include="webui\PrinterWebServer.cs" />
160174
<Compile Include="webui\WebServerBridge.cs" />
161175
<Compile Include="webui\WebSocketHandler.cs" />
@@ -168,6 +182,9 @@
168182
<AutoGen>True</AutoGen>
169183
<DependentUpon>Resources.resx</DependentUpon>
170184
</Compile>
185+
<EmbeddedResource Include="ui\main\dialog\GenericDialog.resx">
186+
<DependentUpon>GenericDialog.cs</DependentUpon>
187+
</EmbeddedResource>
171188
<EmbeddedResource Include="ui\main\MainMenu.resx">
172189
<DependentUpon>MainMenu.cs</DependentUpon>
173190
</EmbeddedResource>
@@ -189,6 +206,9 @@
189206
<EmbeddedResource Include="ui\window\SettingsWindow.resx">
190207
<DependentUpon>SettingsWindow.cs</DependentUpon>
191208
</EmbeddedResource>
209+
<EmbeddedResource Include="ui\window\TempControlWindow.resx">
210+
<DependentUpon>TempControlWindow.cs</DependentUpon>
211+
</EmbeddedResource>
192212
<None Include="packages.config" />
193213
<None Include="Properties\Settings.settings">
194214
<Generator>SettingsSingleFileGenerator</Generator>

program/Program.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ static void Main()
2222
//AllocConsole();
2323
Application.EnableVisualStyles();
2424
Application.SetCompatibleTextRenderingDefault(false);
25+
2526
Application.Run(new ui.main.MainMenu());
2627

28+
29+
2730
}
2831

2932
//TODO

program/util/Config.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,22 @@ public class Config
1616
[DefaultValue(false)]
1717
public bool AlwaysOnTop { get; set; }
1818

19+
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
20+
[DefaultValue(false)]
21+
public bool AlertWhenComplete { get; set; }
22+
23+
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
24+
[DefaultValue(false)]
25+
public bool AlertWhenCooled { get; set; }
26+
27+
28+
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
29+
[DefaultValue(true)]
30+
public bool AudioAlerts { get; set; }
31+
32+
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
33+
[DefaultValue(true)]
34+
public bool VisualAlerts { get; set; }
1935

2036
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
2137
[DefaultValue(false)]
@@ -43,6 +59,10 @@ public Config Load()
4359
WebUi = false;
4460
DiscordSync = false;
4561
AlwaysOnTop = false;
62+
AlertWhenComplete = false;
63+
AlertWhenCooled = false;
64+
AudioAlerts = false;
65+
VisualAlerts = true;
4666
DebugMode = false;
4767
WebhookUrl = "";
4868
CustomCamera = false;

program/util/WebhookHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ private async Task<Embed> CreatePrinterStatusEmbed(FiveMClient printerClient)
7979

8080
var embed = new EmbedBuilder().WithTitle(printerClient.PrinterName + " status").WithColor(Colors.Orange);
8181

82-
var img = await mainMenu.GetCameraStreamManager().GetSingleFrameAsync();
82+
var img = await mainMenu.MjpegStreamManager.GetSingleFrameAsync();
8383

8484

8585
var webcamPreview = await ImgBB.Upload(img, "preview.png");

ui/main/MainMenu.Designer.cs

Lines changed: 15 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)