master
nodyang 1 year ago
parent dfd2e0c826
commit 24400a59c9

@ -39,8 +39,6 @@ namespace Mesnac.Action.ChemicalWeighing.LjPressure
this.btnOK = new System.Windows.Forms.Button(); this.btnOK = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.Alarm = new System.Windows.Forms.ComboBox();
this.SuspendLayout(); this.SuspendLayout();
// //
// HighLimit // HighLimit
@ -104,38 +102,17 @@ namespace Mesnac.Action.ChemicalWeighing.LjPressure
this.label3.TabIndex = 44; this.label3.TabIndex = 44;
this.label3.Text = "低压设定值:"; this.label3.Text = "低压设定值:";
// //
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(39, 90);
this.label1.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(59, 12);
this.label1.TabIndex = 43;
this.label1.Text = "超压报警:";
//
// Alarm
//
this.Alarm.FormattingEnabled = true;
this.Alarm.Location = new System.Drawing.Point(108, 87);
this.Alarm.Name = "Alarm";
this.Alarm.Size = new System.Drawing.Size(129, 20);
this.Alarm.TabIndex = 51;
this.Alarm.SelectedIndexChanged += new System.EventHandler(this.Alarm_SelectedIndexChanged);
//
// FrmPressureUpdate // FrmPressureUpdate
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(268, 206); this.ClientSize = new System.Drawing.Size(268, 206);
this.Controls.Add(this.Alarm);
this.Controls.Add(this.HighLimit); this.Controls.Add(this.HighLimit);
this.Controls.Add(this.LowLimit); this.Controls.Add(this.LowLimit);
this.Controls.Add(this.btnCancel); this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOK); this.Controls.Add(this.btnOK);
this.Controls.Add(this.label4); this.Controls.Add(this.label4);
this.Controls.Add(this.label3); this.Controls.Add(this.label3);
this.Controls.Add(this.label1);
this.ForeColor = System.Drawing.SystemColors.ControlText; this.ForeColor = System.Drawing.SystemColors.ControlText;
this.Name = "FrmPressureUpdate"; this.Name = "FrmPressureUpdate";
this.Text = "修改压力参数"; this.Text = "修改压力参数";
@ -143,9 +120,6 @@ namespace Mesnac.Action.ChemicalWeighing.LjPressure
this.PerformLayout(); this.PerformLayout();
} }
private System.Windows.Forms.ComboBox Alarm;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox comboBox1; private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.TextBox HighLimit; private System.Windows.Forms.TextBox HighLimit;

@ -34,9 +34,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjPressure
}); });
this.Alarm.DataSource = ls; // this.Alarm.DataSource = ls;
Alarm.ValueMember = "Id"; // Alarm.ValueMember = "Id";
Alarm.DisplayMember = "Name"; // Alarm.DisplayMember = "Name";
var i = BasePlcHelper.Instance.WatchDog.LastValue.ToInt(); var i = BasePlcHelper.Instance.WatchDog.LastValue.ToInt();
if (i == 0) if (i == 0)
@ -52,15 +52,15 @@ namespace Mesnac.Action.ChemicalWeighing.LjPressure
this.LowLimit.Text = v.LowLimit.ToString(CultureInfo.InvariantCulture); this.LowLimit.Text = v.LowLimit.ToString(CultureInfo.InvariantCulture);
this.HighLimit.Text = v.HighLimit.ToString(CultureInfo.InvariantCulture); this.HighLimit.Text = v.HighLimit.ToString(CultureInfo.InvariantCulture);
foreach (MyNameValue combo in Alarm.Items) // foreach (MyNameValue combo in Alarm.Items)
{ // {
if (combo.Id == v.Alarm) // if (combo.Id == v.Alarm)
{ // {
Alarm.SelectedItem = combo; // Alarm.SelectedItem = combo;
Alarm.Enabled = false; // Alarm.Enabled = false;
break; // break;
} // }
} // }
} }
else else
{ {
@ -101,7 +101,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPressure
Id = _id, Id = _id,
HighLimit = b, HighLimit = b,
LowLimit = a, LowLimit = a,
Alarm = Convert.ToInt16(Alarm.SelectedValue)
}; };
PressurePLC.DownToPlc(new List<PressureSettingView>() PressurePLC.DownToPlc(new List<PressureSettingView>()

@ -31,11 +31,12 @@ namespace Mesnac.Action.ChemicalWeighing.LjPressure
private void DoWord() private void DoWord()
{ {
LoadingHelper.ShowLoadingScreen(); LoadingHelper.ShowLoadingScreen();
var i = BasePlcHelper.Instance.WatchDog.LastValue.ToInt(); var i = LjHelp.WatchDog;
if (i == 0) if (i == 0)
{ {
LoadingHelper.CloseForm(); LoadingHelper.CloseForm();
MessageBox.Show("PLC通讯失败"); MessageBox.Show("PLC通讯失败");
ICSharpCode.Core.LoggingService<UpAction>.Warn("PLC通讯失败");
return; return;
} }
@ -49,7 +50,6 @@ namespace Mesnac.Action.ChemicalWeighing.LjPressure
LoadingHelper.CloseForm(); LoadingHelper.CloseForm();
if (OnHandler != null) if (OnHandler != null)
{ {
OnHandler(this._runtime.BaseControl.MCRoot, System.EventArgs.Empty); OnHandler(this._runtime.BaseControl.MCRoot, System.EventArgs.Empty);

@ -19,7 +19,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjProportional
base.RunIni(runtime); //必须调用 base.RunIni(runtime); //必须调用
this._runtime = runtime; this._runtime = runtime;
DbMCControl materialGridControl = DbMCControl materialGridControl =
this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "ElectricalSetting") this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "ProportionalSetting")
.FirstOrDefault(); //获取物料数据控件 .FirstOrDefault(); //获取物料数据控件
this._materialGridControl = materialGridControl; this._materialGridControl = materialGridControl;

@ -39,7 +39,7 @@ namespace Mesnac.Action.ChemicalWeighing
// label2 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(122, 40); this.label2.Location = new System.Drawing.Point(85, 30);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(65, 12); this.label2.Size = new System.Drawing.Size(65, 12);
this.label2.TabIndex = 0; this.label2.TabIndex = 0;
@ -55,12 +55,11 @@ namespace Mesnac.Action.ChemicalWeighing
this.Text = "Loading"; this.Text = "Loading";
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
} }
#endregion #endregion
private Label label1; private Label label1;
private Label label2; private System.Windows.Forms.Label label2;
} }
} }

@ -8,11 +8,13 @@ namespace Mesnac.Action.ChemicalWeighing
public Loading() public Loading()
{ {
InitializeComponent(); InitializeComponent();
this.ControlBox = true ;
this.MaximizeBox = false;
} }
private void loading_Load(object sender, EventArgs e) private void loading_Load(object sender, EventArgs e)
{ {
//this.BackColor = Color.Transparent;
this.Opacity = 1; this.Opacity = 1;
} }

@ -15,10 +15,7 @@ namespace Mesnac.Action.ChemicalWeighing
#endregion #endregion
//private LoadingHelper()
//{
//}
/// <summary> /// <summary>
/// 显示loading框 /// 显示loading框

@ -4,7 +4,6 @@
<Node Name="FrmBasUser" Text="用户管理" ToolTipText="FrmBasUser" Tag="FrmBasUser" ImageIndex="3" SelectedImageIndex="3" /> <Node Name="FrmBasUser" Text="用户管理" ToolTipText="FrmBasUser" Tag="FrmBasUser" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="FrmBasRole" Text="角色管理" ToolTipText="FrmBasRole" Tag="FrmBasRole" ImageIndex="3" SelectedImageIndex="3" /> <Node Name="FrmBasRole" Text="角色管理" ToolTipText="FrmBasRole" Tag="FrmBasRole" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="FrmRolePurview" Text="角色权限管理" ToolTipText="FrmRolePurview" Tag="FrmRolePurview" ImageIndex="3" SelectedImageIndex="3" /> <Node Name="FrmRolePurview" Text="角色权限管理" ToolTipText="FrmRolePurview" Tag="FrmRolePurview" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="FrmCurrentPlan" Text="生产计划" ToolTipText="" Tag="FrmCurrentPlan" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="FrmRecipe" Text="配方管理" ToolTipText="FrmRecipe" Tag="FrmRecipe" ImageIndex="3" SelectedImageIndex="3" /> <Node Name="FrmRecipe" Text="配方管理" ToolTipText="FrmRecipe" Tag="FrmRecipe" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="FrmMaterial" Text="物料管理" ToolTipText="FrmMaterial" Tag="FrmMaterial" ImageIndex="3" SelectedImageIndex="3" /> <Node Name="FrmMaterial" Text="物料管理" ToolTipText="FrmMaterial" Tag="FrmMaterial" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="FrmBin" Text="料仓管理" ToolTipText="FrmBin" Tag="FrmBin" ImageIndex="3" SelectedImageIndex="3" /> <Node Name="FrmBin" Text="料仓管理" ToolTipText="FrmBin" Tag="FrmBin" ImageIndex="3" SelectedImageIndex="3" />

Loading…
Cancel
Save