public void ConnectMultipleReport() { IAvpCollection snapshotStepCol = jobStep.FindByType("Step.Snapshot.1"); for (int i = 0; i < snapshotStepCol.Count; i++) { if (allMultipleReport == null) { allMultipleReport = new ReportConnection[4]; } if (allMultipleReport[i] == null) { allMultipleReport[i] = new ReportConnection(); allMultipleReport[i].NewReport += receivedReport_NewReport; } allMultipleReport[i].Connect(vsDevice, i + 1); allMultipleReport[i].DropWhenBusy = false; allMultipleReport[i].FreezeMode = ReportConnection.FreezeModeOptions.SHOW_ALL; allMultipleReport[i].DataRecordAdd("Snapshot1.BufOut"); if (ConnectionEventCallback != null) { ConnectionEventCallback.Invoke(Enum_ConnectionEvent.CONNECTED_REPORT, allMultipleReport[i]); } } }
protected override bool OnQvItemAdd(Common.IReportItem qvItem) { try { ReportConnection connection = qvItem as ReportConnection; if (string.IsNullOrWhiteSpace(connection.Name) || connection.QlikViewDocument == null) { MessageBox.Show("Name and QlikViewDocument are required."); return(false); } if (connection.IsServer && string.IsNullOrWhiteSpace(connection.ServerName)) { MessageBox.Show("Server Name is required."); return(false); } ReportConfig.ConnectionManager.AddItem(qvItem); } catch (Exception ex) { MessageBox.Show(ex.Message); return(false); } return(true); }
public void ConnectReport() { try { if (allReport == null) { allReport = new ReportConnection(); allReport.NewReport += receivedReport_NewReport; } allReport.Connect(vsDevice); allReport.DropWhenBusy = false; allReport.FreezeMode = ReportConnection.FreezeModeOptions.SHOW_ALL; allReport.DataRecordAdd("Snapshot1.BufOut"); if (ConnectionEventCallback != null) { ConnectionEventCallback.Invoke(Enum_ConnectionEvent.CONNECTED_REPORT, allReport); } } catch (Exception ex) { throw new NotImplementedException(ex.Message); } }
public void Preview(ReportConnection connection) { this.SetConnection(connection); this.OpenConnector(); this.Show(); System.Threading.Thread.Sleep(10000); this.Hide(); }
private void CreateConnectionObject() { if (this.dataAccessConnection == null) { ReportConnection connection = this.repo.GetConnection(this.masterReport_Id); this.dataAccessConnection = connection.CopyToObject(new DatabaseModel()) as DatabaseModel; } this.data = new DataAccess(this.dataAccessConnection); }
public ReportConnectionModel GetReportConnectionByPrimaryKey(Int64 MasterReport_Id, string ReportConnectionName) { ReportConnection result = this.dataContext .ReportConnections .FirstOrDefault(pk => pk.MasterReport_Id == MasterReport_Id && pk.ReportConnectionName == ReportConnectionName); if (result == null) { return(null); } return(result.CopyToObject(new ReportConnectionModel()) as ReportConnectionModel); }
public ReportConnectionModel GetProductionOrConnectionModel(long masterReport_Id) { ReportConnection result = base.dataContext .ReportConnections .FirstOrDefault(d => d.IsProductionConnection == true && d.IsActive == true); if (result == null) { return(null); } return(result.CopyToObject(new ReportConnectionModel()) as ReportConnectionModel); }
private void Microscan_App_Loaded(object sender, RoutedEventArgs e) { WFHost1.Child = BufferView1; m_Coord = new VsCoordinator(); // Starts Backplane m_Job = new JobStep(); m_RepCon1 = new ReportConnection(); m_IO = new IOConnection(); // Set DEVICENAME to your units name DEVICENAME = "SoftSys1"; //DEVICENAME = "MicroHAWK1A48C4"; m_RepCon1.NewReport += new EventHandler <ReportConnectionEventArgs>(m_RepCon1_NewReport); m_Coord.OnDeviceFocus += new _IVsCoordinatorEvents_OnDeviceFocusEventHandler(m_Coord_OnDeviceFocus); m_Coord.DeviceFocusSetOnDiscovery(DEVICENAME, -1); }
public void SetConnection(QlikView.Common.ReportConnection connection) { if (CurrentConnection == null || CurrentConnection.Name != connection.Name || this._doc == null) { if (connection.IsLocal == false) { this.axQlikOCX1.UserName = connection.User; this.axQlikOCX1.Password = connection.Password; string doc = string.Format("qvp://{0}/{1}", connection.ServerName, connection.QlikViewDocument); this._doc = this.axQlikOCX1.OpenDocument(doc); } else { this._doc = this.axQlikOCX1.OpenDocument(connection.QlikViewDocument); } CurrentConnection = connection; } }
private void DisconnectReport() { if (allReport != null) { allReport.Disconnect(); allReport.NewReport -= receivedReport_NewReport; allReport = null; } if (allMultipleReport != null) { foreach (ReportConnection report in allMultipleReport) { report.Disconnect(); report.NewReport -= receivedReport_NewReport; } allMultipleReport = null; } if (ConnectionEventCallback != null) { ConnectionEventCallback.Invoke(Enum_ConnectionEvent.CONNECTED_REPORT, null); } }
public void UpdateReportConnection(ReportConnectionModel model) { ReportConnection existing = this.dataContext .ReportConnections .Where(rx => rx.MasterReport_Id == model.MasterReport_Id && rx.ReportConnectionName == model.ReportConnectionName) .FirstOrDefault(); if (existing == null) { existing = model.CopyToObject(new ReportConnection()) as ReportConnection; this.dataContext.ReportConnections.Add(existing); } else { existing = model.CopyToObject(existing) as ReportConnection; } this.dataContext.SaveChanges(); model = existing.CopyToObject(model) as ReportConnectionModel; }
private void Microscan_App_Closing(object sender, System.ComponentModel.CancelEventArgs e) { // Stop all inspections if (m_Dev != null) { m_Dev.StopAll(); } // Disconnect the reports if (m_RepCon1 != null) { m_RepCon1.Disconnect(); } m_RepCon1 = null; // Disconnect the IO if (m_IO != null) { m_IO.Disconnect(); } m_IO = null; // Disconnect from the camera if (m_Dev != null) { m_Dev.Disconnect(); } m_Dev = null; // Set the RootStep of setup manager to null SetupManager1.RootStep = null; // Clear the job from pc memory while (m_Job.Count > 0) { m_Job.Remove(1); } m_Job = null; }
public void Preview(ReportConnection connection) { //Do Nothing }
public void Preview(ReportConnection connection) { this._qlikViewConnector.Preview(connection); }