Пример #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            ////string typeName = typeof(US300).AssemblyQualifiedName;
            ////LISYQ.US300, US300, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
            ////LISYQ.TM2655P, TM2655P, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
            ////string typeName = typeof(LISYQ.URT200B).AssemblyQualifiedName;
            //string outMsg = "";
            //if (yqDemo != null)
            //{
            //    if (yqDemo.IsOpen(out outMsg) == false)
            //    {
            //        yqDemo.open(out outMsg);
            //    }
            //}
            //else
            //{

            //    string yqVersion = TJClient.Common.XmlRW.GetValueFormXML(System.Configuration.ConfigurationSettings.AppSettings["US300"].ToString(), "YQ_Version", "value");
            //    yqDemo = LisFactory.LisCreate(yqVersion);
            //}

            //DataTable dt = yqDemo.YQDataReturn("", out outMsg);

            string YqXmlPath = "";

            try
            {
                //if (drpFlag == true && comboBox_yq.SelectedValue != null && comboBox_yq.SelectedValue.ToString().Length > 0)
                //{
                //xmlpath
                YqXmlPath = System.Configuration.ConfigurationSettings.AppSettings["US300"].ToString();
                //jg数据处理间隔时间
                //YQ_Interval = XmlRW.GetValueFormXML(YqXmlPath, "YQ_Interval", "value");

                ////rqlx	标本日期类型
                //YQ_DateType = XmlRW.GetValueFormXML(YqXmlPath, "YQ_DateType", "value");

                ////仪器数据处理类型
                //YQ_Type = XmlRW.GetValueFormXML(YqXmlPath, "YQ_YQType", "value");

                //启动自动获取数据
                AutoForm autoform = new AutoForm();
                //autoform.Owner = this;
                autoform.Show();
                autoform.Visible = false;
                autoform.setStart("US300");

                //检验结果初始化(右侧列表)
                //init_dataGridView_hybb();
                //}
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Пример #2
0
        protected void addUnpackMenuAndShow()
        {
            ToolStripMenuItemEx actionUnpackMenuItem = new((_, _) => unpack(fileUtil.pathNameNoExt)) {
                Text         = @$ "&Unpack {fileUtil.name} to {fileUtil.pathNameNoExt}",
                ShortcutKeys = Keys.Control | Keys.U,
            };
            ToolStripMenuItemEx actionUnpackAsMenuItem = new((_, _) => unpackTo()) {
                Text         = @$ "U&npack {fileUtil.name} to... (subdir /{fileUtil.nameNoExt})",
                ShortcutKeys = Keys.Control | Keys.N,
            };
            ToolStripMenuItemEx fileMenu = new() {
                Text          = @"&Action",
                DropDownItems =
                {
                    actionUnpackMenuItem,
                    actionUnpackAsMenuItem,
                }
            };

            previewForm.menuStrip.Items.Add(fileMenu);

            previewForm.Show();
        }