public static AutoUpdate CreateAutoUpdate() { if (_autoUpdate == null) { _autoUpdate = new AutoUpdate(); } return(_autoUpdate); }
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; }
public TestWindow(string User) { InitializeComponent(); //this.Topmost = true; _printer = new printer(); _managers = Managers.CreateManagers(); _mysqlManager = _managers.GetMySQLManager(); _autoUpdate = AUTOUPDATE.AutoUpdate.CreateAutoUpdate(); _login = User; txtSN.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(); }