public void FetchInfos()
        {
            var xmls = mDataFeeder.GetCompleteXmlFromNet();

            HHI_Module.listHandInData.Clear();
            HHI_Module.listPrefixes.Clear();
            HHI_Module.listServerInfos.Clear();

            HHI_Module.LoadHandIns(xmls[HHI_Module.HHIRootNodeName]);
            HHI_Module.LoadPrefixs(xmls[HHI_Module.PrefixRootNodeName]);
            HHI_Module.LoadConfig(xmls[HHI_Module.ServerInfoRootNodeName]);
            HHI_Module.LoadAppInfo(xmls[HHI_Module.AppInfoNodeName]);
        }
示例#2
0
 private void Form_Main_Load(Object sender, EventArgs e)
 {
     HHI_Module.LoadPrefixs();
     HHI_Module.LoadHandIns();
     static_handIn.Text                = cn_strs.str_select_handin;
     fileToolStripMenuItem.Text        = "文件";
     newHandInToolStripMenuItem.Text   = "创建新方案";
     exitToolStripMenuItem.Text        = "退出";
     prefixToolStripMenuItem.Text      = "预设";
     saveToolStripMenuItem.Text        = "保存...";
     saveHHIToolStripMenuItem.Text     = "保存所有新方案";
     savePrefixsToolStripMenuItem.Text = "保存所有预设";
     saveAllToolStripMenuItem.Text     = "保存所有";
     btn_check.Text = "检查";
     comboBox_handIns.DataSource    = HHI_Module.listHandInData;
     comboBox_handIns.ValueMember   = "id";
     comboBox_handIns.DisplayMember = "name";
     ReloadList();
 }
示例#3
0
        private async void btn_ConToServer_Click(Object sender, EventArgs e)
        {
            if (m_Client == null)
            {
                goto CON;
            }
            if (m_Client.Connected() && GetCurrentServerInfo().IP == m_Client.IPAddress)
            {
                MessageBox.Show("服务器已连接");
                return;
            }
            else if (m_Client.Connected() && GetCurrentServerInfo().IP == m_Client.IPAddress)
            {
                m_Client.Disconnect();
            }
CON:
//if( !CurrentPingStatus() ) {
//    return;
//}
            m_Client = new Client(GetCurrentServerInfo().IP, GetCurrentServerInfo().Port);
            if (1 == await m_Client.Connect())
            {
                MessageBox.Show("连接失败");
                return;
            }
            await m_Client.fileTrans.DownloadFiles(HHI_Module.m_dataPath);

            Sleep();

            HHI_Module.LoadPrefixs();
            HHI_Module.LoadHandIns();
            comboBox_handIns.DataSource    = HHI_Module.listHandInData;
            comboBox_handIns.ValueMember   = "id";
            comboBox_handIns.DisplayMember = "name";
            btn_attach.Enabled             = true;
            btn_pull_info.Enabled          = true;
            comboBox_handIns.Enabled       = true;
            RefreshText();
        }