Ejemplo n.º 1
0
        public static void ShowYesNo(Form parent, Point position, string text, EventHandler onYes, EventHandler onNo)
        {
            Popup popup = new Popup(parent);
            popup.Location = position;
            popup.rtbxMessage.Text = text;
            popup.tbxYes.Click += onYes;
            popup.tbxNo.Click += onNo;

            popup.tbxYes.Visible = true;
            popup.tbxNo.Visible = true;
            popup.tbxText.Visible = false;
            popup.tbxOk.Visible = false;

            popup.BringToFront();
            popup.Invalidate();
        }
Ejemplo n.º 2
0
        public static void ShowTextInput(Form parent, Point position, string text, bool hiddenText, EventHandler<OnOkEventArgs> onOk)
        {
            Popup popup = new Popup(parent);
            popup.Location = position;
            popup.rtbxMessage.Text = text;
            popup.OnOk += onOk;

            popup.tbxText.UseSystemPasswordChar = hiddenText;

            popup.tbxYes.Visible = false;
            popup.tbxNo.Visible = false;
            popup.tbxOk.Visible = true;
            popup.tbxText.Visible = true;

            popup.BringToFront();
            popup.Invalidate();
        }