public static Managers CreateManagers() { if (_managers == null) { _managers = new Managers(); } return(_managers); }
public ChoosePrinterWindowFullHD(String Login) { InitializeComponent(); _managers = Managers.CreateManagers(); _mysqlManager = _managers.GetMySQLManager(); _buttonListManager = _managers.GetButtonListManager(); _login = Login; txtLabel.Focus(); }
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 SNWindow(COMPONENTTYPE Type, int TestID) { InitializeComponent(); this.Topmost = true; this.Focus(); _managers = Managers.CreateManagers(); _mysqlManager = _managers.GetMySQLManager(); _type = Type; _testID = TestID; ChangeLabel(); txtSN.Focus(); }
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 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 ComponentWindow(int TestID, string MT, string Status, string Login) { InitializeComponent(); //this.Topmost = true; _managers = Managers.CreateManagers(); _mysqlManager = _managers.GetMySQLManager(); _printerManager = _managers.GetPrinterManager(); _testid = TestID; _mt = MT; _status = Status; _login = Login; _printer = _printerManager.GetPrinterByMT(_mt); _dismantledComponentsList = new List <Component>(); InitializePrinterComponentsToListView(_status); }
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(); }
public ComponentView(string Login, int TestID, string PN, int ID) { //this.Topmost = true; InitializeComponent(); _managers = Managers.CreateManagers(); _mysqlManager = _managers.GetMySQLManager(); _buttonListManager = _managers.GetButtonListManager(); _login = Login; _testid = TestID; _pn = PN; _id = ID; _component = _mysqlManager.GetComponentByPN(PN.Remove(0, 2)); lblMT.Content = "Komponent: " + _component._PN; lblComment.Content = "Komentarz: " + _component._comment; string _path = ParseFIDPathFromXML(); int _revInt = 0; int.TryParse(_component._REV, out _revInt); if (_revInt > 9) { _browser.Navigate(_path + @"FID\" + _component._FID + "." + _component._REV + " " + _component._PN + ".pdf"); } else { _browser.Navigate(_path + @"FID\" + _component._FID + ".0" + _component._REV + " " + _component._PN + ".pdf"); } this.OK.Visibility = Visibility.Visible; this.NOK.Visibility = Visibility.Visible; this.NONE.Visibility = Visibility.Visible; this.BACK.Visibility = Visibility.Visible; _timer = new DispatcherTimer(); _timer.Interval = TimeSpan.FromSeconds(1); _timer.Tick += timer_Tick; _timer.Start(); }
public NewOrderWindow() { InitializeComponent(); _managers = Managers.CreateManagers(); _mysqlManager = _managers.GetMySQLManager(); }
public SupermarketWindow() { InitializeComponent(); _managers = Managers.CreateManagers(); _mysqlManager = _managers.GetMySQLManager(); }