Example #1
0
        private static void Download(ServiceReference1.StrumienClient client2)
        {
            String filePath = Path.Combine(System.Environment.CurrentDirectory, "klient.jpg");


            System.IO.Stream stream2 = client2.getStream("image.jpg");
            ZapiszPlik(stream2, filePath);
        }
Example #2
0
        public Form1()
        {
            CallbackHandler mojCallbackHandler = new CallbackHandler();
            InstanceContext instanceContext    = new InstanceContext(mojCallbackHandler);

            callbackLista = new CallbackListaClient(instanceContext);

            client2 = new ServiceReference1.StrumienClient();
            InitializeComponent();
        }
Example #3
0
        private static void Download2(ServiceReference1.StrumienClient client2, String nazwa)
        {
            String filePath = Path.Combine(System.Environment.CurrentDirectory, nazwa);

            Console.WriteLine("wywoluje getMStream");
            Stream fs = null;
            long   rozmiar;
            string nnn = nazwa;

            nnn      = client2.getMStream(nnn, out rozmiar, out fs);
            filePath = Path.Combine(System.Environment.CurrentDirectory, nnn);
            ZapiszPlik(fs, filePath);
        }
Example #4
0
 private static void Upload2(ServiceReference1.StrumienClient client2, String nazwa, String opis)
 {
     client2.UploadMStream(nazwa, opis, WyslijMPlik(".\\" + nazwa, opis));
 }
Example #5
0
        private static void Upload(ServiceReference1.StrumienClient client2, String nazwa)
        {
            Stream send = WyslijPlik(nazwa);

            client2.UploadStream(send);
        }