Example #1
0
        private void updateForm(string value, formComponents component)
        {
            switch (component)
            {
            case formComponents.AZIMUTH:
                if (this.azimuthTextBox.InvokeRequired)
                {
                    delegateUpdate d = new delegateUpdate(updateForm);
                    this.Invoke(d, new object[] { value, component });
                }
                else
                {
                    this.azimuthTextBox.Text = value;
                }
                break;

            case formComponents.ELEVATION:
                if (this.elevationTextBox.InvokeRequired)
                {
                    delegateUpdate d = new delegateUpdate(updateForm);
                    this.Invoke(d, new object[] { value, component });
                }
                else
                {
                    this.elevationTextBox.Text = value;
                }
                break;
            }
        }
Example #2
0
 //反注册更新函数;
 public static void UnRegisterUpdateCallback(delegateUpdate callback)
 {
     if (!updateList.Contains(callback))
     {
         Debug.LogWarning("Main.cs, UnRegisterUpdateCallback: Sorry, Main's updatelist has not contains this item:" + callback.ToString());
         return;
     }
     updateList.Remove(callback);
 }