/// <summary> /// Updates during sim contacts reading /// </summary> private void ReadingUpdate() { PBar.SetValue(GlobalObjUI.SimADNPosition); mainwindow_Ui.StatusBar.ShowMessage(GlobalObjUI.LMan.GetString("readcontact") + GlobalObjUI.SimADNPosition.ToString("d3")); MainClass.QtWait(); if (GlobalObjUI.SimADNStatus == 3 && !isEnd) { isEnd = true; // End with errors MainClass.ShowMessage(this, "ERROR", GlobalObjUI.SimADNError, MainClass.MessageType.Error); // Update gui widgets properties ScanSimAfter(); // update gui widgets with results UpdateSimControls(false); } if (GlobalObjUI.SimADNStatus == 2 && !isEnd) { isEnd = true; // Extract contacts from records retStr = GlobalObjUI.FromRecordsToContacts(); if (retStr != "") { // error detected MainClass.ShowMessage(this, "ERROR", retStr, MainClass.MessageType.Error); // Update gui widgets properties ScanSimAfter(); // update gui widgets with results UpdateSimControls(false); } else { // update ListView List <string> rowContent = null; foreach (Contact cnt in GlobalObjUI.SimContacts.SimContacts) { rowContent = new List <string>(); rowContent.Add(" "); rowContent.Add(cnt.Description); rowContent.Add(cnt.PhoneNumber); new QTreeWidgetItem(mainwindow_Ui.LstSimContacts, rowContent); } // Update gui widgets properties ScanSimAfter(); // update gui widgets with results UpdateSimControls(true); } } }
/// <summary> /// Set gui widgets before sim scan /// </summary> private void ScanSimBefore() { // Setup ProgressBar PBar.SetMinimum(0); PBar.SetMaximum(GlobalObjUI.SimADNRecordCount); PBar.SetValue(0); PBar.SetVisible(true); mainwindow_Ui.MainMenu.Enabled = false; mainwindow_Ui.TopToolBar.Enabled = false; mainwindow_Ui.FrameSim.Enabled = false; mainwindow_Ui.FrameFile.Enabled = false; MainClass.QtWait(); }