|
|
@@ -14,7 +14,7 @@ namespace OTSMeasureApp
|
|
|
public partial class OTSSolutionWindow : DockContent
|
|
|
{
|
|
|
|
|
|
- //如果没有样品标题信息,就使用默认 "未加载样品名";
|
|
|
+
|
|
|
public String m_DefaultSolutionName = "未加载样品名";
|
|
|
public String m_DefaultSampleName = "样品";
|
|
|
public OTSIncAMeasureAppForm m_MeasureAppForm = null;
|
|
|
@@ -79,7 +79,7 @@ namespace OTSMeasureApp
|
|
|
m_TreeViewBase.DisplayWorkSampleTree(m_WorkSampleParam);
|
|
|
}
|
|
|
|
|
|
- //MeasureApp窗口给 OTSSolutionWindow 发送窗口删除样品回复
|
|
|
+
|
|
|
public void DeletCurrentSampleNode()
|
|
|
{
|
|
|
treeView1.Nodes.Remove(m_WorkSampleNode); //移除当前工作样品
|
|
|
@@ -105,7 +105,7 @@ namespace OTSMeasureApp
|
|
|
m_TreeViewBase.SetSampleCheckboxStatu(sSampleName, bCheckBoxStatu);
|
|
|
}
|
|
|
|
|
|
- // MeasureApp 窗口给 OTSSolutionWindow 窗口编辑样品名回复
|
|
|
+
|
|
|
public void Rev_MeasureApp_EditEditSample_Event(string sSampleOldName, string sSampleNewName)
|
|
|
{
|
|
|
if (sSampleNewName == "") //修改的样品新名称为空,则说明不允许修改
|
|
|
@@ -238,33 +238,13 @@ namespace OTSMeasureApp
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- [DllImport("user32.dll", CharSet = CharSet.Auto)]
|
|
|
- private static extern IntPtr SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, ref TVITEM lParam);
|
|
|
+
|
|
|
|
|
|
private void treeView1_DrawNode(object sender, DrawTreeNodeEventArgs e)
|
|
|
{
|
|
|
e.DrawDefault = true;
|
|
|
}
|
|
|
- private const int TVIF_STATE = 0x8;
|
|
|
- private const int TVIS_STATEIMAGEMASK = 0xF000;
|
|
|
- private const int TV_FIRST = 0x1100;
|
|
|
- private const int TVM_SETITEM = TV_FIRST + 63;
|
|
|
- private void HideCheckBox(TreeView tvw, TreeNode node)
|
|
|
- {
|
|
|
-
|
|
|
- TVITEM tvi = new TVITEM();
|
|
|
-
|
|
|
- tvi.hItem = node.Handle;
|
|
|
-
|
|
|
- tvi.mask = TVIF_STATE;
|
|
|
-
|
|
|
- tvi.stateMask = TVIS_STATEIMAGEMASK;
|
|
|
-
|
|
|
- tvi.state = 0;
|
|
|
-
|
|
|
- SendMessage(tvw.Handle, TVM_SETITEM, IntPtr.Zero, ref tvi);
|
|
|
-
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
[StructLayout(LayoutKind.Sequential, Pack = 8, CharSet = CharSet.Auto)]
|
|
|
|
|
|
@@ -311,7 +291,7 @@ namespace OTSMeasureApp
|
|
|
{
|
|
|
log.Error("(OTSSolutionWindow.treeView1_NodeMouseClick ) m_TreeViewBase.GetSampleNodeLockStatu(m_WorkSampleNode, ref bLockStatu) = false Failed !");
|
|
|
}
|
|
|
- SampleParaLock.Checked = bLockStatu;
|
|
|
+ //SampleParaLock.Checked = bLockStatu;
|
|
|
//显示清除测量数据
|
|
|
COTSSample cSample = m_MeasureAppForm.m_ProjParam.GetWorkSample();
|
|
|
if (cSample.GetName() == tn.Text)
|
|
|
@@ -330,8 +310,7 @@ namespace OTSMeasureApp
|
|
|
//Treeview增加测量样品节点
|
|
|
public void toolStripMenuItem1_AddNode_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
- // m_TreeViewBase.AddTreeViewNode();
|
|
|
- //m_MeasureAppForm.m_EventFun.Send_AddSample_SoluWindowReqMeasureApp_Event_Fun();
|
|
|
+
|
|
|
m_MeasureAppForm.SoluwindowReqAddSample();
|
|
|
}
|
|
|
private void treeView1_AfterLabelEdit(object sender, NodeLabelEditEventArgs e)
|
|
|
@@ -503,11 +482,11 @@ namespace OTSMeasureApp
|
|
|
|
|
|
|
|
|
//设置样品参数锁
|
|
|
- private void SampleParaLock_Click(object sender, EventArgs e)
|
|
|
- {
|
|
|
+ //private void SampleParaLock_Click(object sender, EventArgs e)
|
|
|
+ //{
|
|
|
|
|
|
- m_TreeViewBase.SetSampleParaLockStatu();
|
|
|
- }
|
|
|
+ // m_TreeViewBase.SetSampleParaLockStatu();
|
|
|
+ //}
|
|
|
private void treeView1_MouseDown(object sender, MouseEventArgs e)
|
|
|
{
|
|
|
if (e.Button == MouseButtons.Right)
|