示例#1
0
        public static void AddInstruction(User_Controls.InstructionBlock ib)
        {
            ib.BgColor = InstructionBgColorFinder(ib.InstructionIndex);
            ib.Name    = "iBlock" + ib.InstructionIndex;
            MainWindowViewModel.InstructionBlocks.Insert(ib.InstructionIndex - 1, ib);

            MainWindow.Instance.InstructionsStackPanel.Children.Add(MainWindowViewModel.InstructionBlocks[ib.InstructionIndex - 1]);
        }
示例#2
0
        public static void AddDefaultInstruction()
        {
            User_Controls.InstructionBlock ib = new User_Controls.InstructionBlock();
            ib.InstructionLabel = "New Instruction";
            ib.BlockColor       = new SolidColorBrush(Colors.Maroon);
            ib.InstructionIndex = MainWindowViewModel.InstructionBlocks.Count + 1;

            AddInstruction(ib);
        }