This commit is contained in:
h z
2024-06-24 07:27:50 +08:00
parent d0d90501a5
commit 634c503c7c
8 changed files with 67 additions and 11 deletions

View File

@@ -7,7 +7,6 @@ using VirtualChemistry.Chemistry.Mixtures.Implements;
public partial class Bottle : MenuButton, IChemicalContainer
{
private double ContainerVolume { get; set; }
private HeterogeneousMixture HeterogeneousMixture { get; set; }
public double Volume() => ContainerVolume;
public HeterogeneousMixture Content { get; set; } = HeterogeneousMixture.Null;
@@ -64,18 +63,38 @@ public partial class Bottle : MenuButton, IChemicalContainer
case 2:
GlobalScene.Demo.SelectedBottle = this;
GlobalScene.MainScene.SwitchToConstructor();
return;
break;
case 3:
Content = GlobalScene.Flask.Content;
Content.Container = this;
GlobalScene.Flask.Content = HeterogeneousMixture.Null;
GlobalScene.Flask.Update();
return;
break;
case 4:
return;
GlobalScene.Demo.SelectedBottle = this;
GlobalScene.Demo.PopupStringLoader();
break;
case 5:
foreach (HomogeneousMixture m in Content.Layers.ToArray())
{
m.Volume = m.FreeVolume;
GlobalScene.Flask.Content.AddLayer(m);
}
//GlobalScene.Flask.Content = Content;
//Content.Container = GlobalScene.Flask;
Content = HeterogeneousMixture.Null;
GlobalScene.Flask.Update();
break;
case 6:
GlobalScene.Demo.FullRepr.Text = Content.Dump();
break;
case 7:
Content = HeterogeneousMixture.Null;
break;
default:
return;
break;
}
BuildMenu();
}
// Called when the node enters the scene tree for the first time.