コード例 #1
0
        public bool?ShowDialog(InputWindow.Delegate_ValidateCheck onCheck)
        {
            try
            {
                if (TextBox_Name != null)
                {
                    var bindExp = TextBox_Name.GetBindingExpression(TextBox.TextProperty);
                    if (bindExp != null)
                    {
                        if (bindExp.ParentBinding.ValidationRules.Count > 0)
                        {
                            var rule = bindExp.ParentBinding.ValidationRules[0] as InputWindow.RequiredRule;
                            if (rule != null)
                            {
                                rule.OnValidateCheck = onCheck;
                            }
                        }
                    }
                }

                return(this.ShowDialog());
            }
            catch (System.Exception ex)
            {
                EngineNS.Profiler.Log.WriteLine(EngineNS.Profiler.ELogTag.Error, "Create Resource Exception", ex.ToString());
            }
            return(false);
        }
コード例 #2
0
 public bool?ShowDialog(InputWindow.Delegate_ValidateCheck onCheck)
 {
     try
     {
         mCreateData = new ParticleResourceInfo.ParticleCreateData();
         return(this.ShowDialog());
     }
     catch (System.Exception ex)
     {
         EngineNS.Profiler.Log.WriteLine(EngineNS.Profiler.ELogTag.Error, "Create Resource Exception", ex.ToString());
     }
     return(false);
 }