public SwarmMemory(SwarmConnection c) { Master = ""; BackUp = ""; conn = c; TaskIndexList = new List<int>(); ResultCollection = new Hashtable(); SubResultCollection = new Hashtable(); }
public SwarmMemory(SwarmConnection c) { Master = ""; BackUp = ""; conn = c; }
public ChatModule(SwarmConnection SConn) { SC = SConn; SC.ChatChanged += new SwarmConnection.ChatEventHandler(ChatMsg); }
//*** All the public functions ***// /// <summary> /// ProgWin Constructor /// </summary> /// <param name="e">editor type</param> /// <param name="sconn">Swarm Connection Object</param> /// <param name="ip">Self IP</param> /// <param name="port">Self Port</param> /// <param name="pid">PID of the program</param> /// <param name="uname">Self USername</param> public ProgWin(editorType e, SwarmConnection sconn, string ip, string port, string pid, string uname, string Prog) { InitializeComponent(); et = e; err.ProgWinError += new ErrorNotification(ShowError); plot.image += new PlotReceiver.BmpImage(EnablePlot); Controller = new executor(); Controller.resEvent += new executor.result(Display); keywords = Controller.frontEnd.getKeywords(); err.SetExecutorObject(Controller); err.SetPlotObject(plot); username = uname; progName = Prog; //Swarm Operations SC = sconn; SM = new SwarmMemory(SC); IP = ip; Port = port; PID = pid; SM.PermissionListCh += new SwarmMemory.PermissionListChanged(progUserListChange); SM.rnBtnClicked += new SwarmMemory.RunButtonClick(RunClicked); SM.srcChanged += new SwarmMemory.SourceCodeChanged(CollabEditing); SM.CloseP += new SwarmMemory.CloseProgram(SM_CloseP); SM.RerunP += new SwarmMemory.RerunProgram(SM_RerunP); SC.DisconnectChanged += new SwarmConnection.DisconnectEventHandler(SM_CloseP); SM.FinalResult += new SwarmMemory.GetFinalResult(SM_FinalResult); SM.createTheObjects(PID, IP, Port); //Finally the swarm memory object SC.InsertProgtoSC(SM); err.SetSwarmMemoryObject(SM); //Exec Operations Controller.setPlotObject(plot); Controller.setSMObject(SM); worker = new BackgroundWorker(); worker.DoWork += new DoWorkEventHandler(worker_DoWork); worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted); prog = new TextRange(rtbInput.Document.ContentStart, rtbInput.Document.ContentEnd).Text; userColor.Add(Colors.Brown); userColor.Add(Colors.Yellow); userColor.Add(Colors.Green); }
/// <summary> /// Default constructor - Initializing the intial things /// </summary> // TODO check all the initializations public ProgConf(SwarmConnection SConn) { InitializeComponent(); SC = SConn; ChatModule Chat = new ChatModule(SC); mnuProg.Visibility = Visibility.Visible; txtMessage.Focus(); //Event Registrations err.ProgConfError += new ErrorNotification(ShowError); SC.ListChanged += new SwarmConnection.ChangedEventHandler(setUserList); SC.TransOwner += new SwarmConnection.PrivelageEventHandler(OwnerChanged); SC.ChngPermission += new SwarmConnection.PrivelageEventHandler(NewAccessPermission); SC.AddPrev += new SwarmConnection.PrivelageEventHandler(NewAccessPermission); Chat.Chat += new ChatNotification(DisplayChat); //Add paragraph to rich text box rtbChat.Document.Blocks.Add(p); }
public void SetSwarmConnectionObject(SwarmConnection s) { SC = s; SC.ErrorChanged +=new SwarmConnection.ErrorEventHandler(ErrorMsg); }