示例#1
0
        public MainWindowViewModel(IUsersService usersService,
                                   ITableInfoService tableInfoService,
                                   IColumnInfoService columnInfoService)
        {
            _usersService      = usersService;
            _tableInfoService  = tableInfoService;
            _columnInfoService = columnInfoService;

            _isLoggedIn          = false;
            _accountPopupBoxIcon = new PackIcon
            {
                Kind       = PackIconKind.AccountRemove,
                Width      = 24,
                Height     = 24,
                Margin     = new Thickness(4, 0, 4, 0),
                Foreground = new SolidColorBrush(Color.FromRgb(244, 67, 54))
            };

            _allItems = GenerateNavItems();
            FilterItems(null);

            _selectedItem = _navItems[0];

            MovePrevCommand = new AnotherCommandImplementation(
                _ => SelectedIndex--,
                _ => SelectedIndex > 0);

            MoveNextCommand = new AnotherCommandImplementation(
                _ => SelectedIndex++,
                _ => SelectedIndex < _allItems.Count - 1);
        }
示例#2
0
        public ExportEntityViewModel(ITableInfoService tableInfoService, IColumnInfoService columnInfoService)
        {
            _tableInfoService  = tableInfoService;
            _columnInfoService = columnInfoService;

            _dbServerHistoryItems = DbServerInfoFile.GetDbServerInfoHistoryItems();

            _currentDbServerInfoItem = new DbServerInfo();
        }
示例#3
0
        public MainWindow(IUsersService usersService,
                          ITableInfoService tableInfoService,
                          IColumnInfoService columnInfoService)
        {
            InitializeComponent();

            DataContext = new MainWindowViewModel(usersService, tableInfoService, columnInfoService);

            _i = 0;

            SnackBar = MainSnackBar;
        }
示例#4
0
        public ExportEntity(ITableInfoService tableInfoService, IColumnInfoService columnInfoService)
        {
            InitializeComponent();

            DataContext = new ExportEntityViewModel(tableInfoService, columnInfoService);
        }