Exemple #1
0
        private void OnInstallClick(object sender, EventArgs e)
        {
            string fileName = "test.zip";

            if (selectedFiles.Count > 0)
            {
                progressBar.Value = 0;
                failList.Items.Clear();
                succesList.Items.Clear();
                progressBar.Increment(20);
                CreateZipFile(fileName);
                selectedFiles.Clear();
                succesList.Items.Clear();
                failList.Items.Clear();
                SelectedListView.Clear();
                progressBar.Increment(40);
                amazonS3Uploader.UploadFile(fileName);
                progressBar.Increment(80);
                File.Delete(fileName);
                UdpHelper.Instance().SendInstallInfo("https://licenta-stefan.s3.eu-central-1.amazonaws.com/" + fileName, clients);
                StartTimeout();
                progressBar.Increment(100);
            }
            else
            {
                MessageBox.Show("Please select files to install!");
            }
        }
Exemple #2
0
 public static UdpHelper Instance()
 {
     if (instance == null)
     {
         instance = new UdpHelper();
     }
     return(instance);
 }
Exemple #3
0
 public App()
 {
     UdpHelper.Instance().StartListening();
     InitializeComponent();
     Distribute.Instance();
     HostList.Instance();
     UdpHelper.Instance().SendDiscoverMessage();
 }
Exemple #4
0
        private void BtnRetry_Click(object sender, EventArgs e)
        {
            string fileName = "test.zip";

            if (failList.Items.Count > 0)
            {
                List <string> retryList = new List <string>();
                foreach (ListViewItem item in failList.Items)
                {
                    retryList.Add(item.Text);
                }
                UdpHelper.Instance().SendInstallInfo("https://licenta-stefan.s3.eu-central-1.amazonaws.com/" + fileName, retryList);
            }
            else
            {
                MessageBox.Show("Fail List is empty!");
            }
        }