Beispiel #1
0
 /// <summary>
 /// 冻结
 /// </summary>
 public void Freeze()
 {
     try
     {
         if (ButtonEnter.InvokeRequired)
         {
             FreezeDelegate d = Freeze;
             ButtonEnter.Invoke(d);
         }
         else
         {
             //冻结所有控件
             ButtonEnter.Enabled  = false;
             ButtonCancle.Enabled = true;
             input_name.Enabled   = false;
             checkBox1.Enabled    = checkBox2.Enabled = false;
             Browse.Enabled       = false;
             InputPageNum.Enabled = InputStartPicNum.Enabled = InputMaxPicNum.Enabled = false;
             InputCookie.Enabled  = false;
         }
     }
     catch
     {
     }
 }
Beispiel #2
0
        public MasterAPI(string[] pcsUrls)
        {
            Servers         = new ConcurrentDictionary <string, IServer>();
            ServerUrls      = "";
            ServerIdsToUrls = new ConcurrentDictionary <string, string>();

            Clients = new ConcurrentDictionary <string, IClient>();

            PCSs = new ConcurrentDictionary <string, ProcessCreationService>();
            foreach (string url in pcsUrls)
            {
                PCSs.TryAdd(BaseUrlExtractor.Extract(url), (ProcessCreationService)Activator.GetObject(typeof(ProcessCreationService), url));
            }

            _startProcessDelegate = new StartProcessDelegate(StartProcess);

            _serverDelegate         = new ServerDelegate(ServerSync);
            _clientDelegate         = new ClientDelegate(ClientSync);
            _addRoomDelegate        = new AddRoomDelegate(AddRoomSync);
            _statusDelegate         = new StatusDelegate(StatusSync);
            _crashDelegate          = new CrashDelegate(CrashSync);
            _freezeDelegate         = new FreezeDelegate(FreezeSync);
            _unfreezeDelegate       = new UnfreezeDelegate(UnfreezeSync);
            _shutDownSystemDelegate = new ShutDownSystemDelegate(ShutDownSystemSync);

            _checkNodeStatusDelegate = new CheckNodeStatus(CheckNode);

            _nodesCreated = 0;
        }
 /// <summary>
 /// 冻结
 /// </summary>
 public void Freeze()
 {
     try
     {
         if (ButtonEnter.InvokeRequired)
         {
             FreezeDelegate d = Freeze;
             ButtonEnter.Invoke(d);
         }
         else
         {
             //冻结所有控件
             ButtonEnter.Enabled        = false;
             ButtonCancle.Enabled       = true;
             input_name.Enabled         = false;
             RadioButtonGallery.Enabled = RadioButtonScraps.Enabled = false;
             Browse.Enabled             = false;
             InputPageNum.Enabled       = InputStartPicNum.Enabled = false;
         }
     }
     catch
     {
     }
 }
Beispiel #4
0
 public void Freeze(Delegate v, params object[] parameters)
 {
     freeze = Freez;
     freeze.BeginInvoke(v, parameters, null, null);
 }