/// <summary>
 ///
 /// </summary>
 public void Start(ControllerEntry context)
 {
     this.context   = context;
     m_Transform    = m_GameObject.transform;
     m_Graphic      = m_GameObject.GetComponent <Graphic>();
     m_DefaultScale = m_Transform.localScale.x;
 }
Beispiel #2
0
 /// <summary>
 ///
 /// </summary>
 public void Start(ControllerEntry context)
 {
     this.context   = context;
     m_Transform    = m_GameObject.transform;
     m_Graphic      = m_GameObject.GetComponent <Graphic>();
     m_DefaultScale = m_Transform.localScale.x;
     // TODO :
     m_UIEffect = m_GameObject.GetComponent <UIEffect>();
     if (m_UIEffect != null)
     {
         m_UIEffect.highlight.onUpdate += OnHighlight;
         m_UIEffect.highlight.onUpdate(0.0f);
     }
 }
 public void Start(ControllerEntry context)
 {
     this.context = context;
     if (key != null)
     {
         if (value >= 0f)
         {
             key.onClick.AddListener(OnStartClick);
         }
         else
         {
             key.onClick.AddListener(OnStopClick);
         }
     }
 }
        public void SetValue(ControllerEntry ce)
        {
            if (Convert.ToBoolean(ConfigurationManager.AppSettings["ControlerIsReadonly"]))
            {
                throw new Exception(@"Controler is read only (Chack configureaion)");
            }
            else
            {
            int intValue =  Convert.ToInt32(ce.EntryValue  *10);
            foreach (ControllerEntry maince in ControllerDictionaryList)
            {
                if(ce.Name == maince.Name)
                {
                    ce = new ControllerEntry(maince,ce.EntryValue);
                }
            }

            string url = @"http://" + ConfigurationManager.AppSettings["ControllerIP"] + ConfigurationManager.AppSettings["SetValuesURI"] +"R"+ ce.ID.ToString("000") + @"%2CD+" + intValue.ToString("000");
            byte[] myDataBuffer = WC.DownloadData(url);

            }
        }
 /// <summary>
 ///
 /// </summary>
 public void Start(ControllerEntry context)
 {
     this.context = context;
     m_Thumb      = m_GameObject.GetComponent <RectTransform>();
     m_Image      = m_GameObject.GetComponent <Image>();
 }
        private void ParseControlerResponse(string ControlerResponse)
        {
            string [] splitControlerResponse  = ControlerResponse.Split(new Char[] {} );
            for (int j = 0 ; j<ControllerDictionaryList.Count ; j++)
            {

                for (int i = 0; i<ControllerDictionaryList.Count; i++ )
                {
                    string ID =  splitControlerResponse[i].Substring(6,4);
                    if (ID == ControllerDictionaryList[j].ID.ToString("0000"))
                    {
                        string Value =  splitControlerResponse[i].Substring(13);
                        double   DecimalValue =  Convert.ToDouble(Value)/10;
                        ControllerDictionaryList[j]   = new ControllerEntry(ControllerDictionaryList[j] ,DecimalValue);
                    }
                }

            }
        }