예제 #1
0
        public string VdaInitialization(string serverIp, string userName, string password)
        {
            MyLog4Net.Container.Instance.Log.Debug("COMLibrary  VdaInitialization ");
            Trace.WriteLine(string.Format("COMLibrary  VdaInitialization {0} {1} {2}", serverIp, userName, password));
            OcxMain      = new ucXDMain();
            OcxMain.Dock = DockStyle.Fill;


            try
            {
                bool ret = OcxMain.LoginWnd(serverIp, userName, password);
                this.Controls.Add(OcxMain);
                OcxMain.InitWnd();
                m_isInited = true;
                MyLog4Net.Container.Instance.Log.Debug("COMLibrary finish VdaInitialization ");
                return(MakeRetMsg(0, ""));
            }
            catch (Exception ex)
            {
                m_isInited = false;

                MyLog4Net.Container.Instance.Log.Debug("COMLibrary finish VdaInitialization error :ret=[-1]" + ex.Message);
                return(MakeRetMsg(-1, ex.Message));
            }
        }
예제 #2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            bool ret = c.LoginWnd(textBoxItemIP.Text, textBoxItemUser.Text, textBoxItemPass.Text);

            if (ret)
            {
                c.InitWnd();
            }
        }