Beispiel #1
0
 public static MySQLManager CreateManager()
 {
     if (_manager == null)
     {
         _manager = new MySQLManager();
     }
     return(_manager);
 }
Beispiel #2
0
        public ComponentWindowThumbnailsFullHD(int TestID, string MT, int PrinterID, string Status, string Login)
        {
            //this.Topmost = true;
            _testID    = TestID;
            _mt        = MT;
            _printerID = PrinterID;
            _status    = Status;
            _login     = Login;

            _managers          = Managers.CreateManagers();
            _printerManager    = _managers.GetPrinterManager();
            _buttonListManager = _managers.GetButtonListManager();
            _autoUpdate        = AUTOUPDATE.AutoUpdate.CreateAutoUpdate();
            _mysqlManager      = _managers.GetMySQLManager();

            //_printer = _printerManager.GetPrinterByMT(_mt);
            _printer = _printerManager.GetPrinterByID(_printerID);
            _imageStatusButtonList    = new List <Image>();
            _dismantledComponentsList = new List <Component>();
            foreach (var value in _printer.GetComponentList())
            {
                _dismantledComponentsList.Add(value);
            }

            InitializeComponent();

            _timer          = new DispatcherTimer();
            _timer.Interval = TimeSpan.FromSeconds(1);
            _timer.Tick    += timer_Tick;
            _timer.Start();

            _maxButtonsOnPage = _maxColumnsOnPage * _maxRowsOnPage;
            _pageMax          = _dismantledComponentsList.Count / (_maxButtonsOnPage);
            if ((_dismantledComponentsList.Count % _maxButtonsOnPage) > 0)
            {
                _pageMax++;
            }
            if (_dismantledComponentsList.Count < _maxButtonsOnPage)
            {
                _pageMax = 1;
            }
            if (_pageMax > 1)
            {
                btnRight.Visibility = Visibility.Visible;
            }

            //CreateButtons
            CreateButtonList();
            ButtonSetVisibility();
            CreateImageButtonList();

            _pageCount = _mysqlManager.GetPageCountByTestID(_testID);

            this.lblPC.Content      = "Page Count: " + _pageCount;
            this.lblMT.Content      = "MT: " + _mt + " \tStrona: " + _pageCurrent + " / " + _pageMax;
            _dismantleStartDateTime = DateTime.Now;
        }
Beispiel #3
0
        public LoginWindow()
        {
            InitializeComponent();
            _managers     = Managers.CreateManagers();
            _mysqlManager = MYSQL.MySQLManager.CreateManager();

            _timer          = new DispatcherTimer();
            _timer.Interval = TimeSpan.FromMinutes(1);
            _timer.Tick    += timer_Tick;
            _timer.Start();

            txtNFC.Focus();
        }
        public MainWindowFullHD(string Login, int Permission)
        {
            InitializeComponent();
            _managers = Managers.CreateManagers();
            _managers.InitializePrinters();
            _mysqlManager = MYSQL.MySQLManager.CreateManager();
            _autoUpdate   = AUTOUPDATE.AutoUpdate.CreateAutoUpdate();

            lblName.Content = _login = Login;
            if (Permission == 9)
            {
                gboxDismantle.Visibility = System.Windows.Visibility.Visible;
            }

            lblVersion.Content = "version: " + _autoUpdate.GetCurrentVersion().ToString();

            _timer          = new DispatcherTimer();
            _timer.Interval = TimeSpan.FromSeconds(1);
            _timer.Tick    += timer_Tick;
            _timer.Start();
        }