void OpenVehicleSpawnMenu()
    {
        ListMenu VehicleMenu = new ListMenu("Spawn Vehicle");

        VehicleMenu.Add("Infernus", "A fast car");
        VehicleMenu.Add("LAZER", "A military jet");
        VehicleMenu.Add("BMX", "A bike");
        VehicleMenu.Add("Jetpack", "CLASSIFIED");
        View.AddMenu(VehicleMenu);
    }
Esempio n. 2
0
 public void SetupMenu()
 {
     if (!App.Login)
     {
         ListMenu.Clear();
         ListMenu.Add(new Models.Menu()
         {
             Tag   = "LOGIN",
             Title = "Login",
             Icon  = ""
         });
         ListMenu.Add(new Models.Menu()
         {
             Tag   = "TOP",
             Title = "TOP 50",
             Icon  = ""
         });
     }
     else
     {
         ListMenu.Clear();
         ListMenu.Add(new Models.Menu()
         {
             Tag   = "TOP",
             Title = "TOP 50",
             Icon  = ""
         });
     }
 }
Esempio n. 3
0
        //メニュー取得
        public ListMenu GetListMenu()
        {
            var mainMenu = new ListMenu();

            foreach (var a in Ar)
            {
                var nameTag = string.Format("Tool_{0}", a.NameTag);
                mainMenu.Add(new OneMenu(nameTag, a.JpMenu, a.EnMenu, a.Mnemonic, Keys.None));
            }
            return(mainMenu);
        }
Esempio n. 4
0
 public void SelectedTabViewCommandExecuted(int index)
 {
     try
     {
         ListMenu.Clear();
         if (index == 0)
         {
             //breakfast
             ListMenu.Add(new FoodModel
             {
                 Url         = "https://upload.wikimedia.org/wikipedia/commons/f/f7/Eggs%2C_parmesan_and_carrots_with_cream.jpeg",
                 Description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
                 Name        = "Egg Toast",
                 Price       = "$30"
             });
             ListMenu.Add(new FoodModel
             {
                 Url         = "https://upload.wikimedia.org/wikipedia/commons/f/f7/Eggs%2C_parmesan_and_carrots_with_cream.jpeg",
                 Description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
                 Name        = "Egg Toast",
                 Price       = "$30"
             });
             ListMenu.Add(new FoodModel
             {
                 Url         = "https://upload.wikimedia.org/wikipedia/commons/f/f7/Eggs%2C_parmesan_and_carrots_with_cream.jpeg",
                 Description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
                 Name        = "Egg Toast",
                 Price       = "$30"
             });
             ListMenu.Add(new FoodModel
             {
                 Url         = "https://upload.wikimedia.org/wikipedia/commons/f/f7/Eggs%2C_parmesan_and_carrots_with_cream.jpeg",
                 Description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
                 Name        = "Egg Toast",
                 Price       = "$30"
             });
             ListMenu.Add(new FoodModel
             {
                 Url         = "https://upload.wikimedia.org/wikipedia/commons/f/f7/Eggs%2C_parmesan_and_carrots_with_cream.jpeg",
                 Description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
                 Name        = "Egg Toast",
                 Price       = "$30"
             });
             ListMenu.Add(new FoodModel
             {
                 Url         = "https://upload.wikimedia.org/wikipedia/commons/f/f7/Eggs%2C_parmesan_and_carrots_with_cream.jpeg",
                 Description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
                 Name        = "Egg Toast",
                 Price       = "$30"
             });
         }
         else if (index == 1)
         {
             //sandwiches
             ListMenu.Add(new FoodModel
             {
                 Url         = "https://www.ciafoodies.com/wp-content/uploads/2019/10/PM_20161005_AP_11-1024x767.jpg",
                 Description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
                 Name        = "Sandwiches",
                 Price       = "$50"
             });
             ListMenu.Add(new FoodModel
             {
                 Url         = "https://www.ciafoodies.com/wp-content/uploads/2019/10/PM_20161005_AP_11-1024x767.jpg",
                 Description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
                 Name        = "Sandwiches",
                 Price       = "$50"
             });
             ListMenu.Add(new FoodModel
             {
                 Url         = "https://www.ciafoodies.com/wp-content/uploads/2019/10/PM_20161005_AP_11-1024x767.jpg",
                 Description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
                 Name        = "Sandwiches",
                 Price       = "$50"
             });
             ListMenu.Add(new FoodModel
             {
                 Url         = "https://www.ciafoodies.com/wp-content/uploads/2019/10/PM_20161005_AP_11-1024x767.jpg",
                 Description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
                 Name        = "Sandwiches",
                 Price       = "$50"
             });
             ListMenu.Add(new FoodModel
             {
                 Url         = "https://www.ciafoodies.com/wp-content/uploads/2019/10/PM_20161005_AP_11-1024x767.jpg",
                 Description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
                 Name        = "Sandwiches",
                 Price       = "$50"
             });
             ListMenu.Add(new FoodModel
             {
                 Url         = "https://www.ciafoodies.com/wp-content/uploads/2019/10/PM_20161005_AP_11-1024x767.jpg",
                 Description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
                 Name        = "Sandwiches",
                 Price       = "$50"
             });
             ListMenu.Add(new FoodModel
             {
                 Url         = "https://www.ciafoodies.com/wp-content/uploads/2019/10/PM_20161005_AP_11-1024x767.jpg",
                 Description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
                 Name        = "Sandwiches",
                 Price       = "$50"
             });
         }
         else if (index == 2)
         {
             //salads
             ListMenu.Add(new FoodModel
             {
                 Url         = "https://www.budgetbytes.com/wp-content/uploads/2018/07/Build-Cobb-Salads-Step-3.jpg",
                 Description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
                 Name        = "Salads",
                 Price       = "$70"
             });
             ListMenu.Add(new FoodModel
             {
                 Url         = "https://www.budgetbytes.com/wp-content/uploads/2018/07/Build-Cobb-Salads-Step-3.jpg",
                 Description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
                 Name        = "Salads",
                 Price       = "$70"
             });
             ListMenu.Add(new FoodModel
             {
                 Url         = "https://www.budgetbytes.com/wp-content/uploads/2018/07/Build-Cobb-Salads-Step-3.jpg",
                 Description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
                 Name        = "Salads",
                 Price       = "$70"
             });
             ListMenu.Add(new FoodModel
             {
                 Url         = "https://www.budgetbytes.com/wp-content/uploads/2018/07/Build-Cobb-Salads-Step-3.jpg",
                 Description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
                 Name        = "Salads",
                 Price       = "$70"
             });
             ListMenu.Add(new FoodModel
             {
                 Url         = "https://www.budgetbytes.com/wp-content/uploads/2018/07/Build-Cobb-Salads-Step-3.jpg",
                 Description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
                 Name        = "Salads",
                 Price       = "$70"
             });
             ListMenu.Add(new FoodModel
             {
                 Url         = "https://www.budgetbytes.com/wp-content/uploads/2018/07/Build-Cobb-Salads-Step-3.jpg",
                 Description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
                 Name        = "Salads",
                 Price       = "$70"
             });
             ListMenu.Add(new FoodModel
             {
                 Url         = "https://www.budgetbytes.com/wp-content/uploads/2018/07/Build-Cobb-Salads-Step-3.jpg",
                 Description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
                 Name        = "Salads",
                 Price       = "$70"
             });
             ListMenu.Add(new FoodModel
             {
                 Url         = "https://www.budgetbytes.com/wp-content/uploads/2018/07/Build-Cobb-Salads-Step-3.jpg",
                 Description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
                 Name        = "Salads",
                 Price       = "$70"
             });
         }
     }
     catch (Exception ex)
     {
     }
 }
Esempio n. 5
0
        /*
         *      //DLLを検索し、各オプションを生成する
         *      //Ver5.2.4 関係ない*Server.dll以外は、対象外とする
         *      //var list = Directory.GetFiles(kernel.ProgDir(), "*.dll").ToList();
         *      var list = Directory.GetFiles(kernel.ProgDir(), "*Server.dll").ToList();
         *      list.Sort();
         *      //foreach (var path in Directory.GetFiles(kernel.ProgDir(), "*.dll")) {
         *      foreach (var path in list) {
         *
         *          //テスト時の関連DLLを読み飛ばす
         *          if (path.IndexOf("TestDriven") != -1)
         *              continue;
         *
         *          string nameTag = Path.GetFileNameWithoutExtension(path);
         *
         *          //DLLバージョン確認
         *          var vi = FileVersionInfo.GetVersionInfo(path);
         *          if (vi.FileVersion != Define.ProductVersion()) {
         *              throw new Exception(string.Format("A version of DLL is different [{0} {1}]", nameTag, vi.FileVersion));
         *          }
         *
         *          if (nameTag == "WebServer") {
         *              var op = (OneOption)Util.CreateInstance(kernel, path, "OptionVirtualHost", new object[] { kernel, path, "VirtualHost" });
         *              if (Add(op)) {
         *                  //WebServerの場合は、バーチャルホストごとに1つのオプションを初期化する
         *                  foreach (var o in (Dat)op.GetValue("hostList")) {
         *                      if (o.Enable) {
         *                          string name = string.Format("Web-{0}:{1}", o.StrList[1], o.StrList[2]);
         *                          Add((OneOption)Util.CreateInstance(kernel, path, "Option", new object[] { kernel, path, name }));
         *                      }
         *                  }
         *              }
         *          } else if (nameTag == "TunnelServer") {
         *              //TunnelServerの場合は、1トンネルごとに1つのオプションを初期化する
         *              var op = (OneOption)Util.CreateInstance(kernel, path, "OptionTunnel", new object[] { kernel, path, "TunnelList" });
         *              if (Add(op)) {
         *                  //トンネルのリスト
         *                  foreach (var o in (Dat)op.GetValue("tunnelList")) {
         *                      if (o.Enable) {
         *
         *                          //int protocol = (int)o[0].Obj;//プロトコル
         *                          //int port = (int)o[1].Obj;//クライアントから見たポート
         *                          //string targetServer = (string)o[2].Obj;//接続先サーバ
         *                          //int targetPort = (int)o[3].Obj;//接続先ポート
         *                          string name = string.Format("{0}:{1}:{2}:{3}", (o.StrList[0] == "0") ? "TCP" : "UDP", o.StrList[1], o.StrList[2], o.StrList[3]);
         *                          Add((OneOption)Util.CreateInstance(kernel, path, "Option", new object[] { kernel, path, "Tunnel-" + name }));
         *                      }
         *                  }
         *              }
         *          } else {  //上記以外
         *              //DLLにclass Optionが含まれていない場合、Util.CreateInstanceはnulllを返すため、以下の処理はスキップされる
         *              if (Add((OneOption)Util.CreateInstance(kernel, path, "Option", new object[] { kernel, path, nameTag }))) {
         *                  //DnsServerがリストされている場合 ドメインリソースも追加する
         *                  if (nameTag == "DnsServer") {
         *                      var o = (OneOption)Util.CreateInstance(kernel, path, "OptionDnsDomain", new object[] { kernel, path, "DnsDomain" });
         *                      if (Add(o)) {
         *                          foreach (var e in (Dat)o.GetValue("domainList")) {
         *                              if (e.Enable) {
         *                                  Add((OneOption)Util.CreateInstance(kernel, path, "OptionDnsResource", new object[] { kernel, path, "Resource-" + e.StrList[0] }));
         *                              }
         *                          }
         *                      }
         *                  }else if (nameTag == "SmtpServer") {
         #if ML_SERVER
         *                      var o = (OneOption)Util.CreateInstance(kernel,path, "OptionMl", new object[] { kernel, path, "Ml" });
         *                      if (Add(o)) {
         *                          foreach (var e in (Dat)o.GetValue("mlList")) {
         *                              if (e.Enable) {
         *                                  Add((OneOption)Util.CreateInstance(kernel,path, "OptionOneMl", new object[] { kernel, path, "Ml-" + e.StrList[0] }));
         *                              }
         *                          }
         *                      }
         #endif
         *                  }
         *              }
         *          }
         *      }
         *      //SmtpServer若しくはPopServerがリストされている場合、MailBoxを生成する
         *      if (Get("SmtpServer")!=null || Get("PopServer")!=null){
         *          Add(new OptionMailBox(kernel, Application.ExecutablePath, "MailBox"));//メールボックス
         *      }
         *
         *      }
         */


        /**
         * メニュー取得
         * @return
         */

        public ListMenu GetListMenu()
        {
            var      mainMenu    = new ListMenu();
            ListMenu webMenu     = null;
            ListMenu dnsMenu     = null;
            ListMenu mailMenu    = null;
            ListMenu proxyMenu   = null;
            int      countTunnel = 0;

            foreach (var a in Ar)
            {
                var menu = mainMenu;

                if (a.NameTag == "Dns")
                {
                    var m = new OneMenu("Option_DnsServer0", "DNSサーバ", "DNS Server", 'D', Keys.None);
                    mainMenu.Add(m);
                    dnsMenu   = new ListMenu();
                    m.SubMenu = dnsMenu;
                    menu      = dnsMenu;
                }
                else if (a.NameTag == "DnsDomain" || a.NameTag.IndexOf("Resource-") == 0)
                {
                    if (dnsMenu != null && dnsMenu.Count == 1)
                    {
                        dnsMenu.Add(new OneMenu()); //セパレータ
                    }
                    if (dnsMenu != null)
                    {
                        menu = dnsMenu;
                    }
                }
                else if (a.NameTag == "Ml" || a.NameTag.IndexOf("Ml-") == 0)
                {
                    if (mailMenu != null && mailMenu.Count == 3)
                    {
                        mailMenu.Add(new OneMenu());//セパレータ
                    }
                    menu = mailMenu;
                }
                else if (a.NameTag == "Pop3" || a.NameTag == "Smtp")
                {
                    if (mailMenu == null)
                    {
                        var m = mainMenu.Add(new OneMenu("Option_MailServer0", "メールサーバ", "Mail Server", 'M', Keys.None));
                        mailMenu  = new ListMenu();
                        m.SubMenu = mailMenu;
                    }
                    menu = mailMenu;
                }
                else if (a.NameTag.IndexOf("Proxy") == 0 || a.NameTag == "TunnelList")
                {
                    if (proxyMenu == null)
                    {
                        var m = mainMenu.Add(new OneMenu("Option_Proxy", "プロキシサーバ", "Proxyl Server", 'P', Keys.None));
                        proxyMenu = new ListMenu();
                        m.SubMenu = proxyMenu;
                    }
                    menu = proxyMenu;
                }
                else if (a.NameTag == "VirtualHost")
                {
                    OneMenu m = mainMenu.Add(new OneMenu("Option_WebServer0", "Webサーバ", "Web Server", 'W', Keys.None));
                    webMenu   = new ListMenu();
                    m.SubMenu = webMenu;
                    menu      = webMenu;
                }
                else if (a.NameTag.IndexOf("Web-") == 0)
                {
                    if (webMenu != null && (webMenu.Count == 1))
                    {
                        webMenu.Add(new OneMenu()); // セパレータ
                    }
                    menu = webMenu;
                }
                else if (a.NameTag.IndexOf("Tunnel-") == 0)
                {
                    if (countTunnel == 0)
                    {
                        if (proxyMenu != null)
                        {
                            proxyMenu.Add(new OneMenu()); // セパレータ
                        }
                    }
                    countTunnel++;
                    menu = proxyMenu;
                }

                String nameTag = string.Format("Option_{0}", a.NameTag);

                if (a.NameTag == "MailBox")
                {
                    if (mailMenu != null)
                    {
                        mailMenu.Insert(0, new OneMenu()); // セパレータ
                        //mailMenu.Insert(0, new OneMenu(nameTag, a.JpMenu, a.EnMenu, a.Mnemonic,Keys.None));
                        mailMenu.Insert(0, new OneMenu(nameTag, a.MenuStr, a.MenuStr, a.Mnemonic, Keys.None));
                    }
                }
                else
                {
                    //menu.Add(new OneMenu(nameTag, a.JpMenu, a.EnMenu, a.Mnemonic, Keys.None));
                    menu.Add(new OneMenu(nameTag, a.MenuStr, a.MenuStr, a.Mnemonic, Keys.None));
                }
            }
            return(mainMenu);
        }
Esempio n. 6
0
 //「起動/停止」のサブメニュー
 private ListMenu StartStopMenu()
 {
     ListMenu subMenu = new ListMenu();
     subMenu.Add(new OneMenu("StartStop_Start", "サーバ起動", "Start", 'S', Keys.None));
     subMenu.Add(new OneMenu("StartStop_Stop", "サーバ停止", "Stop", 'P', Keys.None));
     subMenu.Add(new OneMenu("StartStop_Restart", "サーバ再起動", "Restart", 'R', Keys.None));
     subMenu.Add(new OneMenu("StartStop_Service", "サービス設定", "Service", 'S', Keys.None));
     return subMenu;
 }
Esempio n. 7
0
 //「ヘルプ」のサブメニュー
 private ListMenu HelpMenu()
 {
     ListMenu subMenu = new ListMenu();
     subMenu.Add(new OneMenu("Help_Homepage", "ホームページ", "HomePage", 'H', Keys.None));
     subMenu.Add(new OneMenu("Help_Document", "ドキュメント", "Document", 'D', Keys.None));
     subMenu.Add(new OneMenu("Help_Support", "サポート掲示板", "Support", 'S', Keys.None));
     subMenu.Add(new OneMenu("Help_Version", "バージョン情報", "Version", 'V', Keys.None));
     return subMenu;
 }
Esempio n. 8
0
 //「ファイル」のサブメニュー
 private ListMenu FileMenu()
 {
     ListMenu subMenu = new ListMenu();
     subMenu.Add(new OneMenu("File_LogClear", "ログクリア", "Loglear", 'C', Keys.F1));
     subMenu.Add(new OneMenu("File_LogCopy", "ログコピー", "LogCopy", 'L', Keys.F2));
     subMenu.Add(new OneMenu("File_Trace", "トレース表示", "Trace", 'T', Keys.None));
     subMenu.Add(new OneMenu()); // セパレータ
     subMenu.Add(new OneMenu("File_Exit", "終了", "Exit", 'X', Keys.None));
     return subMenu;
 }