Esempio n. 1
0
        private void tsi_save_Click(object sender, EventArgs e)
        {
            if (!Directory.Exists("Saved Proxies"))
            {
                Directory.CreateDirectory("Saved Proxies");
            }

            using (StreamWriter sw = new StreamWriter("Saved Proxies\\" + DateTimes.DateTimeToUnix_s(DateTime.Now) + ".txt"))
                foreach (ListViewItem item in lv_checked.Items)
                {
                    sw.WriteLine("{0}:{1}", item.SubItems[1].Text, item.SubItems[2].Text);
                }

            MessageBox.Show("Saved proxy list locally. Check the directory the application was ran in.");
        }
Esempio n. 2
0
        private void tsi_saveAs_Click(object sender, EventArgs e)
        {
            SaveFileDialog sfd = new SaveFileDialog();

            sfd.Title    = "Save The List F****t.";
            sfd.Filter   = "Text File (*.txt)|*.txt|All Files (*.*)|*.*";
            sfd.FileName = "Checked Proxy List - " + DateTimes.DateTimeToUnix_s(DateTime.Now) + ".txt";

            if (sfd.ShowDialog() == DialogResult.OK)
            {
                if (sfd.FileName != "")
                {
                    using (StreamWriter sw = new StreamWriter(sfd.FileName)) {
                        foreach (ListViewItem item in lv_checked.Items)
                        {
                            sw.WriteLine("{0}:{1}", item.SubItems[1].Text, item.SubItems[2].Text);
                        }
                    }
                }
            }
        }