Beispiel #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!");
            }
        }
 public bool HaveAllListViewItemsLowerCurrentVersion(bool includeNotMarked, string referenceVersion, bool allListViews)
 {
     if (allListViews)
     {
         foreach (ProjectsListView listView in m_listViews)
         {
             if (!listView.HaveAllListViewItemsLowerCurrentVersion(includeNotMarked, referenceVersion))
             {
                 return(false);
             }
         }
         return(true);
     }
     else
     {
         return(SelectedListView.HaveAllListViewItemsLowerCurrentVersion(includeNotMarked, referenceVersion));
     }
 }
 public void DoRemoveAccommodation()
 {
     try
     {
         string t = Title;
         foreach (var accommodations in SelectedListView)
         {
             if (t == accommodations.Title)
             {
                 SelectedListView.Remove(accommodations);
                 _serialize.SaveAccommodations(SelectedListView);
                 Title = "";
                 break;
             }
         }
     }
     catch (Exception ex)
     {
         Title = "Something went wrong try again!";
     }
 }
 public void PotentialBtnClick()
 {
     selectedListView=SelectedListView.Potential;
     raffleListScreenView.ConfirmedBarView.BackgroundColor = UIColor.FromRGB (100, 100, 100);
     raffleListScreenView.PotentialBarView.BackgroundColor = UIColor.FromRGB (0, 122, 255);
     raffleListScreenView.confirmedBtn.SetTitleColor (UIColor.Black, UIControlState.Normal);
     raffleListScreenView.PotentialBtn.SetTitleColor( UIColor.FromRGB (0, 122, 255),UIControlState.Normal);
     raffleListScreenView.RaffleListTableView.ReloadData();
 }
 public RaffleListScreenController()
 {
     selectedListView = SelectedListView.Confirmed;
 }