Esempio n. 1
0
 /// <summary>
 /// Opens folder pointed at by ddUrl.
 /// </summary>
 /// <remarks>
 /// This refreshes the gridview if already open.
 /// </remarks>
 private void open_Folder()
 {
     Console.WriteLine("OPEN");
     try
     {
         folder           = new Folder_IO(ddUrl.Text);
         fileWatcher.Path = ddUrl.Text;
         countFolders();
         btnShowDiv.Enabled = true;
         btnDivide.Enabled  = false;
         dirname            = ddUrl.Text;
         lstDivs_Click(null, null);
         txtFilter.Enabled = true;
         dragRow           = -1; savedRow = 0;
         if (showFields)
         {
             LoadFormatFields();
         }
         if (gvFiles.SelectedCells.Count > 0)
         {
             caller.SetLabelItemSize(Folder_IO.Get_Item_Size(gvFiles.SelectedCells[3].Value.ToString()));
         }
     }
     catch (Exception ex)
     {
         BetterDialog.ShowDialog("", "Error : " + ex.Message, "", "", "OK", null, BetterDialog.ImageStyle.Icon);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Sets savedRow to selected rowindex of gridview.
 /// Sets LabelItemSize to selected row's item file size.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void gvFiles_RowEnter(object sender, DataGridViewCellEventArgs e)
 {
     if (gvFiles.SelectedCells.Count > 0)
     {
         if (gvFiles.SelectedCells[2].Value != null && !multiRun)
         {
             if (!multiRun)
             {
                 savedRow = gvFiles.SelectedCells[2].RowIndex;
             }
             caller.SetLabelItemSize(Folder_IO.Get_Item_Size(gvFiles.SelectedCells[3].Value.ToString()));
             Console.WriteLine(savedRow);
         }
     }
     else
     {
         caller.SetLabelItemSize(" ");
     }
 }