Ejemplo n.º 1
0
 public FileDialog(IntPtr conn, Share padre)
 {
     dad  = padre;
     Conn = conn;
     InitializeComponent();
 }
Ejemplo n.º 2
0
        public ProgressBarDialog(IntPtr connection, utente usr, string path, SendFiles padre, Share nonno)
        {
            grandDad = nonno;
            InitializeComponent();
            prima          = DateTime.Now;
            mut_pipe       = new Mutex();
            is_pipe_closed = false;

            updateProgressBar = new delegateUpdateProgressBar(modify_progress_bar);

            StringBuilder str = new StringBuilder();

            connessione = connection;



            inviaFile(connessione, path, usr.MAC, str);
            progressBar1.Maximum = 100;
            progressBar1.Minimum = 0;
            progressBar1.MarqueeAnimationSpeed = 0;

            string tmpID = str.ToString();

            if (tmpID == "-1")
            {
                SendFiles padre2 = new SendFiles(padre.path, padre.conn, padre.nomeFile, nonno, false);
                padre.Close();
                padre2.Show();
                this.Close();
            }
            else
            {
                this.Show();
                pipe = new NamedPipeClientStream(tmpID);

                p           = new PollingPipe(updateProgressBar, null, this, null, pipe, null, mut_pipe, 3, true);
                nome_file   = path;
                label3.Text = nome_file;
                label4.Text = usr.Nome + " " + usr.Cognome;
            }
        }