Example #1
0
 /// <summary>
 /// This method is one of the delegates sent to CreateOrJoin, it's call means the user wants to create a spreadsheet.
 /// </summary>
 /// <param name="IPaddress"></param>
 /// <param name="port"></param>
 /// <param name="ssName"></param>
 /// <param name="psword"></param>
 private void CreateDelegate(string IPaddress, string port, string ssName, string psword)
 {
     if (this.IsHandleCreated)
     {
         this.Invoke((MethodInvoker)delegate
             {
                 int num = 0;
                 if (Int32.TryParse(port, out num))
                 {
                     if (!ReferenceEquals(clientCommunication, null))
                         clientCommunication.Leave();
                     spreadsheet = new Spreadsheet(s => Regex.IsMatch(s, @"^[a-zA-Z]{1}[0-9]{1,2}$"), s => s.ToUpper(), "ps6");
                     clientCommunication = new ClientSocket(IPaddress, changeCell, Update, num, this.SendXML);
                     EmptySSPanel();
                     clientCommunication.CreateSpreadsheet(ssName, psword);
                     refreshSpreadsheet();
                 }
             });
     }
 }