public void PlayRoutine(Routine routine) { _routine = routine; _playing = true; Cancel(); // Maybe? _threads = new List<Thread>(); _masterThread = new Thread(new ParameterizedThreadStart(PlayRoutineHelper)); _masterThread.Start(routine); }
public RoutineStep(SerializationInfo info, StreamingContext ctxt) { _name = info.GetString("_name"); _stepShape = (StepShape)info.GetValue("_stepShape", typeof(StepShape)); _attributePoints = (List<AttributePoint>)info.GetValue("_attributePoints", typeof(List<AttributePoint>)); _duration = info.GetDouble("_duration"); _repeatCount = info.GetInt32("_repeatCount"); _visible = info.GetBoolean("_visible"); _parentRoutine = (Routine)info.GetValue("_parentRoutine", typeof(Routine)); }
public RoutineBuilder(Routine routine) { //View initialization InitializeComponent(); LivePreview = false; //Initialize Routine _routine = routine; _routine.RoutineBuilder = this; tbxRoutineName.Text = _routine.Name; this.Title = _routine.Name; //Build Canvas toolbar - drawing shapes icons toolbarButtons = new List<ToggleButton>(); toolbarButtons.Add(btnToolbarMove); toolbarButtons.Add(btnToolbarArc); toolbarButtons.Add(btnToolbarCircle); toolbarButtons.Add(btnToolbarDot); toolbarButtons.Add(btnToolbarLine); toolbarButtons.Add(btnToolbarPolyline); toolbarButtons.Add(btnToolbarRectangle); toolbarButtons.Add(btnToolbarReferencePoint); toolbarButtons.Add(btnToolbarAttrPoint); _activeTool = null; _drawing = false; _movingShape = false; _movingReferencePoint = false; _movingAttributePoint = false; _makingPath = false; _makingPathStep2 = false; attributePointPopup = new AttributePointPopup(); //Build "Add Fixture" popup addFixturePop = new AddFixturePopup(); addFixturePop.AddSelectedClick += new RoutedEventHandler(SubroutineBuilder_AddSelectedClick); //Initialize Timeline CollectionContainer items = new CollectionContainer(); items.Collection = _routine.RoutineFixtures; CollectionContainer newFixtureLineCollection = new CollectionContainer(); BindingList<string> newFixtureLine = new BindingList<string>(); newFixtureLine.Add("Click here to add a fixture..."); newFixtureLineCollection.Collection = newFixtureLine; CompositeCollection cmpc = new CompositeCollection(); cmpc.Add(items); cmpc.Add(newFixtureLineCollection); lbxTimeline.ItemsSource = cmpc; //lbxTimeline.ItemsSource = _routine.RoutineFixtures; _lastSelectedFixture = null; //Step items list. necessary? lbxSteps.ItemsSource = null; //Reference Point list. lbxReferencePoints.ItemsSource = null; }
public RoutineStep(string name, StepShape stepShape, Routine parentRoutine) { _name = name; _stepShape = stepShape; //Default times _visible = false; _duration = 5; _repeatCount = 1; _attributePoints = new List<AttributePoint>(); _parentRoutine = parentRoutine; }
private void button1_Click(object sender, RoutedEventArgs e) { Routine newRoutine = new Routine(); Controller.Routines.Add(newRoutine); RoutineBuilder builder = new RoutineBuilder(newRoutine); builder.Show(); //BADDDDD WindowManager.CurrentViews[typeof(RoutineBuilder)] = builder; }
public RoutinePlayer(Routine routine) { _routine = routine; }
public void PreviewRoutine(Routine routine) { _preview = true; PlayRoutine(routine); }