コード例 #1
0
        public NotificationDialog(int iconCharCode, int iconSize, string title, string content, string okText, bool showViewLogs, string viewLogsText) : base()
        {
            InitializeComponent();

            this.TitleBarHeight = Constants.DefaultWindowButtonHeight + 10;
            this.Icon.Text      = char.ConvertFromUtf32(iconCharCode);
            this.Icon.FontSize  = iconSize;
            this.Title          = title;
            //Me.TextBlockTitle.Text = iTitle.ToUpper
            this.TextBlockTitle.Text    = title.ToLower();
            this.TextBlockContent.Text  = content;
            this.ButtonOK.Content       = okText;
            this.ButtonViewLogs.Content = viewLogsText;

            if (showViewLogs)
            {
                this.ButtonViewLogs.Visibility = Visibility.Visible;
            }
            else
            {
                this.ButtonViewLogs.Visibility = Visibility.Collapsed;
            }

            WindowUtils.CenterWindow(this);
        }
コード例 #2
0
ファイル: CustomDialog.xaml.cs プロジェクト: ptddqr/Dopamine
        public CustomDialog(string title, UserControl content, int width, int height, bool canResize, bool autoSize, bool showTitle, bool showCancelButton, string okText, string cancelText, Func <Task <bool> > callback) : base()
        {
            InitializeComponent();

            this.TitleBarHeight        = Constants.DefaultWindowButtonHeight + 10;
            this.Title                 = title;
            this.TextBlockTitle.Text   = title.ToLower();
            this.Width                 = width;
            this.MinWidth              = width;
            this.CustomContent.Content = content;

            if (canResize)
            {
                this.ResizeMode    = ResizeMode.CanResize;
                this.Height        = height;
                this.MinHeight     = height;
                this.SizeToContent = SizeToContent.Manual;
            }
            else
            {
                this.ResizeMode = ResizeMode.NoResize;

                if (autoSize)
                {
                    this.SizeToContent = SizeToContent.Height;
                }
                else
                {
                    this.Height        = height;
                    this.MinHeight     = height;
                    this.SizeToContent = SizeToContent.Manual;
                }
            }

            if (showCancelButton)
            {
                this.ButtonCancel.Visibility = Visibility.Visible;
            }
            else
            {
                this.ButtonCancel.Visibility = Visibility.Collapsed;
            }

            if (showTitle)
            {
                this.TitlePanel.Visibility = Visibility.Visible;
            }
            else
            {
                this.TitlePanel.Visibility = Visibility.Collapsed;
            }

            this.ButtonOK.Content     = okText;
            this.ButtonCancel.Content = cancelText;

            this.callback = callback;

            WindowUtils.CenterWindow(this);
        }
コード例 #3
0
        public ConfirmationDialog(int iconCharCode, int iconSize, string title, string content, string okText, string cancelText) : base()
        {
            InitializeComponent();

            this.Icon.Text             = char.ConvertFromUtf32(iconCharCode);
            this.Icon.FontSize         = iconSize;
            this.Title                 = title;
            this.TextBlockTitle.Text   = title;
            this.TextBlockContent.Text = content;
            this.ButtonOK.Content      = okText;
            this.ButtonCancel.Content  = cancelText;

            WindowUtils.CenterWindow(this);
        }
コード例 #4
0
ファイル: InputDialog.xaml.cs プロジェクト: zaevi/Dopamine
        public InputDialog(int iconCharCode, int iconSize, string title, string content, string okText, string cancelText, string defaultResponse)
            : base()
        {
            InitializeComponent();

            this.DialogIcon.Text     = char.ConvertFromUtf32(iconCharCode);
            this.DialogIcon.FontSize = iconSize;
            this.Title = title;
            this.TextBlockTitle.Text   = title;
            this.TextBlockContent.Text = content;
            this.ButtonOK.Content      = okText;
            this.ButtonCancel.Content  = cancelText;
            this.TextBoxResponse.Text  = defaultResponse;

            WindowUtils.CenterWindow(this);
        }
コード例 #5
0
        public InputDialog(int iconCharCode, int iconSize, string title, string content, string okText, string cancelText, string defaultResponse)
            : base()
        {
            // This call is required by the designer.
            InitializeComponent();

            // Add any initialization after the InitializeComponent() call.
            this.TitleBarHeight        = Constants.DefaultWindowButtonHeight + 10;
            this.Icon.Text             = char.ConvertFromUtf32(iconCharCode);
            this.Icon.FontSize         = iconSize;
            this.Title                 = title;
            this.TextBlockTitle.Text   = title.ToLower();
            this.TextBlockContent.Text = content;
            this.ButtonOK.Content      = okText;
            this.ButtonCancel.Content  = cancelText;
            this.TextBoxResponse.Text  = defaultResponse;

            WindowUtils.CenterWindow(this);
        }
コード例 #6
0
 private void listener_button_show_join(object sender, RoutedEventArgs e)
 {
     _mode = 1;
     expand(100);
     WindowUtils.CenterWindow(this);
 }