当前位置: 首页>>代码示例>>C#>>正文


C# InputBox.Show方法代码示例

本文整理汇总了C#中InputBox.Show方法的典型用法代码示例。如果您正苦于以下问题:C# InputBox.Show方法的具体用法?C# InputBox.Show怎么用?C# InputBox.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在InputBox的用法示例。


在下文中一共展示了InputBox.Show方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ChangeableButton_Click

        private void ChangeableButton_Click(object sender, EventArgs e)
        {
            Button iSender = (Button)sender;
            string screen = "";
            if (iSender.Parent == tabHome)
            {
                screen = "Home";
            }
            else if (iSender.Parent == tabOilType)
            {
                screen = "OilType";
            }
            InputBox iBox = new InputBox();
            string text = iBox.Show("Please enter the text for the button: ", typeof(ucKeypadQwerty));

            int location = -1;
            int.TryParse(iSender.Tag.ToString(), out location);

            frmSelection selectionBox = new frmSelection();
            object actionType = selectionBox.ShowDialog("Please select the action type", Enum.GetValues(typeof(Actions)));
            Actions action;
            Enum.TryParse<Actions>(actionType.ToString(), out action);

            DialogResult costSet = MessageBox.Show("Does this have a set cost?", "is Cost Set", MessageBoxButtons.YesNo);
            if (costSet == DialogResult.Yes)
            {
                string setCost = iBox.Show("What is the set Cost?", typeof(ucKeypadQwerty));

            }
            else
            {

            }

            unSavedChanges.Add(new KeypadButton() { Text = text, IndexLocation = location, ActionType = action, ID = -1, Screen = "Home"});
            iSender.Text = text;
        }
开发者ID:swalker1522,项目名称:PointOfSalePrototype,代码行数:37,代码来源:frmSettings.cs

示例2: listenOnPortToolStripMenuItem_Click

 // Create new listener on input port.
 private void listenOnPortToolStripMenuItem_Click(object sender, EventArgs e)
 {
     InputBox input = new InputBox();
     ListenOnPort(Convert.ToInt32(input.Show("Port selection", "Listen on port: ", "", "OK")));
 }
开发者ID:gotoel,项目名称:CCSURAT,代码行数:6,代码来源:ServerMainForm.cs

示例3: btnNew_Click

 private void btnNew_Click(object sender, EventArgs e)
 {
     InputBox iBox = new InputBox();
     string tagNumber = iBox.Show("Please Enter the Tag Number:", typeof(ucKeypadQwerty));
     if (tagNumber != null)
     {
         //int newID;
         //newID = dbInterface.CreateTicket(tagNumber);
         frmTicket frm = new frmTicket(tagNumber, this); //Create new Ticket.
         frm.Show();
     }
 }
开发者ID:swalker1522,项目名称:PointOfSalePrototype,代码行数:12,代码来源:frmHome.cs

示例4: sendMessageToolStripMenuItem_Click

 // Send MessageBox message to all selected client machines.
 private void sendMessageToolStripMenuItem_Click(object sender, EventArgs e)
 {
     InputBox input = new InputBox();
     string msg = input.Show("Send Message", "Input message to send: ", "Send");
     if(msg != null)
         SendSelected("[[MESSAGE]]" + msg + "[[/MESSAGE]]");
 }
开发者ID:gotoel,项目名称:CCSURAT,代码行数:8,代码来源:ServerMainForm.cs

示例5: uploadToSiteButton_Click

    private void uploadToSiteButton_Click(object sender, EventArgs e)
    {
        this.lifeTimer.Enabled = false;
        //declare the form.
        MultipartForm form;

        //define the inputbox as readonly, output only.
        InputBox i = new InputBox("Your URL", "Your URL is also copied to the clipboard automatically", false, true);
        uploadToSiteButton.Enabled = false;
        uploadToFtpButton.Enabled = false;
        applyEffectButton.Enabled = false;
        string returnValue;
        //see what option they chose.
        switch(hostingChoicesComboBox.SelectedItem.ToString().ToLower())
        {
            case "kalleload.net":
                form = new MultipartForm("http://www.kalleload.net/");
                form.FileContentType = "image/jpeg";
                form.InputBoxName = "selector";
                form.setField("progress", "1");
                form.setField("markurl", String.Empty);
                form.setField("MAX_UPLOAD_SIZE", "16777216");
                form.sendFile(_FileNameToHandle);
                returnValue = utilities.parsePOSTData("kalleload", form.ResponseText.ToString());
                Clipboard.SetText(returnValue, TextDataFormat.Text);
                i.SetTextbox(returnValue);
                i.Show();
                break;

            //case "imgpurse.com":
            //    form = new MultipartForm("http://www.imgpurse.com/");
            //    form.FileContentType = "image/jpeg";
            //    form.InputBoxName = "file";
            //    form.setField("upload", "1");
            //    form.sendFile(_FileNameToHandle);
            //    returnValue = utilities.parsePOSTData("imgpurse", form.ResponseText.ToString());
            //    Clipboard.SetText(returnValue, TextDataFormat.Text);
            //    i.SetTextbox(returnValue);
            //    i.Show();
            //    break;
            case "tinypic.com":
                form = new MultipartForm("http://s4.tinypic.com/upload.php");
                form.FileContentType = "image/jpeg";
                form.InputBoxName = "the_file";
                form.setField("UPLOAD_IDENTIFIER", "1154009790_1225587842");
                form.setField("upk", "e8bd19dfda564c710e602341ed9ffdec");
                form.setField("action", "upload");
                form.sendFile(_FileNameToHandle);
                returnValue = utilities.parsePOSTData("tinypic", form.ResponseText.ToString());
                Clipboard.SetText(returnValue, TextDataFormat.Text);
                i.SetTextbox(returnValue);
                i.Show();
                break;
            case "imageshack.us":
                form = new MultipartForm("http://www.imageshack.us");
                form.FileContentType = "image/jpeg";
                form.InputBoxName = "fileupload";
                form.setField("swfbutan", "1");
                form.sendFile(_FileNameToHandle);
                returnValue = utilities.parsePOSTData("imageshack", form.ResponseText.ToString());
                Clipboard.SetText(returnValue, TextDataFormat.Text);
                i.SetTextbox(returnValue);
                i.Show();
                break;
            case "imgcow.com":
                form = new MultipartForm("http://www.imgcow.com/index.php");
                form.FileContentType = "image/jpeg";
                form.InputBoxName = "file_1";
                form.sendFile(_FileNameToHandle);
                returnValue = utilities.parsePOSTData("imgcow", form.ResponseText.ToString());
                Clipboard.SetText(returnValue, TextDataFormat.Text);
                i.SetTextbox(returnValue);
                i.Show();
                break;
            default:
                break;
        }
        this.lifeTimer.Enabled = true;
        this.applyEffectButton.Enabled = true;
        this.uploadToSiteButton.Enabled = true;
        this.uploadToFtpButton.Enabled = true;
        //get rid of the form.
        form = null;
    }
开发者ID:vantruc,项目名称:skimpt,代码行数:84,代码来源:toastform.cs


注:本文中的InputBox.Show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。