public ButtonPage()
 {
     InitializeComponent();
     StripColorChange  = new SimpleCommand(StripColorChangeEvent);
     ButtonColorChange = new SimpleCommand(ButtonColorChangeEvent);
     ModuleData        = new ButtonModule();
     ModuleData.SolutionChangedEvent += ModuleData_SolutionChangedEvent;
 }
示例#2
0
 public static void UpdateButtonModule(this ButtonModule btnModule, ButtonModuleViewModel btnModuleVm)
 {
     btnModule.ID      = btnModuleVm.ID;
     btnModule.Type    = btnModuleVm.Type;
     btnModule.Title   = btnModuleVm.Title;
     btnModule.Payload = btnModuleVm.Payload;
     btnModule.Index   = btnModuleVm.Index;
 }
示例#3
0
    private void CycleNote(ButtonModule clicked)
    {
        int index = GetModuleId(clicked);

        if (index != -1)
        {
            Synthetizer.CycleNote(FromIndex(index));
        }
    }
示例#4
0
        public ModuleBrowserViewModel(IModuleService moduleService, IRackService rackService)
        {
            modServ  = moduleService;
            rackServ = rackService;

            //TOOD: update module service so we have ability to load distinct modules as well as those in the rack
            ButtonModule buttonModule = new ButtonModule("Test Button", "Just a test module with a button");

            Modules = new List <ModuleBase>();
            Modules.Add(buttonModule);
        }
 public ButtonModule AddButtonModule(ButtonModule btnModule)
 {
     return(_buttonModuleRepository.Add(btnModule));
 }
示例#6
0
 private void InitializeModule(BombInfo info)
 {
     buttonModule = new ButtonModule(info);
     colorComboBox.Items.AddRange(comboColorStrings.ToArray());
     textComboBox.Items.AddRange(comboTextStrings.ToArray());
 }