// Start is called before the first frame update
 void Start()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
Esempio n. 2
0
 private void button3_Click(object sender, RoutedEventArgs e)
 {
     Epi.Web.Common.Message.SurveyControlsResponse Result = new Common.Message.SurveyControlsResponse();
     try
     {
         SurveyManagerServiceV2.ManagerServiceV2Client client  = ServiceClient.GetClientV2();
         Epi.Web.Common.Message.SurveyControlsRequest  Request = new Common.Message.SurveyControlsRequest();
         Request.SurveyId = this.SurveyId.Text;
         Result           = client.GetSurveyControlList(Request);
         foreach (Epi.Web.Common.DTO.SurveyControlDTO ControlInfo in Result.SurveyControlList)
         {
             ControlsInfo.AppendText(string.Format("{0} - {1} - {2}\n", ControlInfo.ControlId, ControlInfo.ControlType, ControlInfo.ControlPrompt));
             ControlsInfo.AppendText("\n-----------------------------------------------------\n");
         }
     }
     catch (Exception ex)
     {
         ControlsInfo.AppendText("Error");
         //throw ex;
     }
 }