protected void DeleteButton_Click(object sender, EventArgs e) { string fileName = Path.GetFileName(DeleteFileName.Text); string filePath = Path.Combine(_DigitalGoodPath, fileName); if (File.Exists(filePath)) { File.Delete(filePath); if (DeleteDigitalGoodsWithFile.Checked) { IList <DigitalGood> goods = GetFileDigitalGoods(fileName); goods.DeleteAll(); } } // REMOVE THE FILE FROM THE LIST int index = IndexOfFile(fileName); if (index > -1) { _FileList.RemoveAt(index); // BIND FILE LIST TO THE GRID FileGrid.DataSource = _FileList; FileGrid.DataBind(); } }
void FileGrid_SelectionChanged(object sender, EventArgs e) { if (Context != null && ComputeDifferencesFunction != null) { var selectedIds = FileGrid.FindSelectedIds().ToList(); this.StartTask(() => ComputeDifferencesFunction(Context, selectedIds), UpdatePatchText); } }
private void ReplaceByCheckBox_Checked(object sender, RoutedEventArgs e) { CheckBox chk = sender as CheckBox; if (chk != null) { ReplaceStackSettings.Visibility = System.Windows.Visibility.Visible; FileGrid.InvalidateArrange(); FileGrid.UpdateLayout(); } }
private ContextMenu BuildChangedFilesActionMenu() { var menu = new ContextMenu(); if (Context != null && ActionsForChangesFunction != null) { var selectedIds = FileGrid.FindSelectedIds(); var actions = ActionsForChangesFunction(Context, selectedIds); menu.MenuItems.AddActions(actions); } return(menu); }
private void ReplaceByCheckBox_Unchecked(object sender, RoutedEventArgs e) { CheckBox chk = sender as CheckBox; if (chk != null) { if (!_skipSelectionChanged) { setReplaceValues(null); } ReplaceStackSettings.Visibility = System.Windows.Visibility.Collapsed; FileGrid.InvalidateArrange(); FileGrid.UpdateLayout(); } }
private void ReplaceByCheckBox_Checked(object sender, RoutedEventArgs e) { CheckBox chk = sender as CheckBox; if (chk != null) { //ReplaceStackSettings.Height = 110; ReplaceStackSettings.Visibility = System.Windows.Visibility.Visible; System.Windows.GridLength len = new System.Windows.GridLength(110); //System.Xml.XmlNodeList nodes = _xml.SelectNodes("//Datasets/ReplaceBy"); //setReplaceValues(nodes); FileGrid.RowDefinitions[3].Height = len; FileGrid.InvalidateArrange(); FileGrid.UpdateLayout(); } }
private void ReplaceByCheckBox_Unchecked(object sender, RoutedEventArgs e) { CheckBox chk = sender as CheckBox; if (chk != null) { if (!_skipSelectionChanged) { setReplaceValues(null); } ReplaceStackSettings.Visibility = System.Windows.Visibility.Hidden; System.Windows.GridLength len = new System.Windows.GridLength(0); FileGrid.RowDefinitions[3].Height = len; FileGrid.InvalidateArrange(); FileGrid.UpdateLayout(); } }
protected void InitializeFileGrid() { FileGrid.DataSource = HccApp.CatalogServices.ProductFiles.FindByProductId(ProductId); FileGrid.DataBind(); }
private void Grid_MouseDown(Object sender, System.Windows.Input.MouseButtonEventArgs e) => FileGrid.UnselectAll();
protected void InitializeFileGrid() { FileGrid.DataSource = MTApp.CatalogServices.ProductFiles.FindByProductId(localProduct.Bvin); FileGrid.DataBind(); }
internal void RemoveFile(string fileName) { DropboxConnect.RemoveFile(fileName); FileGrid.RemoveItem(fileName); //throw new NotImplementedException(); }
public void Refresh() { FileGrid.CleanGrid(); //throw new NotImplementedException(); }
public void ShowContent(FileStorageItem[] items) { FileGrid.AddChildren(items); }
private void BindFileGrid() { // BIND FILE LIST TO GRID FileGrid.DataSource = _FileList; FileGrid.DataBind(); }