MH: Dateinamen und -beschreibung änderbar
This commit is contained in:
@@ -7,21 +7,26 @@
|
||||
|
||||
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="75"/>
|
||||
<ColumnDefinition Width="125"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="Dateiname:" Margin="2 0 0 0"/>
|
||||
<TextBox x:Name="Textbox_Dateiname" Grid.Row="0" Grid.Column="1" Height="20" Margin="5 0 2 0"/>
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="Beschreibung:" Margin="2 0 0 0"/>
|
||||
<TextBox x:Name="Textbox_Beschreibung" Grid.Row="1" Grid.Column="1" Height="20" Margin="5 0 2 0"/>
|
||||
|
||||
<WrapPanel Grid.Row="2" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="5 5 2 0">
|
||||
|
||||
<StackPanel FlowDirection="LeftToRight" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
|
||||
<Label Content="Dateiname:" Margin="2 0 0 0"/>
|
||||
<TextBox x:Name="Textbox_Dateiname" Height="20" Margin="5 0 5 0"/>
|
||||
</StackPanel>
|
||||
<StackPanel FlowDirection="LeftToRight" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
|
||||
<Label Content="Beschreibung:" Margin="2 0 0 0"/>
|
||||
<TextBox x:Name="Textbox_Beschreibung" Height="20" Margin="5 0 5 0"/>
|
||||
</StackPanel>
|
||||
|
||||
<WrapPanel Grid.Row="2" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="5">
|
||||
<Button x:Name="Button_Cancel" Content="Abbrechen" Click="Button_Cancel_Click" Margin="0 0 5 0" />
|
||||
<Button x:Name="Button_Save" Content="Speichern" Click="Button_Save_Click"/>
|
||||
</WrapPanel>
|
||||
|
||||
@@ -71,9 +71,8 @@ namespace BeWo.View.Detail
|
||||
}
|
||||
|
||||
private void Button_Cancel_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (MessageBox.Show("Wollen Sie wirklich abbrechen?", "BeWoPlaner", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
|
||||
ButtonCancelClicked?.Invoke();
|
||||
{
|
||||
ButtonCancelClicked?.Invoke();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -208,14 +208,14 @@
|
||||
<dxg:GridColumn FieldName="FileName" Header="" FixedWidth="True" Width="24" ReadOnly="True">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Content="r" FontFamily="Webdings" Click="DeleteButton_Click" Width="18" Height="18" VerticalAlignment="Center" />
|
||||
<Button Content="r" FontFamily="Webdings" Click="DeleteButton_Click" Width="18" Height="18" VerticalAlignment="Center" ToolTip="Löschen"/>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn Header="" FixedWidth="True" Width="24" ReadOnly="True">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Content="!" FontFamily="Webdings" Click="EditButton_Click" Width="18" Height="18" VerticalAlignment="Center" />
|
||||
<Button Content="N" FontFamily="Webdings" Click="EditButton_Click" Width="18" Height="18" VerticalAlignment="Center" ToolTip="Bearbeiten"/>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
|
||||
@@ -924,10 +924,10 @@ namespace BeWo.View.Master
|
||||
|
||||
var beWoWindow = new BeWoWindow
|
||||
{
|
||||
rootGroupBox = { Header = "Datei " + selectedFile.FileName + " bearbeiten" },
|
||||
Height = this.Height,
|
||||
Width = 600,
|
||||
MinWidth = 400,
|
||||
rootGroupBox = { Header = "Datei \"" + selectedFile.FileName + "\" bearbeiten" },
|
||||
Height = 100,
|
||||
Width = 400,
|
||||
MinWidth = 300,
|
||||
WindowStartupLocation = WindowStartupLocation.CenterOwner,
|
||||
GroupBoxContent = control,
|
||||
Owner = BeWoApp.CurrentBeWo.MainWindow
|
||||
@@ -945,10 +945,11 @@ namespace BeWo.View.Master
|
||||
row.DataContract.FilesInFolder.Add(newVM.DataContract);
|
||||
row.DataContract.BeWoFolderDC.Files.Add(newVM.DataContract);
|
||||
|
||||
row.DataContract.FilesInFolder = row.DataContract.FilesInFolder.OrderBy(f => f.InsertedOn).ToList();
|
||||
|
||||
this.datagrid_documents.ItemsSource = null;
|
||||
this.datagrid_documents.ItemsSource = row.DataContract.FilesInFolder;
|
||||
|
||||
|
||||
beWoWindow.Close();
|
||||
return;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user