コード例 #1
0
        private bool RunValidation()
        {
            if (ValidateProperties == null)
            {
                return(true);
            }

#if FAMISTUDIO_MACOS
            MacUtils.RemoveNSWindowAlwaysOnTop(MacUtils.NSWindowFromGdkWindow(GdkWindow.Handle));
#endif
            // Validation might display messages boxes, need to work around z-ordering issues.
            bool valid = ValidateProperties.Invoke(propertyPage);

#if FAMISTUDIO_MACOS
            // This fixes some super weird focus issues.
            if (!valid)
            {
                Hide();
                Show();
            }

            MacUtils.SetNSWindowAlwayOnTop(MacUtils.NSWindowFromGdkWindow(GdkWindow.Handle));
#endif

            return(valid);
        }
コード例 #2
0
 private void buttonYes_Click(object sender, EventArgs e)
 {
     if (ValidateProperties == null || ValidateProperties.Invoke(propertyPage))
     {
         DialogResult = DialogResult.OK;
         Close();
     }
 }
コード例 #3
0
        private bool RunValidation()
        {
            if (ValidateProperties == null)
            {
                return(true);
            }

            // Validation might display messages boxes, need to work around z-ordering issues.
            bool valid = ValidateProperties.Invoke(propertyPage);

            return(valid);
        }
コード例 #4
0
 protected override Task <IDictionary <string, IEnumerable> > ValidateInternalAsync(string propertyName, CancellationToken token)
 {
     ValidateProperties.Add(propertyName);
     ValidateCount++;
     return(base.ValidateInternalAsync(propertyName, token));
 }