Exemplo n.º 1
0
        private void AddTimeSlice(DateTime start, DateTime end, Color color, double marginLeft = 0)
        {
            var time = new TimeSliceCargo {
                Background = new SolidColorBrush(color), Height = 100, CanvasLeft = ConveyorTry.GetPositionOfRightBlank() + marginLeft
            };

            time.SetTime(start, end);
            time.OnTrayMove += Time_OnTrayMove;
            ConveyorTry.AddCargos(time);
        }
Exemplo n.º 2
0
 private async Task Init()
 {
     AddTimeSlice(DateTime.Parse("2010/1/1 2:7:4"), DateTime.Parse("2010/1/1 5:9:4"), (Color)ColorConverter.ConvertFromString("#ffa631"));
     AddTimeSlice(DateTime.Parse("2010/1/10 22:25:4"), DateTime.Parse("2010/1/11 1:3:4"), (Color)ColorConverter.ConvertFromString("#afdd22"), 20);
     AddTimeSlice(DateTime.Parse("2011/1/10 7:14:4"), DateTime.Parse("2011/10/10 10:3:4"), (Color)ColorConverter.ConvertFromString("#ed5736"), 20);
     //ConveyorTry.AddCargos(new VariableGridCargo { Height = 50, Width = 100, Background = new SolidColorBrush(Colors.Gainsboro) });
     ConveyorTry.MinLeftPiexl = 0;
     ConveyorTry.MaxLeftPiexl = ConveyorTry.GetPositionOfRightBlank() - 30;
     Loaded      += MainWindow_Loaded;
     SizeChanged += MainWindow_SizeChanged;
     await Task.CompletedTask;
 }