finished candybox

This commit is contained in:
meelstorm
2025-09-18 10:50:50 +02:00
parent dc12b3e51a
commit 6c0b778ba6
9 changed files with 535 additions and 55 deletions

View File

@@ -39,7 +39,9 @@
flowLayoutPanel2 = new FlowLayoutPanel();
btnSelectRecipe = new MaterialSkin.Controls.MaterialRaisedButton();
btnStop = new MaterialSkin.Controls.MaterialRaisedButton();
btnPause = new MaterialSkin.Controls.MaterialRaisedButton();
materialDivider2 = new MaterialSkin.Controls.MaterialDivider();
btnResume = new MaterialSkin.Controls.MaterialRaisedButton();
((System.ComponentModel.ISupportInitialize)previewWindow1).BeginInit();
flowLayoutPanel1.SuspendLayout();
flowLayoutPanel2.SuspendLayout();
@@ -140,9 +142,11 @@
flowLayoutPanel2.Controls.Add(btnSelectRecipe);
flowLayoutPanel2.Controls.Add(btnStart);
flowLayoutPanel2.Controls.Add(btnStop);
flowLayoutPanel2.Controls.Add(btnPause);
flowLayoutPanel2.Controls.Add(btnResume);
flowLayoutPanel2.Location = new Point(21, 27);
flowLayoutPanel2.Name = "flowLayoutPanel2";
flowLayoutPanel2.Size = new Size(200, 237);
flowLayoutPanel2.Size = new Size(200, 365);
flowLayoutPanel2.TabIndex = 12;
//
// btnSelectRecipe
@@ -179,6 +183,23 @@
btnStop.Text = "Stop";
btnStop.UseVisualStyleBackColor = true;
//
// btnPause
//
btnPause.Anchor = AnchorStyles.Top | AnchorStyles.Right;
btnPause.AutoSizeMode = AutoSizeMode.GrowAndShrink;
btnPause.Depth = 0;
btnPause.DrawBorder = true;
btnPause.Font = new Font("Segoe UI", 9F, FontStyle.Bold);
btnPause.Icon = null;
btnPause.Location = new Point(21, 213);
btnPause.MouseState = MaterialSkin.MouseState.HOVER;
btnPause.Name = "btnPause";
btnPause.Primary = false;
btnPause.Size = new Size(176, 64);
btnPause.TabIndex = 12;
btnPause.Text = "Pause";
btnPause.UseVisualStyleBackColor = true;
//
// materialDivider2
//
materialDivider2.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right;
@@ -191,6 +212,23 @@
materialDivider2.TabIndex = 11;
materialDivider2.Text = "materialDivider2";
//
// btnResume
//
btnResume.Anchor = AnchorStyles.Top | AnchorStyles.Right;
btnResume.AutoSizeMode = AutoSizeMode.GrowAndShrink;
btnResume.Depth = 0;
btnResume.DrawBorder = true;
btnResume.Font = new Font("Segoe UI", 9F, FontStyle.Bold);
btnResume.Icon = null;
btnResume.Location = new Point(21, 283);
btnResume.MouseState = MaterialSkin.MouseState.HOVER;
btnResume.Name = "btnResume";
btnResume.Primary = false;
btnResume.Size = new Size(176, 64);
btnResume.TabIndex = 13;
btnResume.Text = "Resume";
btnResume.UseVisualStyleBackColor = true;
//
// SingleCameraControl
//
AutoScaleDimensions = new SizeF(7F, 15F);
@@ -226,5 +264,7 @@
private MaterialSkin.Controls.MaterialRaisedButton btnSelectRecipe;
private MaterialSkin.Controls.MaterialDivider materialDivider2;
private FlowLayoutPanel flowLayoutPanel2;
private MaterialSkin.Controls.MaterialRaisedButton btnPause;
private MaterialSkin.Controls.MaterialRaisedButton btnResume;
}
}

View File

@@ -37,12 +37,16 @@ namespace VisionBuilder.UI.Windows.Components
btnStart.Command=_singleCameraVm.StartCommand;
btnStop.Command=_singleCameraVm.StopCommand;
btnSelectRecipe.Command=_singleCameraVm.SelectRecipeCommand;
btnPause.Command=_singleCameraVm.PauseCommand;
btnResume.Command=_singleCameraVm.ResumeCommand;
lblCameraName.DataBindings.Add("Text", _singleCameraVm, nameof(_singleCameraVm.CameraLabelAndStatus), true, DataSourceUpdateMode.OnPropertyChanged);
btnSelectRecipe.DataBindings.Add("Text", _singleCameraVm, nameof(_singleCameraVm.CurrentRecipeName), true, DataSourceUpdateMode.OnPropertyChanged);
btnStart.DataBindings.Add(nameof(btnStart.Visible), _singleCameraVm, nameof(_singleCameraVm.CanStart), true, DataSourceUpdateMode.OnPropertyChanged);
btnStop.DataBindings.Add(nameof(btnStop.Visible), _singleCameraVm, nameof(_singleCameraVm.CanStop), true, DataSourceUpdateMode.OnPropertyChanged);
btnSelectRecipe.DataBindings.Add(nameof(btnSelectRecipe.Primary), _singleCameraVm, nameof(_singleCameraVm.RecipeNotSelected), true, DataSourceUpdateMode.OnPropertyChanged);
btnPause.DataBindings.Add(nameof(btnPause.Visible), _singleCameraVm, nameof(_singleCameraVm.CanPause), true, DataSourceUpdateMode.OnPropertyChanged);
btnResume.DataBindings.Add(nameof(btnResume.Visible), _singleCameraVm, nameof(_singleCameraVm.CanResume), true, DataSourceUpdateMode.OnPropertyChanged);
}

View File

@@ -29,6 +29,8 @@ namespace VisionBuilder.UI.Windows.Components
switch (e.PropertyName)
{
case nameof(StatisticsVM.SessionStarted):
Clear();
InitializeFields();
UpdateMeta(StartedAtLabel, _statisticsVm.SessionStarted, true);
break;
case nameof(StatisticsVM.RecipeName):