Esempio n. 1
0
        private int version; // The version the client-side is. The spreadsheet sends updates to correct when the version is wrong.

        #endregion Fields

        #region Constructors

        /// <summary>
        ///  Creates the communication outlet that the client will use to "talk" to the server.
        /// </summary>
        /// <param name="ipAddress"></param>
        public ClientSocket(string ipAddress, EditCell spreadsheet, ClientToGUI_SS receivedMessage, int port, SendXML xmlSender)
        {
            changePayload.contents = "";
            try
            {
                // set private instance variables
                this.ipAddress = ipAddress;
                this.clientGUI_SS = receivedMessage;
                this.e_Cell = spreadsheet;
                this.send_XML = xmlSender;

                TcpClient client = new TcpClient(ipAddress, port);
                Socket sock = client.Client;

                socket = new SSOffical(sock, new UTF8Encoding());
                socket.BeginReceive(MasterCallback, null, CustomNetworking.callbacks.MASTER);
                version = 0;
                password = "";
                nameOfSpreadsheet = "";
            }
            catch (Exception e)
            {
                clientGUI_SS("Server connection aborted, \n" + e.Message, true);
            }
        }
Esempio n. 2
0
    /// <summary>
    /// 根据企业ID和产品ID下载产品
    /// </summary>
    /// <param name="companyId"></param>
    /// <param name="produceID"></param>
    public void BeginToLoadProduce(string companyId, string produceID)
    {
        strXMLModel = SendXML.SendProduceID(companyId, produceID);

        start(strXMLModel, InfoType.SendProduceID, produceID);
    }
Esempio n. 3
0
    /// <summary>
    /// 根据HouseID和RoomID获取场景布局
    /// </summary>
    /// <param name="sceneId"></param>
    /// <param name="roomID"></param>
    public void BeginToLoadLayout(string sceneId, string roomID)
    {
        strXMLModel = SendXML.SendRoomId(sceneId, roomID);

        start(strXMLModel, InfoType.SendRoomID, roomID);
    }
Esempio n. 4
0
 /// <summary>
 /// 根据HouseID获取Room信息
 /// </summary>
 /// <param name="houseID"></param>
 public void BeginToLoadRoom(string houseID)
 {
     strXMLModel = SendXML.SendHouseId(houseID);
     start(strXMLModel, InfoType.SendHouseID, houseID);
 }
Esempio n. 5
0
 /// <summary>
 /// 根据企业ID获取 House信息
 /// </summary>
 /// <param name="companyID"></param>
 public void BeginToLoadHouse(string companyID)
 {
     localCompanyID = companyID;
     strXMLModel    = SendXML.SendCompanyId(companyID);
     start(strXMLModel, InfoType.SendCompanyID, companyID);
 }
Esempio n. 6
0
    /// <summary>
    /// 根据内页ID获取内页信息
    /// </summary>
    /// <param name="companyID"></param>
    public void BeginToLoadPage(string pagesId)
    {
        strXMLModel = SendXML.SendPagesId(pagesId);

        start(strXMLModel, InfoType.Bro_sendPagesID, pagesId);
    }
Esempio n. 7
0
    /// <summary>
    /// 根据宣传册ID获取内页信息
    /// </summary>
    /// <param name="companyID"></param>
    public void BeginToLoadBook(string booksId)
    {
        strXMLModel = SendXML.SendBooksId(booksId);

        start(strXMLModel, InfoType.Bro_sendBooksID, booksId);
    }
Esempio n. 8
0
    /// <summary>
    /// 根据宣传册ID获取布局
    /// </summary>
    /// <param name="companyID"></param>
    public void BeginToLoadBroLayout(string layoutId)
    {
        strXMLModel = SendXML.SendLayoutId(layoutId);

        start(strXMLModel, InfoType.Bro_sendLayoutID, layoutId);
    }
Esempio n. 9
0
    /// <summary>
    /// 根据企业ID获取宣传册ID
    /// </summary>
    /// <param name="companyID"></param>
    public void BeginToLoadAllBooks(string companyID)
    {
        strXMLModel = SendXML.SendCompanyID_bro(companyID);

        start(strXMLModel, InfoType.Bro_sendcompanyID, companyID);
    }
Esempio n. 10
0
    /// <summary>
    /// 根据企业ID获取企业信息
    /// </summary>
    /// <param name="companyID"></param>
    public void BeginToLoadCompany(string companyID)
    {
        strXMLModel = SendXML.SendCompanyInfomation(companyID);

        start(strXMLModel, InfoType.CompanyInfomation, companyID);
    }