Create from profile button in ProceduresDlg enabled again, etc, ver. 2.30.1983
This commit is contained in:
parent
8d6d0c011b
commit
75fcffc9c3
@ -127,7 +127,7 @@ namespace Config
|
||||
case Common.GID.Administrators:
|
||||
#if TURA_IPERL || TURA_IPERL_NEW || TURA_SPECIAL
|
||||
case Common.GID.TraceabilityManagement:
|
||||
#elif KEMPNO_50 || KRAKOW_50 || TORUN_50 || WARSAW_END
|
||||
#elif KEMPNO_50 || KRAKOW_50 || TORUN_50 || WARSAW_50 || WARSAW_END
|
||||
case Common.GID.MetrologicalAuthority:
|
||||
case Common.GID.WaterMeterAuthority:
|
||||
#endif
|
||||
|
||||
@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.30.1982.0")]
|
||||
[assembly: AssemblyFileVersion("2.30.1982.0")]
|
||||
[assembly: AssemblyVersion("2.30.1983.0")]
|
||||
[assembly: AssemblyFileVersion("2.30.1983.0")]
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2022 Sensus Slovensko a.s.
|
||||
///
|
||||
#if KEMPNO_50 || KRAKOW_50 || TORUN_50 || WARSAW_50 || WARSAW_END
|
||||
#define SHOW_Q_TG
|
||||
#endif
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -126,7 +130,7 @@ namespace TBF.UI.Procedures
|
||||
/// Dynamic SharedDlgButtons configuration
|
||||
sharedButtons.ParentForm = parentForm;
|
||||
|
||||
#if KEMPNO_50 || KRAKOW_50
|
||||
#if KEMPNO_50 || KRAKOW_50 || TORUN_50 || WARSAW_50 || WARSAW_END
|
||||
sharedButtons.RequiredGroupMembership = procedure.Protected ? new GID[] { GID.WaterMeterAuthority }
|
||||
: new GID[] { GID.TestingSpecialists, GID.WaterMeterAuthority };
|
||||
#else
|
||||
@ -354,7 +358,7 @@ namespace TBF.UI.Procedures
|
||||
LoadUISettings();
|
||||
|
||||
/// Enable/disable/show/hide controls in General tab
|
||||
#if KEMPNO_50 || KRAKOW_50
|
||||
#if KEMPNO_50 || KRAKOW_50 || TORUN_50 || WARSAW_50 || WARSAW_END
|
||||
altProcNameLabel.Visible = true;
|
||||
altProcNameTextBox.Visible = true;
|
||||
//altProcPeriodLabel.Visible = true;
|
||||
@ -775,7 +779,7 @@ namespace TBF.UI.Procedures
|
||||
{
|
||||
Name,
|
||||
Part,
|
||||
#if TEST_PROFILES
|
||||
#if SHOW_Q_TG
|
||||
Qtg,
|
||||
#endif
|
||||
Qfrom,
|
||||
@ -797,7 +801,7 @@ namespace TBF.UI.Procedures
|
||||
ListViewEx lv = metrology1ListViewEx;
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.Test_chdr, Width = 70 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.Part, Width = 40 });
|
||||
#if TEST_PROFILES
|
||||
#if SHOW_Q_TG
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.Q_tg, Width = 80 });
|
||||
#endif
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.Q_from, Width = 80 });
|
||||
@ -827,7 +831,7 @@ namespace TBF.UI.Procedures
|
||||
{
|
||||
new TextBox(), /// Name
|
||||
new TextBox(), /// Part
|
||||
#if TEST_PROFILES
|
||||
#if SHOW_Q_TG
|
||||
new TextBox(), /// Qtg
|
||||
#endif
|
||||
new TextBox(), /// Qfrom
|
||||
@ -872,7 +876,7 @@ namespace TBF.UI.Procedures
|
||||
ListViewItem lvi = new ListViewItem(test.Name); /// Name
|
||||
lvi.Tag = test;
|
||||
lvi.SubItems.Add((test.Part == 0) ? "-" : test.Part.ToString()); /// Part
|
||||
#if TEST_PROFILES
|
||||
#if SHOW_Q_TG
|
||||
lvi.SubItems.Add(Units.ConvertTo(test.FlowUnit, test.Qtg).ToString()); /// Q_tg (target flow)
|
||||
#endif
|
||||
lvi.SubItems.Add(Units.ConvertTo(test.FlowUnit, test.Qfrom).ToString()); /// Q_from
|
||||
@ -915,7 +919,7 @@ namespace TBF.UI.Procedures
|
||||
int itmp;
|
||||
float tmp;
|
||||
double dtmp;
|
||||
#if TEST_PROFILES
|
||||
#if SHOW_Q_TG
|
||||
if (test.QtgTextChngd && Utils.TryParseUDouble(lvi.SubItems[(int)MtrlgyClmn.Qtg].Text, out dtmp))
|
||||
test.Qtg = (float)Units.ConvertFrom(test.FlowUnit, dtmp);
|
||||
#endif
|
||||
@ -947,7 +951,7 @@ namespace TBF.UI.Procedures
|
||||
{
|
||||
MtrlgyClmn column = (MtrlgyClmn)e.SubItem;
|
||||
|
||||
#if TEST_PROFILES
|
||||
#if SHOW_Q_TG
|
||||
if (e.SubItem == (int)MtrlgyClmn.Qtg) return;
|
||||
#endif
|
||||
/// Unit change is allowed when locked
|
||||
@ -970,7 +974,7 @@ namespace TBF.UI.Procedures
|
||||
|
||||
void metrology1ListViewEx_SubItemRightClicked(object sender, SubItemEventArgs e)
|
||||
{
|
||||
#if TEST_PROFILES
|
||||
#if SHOW_Q_TG
|
||||
if (e.SubItem == (int)MtrlgyClmn.Qtg) return;
|
||||
#endif
|
||||
if (!unlocked || e.SubItem >= (int)MtrlgyClmn.ColumnsCount) return;
|
||||
@ -1024,7 +1028,7 @@ namespace TBF.UI.Procedures
|
||||
if (int.TryParse(e.DisplayText, out dummy) && Data.IsGoodPartNr(dummy)) return; /// OK
|
||||
break;
|
||||
|
||||
#if TEST_PROFILES
|
||||
#if SHOW_Q_TG
|
||||
case MtrlgyClmn.Qtg:
|
||||
if (Utils.TryParseUFloat(e.DisplayText, out fdummy))
|
||||
{
|
||||
@ -1160,7 +1164,7 @@ namespace TBF.UI.Procedures
|
||||
ix = (int)MtrlgyClmn.Qto;
|
||||
flowM3ph = Units.ConvertFrom(oriUnit, Utils.ParseUDouble(item.SubItems[ix].Text));
|
||||
item.SubItems[ix].Text = Units.ConvertTo(newUnit, test.QtoTextChngd ? flowM3ph : test.Qto).ToString();
|
||||
#if TEST_PROFILES
|
||||
#if SHOW_Q_TG
|
||||
ix = (int)MtrlgyClmn.Qtg;
|
||||
flowM3ph = Units.ConvertFrom(oriUnit, Utils.ParseUDouble(item.SubItems[ix].Text));
|
||||
item.SubItems[ix].Text = Units.ConvertTo(newUnit, test.QtgTextChngd ? flowM3ph : test.Qtg).ToString();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2022 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
@ -29,7 +29,6 @@ namespace TBF.UI.Procedures
|
||||
sharedButtons.ParentForm = this;
|
||||
sharedButtons.RequiredGroupMembership = new GID[] { GID.TestingSpecialists, GID.Metrologists };
|
||||
|
||||
#if TEST_PROFILES
|
||||
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | SharedButtons.Buttons.Remove |
|
||||
SharedButtons.Buttons.Up | SharedButtons.Buttons.Down |
|
||||
SharedButtons.Buttons.Edit | SharedButtons.Buttons.Copy |
|
||||
@ -37,13 +36,12 @@ namespace TBF.UI.Procedures
|
||||
SharedButtons.Buttons.Compare |SharedButtons.Buttons.Custom1;
|
||||
sharedButtons.Custom1Caption = string.Format("Create from{0}test profiles", Environment.NewLine);
|
||||
sharedButtons.Custom1Clicked += custom1Button_Click;
|
||||
#else
|
||||
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | SharedButtons.Buttons.Remove |
|
||||
SharedButtons.Buttons.Up | SharedButtons.Buttons.Down |
|
||||
SharedButtons.Buttons.Edit | SharedButtons.Buttons.Copy |
|
||||
SharedButtons.Buttons.Export | SharedButtons.Buttons.Import |
|
||||
SharedButtons.Buttons.Compare;
|
||||
#endif
|
||||
|
||||
//sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | SharedButtons.Buttons.Remove |
|
||||
// SharedButtons.Buttons.Up | SharedButtons.Buttons.Down |
|
||||
// SharedButtons.Buttons.Edit | SharedButtons.Buttons.Copy |
|
||||
// SharedButtons.Buttons.Export | SharedButtons.Buttons.Import |
|
||||
// SharedButtons.Buttons.Compare;
|
||||
|
||||
sharedButtons.Unlocked += Unlocked;
|
||||
sharedButtons.OKClicked += okButton_Click;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user