public void Initialize(BaseModel _model)
 {
     var model = (ZoomableItem) _model;
     actionBtn.Text = model.ActionLabel;
     itemRow1.Initialize(model.Display);
     model.ActionRequested = actionBtn.GetClick().Select(_ => model.Display);
 }
 public void Initialize(BaseModel model)
 {
     _model = (ShifterModel) model;
     bindingSource1.DataSource = _model;
     actionBtn.GetClick().Subscribe(_ => _model.Handler());
     _model.ItemsAdded.Subscribe(AddToLayout);
 }
Exemplo n.º 3
0
 public void Initialize(BaseModel model)
 {
     var _model = (UserRowModel) model;
     bsUser.DataSource = _model;
     _model.ChangeAccessRequest = chgAccsBtn.GetClick().Select(_ => _model);
     _model.ResetPasswordRequest = resetPassBtn.GetClick().Select(_ => _model);
     _model.TransactionReportRequest = trsctRptBtn.GetClick().Select(_ => _model);
 }
 public void Initialize(BaseModel _model)
 {
     var model = (IMainMenuModel) _model;
     model.ConfigurationRequest = configButton.GetClick().Select(_ => model as MainMenuModel);
     model.InventoryRequest = InventoryButton.GetClick().Select(_ => model as MainMenuModel);
     model.RemoveItemRequest = removeButton.GetClick().Select(_ => model as MainMenuModel);
     model.ReturnItem = returnButton.GetClick().Select(_ => model as MainMenuModel);
 }
 public void Initialize(BaseModel _model)
 {
     var model = (IConfigurationModel) _model;
     model.AddUserRequest = addUserButton.GetClick().Select(_ => model as ConfigurationModel);
     model.DeleteUserRequest = DeleteUserButton.GetClick().Select(_ => model as ConfigurationModel);
     model.ExitApplicationRequest = ExitAppButton.GetClick().Select(_ => model as ConfigurationModel);
     model.PrinterSetupRequest = PrinterButton.GetClick().Select(_ => model as ConfigurationModel);
     model.RestartSystemRequest = rebootButton.GetClick().Select(_ => model as ConfigurationModel);
     model.SystemSettingsRequest = SystemSettingsButton.GetClick().Select(_ => model as ConfigurationModel);
     model.UserControlPanelRequest = userControlButton.GetClick().Select(_ => model as ConfigurationModel);
 }
 public void Initialize(BaseModel _model)
 {
     var model = (IInventoryLandingModel) _model;
     model.AdjustReorderPointRequest = AdjustReorderButton.GetClick().Select(_ => model as InventoryLandingModel);
     model.AssignItemRequest = AssignItemButton.GetClick().Select(_ => model as InventoryLandingModel);
     model.DeleteItemRequest = DeleteItemButton.GetClick().Select(_ => model as InventoryLandingModel);
     model.InventoryCountRequest = inventoryCountButton.GetClick().Select(_ => model as InventoryLandingModel);
     model.RestockHistoryRequest = RestockHistoryButton.GetClick().Select(_ => model as InventoryLandingModel);
     model.RestockRequest = RestockButton.GetClick().Select(_ => model as InventoryLandingModel);
     model.TransactionReportRequest =
         TransactionReportButton.GetClick().Select(_ => model as InventoryLandingModel);
 }
 public void Initialize(BaseModel model)
 {
     var _model = model as AssignItemModel;
     if (_model == null) return;
     _model.NewLocationsLoaded.Subscribe(list =>
                                             {
                                                 LocationCombo.Items.Clear();
                                                 LocationCombo.Items.AddRange(list.ToArray());
                                             });
     bsAssign.DataSource = _model;
     _model.AssignRequest = assignmentButton.GetClick().Select(_ => _model);
     assignmentButton.GetClick().Subscribe(_ => txtName.Focus());
 }
        public void Initialize(BaseModel _model)
        {
            var model = (LoginModel) _model;
            loginBs.DataSource = model;
            model.LoginRequested = GetLoginClicked(model)
                .Merge(GetEnterKey(model));

            LoginButton.GetClick()
                .Where(ev => !model.IsValid())
                .Subscribe(ev => label1.Text = Master.InvalidLogin);

            this.GetVisibleChanged().Where(_ => Visible).Subscribe(_ => UserNameInput.Focus());
        }
Exemplo n.º 9
0
 protected BaseSheet(BaseModel model, OptionsType options = OptionsType.Full)
 {
     InitializeComponent();
     ConnectionInfo.Initialize(model);
     Options.Initialize(model);
     if (options == OptionsType.Printer) PrintScreenOnly.Initialize(model);
     Options.Hide();
     PrintScreenOnly.Hide();
     _controlOption = options;
     Height = 600;
     Width = 800;
     ToggleControls();
     model.MainMenuRequest = _mainMenuBtn.GetClick().Select(__ => model);
     logo.GetClick().Subscribe(_ => new AboutDialog().ShowDialog());
 }
Exemplo n.º 10
0
 public void Initialize(BaseModel _model)
 {
     var model = (DisplayableItem) _model;
     bsSource.DataSource = model;
     this.GetClick().Subscribe(_ => model.Clicked(model));
 }
 public void Initialize(BaseModel model)
 {
     bsData.DataSource = model;
 }