public void CFSTXDSS_ClientsContainer_Load(System.Object sender, System.EventArgs e) { try { this._ClientHandlersDataContainer = ClientHandlersDataContainer.GetInstance(); if (this._ClientHandlersDataContainer.Count > 0) { //starts to create the handler for each one IEnumerator enumm = this._ClientHandlersDataContainer.GetEnumerator(); ClientHandlerData hnd = default(ClientHandlerData); while (enumm.MoveNext()) { hnd = (ClientHandlerData)enumm.Current; CF_DPE_ClientHandler clientHandler = new CF_DPE_ClientHandler(hnd); System.Windows.Forms.TabPage clientTab = new System.Windows.Forms.TabPage(clientHandler.STXDSS_Client.ClientName); clientTab.Controls.Add(clientHandler); clientHandler.Dock = System.Windows.Forms.DockStyle.Fill; this.TabClients.TabPages.Add(clientTab); this.lstBoxClients.Items.Add(clientHandler.STXDSS_Client); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public void Button8_Click(System.Object sender, System.EventArgs e) { try { IEnumerator enumm = default(IEnumerator); string listElement = ""; if (this.lstPostedPublicationVariables.Items.Count >= 0) { enumm = this.lstPostedPublicationVariables.Items.GetEnumerator(); while (enumm.MoveNext()) { listElement = System.Convert.ToString(enumm.Current); string VariableName = this.GetSelectedPublicationVariableName(listElement); DPE_ServerDefs.PublicationVariableDataType varType = this.GetSelectedPublicationVariableDataType(listElement); //modifies the handler data for the publicationsPosting.PublicationVariableDefinitionData varDef = this._ClientHandlerData.GetPublicationPostDefinition(this._publicationName).GetVariableDefinition(VariableName); this._variablesHandlerContainer.AddVariableHandler(this._publicationName, ref varDef); } ClientHandlersDataContainer.GetInstance().SaveData(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
internal static ClientHandlersDataContainer GetInstance() { if (_ClientHandlersDataContainer == null) { try { _ClientHandlersDataContainer = ObjectSerializer.DeserializeObjectFromFile(HANDLER_CONTAINER_FILE_NAME); } catch (Exception) { if (_ClientHandlersDataContainer == null) { _ClientHandlersDataContainer = new ClientHandlersDataContainer(); } } } return(_ClientHandlersDataContainer); }
public void Button7_Click(System.Object sender, System.EventArgs e) { try { if (this.lstPostedPublicationVariables.SelectedIndex >= 0) { string VariableName = this.GetSelectedPublicationVariableName(); DPE_ServerDefs.PublicationVariableDataType varType = this.GetSelectedPublicationVariableDataType(); //modifies the handler data for the publicationsPosting.PublicationVariableDefinitionData varDef = this._ClientHandlerData.GetPublicationPostDefinition(this._publicationName).GetVariableDefinition(VariableName); this._variablesHandlerContainer.AddVariableHandler(this._publicationName, ref varDef); ClientHandlersDataContainer.GetInstance().SaveData(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
internal ClientHandlersDataContainerEnumerator(ClientHandlersDataContainer container) { this._enumm = container.HandlersTableEnumerator; }
private void EventHandling_VariableSimulationHandler_simulationStatusChanged(CF_DPE_PublicationVariableSimulationHandler handler) { ClientHandlersDataContainer.GetInstance().SaveData(); }