Exemplo n.º 1
0
        private void DownloadButton_Click(object sender, EventArgs e)
        {
            GetTextDialog getlink = new GetTextDialog("Download File", "Enter a File Link below", "");

            getlink.BigResultBox();

            if (getlink.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    Sharing.DownloadLink(getlink.ResultBox.Text);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }
Exemplo n.º 2
0
        public static void AddBuddyDialog(OpCore core, string link)
        {
            GetTextDialog add = new GetTextDialog("Add Buddy", "Enter a buddy link", link);

            add.BigResultBox();

            if (add.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    core.Buddies.AddBuddy(add.ResultBox.Text);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }