Exemple #1
0
        public PropertiesForm(ADBFile myFile, Image img)
        {
            InitializeComponent();
            IsChangeValue             = false;
            CountFilesInt             = 0;
            isOneFile                 = true;
            oneFile                   = myFile;
            FM                        = new FileManager(myFile.device);
            TypeFile                  = getTypeFile(myFile);
            Location                  = myFile.DirectoryName;
            pictureBox_iconFile.Image = img;
            label_locationValue.Text  = Location.DecodingText().Replace(@"\", "");

            label_sizeValue.Text = label_countValue.Text = "•••";

            backgroundWorker_getSizeFile.RunWorkerAsync();

            textBox_name.Text    = myFile.Name.Replace(@"\", string.Empty).DecodingText();
            tmpName              = textBox_name.Text;
            label_typeValue.Text = TypeFile.DecodingText();

            checkBox_IsHidden.Visible = true;

            if (tmpName[0] == '.')
            {
                checkBox_IsHidden.Checked = true;
            }
            else
            {
                checkBox_IsHidden.Checked = false;
            }
        }
Exemple #2
0
 private string messageForDelete()
 {
     if (listView_files.SelectedItems.Count == 1)
     {
         ADBFile tmpfile = ReturnAdbFileFromLVSelectItem(listView_files.SelectedItems[0]);
         return("are you sure Delete" + " \"" + tmpfile.Name.DecodingText().Replace("\\", "") + " \"  ?\nSize: " + tmpfile.GetLengthDouble().humanReadable());
     }
     else
     {
         return("are you sure Delete  \" " + listView_files.SelectedItems.Count.ToString() + " \"  File & Directory ?");
     }
 }
Exemple #3
0
 private string getTypeFile(ADBFile onefile)
 {
     if (onefile.GetTag() == 'd')
     {
         return("Directory");
     }
     else
     {
         if (string.IsNullOrEmpty(onefile.Extension))
         {
             return("unknownFile");
         }
         return(onefile.Extension);
     }
 }
Exemple #4
0
        private void setLabelFile()
        {
            tmpAdbFile      = ReturnAdbFileFromLVSelectItem(ListViewSI);
            label_name.Text = "Name: " + tmpAdbFile.Name.nickName().DecodingText();


            if (IsShowSize)
            {
                if (backgroundWorker_ProccessSize.IsBusy)
                {
                    backgroundWorker_ProccessSize.CancelAsync();
                }
                if (!backgroundWorker_ProccessSize.IsBusy)
                {
                    backgroundWorker_ProccessSize.RunWorkerAsync();
                }
            }
        }