Iranian Programming Support

Welcome To Csharp TeaM Forum.
For Use All Forum Posts And See Links
Please Register
Thanks
www.Programming.MrForum.net
Csharp TeaM Administrator

Join the forum, it's quick and easy

Iranian Programming Support

Welcome To Csharp TeaM Forum.
For Use All Forum Posts And See Links
Please Register
Thanks
www.Programming.MrForum.net
Csharp TeaM Administrator

Iranian Programming Support

Would you like to react to this message? Create an account in a few clicks or log in to continue.
Iranian Programming Support

Csharp TeaM

Top posting users this month

No user

Latest topics

» html to c# source code convert help
by launchar Tue Dec 06, 2016 7:22 am

» User input
by nesraz Sun Dec 20, 2015 8:39 am

» darkhaste source mediaplayer baraye b4a
by parham01 Tue Dec 15, 2015 10:31 am

» Tolide esme file gheire tekrari
by sajjad3011 Fri Jul 31, 2015 5:00 pm

» 368 library basic 4 android
by alimusavi71 Fri Jul 17, 2015 6:45 pm

» نرم افزار دریافت لایسنس آنتی ویروس نود 32
by programmer-x Wed Jul 15, 2015 3:19 pm

» help for java applications
by launchar Wed Jul 01, 2015 12:25 am

» Nimbuzz id Maker auto Captcha & Auto add FlooD & id BloCker
by briant Sat Jun 20, 2015 12:46 pm

» best mobile server v.1.0.0 persian edition
by programmer-x Fri Jun 19, 2015 12:41 am

» plz help me i neez xml code for spy bot
by alone Sun Mar 22, 2015 9:30 pm

» Dialogs Lib {Basic 4 Android}
by abdo0o Mon Mar 09, 2015 4:02 pm

» Room + PV Flooder Nimbuzz 2015
by sholeh Sat Feb 21, 2015 8:06 am

» PV Flooder Nimbuzz 2015
by sholeh Sat Feb 21, 2015 8:03 am

» سی شارپ سورس
by tr0 Wed Dec 24, 2014 12:15 pm

» help plz auto maker ids
by launchar Wed Dec 17, 2014 5:57 pm

» Join Multi Id To Room + Captcha [ Badbuzz Team ] In Seri Ba AgsXMPP !!
by abdo0o Fri Dec 12, 2014 4:47 am

» Amoozesh Ersale Sms Dar B4a
by abdo0o Fri Dec 12, 2014 4:43 am

» help me pls mehran brother
by launchar Wed Dec 03, 2014 6:36 pm

» plz help code Refresh captcha join Room
by ayad53 Wed Dec 03, 2014 12:24 pm

» please Help Me For AutoCaptchaa kardan IdMaker
by abdo0o Tue Dec 02, 2014 12:12 pm

» source C# bot addlist sender by ==> Alone_051@n.c
by walahazrat Mon Dec 01, 2014 2:34 am

» s2a sender tro help me pls
by walahazrat Mon Dec 01, 2014 2:28 am

» Help For {Data id } C# asixmpp.dll
by abdo0o Sun Nov 30, 2014 11:17 pm

» Help C# {Join & Left With Remoter}
by $iahi Tue Nov 25, 2014 10:31 am

» Source Nimbuzz User Searcher By Mehr,an [ Badbuzz TeaM ]
by waseemmalik Wed Nov 19, 2014 11:35 am


3 posters

    help save c#

    Poll

    help save c#

    [ 0 ]
    help save c# Bar_left0%help save c# Bar_right [0%] 
    [ 0 ]
    help save c# Bar_left0%help save c# Bar_right [0%] 
    [ 0 ]
    help save c# Bar_left0%help save c# Bar_right [0%] 

    Total Votes: 0
    pouya
    pouya
    New Member
    New Member


    Posts : 39
    Points : 78
    Thanks : 3
    Join date : 2013-08-02

    Solved help save c#

    Post by pouya Fri Aug 23, 2013 7:07 pm

    salam

    mikham az to listBox idiayi ke online shodan ro to pc save konam be sorate .txt , button gozashtm ke vaghti click kardm save beshe ! kasi source dare ke midune kar mide va khodesh use karde lotfan beZare... agar ham tozih bede behtar...  DONT_KNOW
    Mehdi izadi
    Mehdi izadi
    Administrator
    Administrator


    Posts : 793
    Points : 1182
    Thanks : 288
    Join date : 2013-06-06
    Age : 32
    Location : Iran,Hormozgan,Bandare Lengeh

    Solved Re: help save c#

    Post by Mehdi izadi Sat Aug 24, 2013 2:57 am

    Salam.
    In Source:

    Click Here For Download


    In Ham Kolle Code Dakhele Source:

    Code:

    /*source save kardane item haye listbox , load kardane txt dar listbox va clear kardane listbox
     * by 2mehdi  ~~~~>  lvleti@nim  &  programmer9010@nim
     * Csharp TeaM
     * www.programming.canadian-forum.com
     * */

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;

    namespace Save_And_Load_Listbox_Csharp_2Mehdi_
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }

            private void button1_Click(object sender, EventArgs e)
            {
                if (listBox1.Items.Count > 0)
                {
                    if (saveFileDialog1.ShowDialog() == DialogResult.OK)
                    {
                        System.IO.StreamWriter meti = new System.IO.StreamWriter(saveFileDialog1.FileName);
                        foreach (object item in listBox1.Items)
                            meti.WriteLine(item.ToString());
                        meti.Close();
                    }
                }
                else
                {
                    MessageBox.Show("ListBox Is Empty *CRAZY*", "An Error Occurred", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
            }

            private void button3_Click(object sender, EventArgs e)
            {
                listBox1.Items.Clear();
            }

            private void button2_Click(object sender, EventArgs e)
            {
                OpenFileDialog openFileDialog1 = new OpenFileDialog();
                openFileDialog1.Filter = "Text Files|*.txt";
                openFileDialog1.Title = "Select a Text file";
                openFileDialog1.FileName = "";
                DialogResult result = openFileDialog1.ShowDialog();
                if (result == DialogResult.OK)
                {
                    string file = openFileDialog1.FileName;

                    string[] text = System.IO.File.ReadAllLines(file);
                    foreach (string line in text)
                    {
                        listBox1.Items.Add(line);

                    }
                    listBox1.Items.Add("");
                }
            }
        }
    }


    Movafagh Bashid ...
    Csharp TeaM
    pouya
    pouya
    New Member
    New Member


    Posts : 39
    Points : 78
    Thanks : 3
    Join date : 2013-08-02

    Solved Re: help save c#

    Post by pouya Sat Aug 24, 2013 7:52 pm

    slm
    Code Save kardan ro mikhastam ba split(#) save kone to pc az to listbox,age mishe unam bezar merci...
    peyman69.tricks
    peyman69.tricks
    Junior Member
    Junior Member


    Posts : 112
    Points : 232
    Thanks : 87
    Join date : 2013-06-11
    Location : esfahan

    Solved Re: help save c#

    Post by peyman69.tricks Sat Aug 24, 2013 8:31 pm

    bebin azizam # mohem nis , k hala hatman # bashe ya .....

    VB Code


    Code:
      Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
            For i = 0 To ListBox1.Items.Count - 1
                TextBox1.AppendText(ListBox1.Items(i) + "#")


            Next

            savefile()
        End Sub
        Private Sub savefile()
            Try
                Dim adress As StreamWriter
                SaveFileDialog1.Title = "BadBuzZ TM"
                SaveFileDialog1.InitialDirectory = "BadBuzz TM"
                SaveFileDialog1.Filter = "Text Files (*.txt)|*.txt"
                SaveFileDialog1.DefaultExt = "txt"
                SaveFileDialog1.FilterIndex = 0
                SaveFileDialog1.FileName = "BadbuzZ"
                SaveFileDialog1.ShowDialog()
                adress = New StreamWriter(SaveFileDialog1.FileName)

                adress.WriteLine(textbox1.Text)

                adress.Close()
            Catch ex As Exception
                MessageBox.Show(ex.Message, "peyman69.tricks@nimbuzz.com", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub

    C# Code


    Code:
    private void Button5_Click(System.Object sender, System.EventArgs e)
    {
       for (i = 0; i <= ListBox1.Items.Count - 1; i++) {
          TextBox1.AppendText(ListBox1.Items(i) + "#");


       }

       savefile();
    }
    private void savefile()
    {
       try {
          StreamWriter adress = default(StreamWriter);
          SaveFileDialog1.Title = "BadBuzZ TM";
          SaveFileDialog1.InitialDirectory = "BadBuzz TM";
          SaveFileDialog1.Filter = "Text Files (*.txt)|*.txt";
          SaveFileDialog1.DefaultExt = "txt";
          SaveFileDialog1.FilterIndex = 0;
          SaveFileDialog1.FileName = "BadbuzZ";
          SaveFileDialog1.ShowDialog();
          adress = new StreamWriter(SaveFileDialog1.FileName);

          adress.WriteLine(textbox1.Text);

          adress.Close();
       } catch (Exception ex) {
          MessageBox.Show(ex.Message, "peyman69.tricks@nimbuzz.com", MessageBoxButtons.OK, MessageBoxIcon.Error);
       }
    }


    Sponsored content


    Solved Re: help save c#

    Post by Sponsored content


      Current date/time is Thu May 02, 2024 5:05 am