private void btnDatabase_Click(object sender, EventArgs e) { OSIsoft.AF.AFDatabase dbSelected = OSIsoft.AF.UI.AFOperations.SelectDatabase(this, _AFServer, _AFDB); if (dbSelected == null) { MessageBox.Show("Database was not changed", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { _AFDB = dbSelected; afElementFindCtrl1.Text = ""; _TargetElement = null; afElementFindCtrl1.Database = _AFDB; this.Text = _AFDB.GetPath() + " - PI Analysis Output Bulk Deleter"; } }
private void MainForm_Load(object sender, EventArgs e) { this.Text = _AFDB.GetPath() + " - PI Analysis Output Bulk Deleter"; numUpDownMaxSearchResults.Value = iMaxRetrievedObjects; numUpDownThreadCount.Value = iAFThreadCount; //Setting attribute filter initial state _AttributeFilter = new Dictionary <string, bool>(); _AttributeListFilterIsActive = false; //Allowing to choose the proper PI Server _PIServers = new OSIsoft.AF.PI.PIServers(); //Tries to connect to the primary first _PiServer = _PIServers.DefaultPIServer; }