public Missing() { var f = new Factory(KnownAssets.Path.Pipe.Missing, this.Container); this.Water = f.ToWaterImages( "1", "2", "3" ); ParamsFunc<string, DispatcherTimer> ToAnimation = Frames => { var WaterDropFrames = f.ToWaterImages( Frames ); Action Hide = delegate { }; return (1000 / 23).AtIntervalWithCounter( Counter => { Hide(); WaterDropFrames.AtModulus(Counter).Show(); Hide = WaterDropFrames.AtModulus(Counter).Hide; } ); }; WaterDropFromLeftAnimation = ToAnimation( "l1", "l2" ); WaterDropFromRightAnimation = ToAnimation( "r1", "r2" ); WaterDropFromTopAnimation = ToAnimation( "t1", "t2" ); WaterDropFromBottomAnimation = ToAnimation( "b1", "b2" ); }
public TopToRight() { var f = new Factory(KnownAssets.Path.Pipe.TopToRight, this.Container); this.Outline = f.ToImage("outline"); this.Brown = f.ToImage("brown"); this.Brown.Visibility = Visibility.Hidden; this.Green = f.ToImage("green"); this.Green.Visibility = Visibility.Hidden; this.Yellow = f.ToImage("yellow"); this.Water = f.ToWaterImages( "0_8", "8_16", "16_24", "24_32", "32_40", "40_48", "48_56", "56_64" ); this.OverlayBlack = f.ToImage("black"); this.OverlayBlack.Visibility = Visibility.Hidden; this.Glow = f.ToImage("glow"); }
public LeftToRight() { var f = new Factory(KnownAssets.Path.Pipe.LeftToRight, this.Container); this.Outline = f.ToImage("outline"); this.Brown = f.ToImage("brown"); this.Brown.Visibility = Visibility.Hidden; this.Green = f.ToImage("green"); this.Green.Visibility = Visibility.Hidden; this.Yellow = f.ToImage("yellow"); this.Water = f.ToWaterImages( "water", "water" ); this.OverlayBlack = f.ToImage("black"); this.OverlayBlack.Visibility = Visibility.Hidden; this.Glow = f.ToImage("glow"); }
public LeftToDrain() { var f = new Factory(KnownAssets.Path.Pipe.LeftToDrain, this.Container); var WaterDropFrames = f.ToWaterImages( "1", "2" ); Action Hide = delegate { }; WaterDropAnimation = (1000 / 23).AtIntervalWithCounter( Counter => { Hide(); WaterDropFrames.AtModulus(Counter).Visibility = Visibility.Visible; Hide = () => WaterDropFrames.AtModulus(Counter).Visibility = Visibility.Hidden; } ); this.Outline = f.ToImage("outline"); this.Brown = f.ToImage("brown"); this.Brown.Visibility = Visibility.Hidden; this.Green = f.ToImage("green"); this.Green.Visibility = Visibility.Hidden; this.Yellow = f.ToImage("yellow"); this.Water = f.ToWaterImages( "0_8", "8_16", "16_24" ); this.Glow = f.ToImage("glow"); }
public PumpToRight() { { var f = new Factory(KnownAssets.Path.Pipe.PumpToRight, this.Container); this.Outline = f.ToImage("outline"); this.Brown = f.ToImage("brown"); this.Brown.Visibility = Visibility.Hidden; this.Green = f.ToImage("green"); this.Green.Visibility = Visibility.Hidden; this.Yellow = f.ToImage("yellow"); this.Water = f.ToWaterImages( "0_8", "8_16" ); this.Glow = f.ToImage("glow"); } { var f = new Factory(KnownAssets.Path.Pipe.PumpHandle, this.Container); var Handles = f.ToHiddenImages( "1", "2", "3", "4", "5", "6" ); Handles.AtModulus(0).Visibility = Visibility.Visible; Action Hide = () => Handles.AtModulus(0).Visibility = Visibility.Hidden; this.PumpHandleAnimation = (1000 / 23).AtIntervalWithCounter( Counter => { Hide(); Handles.AtModulus(Counter).Visibility = Visibility.Visible; Hide = () => Handles.AtModulus(Counter).Visibility = Visibility.Hidden; } ); } }