/// <summary> /// The method that is called to start the backgound task. /// </summary> /// <param name="p_objArgs">Arguments to for the task execution.</param> /// <returns>Always <c>null</c>.</returns> protected override object DoWork(object[] p_objArgs) { OverallMessage = String.Format("{0} all the managed plugins...", EnablePlugins ? "Activating" : "Disabling"); OverallProgress = 0; OverallProgressStepSize = 1; OverallProgressMaximum = PluginList.Count; ShowItemProgress = false; ConfirmActionMethod camConfirm = (ConfirmActionMethod)p_objArgs[0]; foreach (Plugin plugin in PluginList) { if (EnablePlugins) { APL.ActivatePlugin(plugin); } else { APL.DeactivatePlugin(plugin); } if (OverallProgress < OverallProgressMaximum) { StepOverallProgress(); } } return(null); }
public string featuresToString() { String features = ""; String SrcIP2 = ""; String DestIP2 = ""; String SrcMAC2 = ""; String DestMAC2 = ""; Utilities convertor = new Utilities(); if (SrcMAC != null) { SrcMAC2 = convertor.convertMACtoString(SrcMAC); } if (DestMAC != null) { DestMAC2 = convertor.convertMACtoString(DestMAC); } //DestMAC[0].ToString() + "-" + DestMAC[1].ToString() + "-" + DestMAC[2].ToString() + "-" + DestMAC[3].ToString()+ "-" + DestMAC[4].ToString() + "-" + DestMAC[5].ToString(); if (SrcIP != null) { SrcIP2 = convertor.convertIPtoString(SrcIP); } //SrcIP[0].ToString() + "." + SrcIP[1].ToString() + "." + SrcIP[2].ToString()+"." + SrcIP[3].ToString(); if (DestIP != null) { DestIP2 = convertor.convertIPtoString(DestIP); } features += SrcMAC2 + "," + DestMAC2 + "," + SrcIP2 + "," + DestIP2 + "," + SrcPort.ToString() + "," + DestPort.ToString() + "," + Protocol.ToString() + "," + TBT.ToString() + "," + FPS.ToString() + "," + APL.ToString() + "," + AB.ToString() + "," + BS.ToString() + "," + PS.ToString() + "," + DPL.ToString() + "," + PPS.ToString() + "," + PV.ToString() + "," + PX.ToString() + "," + NNP.ToString() + "," + NSP.ToString() + "," + PSP.ToString() + "," + Duration.ToString() + "," + this.Type.ToString() + "," + IOPR + "," + AIT + "," + Reconnect; return(features); }