예제 #1
0
파일: SaveRecordDlg.cs 프로젝트: zszqwe/dp2
        void InitialDp2Protocol()
        {
            if (m_bDp2Initialized == true)
            {
                return;
            }

            if (this.GetDp2SearchParam == null)
            {
                throw new Exception("Getdp2SearchParamEventHandle not set");
            }

            GetDp2SearchParamEventArgs e = new GetDp2SearchParamEventArgs();

            this.GetDp2SearchParam(this, e);

            if (this.MainForm != null &&
                this.dp2ResTree1.cfgCache == null)
            {
                this.dp2ResTree1.cfgCache = this.MainForm.cfgCache;
            }

            // 初始化dp2协议相关参数
            this.dp2ResTree1.stopManager = e.MainForm.stopManager;
            this.dp2ResTree1.Servers     = e.MainForm.Servers;  // 引用
#if OLD_CHANNEL
            this.dp2ResTree1.Channels = e.dp2Channels;
#endif
            this.dp2ResTree1.ChannelManager = Program.MainForm;

            this.dp2ResTree1.EnabledIndices = new int[] { dp2ResTree.RESTYPE_DB };
            this.dp2ResTree1.Fill(null);

            m_bDp2Initialized = true;
        }
예제 #2
0
        void InitialDp2Protocol()
        {
            if (m_bDp2Initialized == true)
                return;

            if (this.GetDp2SearchParam == null)
            {
                throw new Exception("Getdp2SearchParamEventHandle not set");
            }

            GetDp2SearchParamEventArgs e = new GetDp2SearchParamEventArgs();
            this.GetDp2SearchParam(this, e);

            if (this.MainForm != null
    && this.dp2ResTree1.cfgCache == null)
                this.dp2ResTree1.cfgCache = this.MainForm.cfgCache;

            // 初始化dp2协议相关参数
            this.dp2ResTree1.stopManager = e.MainForm.stopManager;
            this.dp2ResTree1.Servers = e.MainForm.Servers;	// 引用
            this.dp2ResTree1.Channels = e.dp2Channels;
            this.dp2ResTree1.EnabledIndices = new int[] { dp2ResTree.RESTYPE_DB };
            this.dp2ResTree1.Fill(null);

            m_bDp2Initialized = true;
        }
예제 #3
0
        void dlg_GetDp2SearchParam(object sender, GetDp2SearchParamEventArgs e)
        {
            dp2SearchForm dp2_searchform = this.GetDp2SearchForm();

            e.dp2Channels = dp2_searchform.Channels;
            e.MainForm = this.m_mainForm;
        }
예제 #4
0
 void dlg_GetDp2SearchParam(object sender, GetDp2SearchParamEventArgs e)
 {
     e.dp2Channels = this.Channels;
     e.MainForm = this.MainForm;
 }