Skip to content

Commit 8d549d2

Browse files
author
ActiveDbSoft CI Service
committed
Version 3.8.26.2227
1 parent 8c4933d commit 8d549d2

20 files changed

+49
-57
lines changed

FullFeaturedMdiDemo/App.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<System.Windows.Forms.ApplicationConfigurationSection>
4+
<add key="DpiAwareness" value="PerMonitorV2" />
5+
</System.Windows.Forms.ApplicationConfigurationSection>
6+
</configuration>

FullFeaturedMdiDemo/ChildForm.Designer.cs

Lines changed: 0 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

FullFeaturedMdiDemo/ChildForm.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,6 @@ public ChildForm(SQLContext sqlContext, ConnectionInfo connectionInfo)
299299
rtbQueryText.ExpressionContext = QView.ActiveUnionSubQuery;
300300
TextBoxCurrentSubQuerySql.ExpressionContext = QView.ActiveUnionSubQuery;
301301
QueryNavBarOptions.Updated += QueryNavBarOptions_Updated;
302-
303-
#if NETFRAMEWORK
304-
toolStrip1.ImageScalingSize = new Size(ScreenHelpers.ScaleByCurrentDPI(toolStrip1.ImageScalingSize.Width),
305-
ScreenHelpers.ScaleByCurrentDPI(toolStrip1.ImageScalingSize.Height));
306-
#endif
307302
}
308303

309304
private void QueryNavBarOptions_Updated(object sender, EventArgs e)
@@ -1119,7 +1114,8 @@ private void CBuilder_SQLUpdated(object sender, EventArgs e)
11191114
string sql = CBuilder.SQL;
11201115
richTextBox1.Text = sql;
11211116

1122-
resultGrid1.FillDataGrid(CBuilder.QueryTransformer.ResultAST.GetSQL(SqlGenerationOptions));
1117+
if (CBuilder.QueryTransformer.ResultAST != null)
1118+
resultGrid1.FillDataGrid(CBuilder.QueryTransformer.ResultAST.GetSQL(SqlGenerationOptions));
11231119
}
11241120
catch
11251121
{

FullFeaturedMdiDemo/FullFeaturedMdiDemo.wf.cs.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,11 @@
9090
<ItemGroup Condition="$(EnableFlexCelSupport) And $(TargetFramework.StartsWith('net4'))">
9191
<Reference Include="TMS.FlexCel">
9292
<SpecificVersion>False</SpecificVersion>
93-
<HintPath>$(AssetsPath)Third-Party Assemblies\FlexCel.Net.dll</HintPath>
9493
</Reference>
9594
</ItemGroup>
9695
<ItemGroup Condition="$(EnableFlexCelSupport) And $(TargetFramework.StartsWith('netcore'))">
9796
<Reference Include="TMS.FlexCel">
9897
<SpecificVersion>False</SpecificVersion>
99-
<HintPath>$(AssetsPath)Third-Party Assemblies\FlexCel.Core.dll</HintPath>
10098
</Reference>
10199
</ItemGroup>
102100
<PropertyGroup Condition="$(EnableFlexCelSupport)">

FullFeaturedMdiDemo/MainForm.cs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,6 @@ public MainForm()
7272

7373
TryToLoadOptions();
7474

75-
#if NETFRAMEWORK
76-
toolStrip1.ImageScalingSize = new Size(ScreenHelpers.ScaleByCurrentDPI(toolStrip1.ImageScalingSize.Width),
77-
ScreenHelpers.ScaleByCurrentDPI(toolStrip1.ImageScalingSize.Height));
78-
#endif
79-
8075
// DEMO WARNING
8176

8277
if (BuildInfo.GetEdition() == BuildInfo.Edition.Trial)
@@ -100,14 +95,20 @@ public MainForm()
10095
UseCompatibleTextRendering = true
10196
};
10297

103-
var buttonClose = new PictureBox { Image = Properties.Resources.cancel, SizeMode = PictureBoxSizeMode.AutoSize, Cursor = Cursors.Hand };
98+
var iconClose = Properties.Resources.cancel;
99+
100+
ScaleBitmapLogicalToDevice(ref iconClose);
101+
102+
var buttonClose = new PictureBox { Image = iconClose, SizeMode = PictureBoxSizeMode.AutoSize, Cursor = Cursors.Hand };
104103
buttonClose.Click += delegate { Controls.Remove(trialNoticePanel); };
105104

106105
trialNoticePanel.Controls.Add(buttonClose);
107106

108107
trialNoticePanel.Resize += delegate
109108
{
110-
buttonClose.Location = new Point(trialNoticePanel.Width - buttonClose.Width - 10, trialNoticePanel.Height / 2 - buttonClose.Height / 2);
109+
buttonClose.Location =
110+
new Point(trialNoticePanel.Width - buttonClose.Width - LogicalToDeviceUnits(10),
111+
trialNoticePanel.Height / 2 - buttonClose.Height / 2);
111112
};
112113

113114
trialNoticePanel.Controls.Add(label);
@@ -898,9 +899,7 @@ private void propertiesToolStripMenuItem_Click(object sender, EventArgs e)
898899
if (childForm == null) return;
899900

900901
var propWindow = new QueryPropertiesForm(childForm, DBView);
901-
902902
propWindow.ShowDialog();
903-
904903
var options = childForm.GetOptions();
905904
_options = options;
906905

FullFeaturedMdiDemo/PropertiesForm/QueryPropertiesForm.cs

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
using System;
1212
using System.Collections.Generic;
13+
using System.Diagnostics;
1314
using System.Drawing;
1415
using System.Windows.Forms;
1516
using ActiveQueryBuilder.Core;
@@ -41,7 +42,6 @@ internal partial class QueryPropertiesForm : Form
4142
private void RegisterPropertyPage(Control link, ObjectProperties propertiesObject)
4243
{
4344
var propertiesContainer = PropertiesFactory.GetPropertiesContainer(propertiesObject);
44-
4545
// create property page control
4646
var propertyPage = new PropertiesBar
4747
{
@@ -54,7 +54,7 @@ private void RegisterPropertyPage(Control link, ObjectProperties propertiesObjec
5454
};
5555

5656
// set properties to property page
57-
var propertiesControl = (IPropertiesControl)propertyPage;
57+
var propertiesControl = (IPropertiesControl) propertyPage;
5858
propertiesControl.SetProperties(propertiesContainer);
5959

6060
// register link -> propertyPage mapping
@@ -64,41 +64,42 @@ private void RegisterPropertyPage(Control link, ObjectProperties propertiesObjec
6464
public QueryPropertiesForm(ChildForm childForm, DatabaseSchemaView dbView)
6565
{
6666
InitializeComponent();
67+
SuspendLayout();
6768
LocalizeGroups();
6869
_childForm = childForm;
6970
_dbView = dbView;
7071

7172
_linkToPage1.Add(linkSqlGeneration, new SqlGenerationPage(childForm.SqlGenerationOptions, childForm.SqlFormattingOptions));
72-
73+
7374
// create and register property pages ==================================
7475
// BehaviorOptions page
75-
RegisterPropertyPage(linkBehaviorOptions, new ObjectProperties(childForm.BehaviorOptions));
76+
linkBehaviorOptions.Tag = new ObjectProperties(childForm.BehaviorOptions);
7677
// DatabaseSchemaViewOptions page
77-
RegisterPropertyPage(linkDatabaseSchemaView, new ObjectProperties(dbView.Options));
78+
linkDatabaseSchemaView.Tag = new ObjectProperties(dbView.Options);
7879
// DesignPaneOptions page
79-
RegisterPropertyPage(linkDesignPane, new ObjectProperties(childForm.DesignPaneOptions));
80+
linkDesignPane.Tag = new ObjectProperties(childForm.DesignPaneOptions);
8081
// VisualOptions page
81-
RegisterPropertyPage(linkVisualOptions, new ObjectProperties(childForm.VisualOptions));
82+
linkVisualOptions.Tag = new ObjectProperties(childForm.VisualOptions);
8283
// AddObjectDialogOptions page
83-
RegisterPropertyPage(linkAddObjectDialog, new ObjectProperties(childForm.AddObjectDialogOptions));
84+
linkAddObjectDialog.Tag = new ObjectProperties(childForm.AddObjectDialogOptions);
8485
// DataSourceOptions page
85-
RegisterPropertyPage(linkDatasourceOptions, new ObjectProperties(childForm.DataSourceOptions));
86+
linkDatasourceOptions.Tag = new ObjectProperties(childForm.DataSourceOptions);
8687
// QueryColumnListOptions page
87-
RegisterPropertyPage(linkQueryColumnList, new ObjectProperties(childForm.QueryColumnListOptions));
88+
linkQueryColumnList.Tag = new ObjectProperties(childForm.QueryColumnListOptions);
8889
// QueryNavBarOptions
89-
RegisterPropertyPage(linkQueryNavBar, new ObjectProperties(childForm.QueryNavBarOptions));
90+
linkQueryNavBar.Tag = new ObjectProperties(childForm.QueryNavBarOptions);
9091
// UserInterfaceOptions
91-
RegisterPropertyPage(linkQueryView, new ObjectProperties(childForm.UserInterfaceOptions));
92-
93-
RegisterPropertyPage(lbExpressionEditor, new ObjectProperties(childForm.ExpressionEditorOptions));
92+
linkQueryView.Tag = new ObjectProperties(childForm.UserInterfaceOptions);
93+
// ExpressionEditor page
94+
lbExpressionEditor.Tag = new ObjectProperties(childForm.ExpressionEditorOptions);
9495

9596
_textEditorOptions.Assign(childForm.TextEditorOptions);
9697
_textEditorOptions.Updated += TextEditorOptionsOnUpdated;
97-
RegisterPropertyPage(lbTextEditor, new ObjectProperties(_textEditorOptions));
98+
lbTextEditor.Tag = new ObjectProperties(_textEditorOptions);
9899

99100
_textEditorSqlOptions.Assign(childForm.TextEditorSqlOptions);
100101
_textEditorSqlOptions.Updated += TextEditorOptionsOnUpdated;
101-
RegisterPropertyPage(lbTextEditorSql, new ObjectProperties(_textEditorSqlOptions));
102+
lbTextEditorSql.Tag = new ObjectProperties(_textEditorSqlOptions);
102103

103104
childForm.MetadataStructureOptions.Updated += MetadataStructureOptionsOnUpdated;
104105

@@ -126,6 +127,7 @@ public QueryPropertiesForm(ChildForm childForm, DatabaseSchemaView dbView)
126127
// Activate the first page on tab2
127128
SideMenu2_LinkClicked(linkMain,
128129
new LinkLabelLinkClickedEventArgs(linkMain.Links[0], MouseButtons.Left));
130+
ResumeLayout(false);
129131
}
130132

131133
private void LocalizeGroups()
@@ -170,6 +172,11 @@ private void SideMenu1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs
170172
_currentSelectedLink1 = (LinkLabel) sender;
171173
_currentSelectedLink1.LinkColor = Color.Blue;
172174

175+
if (!_linkToPage1.Keys.Contains(_currentSelectedLink1))
176+
{
177+
RegisterPropertyPage(_currentSelectedLink1, (ObjectProperties) _currentSelectedLink1.Tag);
178+
}
179+
173180
SwitchPage1(_linkToPage1[_currentSelectedLink1]);
174181
}
175182

@@ -180,7 +187,7 @@ private void SideMenu2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs
180187

181188
_currentSelectedLink2 = (LinkLabel)sender;
182189
_currentSelectedLink2.LinkColor = Color.Blue;
183-
190+
184191
SwitchPage2(_linkToPage2[_currentSelectedLink2]);
185192
}
186193

FullFeaturedMdiDemo/app.manifest

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,13 @@
4949
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
5050
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
5151
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. -->
52-
53-
<application xmlns="urn:schemas-microsoft-com:asm.v3">
54-
<windowsSettings>
55-
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
56-
</windowsSettings>
57-
</application>
52+
53+
<application xmlns="urn:schemas-microsoft-com:asm.v3">
54+
<windowsSettings>
55+
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
56+
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
57+
</windowsSettings>
58+
</application>
5859

5960

6061
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->

WinForms_CSharp_Demos.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,6 @@ Global
259259
HideSolutionNode = FALSE
260260
EndGlobalSection
261261
GlobalSection(ExtensibilityGlobals) = postSolution
262-
SolutionGuid = {EE0D5243-7DA1-4DDC-8D75-4886F7496423}
262+
SolutionGuid = {10700680-2545-448B-8D40-1D6931BA45B5}
263263
EndGlobalSection
264264
EndGlobal
Binary file not shown.
-4.38 MB
Binary file not shown.
-3.85 MB
Binary file not shown.
-1.47 MB
Binary file not shown.
-276 KB
Binary file not shown.
-421 KB
Binary file not shown.
-719 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.8.25.2226
1+
3.8.26.2227

0 commit comments

Comments
 (0)