Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
* Plugin Export Table: new lines
Browse files Browse the repository at this point in the history
   for table cells
  • Loading branch information
festo-i40 committed Jul 29, 2023
1 parent e1a5c44 commit 233f945
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 13 deletions.
10 changes: 8 additions & 2 deletions src/AasxPluginExportTable/AasxPluginExportTable.options.json
Original file line number Diff line number Diff line change
Expand Up @@ -638,8 +638,8 @@
},
{
"Name": "Export scratch info",
"Format": 2,
"RowsTop": 1,
"Format": 3,
"RowsTop": 3,
"RowsBody": 1,
"RowsGap": 2,
"Cols": 2,
Expand All @@ -653,6 +653,12 @@
"",
"",
"",
"",
"",
"%Parent.idShort%",
"",
"",
"",
""
],
"Body": [
Expand Down
3 changes: 2 additions & 1 deletion src/AasxPluginExportTable/Table/ImportExportTableRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ public void SaveToFile(string fn)
using (StreamWriter file = File.CreateText(fn))
{
JsonSerializer serializer = new JsonSerializer();
serializer.Formatting = Formatting.Indented;
serializer.Converters.Add(new Newtonsoft.Json.Converters.StringEnumConverter());
serializer.Formatting = Formatting.Indented;
serializer.Serialize(file, this);
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/AasxWpfControlLibrary/AnyUiWpf.cs
Original file line number Diff line number Diff line change
Expand Up @@ -906,12 +906,13 @@ private void InitRenderRecs()
wpf.Padding = GetWpfTickness(cntl.Padding);
if (cntl.TextWrapping.HasValue)
wpf.TextWrapping = (TextWrapping)((int) cntl.TextWrapping.Value);
if (cntl.MultiLine)
wpf.AcceptsReturn = true;
if (cntl.IsReadOnly)
wpf.IsReadOnly = cntl.IsReadOnly;
wpf.VerticalScrollBarVisibility = (ScrollBarVisibility)
((int) cntl.VerticalScrollBarVisibility);
wpf.AcceptsReturn = cntl.AcceptsReturn;
if (cntl.MaxLines != null)
wpf.MaxLines = cntl.MaxLines.Value;
wpf.Text = cntl.Text;
Expand Down
1 change: 0 additions & 1 deletion src/AnyUi/AnyUiBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1282,7 +1282,6 @@ public class AnyUiTextBox : AnyUiControl

public AnyUiScrollBarVisibility VerticalScrollBarVisibility;

public bool AcceptsReturn;
public bool MultiLine;
public Nullable<int> MaxLines;
public bool IsReadOnly = false;
Expand Down
14 changes: 8 additions & 6 deletions src/AnyUi/AnyUiSmallWidgetToolkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,15 @@ public AnyUiTextBox AddSmallTextBoxTo(
tb.VerticalContentAlignment = verticalContentAlignment.Value;
if (textWrap.HasValue)
tb.TextWrapping = textWrap.Value;
if (multiLine.HasValue)
tb.MultiLine = multiLine.Value;

// (MIHO, 2020-11-13): constrain to one line
tb.AcceptsReturn = false;

// (MIHO, 2020-11-13): be default constrain to one line
tb.MultiLine = false;
tb.MaxLines = 3;
tb.VerticalScrollBarVisibility = AnyUiScrollBarVisibility.Auto;

if (multiLine.HasValue)
tb.MultiLine = multiLine.Value;

tb.VerticalScrollBarVisibility = AnyUiScrollBarVisibility.Auto;

AnyUiGrid.SetRow(tb, row);
AnyUiGrid.SetColumn(tb, col);
Expand Down
4 changes: 2 additions & 2 deletions src/Notes_V3.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if (reference.Keys == null || reference.Keys.Count == 0 || otherReference?.Keys

Soll ich den Bug im Repository eintragen bzw. ein PullRequest starten? Oder pflegst du so etwas „auf dem kurzen Dienstweg“ ein?

* Export table / cells / allow return
* Submodel "move up" (fast re-ordering) show other order than real (slow) ordering!

## Done (w.r.t. recently V3.0)

Expand Down Expand Up @@ -115,7 +115,7 @@ Soll ich den Bug im Repository eintragen bzw. ein PullRequest starten? Oder pfle
* when Find/ Replace: before invoke "Replace all", "Start" needs to be invoked! -- Done
* "add known" .. alphabetic sorting of domains and individual names of semanticIds.
Done for WPF and Blazor (WPF keeps also last selected).
* Submodel "move up" (fast re-ordering) show other order than real (slow) ordering!
* Export table / cells / allow return -- done (re-structed TextBox / MultiLine)

## Notes (influencing todos)

Expand Down

0 comments on commit 233f945

Please sign in to comment.