Exemplo n.º 1
0
        private void SetTextMenuClick(object sender, System.EventArgs e)
        {
            TextInputDialog dialog = new TextInputDialog();

            dialog.TextAccepted += new EventHandler(TextInputDialog_TextAccepted);
            dialog.ShowDialog();

            if (this.inputText != "")
            {
                ToolStripMenuItem mi = sender as ToolStripMenuItem;

                switch (mi.Text)
                {
                case "Text Panel":
                    this.editControl1.StatusBarSettings.TextPanel.Panel.Text = this.inputText;
                    break;

                case "FileName Panel":
                    this.editControl1.StatusBarSettings.FileNamePanel.Panel.Text = this.inputText;
                    break;

                case "Status Panel":
                    this.editControl1.StatusBarSettings.StatusPanel.Panel.Text = this.inputText;
                    break;

                case "Encoding Panel":
                    this.editControl1.StatusBarSettings.EncodingPanel.Panel.Text = this.inputText;
                    break;

                case "Position Panel":
                    this.editControl1.StatusBarSettings.CoordsPanel.Panel.Text = this.inputText;
                    break;

                case "Insert Panel":
                    this.editControl1.StatusBarSettings.InsertPanel.Panel.Text = this.inputText;
                    break;
                }
            }
        }
Exemplo n.º 2
0
        private void TextInputDialog_TextAccepted(object sender, EventArgs e)
        {
            TextInputDialog dialog = sender as TextInputDialog;

            this.inputText = dialog.InputText;
        }