控件rstray优化,减少对UI层的依赖

master
lhiven 2 years ago
parent 12072ee6df
commit c609d1e59f

@ -38,6 +38,10 @@
<Reference Include="HWindow_Tool">
<HintPath>C:\Users\Administrator\Desktop\1\bin\Debug\HWindow_Tool.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Users\Administrator\Desktop\新建文件夹 (3)\Rs.MotionPlat\Rs.Framework\bin\Debug\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />

@ -32,6 +32,7 @@ namespace Rs.Controls
public partial class RsTray : UserControl
{
public string RecipeName { get; set; } = "default";
private int CurrentSlot { get; set; } = 1;
private TrayInfo trayInfo;
@ -255,7 +256,7 @@ namespace Rs.Controls
public void Init()
{
trayInfo = new TrayInfo(SortDir, RowNum, ColumnNum, ItemName);
trayInfo = trayInfo.Init();
trayInfo = trayInfo.Init(RecipeName);
}
public bool Save()
@ -703,7 +704,7 @@ namespace Rs.Controls
}
}
}
string dirPath = Path.Combine(GlobalVar.Instance.RecipeDir, ItemName);
string dirPath = Path.Combine(rsTray.RecipeName, ItemName);
if (!Directory.Exists(dirPath))
{
Directory.CreateDirectory(dirPath);
@ -718,9 +719,9 @@ namespace Rs.Controls
}
public TrayInfo Init()
public TrayInfo Init(string recipeName)
{
string dirPath = Path.Combine(GlobalVar.Instance.RecipeDir, ItemName);
string dirPath = Path.Combine(recipeName, ItemName);
if (!Directory.Exists(dirPath))
{
Directory.CreateDirectory(dirPath);

@ -89,7 +89,9 @@
<Compile Include="Commom\GlobalTray.cs" />
<Compile Include="Commom\GlobalUser.cs" />
<Compile Include="Commom\GlobalVar.cs" />
<Compile Include="Commom\IoEntitys.cs" />
<Compile Include="Commom\NozzleCollection.cs" />
<Compile Include="Commom\Ops.cs" />
<Compile Include="Commom\Scheduling.cs" />
<Compile Include="Commom\VacManager.cs" />
<Compile Include="Commom\VisionProcess.cs" />
@ -138,11 +140,11 @@
<Compile Include="FormMain.Designer.cs">
<DependentUpon>FormMain.cs</DependentUpon>
</Compile>
<Compile Include="Home2.cs">
<Compile Include="Home.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Home2.Designer.cs">
<DependentUpon>Home2.cs</DependentUpon>
<Compile Include="Home.Designer.cs">
<DependentUpon>Home.cs</DependentUpon>
</Compile>
<Compile Include="MonitorConfig.cs">
<SubType>Form</SubType>
@ -251,8 +253,8 @@
<EmbeddedResource Include="FormMain.resx">
<DependentUpon>FormMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Home2.resx">
<DependentUpon>Home2.cs</DependentUpon>
<EmbeddedResource Include="Home.resx">
<DependentUpon>Home.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MonitorConfig.resx">
<DependentUpon>MonitorConfig.cs</DependentUpon>

Loading…
Cancel
Save