Пример #1
0
        private void DoCancel(object sender, RoutedEventArgs e)
        {
            _closedFromButton = true;

            DialogResult = false;
            this.Close();
            instance = null;
        }
Пример #2
0
        private void DoDone(object sender, RoutedEventArgs e)
        {
            _returnText       = Text;
            _closedFromButton = true;

            DialogResult = true;
            this.Close();
            instance = null;
        }
Пример #3
0
        public static string ShowModal(string text, string title, Window owner)
        {
            if (instance == null)
            {
                instance = new XamlEditorDialog();
            }

            instance.Owner = owner;
            instance.Text  = text;
            instance.Title = title;

            bool result = (bool)instance.ShowDialog();

            if (result)
            {
                return(_returnText);
            }
            else
            {
                return(text);
            }
        }
Пример #4
0
        public static string ShowModal(string text, string title, Window owner)
        {
            if (instance == null)
            {
                instance = new XamlEditorDialog();
            }

            instance.Owner = owner;
            instance.Text = text;
            instance.Title = title;

            bool result = (bool) instance.ShowDialog();

            if (result)
            {
                return _returnText;
            }
            else
            {
                return text;
            }
        }
Пример #5
0
 protected override void OnClosed(EventArgs e)
 {
     instance = null;
 }
Пример #6
0
 protected override void OnClosed(EventArgs e)
 {
     instance = null;
 }
Пример #7
0
        private void DoDone(object sender, RoutedEventArgs e)
        {
            _returnText = Text;
            _closedFromButton = true;

            DialogResult = true;
            this.Close();
            instance = null;
        }
Пример #8
0
        private void DoCancel(object sender, RoutedEventArgs e)
        {
            _closedFromButton = true;

            DialogResult = false;
            this.Close();
            instance = null;
        }