Skip to content

Commit 57430b1

Browse files
committed
Merge pull request #20 from RapidScada/develop
Develop to Master
2 parents 2870d0f + 9fdb0d8 commit 57430b1

File tree

283 files changed

+12072
-9308
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

283 files changed

+12072
-9308
lines changed

ScadaAdmin/ScadaAdmin/AppCode/AppUtils.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014 Mikhail Shiryaev
2+
* Copyright 2016 Mikhail Shiryaev
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,10 +20,11 @@
2020
*
2121
* Author : Mikhail Shiryaev
2222
* Created : 2010
23-
* Modified : 2014
23+
* Modified : 2016
2424
*/
2525

2626
using Scada;
27+
using Scada.UI;
2728
using Utils;
2829

2930
namespace ScadaAdmin
@@ -40,7 +41,7 @@ internal static class AppUtils
4041
public static void ProcError(string message)
4142
{
4243
AppData.ErrLog.WriteAction(message, Log.ActTypes.Exception);
43-
ScadaUtils.ShowError(message);
44+
ScadaUiUtils.ShowError(message);
4445
}
4546

4647

ScadaAdmin/ScadaAdmin/FrmAbout.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015 Mikhail Shiryaev
2+
* Copyright 2016 Mikhail Shiryaev
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,13 +20,14 @@
2020
*
2121
* Author : Mikhail Shiryaev
2222
* Created : 2010
23-
* Modified : 2015
23+
* Modified : 2016
2424
*/
2525

26-
using System;
27-
using System.Windows.Forms;
2826
using Scada;
27+
using Scada.UI;
28+
using System;
2929
using System.Diagnostics;
30+
using System.Windows.Forms;
3031

3132
namespace ScadaAdmin
3233
{
@@ -36,7 +37,7 @@ namespace ScadaAdmin
3637
/// </summary>
3738
public partial class FrmAbout : Form
3839
{
39-
private const string Version = "4.5.0.1"; // версия приложения
40+
private const string Version = "4.5.0.2"; // версия приложения
4041
private static FrmAbout frmAbout = null; // экземпляр формы о программе
4142

4243
private bool inited; // форма инициализирована
@@ -94,7 +95,7 @@ private void FrmAbout_Load(object sender, EventArgs e)
9495
// загрузка изображения и гиперссылки из файлов, если они существуют
9596
bool imgLoaded;
9697
string errMsg;
97-
if (ScadaUtils.LoadAboutForm(AppData.ExeDir, this, activePictureBox, lblWebsite,
98+
if (ScadaUiUtils.LoadAboutForm(AppData.ExeDir, this, activePictureBox, lblWebsite,
9899
out imgLoaded, out linkUrl, out errMsg))
99100
{
100101
if (imgLoaded)

ScadaAdmin/ScadaAdmin/FrmAbout.resx

Lines changed: 553 additions & 555 deletions
Large diffs are not rendered by default.

ScadaAdmin/ScadaAdmin/FrmCloneCnls.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014 Mikhail Shiryaev
2+
* Copyright 2016 Mikhail Shiryaev
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,15 +20,16 @@
2020
*
2121
* Author : Mikhail Shiryaev
2222
* Created : 2010
23-
* Modified : 2014
23+
* Modified : 2016
2424
*/
2525

26+
using Scada;
27+
using Scada.UI;
2628
using System;
2729
using System.Collections.Generic;
2830
using System.Data;
2931
using System.Data.SqlServerCe;
3032
using System.Windows.Forms;
31-
using Scada;
3233
using Utils;
3334

3435
namespace ScadaAdmin
@@ -48,7 +49,7 @@ public FrmCloneCnls()
4849
private void FrmCloneCnls_Load(object sender, EventArgs e)
4950
{
5051
// перевод формы
51-
Localization.TranslateForm(this, "ScadaAdmin.FrmCloneCnls");
52+
Translator.TranslateForm(this, "ScadaAdmin.FrmCloneCnls");
5253
}
5354

5455
private void FrmCloneCnls_Shown(object sender, EventArgs e)
@@ -137,7 +138,7 @@ private void btnClone_Click(object sender, EventArgs e)
137138
string infoMsg =
138139
(cloneInCnls ? AppPhrases.CloneInCnlsCompleted : AppPhrases.CloneCtrlCnlsCompleted) + "\r\n" +
139140
string.Format(AppPhrases.AddedCnlsCount, updRows);
140-
ScadaUtils.ShowInfo(updRows > 0 ? infoMsg + AppPhrases.RefreshRequired : infoMsg);
141+
ScadaUiUtils.ShowInfo(updRows > 0 ? infoMsg + AppPhrases.RefreshRequired : infoMsg);
141142
}
142143
catch (Exception ex)
143144
{
@@ -157,7 +158,7 @@ private void btnClone_Click(object sender, EventArgs e)
157158
"\r\n" + Tables.TranlateErrorMessage(ex.Message, table);
158159

159160
AppData.ErrLog.WriteAction(errMsg, Log.ActTypes.Exception);
160-
ScadaUtils.ShowError(updRows > 0 ? errMsg + AppPhrases.RefreshRequired : errMsg);
161+
ScadaUiUtils.ShowError(updRows > 0 ? errMsg + AppPhrases.RefreshRequired : errMsg);
161162
}
162163
}
163164
catch (Exception ex)

ScadaAdmin/ScadaAdmin/FrmCnlMap.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014 Mikhail Shiryaev
2+
* Copyright 2016 Mikhail Shiryaev
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,16 +20,17 @@
2020
*
2121
* Author : Mikhail Shiryaev
2222
* Created : 2012
23-
* Modified : 2014
23+
* Modified : 2016
2424
*/
2525

26+
using Scada;
27+
using Scada.UI;
2628
using System;
2729
using System.Data;
2830
using System.Diagnostics;
2931
using System.IO;
3032
using System.Text;
3133
using System.Windows.Forms;
32-
using Scada;
3334

3435
namespace ScadaAdmin
3536
{
@@ -125,7 +126,7 @@ private void AppendCnlNum(StringBuilder sbLine, int cnlNum1, int cnlNum2, ref in
125126
private void FrmCnlMap_Load(object sender, EventArgs e)
126127
{
127128
// перевод формы
128-
Localization.TranslateForm(this, "ScadaAdmin.FrmCnlMap");
129+
Translator.TranslateForm(this, "ScadaAdmin.FrmCnlMap");
129130
}
130131

131132
private void btnCreate_Click(object sender, EventArgs e)

ScadaAdmin/ScadaAdmin/FrmCreateCnls.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015 Mikhail Shiryaev
2+
* Copyright 2016 Mikhail Shiryaev
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,19 +20,19 @@
2020
*
2121
* Author : Mikhail Shiryaev
2222
* Created : 2010
23-
* Modified : 2015
23+
* Modified : 2016
2424
*/
2525

2626
using Scada;
2727
using Scada.Comm.Devices;
28+
using Scada.UI;
2829
using System;
29-
using System.Linq;
3030
using System.Collections.Generic;
31-
using System.ComponentModel;
3231
using System.Data;
3332
using System.Diagnostics;
3433
using System.Drawing;
3534
using System.IO;
35+
using System.Linq;
3636
using System.Windows.Forms;
3737

3838
namespace ScadaAdmin
@@ -251,7 +251,7 @@ private void EnableCalc()
251251
private void FrmCreateCnls_Load(object sender, EventArgs e)
252252
{
253253
// перевод формы
254-
Localization.TranslateForm(this, "ScadaAdmin.FrmCreateCnls");
254+
Translator.TranslateForm(this, "ScadaAdmin.FrmCreateCnls");
255255
}
256256

257257
private void FrmCreateCnls_Shown(object sender, EventArgs e)
@@ -366,7 +366,7 @@ private void btnCreate_Click(object sender, EventArgs e)
366366
if (msg != "")
367367
{
368368
if (createOK)
369-
ScadaUtils.ShowInfo(msg);
369+
ScadaUiUtils.ShowInfo(msg);
370370
else
371371
AppUtils.ProcError(msg);
372372
}

ScadaAdmin/ScadaAdmin/FrmEditSource.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014 Mikhail Shiryaev
2+
* Copyright 2016 Mikhail Shiryaev
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,12 +20,13 @@
2020
*
2121
* Author : Mikhail Shiryaev
2222
* Created : 2013
23-
* Modified : 2014
23+
* Modified : 2016
2424
*/
2525

2626
using System;
2727
using System.Windows.Forms;
2828
using Scada;
29+
using Scada.UI;
2930

3031
namespace ScadaAdmin
3132
{
@@ -53,7 +54,7 @@ public FrmEditSource()
5354
private void FrmEditSource_Load(object sender, EventArgs e)
5455
{
5556
// перевод формы
56-
Localization.TranslateForm(this, "ScadaAdmin.FrmEditSource");
57+
Translator.TranslateForm(this, "ScadaAdmin.FrmEditSource");
5758
// вывод исходного кода
5859
txtSource.Text = Source;
5960
}

ScadaAdmin/ScadaAdmin/FrmExport.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015 Mikhail Shiryaev
2+
* Copyright 2016 Mikhail Shiryaev
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,15 +20,14 @@
2020
*
2121
* Author : Mikhail Shiryaev
2222
* Created : 2010
23-
* Modified : 2015
23+
* Modified : 2016
2424
*/
2525

26+
using Scada;
27+
using Scada.UI;
2628
using System;
27-
using System.Data;
2829
using System.IO;
2930
using System.Windows.Forms;
30-
using Scada;
31-
using Scada.Data;
3231

3332
namespace ScadaAdmin
3433
{
@@ -63,7 +62,7 @@ public FrmExport()
6362
private void FrmExport_Load(object sender, EventArgs e)
6463
{
6564
// перевод формы
66-
Localization.TranslateForm(this, "ScadaAdmin.FrmExport");
65+
Translator.TranslateForm(this, "ScadaAdmin.FrmExport");
6766
openFileDialog.Title = AppPhrases.ChooseBaseTableFile;
6867
openFileDialog.Filter = AppPhrases.BaseTableFileFilter;
6968

@@ -126,7 +125,7 @@ private void btnExport_Click(object sender, EventArgs e)
126125
int maxID = gbIDs.Enabled && chkFinalID.Checked ? Convert.ToInt32(numFinalID.Value) : int.MaxValue;
127126
string msg;
128127
if (ImportExport.ExportTable(tableInfo, txtFileName.Text, minID, maxID, out msg))
129-
ScadaUtils.ShowInfo(msg);
128+
ScadaUiUtils.ShowInfo(msg);
130129
else
131130
AppUtils.ProcError(msg);
132131
}

ScadaAdmin/ScadaAdmin/FrmImport.cs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015 Mikhail Shiryaev
2+
* Copyright 2016 Mikhail Shiryaev
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,19 +20,15 @@
2020
*
2121
* Author : Mikhail Shiryaev
2222
* Created : 2010
23-
* Modified : 2015
23+
* Modified : 2016
2424
*/
2525

26+
using Scada;
27+
using Scada.UI;
2628
using System;
27-
using System.Data;
28-
using System.Data.SqlServerCe;
2929
using System.Diagnostics;
3030
using System.IO;
31-
using System.Text;
3231
using System.Windows.Forms;
33-
using Scada;
34-
using Scada.Data;
35-
using Utils;
3632

3733
namespace ScadaAdmin
3834
{
@@ -73,7 +69,7 @@ public FrmImport()
7369
private void FrmImport_Load(object sender, EventArgs e)
7470
{
7571
// перевод формы
76-
Localization.TranslateForm(this, "ScadaAdmin.FrmImport");
72+
Translator.TranslateForm(this, "ScadaAdmin.FrmImport");
7773

7874
// заполнение выпадающего списка таблиц
7975
int selInd = 0;
@@ -178,7 +174,7 @@ private void btnImport_Click(object sender, EventArgs e)
178174

179175
// отображение сообщения о результате импорта
180176
if (importOK)
181-
ScadaUtils.ShowInfo(msg);
177+
ScadaUiUtils.ShowInfo(msg);
182178
else
183179
AppUtils.ProcError(msg);
184180

ScadaAdmin/ScadaAdmin/FrmInCnlProps.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014 Mikhail Shiryaev
2+
* Copyright 2016 Mikhail Shiryaev
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,14 +20,15 @@
2020
*
2121
* Author : Mikhail Shiryaev
2222
* Created : 2010
23-
* Modified : 2014
23+
* Modified : 2016
2424
*/
2525

26+
using Scada;
27+
using Scada.UI;
2628
using System;
2729
using System.Data;
2830
using System.Text;
2931
using System.Windows.Forms;
30-
using Scada;
3132

3233
namespace ScadaAdmin
3334
{
@@ -148,7 +149,7 @@ public DialogResult ShowInCnlProps(FrmTable frmTable)
148149
private void FrmInCnlProps_Load(object sender, EventArgs e)
149150
{
150151
// перевод формы
151-
Localization.TranslateForm(this, "ScadaAdmin.FrmInCnlProps");
152+
Translator.TranslateForm(this, "ScadaAdmin.FrmInCnlProps");
152153
}
153154

154155
private void txtCtrlCnlNum_TextChanged(object sender, EventArgs e)
@@ -234,7 +235,7 @@ private void btnOk_Click(object sender, EventArgs e)
234235
}
235236
else
236237
{
237-
ScadaUtils.ShowError(errMsg);
238+
ScadaUiUtils.ShowError(errMsg);
238239
}
239240
}
240241
}

0 commit comments

Comments
 (0)