コード例 #1
0
ファイル: ServerManager.cs プロジェクト: xingx001/SuperNAT
 public static void Stop()
 {
     NATServer?.Stop();
     HttpServerList.ForEach(c => c.Stop());
     TcpServerList.ForEach(c => c.Stop());
     MapList.Clear();
 }
コード例 #2
0
 public void ObjectFilter(IRunAsChain SelChain)
 {
     MapList.Clear();
     foreach (var ch in SelChain.Chain)
     {
         MapList.Add(ch);
     }
     ObjectFilter(MapList[0]);
 }
コード例 #3
0
ファイル: ServerConfig.cs プロジェクト: zj831007/SGF
 public static void Load(string path = null)
 {
     MapServerModuleInfo.Clear();
     if (string.IsNullOrEmpty(path))
     {
         path = DefaultPath;
     }
     ReadConfig(path);
 }
コード例 #4
0
ファイル: Map.cs プロジェクト: springheeljack/Year3Project
 public static void UpdateMapList()
 {
     MapList.Clear();
     foreach (string file in Directory.GetFiles("Content/Map"))
     {
         //string s = TexturePath + "/" + Path.GetFileName(dir) + "/" + Path.GetFileNameWithoutExtension(file);
         //Textures.Add(Path.GetFileNameWithoutExtension(file), Content.Load<Texture2D>(s));
         MapList.Add(Path.GetFileNameWithoutExtension(file));
     }
 }
コード例 #5
0
        public void StopAllServer()
        {
            Debuger.Log();
            var list = m_mapModule.AsList();
            int cnt  = list.Count;

            for (int i = 0; i < cnt; i++)
            {
                list[i].Stop();
                list[i].Release();
            }
            m_mapModule.Clear();
        }
コード例 #6
0
 public void Clean()
 {
     Debuger.Log();
     m_mapSession.Clear();
     Close();
 }
コード例 #7
0
ファイル: FSPManager.cs プロジェクト: zj831007/SGF
 public void Clean()
 {
     Debuger.Log();
     m_mapGame.Clear();
 }
コード例 #8
0
        /// <summary>
        /// Method attempts to order the maplist against a rough outline
        /// </summary>
        public void PerformOrdering()
        {
            // Rough idea of ordering
            // non-matches should be placed at the end
            CustomOrdering = new List <string>
            {
                "UP ↑",
                "DOWN ↓",
                "LEFT ←",
                "RIGHT →",

                "Left Stick UP ↑",
                "Left Stick DOWN ↓",
                "Left Stick LEFT ←",
                "Left Stick RIGHT →",
                "Left Stick, Button(L3)",

                "Right Stick UP ↑",
                "Right Stick DOWN ↓",
                "Right Stick LEFT ←",
                "Right Stick RIGHT →",
                "Right Stick, Button(R3)",

                "D-Pad UP ↑",
                "D-Pad DOWN ↓",
                "D-Pad LEFT ←",
                "D-Pad RIGHT →",

                "Analog UP ↑",
                "Analog DOWN ↓",
                "Analog LEFT ←",
                "Analog RIGHT →",

                "Stick FORE",
                "Stick BACK",
                "Stick LEFT",
                "Stick RIGHT",

                "L Stick FORE",
                "L Stick BACK",
                "L Stick LEFT",
                "L Stick RIGHT",
                "L Throttle Up",
                "L Throttle Down",

                "R Stick FORE",
                "R Stick BACK",
                "R Stick LEFT",
                "R Stick RIGHT",
                "R Throttle Up",
                "R Throttle Down",

                "X1(X UP ↑)",
                "X3(X DOWN ↓)",
                "X4(X LEFT ←)",
                "X2(X RIGHT →)",
                "Y1(Y UP ↑)",
                "Y3(Y DOWN ↓)",
                "Y4(Y LEFT ←)",
                "Y2(Y RIGHT →)",

                "Throttle Up",
                "Throttle Down",

                "L Gear Shift",
                "R Gear Shift",

                "Motion Up",
                "Motion Down",
                "Motion Left",
                "Motion Right",

                "A",
                "B",
                "C",

                "X",
                "Y",
                "Z",

                "Button 1",
                "Button 2",
                "Button 3",
                "Button 4",
                "Button 5",
                "Button 6",

                "I",
                "II",
                "III",
                "IV",
                "V",
                "VI",

                "I (Analog)",
                "II (Analog)",

                "△ (upper)",
                "○ (right)",
                "x (lower)",
                "□ (left)",

                "Fire 1/Start",
                "Fire 2",

                "Offscreen Shot",
                "Cursor",
                "Trigger",
                "Turbo",

                "SHOULDER L",
                "SHOULDER R",

                "Left Shoulder",
                "Right Shoulder",

                "Left-Back",
                "Right-Back",

                "L",
                "R",

                "L1 (front left shoulder)",
                "R1 (front right shoulder)",
                "L2 (rear left shoulder)",
                "R2 (rear right shoulder)",

                "Twist ↑|↓ (Analog, Turn Left)",
                "Twist ↓|↑ (Analog, Turn Right)",

                "Left Button",
                "Middle Button",
                "Right Button",

                "Away Trigger",
                "Trigger",
                "X Axis",
                "Y Axis",

                "SELECT",
                "START",
                "PAUSE",
                "MODE",
                "RUN",
                "Analog(mode toggle)",

                "Autofire Speed",

                "A AF",
                "B AF",
                "C AF",
                "X AF",
                "Y AF",
                "Z AF",
                "L AF",
                "R AF",

                "Rapid A",
                "Rapid B",
                "Rapid C",

                "Rapid X",
                "Rapid Y",
                "Rapid Z",

                "Rapid Button 1",
                "Rapid Button 2",
                "Rapid Button 3",
                "Rapid Button 4",
                "Rapid Button 5",
                "Rapid Button 6",

                "Rapid △",
                "Rapid ○",
                "Rapid x",
                "Rapid □",

                "Rapid Fire 1/Start",
                "Rapid Fire 2",

                "Rapid I",
                "Rapid II",

                "Tilt: UP ↑",
                "Tilt: DOWN ↓",
                "Tilt: LEFT ←",
                "Tilt: RIGHT →",

                "1",
                "2,",
                "3,",
                "4,",
                "5,",
                "6,",
                "7,",
                "8,",
                "9,",
                "10,",
                "11,",
                "12,",
                "13,",
                "14,",
                "15,",
                "16,",
                "17,",
                "18,",
                "19,",
                "20,",
            };


            // get a copy of the map list
            List <Mapping> working = MapList.ToList();

            // destructive copy
            List <Mapping> leftover = new List <Mapping>();

            List <Mapping> final = new List <Mapping>();

            // iterate through the sorting list
            foreach (var s in CustomOrdering)
            {
                // attempt to find matches - exact first
                var map = working.Where(a => a.Description.ToLower() == s.ToLower()).ToList();

                if (map.Count == 1)
                {
                    // exact match found
                    final.Add(map.First());
                    working.Remove(map.First());
                    continue;
                }

                // now try partial match
                var mapP = working.Where(a => a.Description.ToLower().StartsWith(s.ToLower() + " ")).ToList();

                if (mapP.Count == 1)
                {
                    // 1 entry
                    final.Add(mapP.First());
                    working.Remove(mapP.First());
                    continue;
                }
                if (mapP.Count > 1)
                {
                    // multiples found - for now add them all
                    final.AddRange(mapP);
                    foreach (var m in mapP)
                    {
                        working.Remove(m);
                    }

                    continue;
                }
            }

            // at this point all that are remaining should be added
            final.AddRange(working);

            MapList.Clear();
            MapList = final;
        }
コード例 #9
0
 public void Clean()
 {
     this.Log();
     m_mapSession.Clear();
     Close();
 }