private void MenuItemaAddTable_Click(object sender, RoutedEventArgs e)
        {
            var window = new TablePropertiesWindow();

            if (window.ShowDialog() == true)
            {
                AddTableElement(window);
            }
        }
        private void MenuItemaAddTable_Click(object sender, RoutedEventArgs e)
        {
            var window = new TablePropertiesWindow();

            if (window.ShowDialog() == true)
            {
                AddTableElement(window);

                PushCommandToHistory(new AddCommand(this, m_LoadedCanvasItems.Last()));
            }
        }
Beispiel #3
0
        private void MenuItemShowProperties_Click(object sender, RoutedEventArgs e)
        {
            //MessageBox.Show("Not implemented!", "Notice", MessageBoxButton.OK, MessageBoxImage.Asterisk);

            var window = new TablePropertiesWindow();

            window.SetTarget(this);
            window.RowCount  = RowCount;
            window.RowHeight = RowHeight;
            GridLength col0Width = TableGrid.ColumnDefinitions[0].Width, col1Width = TableGrid.ColumnDefinitions[1].Width, col2Width = TableGrid.ColumnDefinitions[2].Width;

            if (window.ShowDialog() == true)
            {
                ActionHistory.Push(new TablePropertiesCommand(this));

                Canvas.SetLeft(this, window.Vector2DPosition.ValueInPixel.X);
                Canvas.SetTop(this, window.Vector2DPosition.ValueInPixel.Y);
                //SpanContent.Text = window.TextCaption;
                RowCount  = window.RowCount;
                RowHeight = window.RowHeight;
                XlsColumn = (string)window.XLSColumn.XLSColumsList.SelectedValue;

                SpanFontFamily = window.FontChooser.SelectedFontFamily;
                SpanFontSize   = Helper.ToEmSize(window.FontChooser.SelectedFontSize, MainWindow.DpiY);
                SpanFontWeight = window.FontChooser.SelectedFontWeight;
                SpanFontStyle  = window.FontChooser.SelectedFontStyle;

                TextFontFamily = window.FontChooser2.SelectedFontFamily;
                TextFontSize   = Helper.ToEmSize(window.FontChooser2.SelectedFontSize, MainWindow.DpiY);
                TextFontWeight = window.FontChooser2.SelectedFontWeight;
                TextFontStyle  = window.FontChooser2.SelectedFontStyle;

                TableGrid.Children.Clear();
                TableGrid.ColumnDefinitions.Clear();
                TableGrid.RowDefinitions.Clear();

                UpdateTableDefinition(window.RowCount, window.RowHeight, col0Width, col1Width, col2Width);
                FillTable();

                if (LayoutWindow.instance != null)
                {
                    LayoutWindow.instance.IsChanged = true;
                }
            }
        }