public WaterStreamControl(Flowsheet flowsheet, Point location, WaterStream waterStream) : this(flowsheet, location, waterStream, StreamOrientation.Right) { //InitializeComponent(); //this.Size = new System.Drawing.Size(UI.STREAM_CTRL_W, UI.STREAM_CTRL_H); //UI.SetStatusColor(this, this.WaterStream.SolveState); //this.Orientation = StreamOrientation.Right; //this.UpdateBackImage(); //this.flowsheet.ConnectionManager.UpdateConnections(this); }
public void InitializeVariableLabels(WaterStream stream) { this.labelMassFlowRate.InitializeVariable(stream.MassFlowRate); this.labelVolumeFlowRate.InitializeVariable(stream.VolumeFlowRate); this.labelPressure.InitializeVariable(stream.Pressure); this.labelTemperature.InitializeVariable(stream.Temperature); this.labelVaporFraction.InitializeVariable(stream.VaporFraction); this.labelEnthalpy.InitializeVariable(stream.SpecificEnthalpy); this.labelSpecificHeat.InitializeVariable(stream.SpecificHeat); this.labelDensity.InitializeVariable(stream.Density); }
private void EvaporationAndDryingSystem_StreamAdded(ProcessStreamBase processStreamBase) { Point location = new System.Drawing.Point(this.flowsheet.X, this.flowsheet.Y); ProcessStreamBaseControl control = null; if (processStreamBase is DryingGasStream) { DryingGasStream stream = (DryingGasStream)processStreamBase; control = new GasStreamControl(this.flowsheet, location, stream); } else if (processStreamBase is DryingMaterialStream) { DryingMaterialStream stream = (DryingMaterialStream)processStreamBase; control = new MaterialStreamControl(this.flowsheet, location, stream); } else if (processStreamBase is WaterStream) { WaterStream stream = (WaterStream)processStreamBase; control = new WaterStreamControl(this.flowsheet, location, stream); } else if (processStreamBase is DetailedFuelStream) { DetailedFuelStream stream = (DetailedFuelStream)processStreamBase; control = new DetailedFuelStreamControl(this.flowsheet, location, stream); } // adjust the location if at the limit of the flowsheet if (this.flowsheet.X > this.flowsheet.Width - control.Width / 2) { int newX = this.flowsheet.Width - control.Width; Point newLocation = new Point(newX, control.Location.Y); control.Location = newLocation; } if (this.flowsheet.Y > this.flowsheet.Height - control.Height / 2) { int newY = this.flowsheet.Height - control.Height; Point newLocation = new Point(control.Location.X, newY); control.Location = newLocation; } this.flowsheet.Controls.Add(control); this.flowsheet.IsDirty = true; }
public static void Initialize() { var mod = ModContent.GetInstance <TerrariaAmbience>(); // var loader = Instance; if (!Main.dedServ) { MorningCrickets = !Directories.ExistsInSFXReplace("forest_morning") ? mod.GetSound(Directories.ForestMorning) : GetSoundFromPath(SFXReplacePath + "/forest_morning.wav"); MorningCricketsInstance = MorningCrickets.CreateInstance(); MorningCrickets.Name = "Morning Crickets"; DayCrickets = !Directories.ExistsInSFXReplace("forest_day") ? mod.GetSound(Directories.ForestDay) : GetSoundFromPath(SFXReplacePath + "/forest_day.wav"); DayCricketsInstance = DayCrickets.CreateInstance(); DayCrickets.Name = "Daytime Crickets"; EveningCrickets = !Directories.ExistsInSFXReplace("forest_evening") ? mod.GetSound(Directories.ForestEvening) : GetSoundFromPath(SFXReplacePath + "/forest_evening.wav"); EveningCricketsInstance = EveningCrickets.CreateInstance(); EveningCrickets.Name = "Evening Crickets"; NightCrickets = !Directories.ExistsInSFXReplace("forest_night") ? mod.GetSound(Directories.ForestNight) : GetSoundFromPath(SFXReplacePath + "/forest_night.wav"); NightCricketsInstance = NightCrickets.CreateInstance(); NightCrickets.Name = "Night Crickets"; DesertAmbience = !Directories.ExistsInSFXReplace("desert_crickets") ? mod.GetSound(Directories.Desert) : GetSoundFromPath(SFXReplacePath + "/desert_crickets.wav"); DesertAmbienceInstance = DesertAmbience.CreateInstance(); DesertAmbience.Name = "Desert Animals"; CampfireCrackle = mod.GetSound(Directories.Campfire); CampfireCrackleInstance = CampfireCrackle.CreateInstance(); CampfireCrackle.Name = "Campfire Embers"; CavesAmbience = !Directories.ExistsInSFXReplace("ug_drip") ? mod.GetSound(Directories.CavernLayer) : GetSoundFromPath(SFXReplacePath + "/ug_drip.wav"); CavesAmbienceInstance = CavesAmbience.CreateInstance(); CavesAmbience.Name = "Caves"; SnowBreezeDay = !Directories.ExistsInSFXReplace("snowfall_day") ? mod.GetSound(Directories.SnowDay) : GetSoundFromPath(SFXReplacePath + "/snowfall_day.wav"); SnowBreezeDayInstance = SnowBreezeDay.CreateInstance(); SnowBreezeDay.Name = "Daytime Snowfall"; SnowBreezeNight = !Directories.ExistsInSFXReplace("snowfall_night") ? mod.GetSound(Directories.SnowNight) : GetSoundFromPath(SFXReplacePath + "/snowfall_night.wav"); SnowBreezeNightInstance = SnowBreezeNight.CreateInstance(); SnowBreezeNight.Name = "Night Snowfall"; CrimsonRumbles = !Directories.ExistsInSFXReplace("crimson_rumbles") ? mod.GetSound(Directories.Crimson) : GetSoundFromPath(SFXReplacePath + "/crimson_rumbles.wav"); CrimsonRumblesInstance = CrimsonRumbles.CreateInstance(); CrimsonRumbles.Name = "Crimson Rumbles"; CorruptionRoars = !Directories.ExistsInSFXReplace("corruption_roars") ? mod.GetSound(Directories.Corruption) : GetSoundFromPath(SFXReplacePath + "/corruption_roars.wav"); CorruptionRoarsInstance = CorruptionRoars.CreateInstance(); CorruptionRoars.Name = "Corruption Roars"; DayJungle = !Directories.ExistsInSFXReplace("jungle_day") ? mod.GetSound(Directories.JungleDay) : GetSoundFromPath(SFXReplacePath + "/jungle_day.wav"); DaytimeJungleInstance = DayJungle.CreateInstance(); DayJungle.Name = "Daytime Jungle"; NightJungle = !Directories.ExistsInSFXReplace("jungle_night") ? mod.GetSound(Directories.JungleNight) : GetSoundFromPath(SFXReplacePath + "/jungle_night.wav"); NightJungleInstance = NightJungle.CreateInstance(); NightJungle.Name = "Night Jungle"; BeachWaves = !Directories.ExistsInSFXReplace("beach_waves") ? mod.GetSound(Directories.Beach) : GetSoundFromPath(SFXReplacePath + "/beach_waves.wav"); BeachWavesInstance = BeachWaves.CreateInstance(); BeachWaves.Name = "Beach Waves"; HellRumble = !Directories.ExistsInSFXReplace("hell_rumble") ? mod.GetSound(Directories.HellLayer) : GetSoundFromPath(SFXReplacePath + "/hell_rumble.wav"); HellRumbleInstance = HellRumble.CreateInstance(); HellRumble.Name = "Hell Rumbling"; Drip1 = mod.GetSound($"{AmbientPath}/environment/liquid/liquid_drip1"); Drip2 = mod.GetSound($"{AmbientPath}/environment/liquid/liquid_drip2"); Drip3 = mod.GetSound($"{AmbientPath}/environment/liquid/liquid_drip3"); Drip1Instance = Drip1.CreateInstance(); Drip2Instance = Drip2.CreateInstance(); Drip3Instance = Drip3.CreateInstance(); SplashNew = mod.GetSound($"{AmbientPath}/environment/liquid/entity_splash_light"); SplashNewInstance = SplashNew.CreateInstance(); SplashNew.Name = "Water Splash (Light)"; LavaStream = mod.GetSound($"{AmbientPath}/environment/liquid/stream_lava"); WaterStream = mod.GetSound($"{AmbientPath}/environment/liquid/stream_water"); LavaStreamInstance = LavaStream.CreateInstance(); WaterStreamInstance = WaterStream.CreateInstance(); Rain = !Directories.ExistsInSFXReplace("rain_new") ? mod.GetSound(Directories.Rain) : GetSoundFromPath(SFXReplacePath + "/rain_new.wav"); RainInstance = Rain.CreateInstance(); Rain.Name = "Rain Outside"; Breeze = mod.GetSound(Directories.Breeze); BreezeInstance = Breeze.CreateInstance(); Breeze.Name = "Wind Breeze"; DayCricketsInstance.IsLooped = true; EveningCricketsInstance.IsLooped = true; NightCricketsInstance.IsLooped = true; CampfireCrackleInstance.IsLooped = true; DesertAmbienceInstance.IsLooped = true; CavesAmbienceInstance.IsLooped = true; SnowBreezeDayInstance.IsLooped = true; SnowBreezeNightInstance.IsLooped = true; CrimsonRumblesInstance.IsLooped = true; CorruptionRoarsInstance.IsLooped = true; DaytimeJungleInstance.IsLooped = true; NightJungleInstance.IsLooped = true; BeachWavesInstance.IsLooped = true; HellRumbleInstance.IsLooped = true; RainInstance.IsLooped = true; LavaStreamInstance.IsLooped = true; WaterStreamInstance.IsLooped = true; MorningCricketsInstance.IsLooped = true; BreezeInstance.IsLooped = true; } }
public WaterStreamLabelsControl(WaterStream stream) : this() { this.InitializeVariableLabels(stream); }