예제 #1
0
 public ServerState(string IPAdd, int port, ServerMain form)
 {
     this.form = form;
     serverSet(IPAdd, port);
     thread = new Thread(new ThreadStart(serverstart));
     thread.Start();
 }
예제 #2
0
 public AddAction(ref ScheduledTask task, ClientThread client, ServerMain dialog)
 {
     InitializeComponent();
     this.task = task;
     this.client = client;
     this.dialog = dialog;
 }
예제 #3
0
 public CreateNewGroup(ref List<Group> groups, Database db, ServerMain s)
 {
     InitializeComponent();
     this.groups = groups;
     this.db = db;
     this.p = s;
 }
예제 #4
0
 public ChooseGroup(ref List<Group> groups,  object client,  ServerMain ad, Database db)
 {
     InitializeComponent();
     this.db = db;
     this.groups = groups;
     this.client = (ClientThread)client;
     this.ad = ad;
 }
예제 #5
0
        public ClientHandler(TcpClient tcpClient, ServerMain serverMain)
        {
            this.tcpClient = tcpClient;
            this.serverMain = serverMain;

            listenThread = new Thread(new ThreadStart(handler));
            listenThread.Start();
        }
예제 #6
0
 private void SplashScreen_Load(object sender, EventArgs e)
 {
     this.Show();
     Thread.Sleep(300);
     ServerMain.db = new Database();
     ServerMain.groups = new List<Group>();
     ServerMain.groups = ServerMain.db.GetGroups();
     ServerMain.compDetails = ServerMain.db.GetKnownClients();
     ServerMain sm = new ServerMain();
     Thread.Sleep(1000);
     sm.ShowDialog();
     this.Close();
 }
예제 #7
0
 public ServerConnectFour(ServerMain serverMain, string player1, string player2)
     : base(serverMain, player1, player2)
 {
     sets = 0;
     game = new List<List<int>>();
     for (int column = 0; column < 8; column++)
     {
         List<int> col = new List<int>();
         for (int row = 0; row < 6; row++)
         {
             col.Add(0);
         }
         game.Add(col);
     }
 }
예제 #8
0
        /// <summary>
        /// Form Constructor
        /// </summary>
        /// <param name="ProcList">Current Known Processes, Built from parent form data grid</param>
        /// <param name="client">Client for commands to be sent too</param>
        /// <param name="parent">parent form</param>
        public NewProcess(ClientThread client, ServerMain parent, Database db)
        {
            s = parent;
            List<string> ProcList = db.GetProcesses(client.GetCompID());
            ProcList.Sort();
            InitializeComponent();
            this.client = client;
            string clientName = client.GetComputerName().Split('\0')[0];
            lstBoxProcesses.Items.Clear();
            toolLblConnectedClient.Text += clientName;

            foreach(string procname in ProcList)
            {
                lstBoxProcesses.Items.Add(procname + ".exe");
            }
        }
예제 #9
0
        static void Main(string[] args)
        {
            ServerMain svc = new ServerMain(); //Create a new object of the server class

            svc.Start();                       //Start the server
        }
예제 #10
0
 public Game(ServerMain serverMain, String player1, String player2)
 {
     Players = new List<string> {player1, player2};
     this.serverMain = serverMain;
 }
예제 #11
0
 public ServerRPSLS(ServerMain serverMain, string player1, string player2)
     : base(serverMain, player1, player2)
 {
     ChosenHands = new Dictionary<string, Hands>();
     Rounds = new List<Dictionary<string, Hands>>();
 }
예제 #12
0
 public AddNewTask(ServerMain dialog, ClientThread client)
 {
     InitializeComponent();
     this.dialog = dialog;
     this.client = client;
 }