示例#1
0
        /// <summary>
        ///   <para>See MonoBehaviour.OnDisable.</para>
        /// </summary>
        protected override void OnDisable()
        {
            base.OnDisable();
#if UNITY_EDITOR
            FontControl.removeText(this);
#endif
        }
示例#2
0
        /// <summary>
        ///   <para>See MonoBehaviour.OnEnable.</para>
        /// </summary>
        protected override void OnEnable()
        {
            base.OnEnable();
#if UNITY_EDITOR
            FontControl.addText(this);
            refreshLanguage();
#endif
        }
示例#3
0
        // Displays the UI for value selection.
        public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, System.IServiceProvider provider, object value)
        {
            IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));

            if (edSvc != null)
            {
                FontControl fontControl = new FontControl(edSvc, value);
                edSvc.DropDownControl(fontControl);
                return(fontControl.Value);
            }
            return(value);
        }
示例#4
0
    /** 选择语言 */
    public void selectLanguage(int type)
    {
        if (CommonSetting.languageType == type)
        {
            return;
        }

        GameC.save.setInt(LocalSaveType.Language, CommonSetting.languageType = type);
        BaseC.config.refreshConfigForLanguage();

        FontControl.refreshLanguage();
        GameC.player.dispatch(GameEventType.RefreshLanguage);
    }
示例#5
0
 private void lblChangeText_Click(object sender, EventArgs e)
 {
     foreach (Control FontControl in this.Controls)
     {
         FontControl.Font = Sans;
         if (FontControl.GetType() == typeof(ListBox))
         {
             FontControl.Font = Sans;
         }
         else if (FontControl.GetType() == typeof(Button))
         {
             FontControl.Font = Sans;
         }
     }
 }
示例#6
0
 private void lbl1_Click(object sender, EventArgs e)
 {
     foreach (Control FontControl in this.Controls)
     {
         if (FontControl.GetType() == typeof(Label))
         {
             FontControl.BackColor = Color.DarkCyan;
             FontControl.ForeColor = Color.Gainsboro;
             Font = Sans;
         }
         else if (FontControl.GetType() == typeof(Button))
         {
             FontControl.BackColor = Color.White;
             FontControl.ForeColor = Color.Goldenrod;
             Font = Sans;
         }
     }
 }
示例#7
0
 /// <summary>
 ///   <para>See MonoBehaviour.OnDestroy.</para>
 /// </summary>
 protected override void OnDestroy()
 {
     base.OnDestroy();
     FontControl.removeText(this);
 }
示例#8
0
 /// <summary>
 ///   <para>See MonoBehaviour.Awake.</para>
 /// </summary>
 protected override void Awake()
 {
     base.Awake();
     FontControl.addText(this);
     // refreshLanguage();
 }