Example #1
0
    public async void Deconnecter()
    {
        menu = MenuLoader.instance;
        await RequetteAsyncDeconnecter();

        menu.Deconnecter();
    }
Example #2
0
        private void method_8()
        {
            FormSplashHelper.MsgWait("正在准备系统主界面...");
            base.WindowState = FormWindowState.Maximized;
            Rectangle rectangle = PropertyUtil.GetRectangle("Site", new Rectangle(10, 10, base.Width, base.Height));

            rectangle.X              = (rectangle.X < 100) ? 0 : rectangle.X;
            rectangle.Y              = (rectangle.Y < 100) ? 0 : rectangle.Y;
            base.StartPosition       = FormStartPosition.Manual;
            base.Bounds              = rectangle;
            base.FormClosing        += new FormClosingEventHandler(this.NormalMainForm_FormClosing);
            this.navigatePage_0      = new NavigatePage();
            this.navigatePage_0.Dock = DockStyle.Left;
            base.Controls.Add(this.navigatePage_0);
            TreeLoader.Load(this.navigatePage_0, this.dockPanel1, "/Aisino/Tree", false);
            this.navigateToolScrip_0      = new NavigateToolScrip();
            this.navigateToolScrip_0.Dock = DockStyle.Top;
            base.Controls.Add(this.navigateToolScrip_0);
            this.navigateToolScrip_0.Load(this.method_9("1"), this.navigatePage_0.Nodes);
            this.navigateToolScrip_0.ItemAdd += new EventHandler(this.navigateToolScrip_0_ItemAdd);
            this.contextMenuStrip_0           = new ContextMenuStrip();
            MenuLoader.Load(this.contextMenuStrip_0.Items, this.dockPanel1, "/Aisino/Menu");
            if (this.contextMenuStrip_0.Items.Count > 0)
            {
                base._menu = this.contextMenuStrip_0;
            }
            base.Controls.Add(base.statusStrip1);
            FormSplashHelper.MsgWait();
        }
Example #3
0
        public ActionResult Menu()
        {
            var uId        = UserInfo.Uid;
            var rId        = UserInfo.UserRid;
            var menuLoader = new MenuLoader();
            var model      = menuLoader.Load(uId, rId).ToList();

            return(PartialView("_Menu", model));
        }
Example #4
0
    public void Click()
    {
        GameObject    eventTrigger = GameObject.FindGameObjectWithTag("Menu.Trigger");
        MenuLoader    ml           = eventTrigger.GetComponent <MenuLoader>();
        DataStructure dt;

        dt.color = color.posibleColor;
        Color a;

        Debug.Log(dt.color);
        switch (dt.color)
        {
        case ColorPicker.PossibleColor.Red:
            a = Color.red;
            break;

        case ColorPicker.PossibleColor.Green:
            a = Color.green;
            break;

        case ColorPicker.PossibleColor.Yellow:
            a = Color.yellow;
            break;

        case ColorPicker.PossibleColor.Orange:
            a = Color.Lerp(Color.red, Color.yellow, .5f);
            break;

        case ColorPicker.PossibleColor.Blue:
            a = Color.blue;
            break;

        case ColorPicker.PossibleColor.Cyan:
            a = Color.cyan;
            break;

        case ColorPicker.PossibleColor.White:
            a = Color.white;
            break;

        case ColorPicker.PossibleColor.Black:
            a = Color.black;
            break;

        case ColorPicker.PossibleColor.Gray:
            a = Color.gray;
            break;

        default:
            a = Color.white;
            break;
        }
        dt.colorUI = a;
        dt.text    = input.text;
        ml.AddItem(dt);
        field.Close();
    }
Example #5
0
    void loadData()
    {
        GameObject loaderobj = GameObject.FindWithTag("Loader");

        Loader    = loaderobj.GetComponent <MenuLoader> ();
        amplitude = Loader.Amplitude;
        frequency = Loader.Frequency;
        ymult     = Loader.YMult;
        rendDist  = Loader.ViewDistance;
    }
    void Start()
    {
        seed = MakeSeed();
        GameObject loaderobj = GameObject.FindWithTag("Loader");

        Loader = loaderobj.GetComponent <MenuLoader> ();

        MapSize  = Loader.MapSize;
        distance = Loader.ViewDistance;

        //Map_Gen map = Origin.GetComponent<Map_Gen>();

        currentX = 0;         //player cords
        currentZ = 0;

        //grid[0,0] = Origin;

        //makeGround(0,0); //generate starting zone

        LodScreen.OutOf = (MapSize + MapSize) * (MapSize + MapSize);

        /*
         * for (int z = -MapSize; z <= MapSize; z++)
         * {
         *      for (int x = -MapSize; x <= MapSize; x++)
         *      {
         *              chonk(x,z);
         *              LodScreen.Current++;
         *              //StartCoroutine(Example(x,z));
         *      }
         * }
         */

        StartCoroutine(StartingChunks());


        lastX = 0;         //when ground was last generated
        lastZ = 0;



        currentX = Player.transform.position.x / 100f;
        currentZ = Player.transform.position.z / 100f;

        distX = lastX - currentX;
        distZ = lastZ - currentZ;

        /*for(int i = 1; i < 25;i++){
         *      chonk(-1,i);
         *      chonk(0,i);
         *      chonk(1,i);
         * }*/

        //makeGround(Mathf.RoundToInt(currentX),Mathf.RoundToInt(currentZ));
    }
Example #7
0
    void LoadInts()
    {
        GameObject loaderobj = GameObject.FindWithTag("Loader");

        Loader      = loaderobj.GetComponent <MenuLoader> ();
        trees       = Loader.Trees;
        small_rocks = Loader.Rocks;
        flints      = Loader.Flints;
        logs        = Loader.Logs;
        busheses    = Loader.Bushes;
    }
Example #8
0
 /// <summary>
 /// Загрузка главного меню игры.
 /// </summary>
 protected void LoadMenu()
 {
     Model = MenuLoader.Load();
     if (View != null)
     {
         View.SendCameraSizeDelegateSending(Model.SetCameraSize);
         View.SendCameraSizeToModel();
     }
     Model.ModelLogic.LoadAnotherModel += LoadAnotherModel;
     ((MenuLogic)Model.ModelLogic).CloseApplication += CloseApplication;
 }
Example #9
0
    // Start is called before the first frame update
    void Start()
    {
        if (instance == null)
        {
            instance = this;
        }

        menuLoader             = FindObjectOfType <MenuLoader>();
        createAccInfoText.text = "";
        loginAccInfoText.text  = "";
        Enjin.SDK.Core.Enjin.StartPlatform(PLATFORM_URL, APP_ID, APP_SECRET);
        LoginAdmin();
    }
Example #10
0
    // Start is called before the first frame update
    void Start()
    {
        menuLoader     = FindObjectOfType <MenuLoader>();
        spriteHandler  = FindObjectOfType <SpriteHandler>();
        rb             = GetComponent <Rigidbody2D>();
        spriteRenderer = GetComponent <SpriteRenderer>();

        //need to check which skin the player picked on menu screen
        //create a class that manages sprites (SpriteManager), make a static class object internally (see AccountManager as example), then use this to determine what the player sprite should be upon start
        //OR just use WalletManager to manage checks for wallet balance specific to the skin token id
        spriteRenderer.sprite = playSkins[spriteHandler.GetActiveSkinIndex()];

        screenWidth = Screen.width;
    }
Example #11
0
        public bool LoadGameInitialization(Ruleset ruleset, string saveFileName)
        {
            var rules = RulesParser.ParseRules(ruleset);

            CityLoader.LoadCities(ruleset);

            MenuLoader.LoadMenus(ruleset);
            // Read SAV file & RULES.txt
            CurrentPlayer = new LocalPlayer(this);

            ClassicSaveLoader.LoadSave(ruleset, saveFileName, rules, CurrentPlayer);
            Images.LoadGraphicsAssetsFromFiles(ruleset, rules);
            //ViewPiece.ActiveXY = gameData.ActiveCursorXY;
            return(true);
        }
Example #12
0
        private void SetupOrders(Game instance)
        {
            var improvements = instance.TerrainImprovements.Values;

            var orderText = MenuLoader.For("ORDERS");

            Orders = improvements.Select(i =>
                                         new ImprovementOrder(i, this, instance, orderText.FirstOrDefault(mi => string.Equals(mi.Shortcut, i.Shortcut, StringComparison.InvariantCultureIgnoreCase)))).Cast <Order>()
                     .ToList();

            Orders.Add(new BuildCity(this, orderText.First(mi => mi.Shortcut == "b").MenuText, instance));
            Orders.Add(new PillageOrder(this, orderText.First(mi => mi.Shortcut == "Shift+P").MenuText, instance));
            Orders.Add(new FortifyOrder(this, orderText.Last(mi => mi.Shortcut == "f").MenuText, instance));
            Orders.Add(new SkipOrder(this, orderText.First(mi => mi.Shortcut == "SPACE").MenuText, instance));
            Orders.Add(new WaitOrder(this, orderText.First(mi => mi.Shortcut == "w").MenuText, instance));
            Orders.Add(new UnloadOrder(this, orderText.First(mi => mi.Shortcut == "u").MenuText));
            Orders.Add(new SleepOrder(this, orderText.First(mi => mi.Shortcut == "s").MenuText, instance));
            Orders.Add(new GotoOrder(this, orderText.First(mi => mi.Shortcut == "g").MenuText, instance));

            UpdateOrders(CurrentPlayer.ActiveTile, CurrentPlayer.ActiveUnit);
        }
Example #13
0
        internal static bool StartPreMade(Main mainForm, Ruleset ruleset, string mapFileName)
        {
            Labels.UpdateLabels(ruleset);
            MenuLoader.LoadMenus(ruleset);
            CityLoader.LoadCities(ruleset);
            var config = new GameInitializationConfig {
                RuleSet = ruleset
            };

            config.PopUps = PopupBoxReader.LoadPopupBoxes(config.RuleSet.Root);
            try
            {
                PopupBox CorrectedPopup(string popupId)
                {
                    var popUp = config.PopUps[popupId];

                    if (popUp.Options != null && popUp.Options.Count != 0)
                    {
                        return(popUp);
                    }
                    popUp.Options = new[] { popUp.Text[^ 2], popUp.Text[^ 1] };
    void RayDown()
    {
        transform.position += new Vector3(0f, 20, 0f);

        RaycastHit hit;

        if (Physics.Raycast(transform.position, new Vector3(0, -90, 0), out hit, 150))
        {
            transform.position = hit.point;
        }

        try{
            GameObject loaderobj = GameObject.FindWithTag("Loader");
            Loader = loaderobj.GetComponent <MenuLoader> ();
        }catch {}

        if (Loader != null)
        {
            fov = Loader.FOV;
        }
    }
Example #15
0
        /// <summary>
        /// Initializing the menu items
        /// </summary>
        /// <returns></returns>
        private bool InitializeMenu()
        {
            try
            {
                string      maintoolbarResource = ApplicationMain.manifestNamespace + "DefaultToolbarItems.xml";
                string      menuResource        = ApplicationMain.manifestNamespace + "DefaultMenuItems.xml";
                FactoryType ft;
#if SyncfusionFramework2_0
                ft = FactoryType.WhidbeyMenuFactory;
#else
                ft = FactoryType.WinFormsMenuFactory;
#endif
                menuFactory = MenuLoader.CreateFactory(ft, ApplicationMain.menuNamespace, new string[] { maintoolbarResource },
                                                       new string[] { menuResource }, ApplicationMain.IconResources, this);

                if (menuFactory.ToolBars != null)
                {
                    this.Controls.AddRange(menuFactory.ToolBars as Control[]);
                }

                if (menuFactory.Menus != null)
                {
                    if (typeof(Menu).IsInstanceOfType(menuFactory.Menus[0]))
                    {
                        Menu = menuFactory.Menus[0] as MainMenu;
                    }
                    else
                    {
                        this.Controls.Add(menuFactory.Menus[0] as Control);
                    }
                }
            }
            catch (Exception ex)
            {
                Trace.WriteLine("Unable to create menu factory due to the following error:");
                Trace.WriteLine(ex.ToString());
                return(false);
            }
            return(true);
        }
Example #16
0
        private void FBMainWindow_Load(object sender, EventArgs e)
        {
            // Заголовок окна.
            Text = Core.Instance.CurrentTranslator["FlowchartBuilder_Caption"];

            // Если первый запуск, задаём дефолтные размеры.
            if (Core.Instance.IsFirstRun)
            {
                Left        = 50;
                Top         = 50;
                Width       = 800;
                Height      = 600;
                WindowState = FormWindowState.Maximized;
            }

            LoadWindowParamsFromRegistry();

            // Загружаем главное меню.
            MenuLoader.LoadMainMenu(this);

            // Загружаем вторичное меню.
            MenuLoader.LoadSecondaryMenu(this);

            // Создаём окно палитры глифов.
            Core.Instance.GetWindowAsChild <GlyphsForm>().Show();

            // Создаём окно свойств.
            Core.Instance.GetWindowAsChild <PropertiesForm>().Show();

            DocumentsTabs.SelectedTabChanged += (s, args) =>
            {
                var tab = DocumentsTabs.SelectedTab;

                // TODO: Exception?

                Core.Instance.SelectDocument(tab.Id);
            };
        }
Example #17
0
        void LoadDataCoverFlow()
        {
            List <object> listMenuItem = MenuLoader.LoadMenu(0);

            for (int i = 0; i < listMenuItem.Count; i++)
            {
                MenuItemLvl0 item  = (MenuItemLvl0)listMenuItem[i];
                Image        img   = new Image();
                BitmapImage  bmImg = new BitmapImage(new Uri(item.ImagePathDescription, UriKind.RelativeOrAbsolute));
                img.Source = bmImg;

                Button bt = new Button();
                bt.Width   = 600;
                bt.Height  = 307;
                bt.Margin  = new Thickness(0, 0, 0, 100);
                bt.Content = img;
                bt.Style   = App.Current.Resources["customButtonNoStyle"] as Style;
                listDataCoverFlow.Add(bt);
                bt.Click += new RoutedEventHandler(bt_Click);

                cbbModel.AddImage(listDataCoverFlow[i], new WriteableBitmap(0, 0).FromResource(item.ImagePath));
            }
        }
Example #18
0
    void Start()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != null)
        {
            Destroy(gameObject);
        }
        DontDestroyOnLoad(gameObject);

        OptionsPanel.SetActive(false);
        ConnexionPanel.SetActive(false);
        FormationPanel.SetActive(false);
        formation = new List <string>();

        data.VerifFichier();
        Component[] hingeJoints = OptionsPanel.GetComponentsInChildren <Slider>();
        hingeJoints[0].GetComponent <Slider>().value = data.GetSetSfx();
        hingeJoints[1].GetComponent <Slider>().value = data.GetVolume();

        if (data.Connecter())
        {
            PlayPanel.SetActive(true);
            MainMenuPanel.SetActive(false);
            son = SoundManager.instance;
            son.SetSfx(data.GetSetSfx());
            son.SetVolume(data.GetVolume());
        }
        else
        {
            MainMenuPanel.SetActive(true);
            PlayPanel.SetActive(false);
        }
    }
Example #19
0
        private void method_8()
        {
            FormSplashHelper.MsgWait("正在准备系统主界面...");
            base.WindowState = FormWindowState.Maximized;
            Rectangle rectangle = PropertyUtil.GetRectangle("Site", new Rectangle(10, 10, base.Width, base.Height));

            rectangle.X           = (rectangle.X < 100) ? 0 : rectangle.X;
            rectangle.Y           = (rectangle.Y < 100) ? 0 : rectangle.Y;
            base.StartPosition    = FormStartPosition.Manual;
            base.Bounds           = rectangle;
            base.FormClosing     += new FormClosingEventHandler(this.MDIMainForm_FormClosing);
            this.menuStrip_0      = new MenuStrip();
            this.menuStrip_0.Font = new Font("黑体", 10f);
            MenuLoader.Load(this.menuStrip_0.Items, this, "/Aisino/Menu");
            ToolStripMenuItem item2 = new ToolStripMenuItem {
                Name = "Menu_Help",
                Text = "帮助"
            };
            ToolStripMenuItem item3 = new ToolStripMenuItem {
                Name = "Menu_Online",
                Text = "在线支持"
            };

            item3.Click += new EventHandler(this.tsbOnline_Click);
            item2.DropDownItems.Add(item3);
            ToolStripMenuItem item4 = new ToolStripMenuItem {
                Name = "Menu_OnlineLogin",
                Text = "登录【增值税发票查询系统】"
            };

            item4.Click += new EventHandler(this.method_14);
            item2.DropDownItems.Add(item4);
            ToolStripMenuItem item5 = new ToolStripMenuItem {
                Name = "Menu_Help",
                Text = "帮助"
            };

            item5.Click += new EventHandler(this.tsbHelp_Click);
            item2.DropDownItems.Add(item5);
            ToolStripMenuItem item6 = new ToolStripMenuItem {
                Name = "Menu_AboutUS",
                Text = "关于"
            };

            item6.Click += new EventHandler(this.method_15);
            item2.DropDownItems.Add(item6);
            this.menuStrip_0.Items.Add(item2);
            if (this.menuStrip_0.Items.Count > 0)
            {
                base.Controls.Add(this.menuStrip_0);
                base.MainMenuStrip = this.menuStrip_0;
            }
            base.Controls.Add(base.statusStrip1);
            this.list_1.Add("Menu.Xtsz");
            this.list_1.Add("Menu.Xtsz.Bmgl");
            this.list_1.Add("Menu.Fpgl");
            this.list_1.Add("Menu.Fplygl");
            this.list_1.Add("Menu.Hzfp");
            this.list_1.Add("Menu.Bsgl");
            this.list_1.Add("Menu.Bsgl.Jskgl");
            this.list_1.Add("Menu.Bsgl.InvData");
            this.list_1.Add("Menu.Xtwh");
            this.list_1.Add("Menu.Wbjk");
            foreach (ToolStripItem item in this.menuStrip_0.Items)
            {
                item.Image = null;
                MenuLabel label = item as MenuLabel;
                if ((label != null) && this.list_1.Contains(label.FunctionID))
                {
                    this.list_0.Add(label.FunctionID);
                }
            }
            FormSplashHelper.MsgWait();
            this.tsbPublish.Visible = false;
            this.tsbPublish.Enabled = false;
        }
Example #20
0
 void Start()
 {
     menu = MenuLoader.instance;
 }
Example #21
0
 public async void FormationButon()
 {
     menu = MenuLoader.instance;
     await RequetteAsyncFormation(true);
 }
Example #22
0
 public MenusController(MenuLoader menuLoader)
 {
     _menuLoader = menuLoader;
 }
Example #23
0
    void Click()
    {
        Text txt = text.GetComponent <Text>();

        if (txt.text.Equals("Add"))
        {
            int width  = Screen.width;
            int height = Screen.height;
            if (popupVis == null || !popupVis.activeSelf)
            {
                popupVis = Instantiate <GameObject>(popup);
            }
            RectTransform rt2 = popupVis.GetComponent <RectTransform>();
            popupVis.transform.SetParent(printer.transform);
            //rt.sizeDelta = new Vector2(width / 4, (float)height / 1.5f);
            //rt.transform.position = new Vector3(width / 2, height / 2);
        }
        else
        {
            MenuLoader ml = GetComponent <MenuLoader>();
            for (var i = 0; i < 4; i++)
            {
                System.Array A = System.Enum.GetValues(typeof(ColorPicker.PossibleColor));
                ColorPicker.PossibleColor posibleColor = (ColorPicker.PossibleColor)A.GetValue(UnityEngine.Random.Range(0, A.Length));
                Color a;
                switch (posibleColor)
                {
                case ColorPicker.PossibleColor.Red:
                    a = Color.red;
                    break;

                case ColorPicker.PossibleColor.Green:
                    a = Color.green;
                    break;

                case ColorPicker.PossibleColor.Yellow:
                    a = Color.yellow;
                    break;

                case ColorPicker.PossibleColor.Orange:
                    a = Color.Lerp(Color.red, Color.yellow, .5f);
                    break;

                case ColorPicker.PossibleColor.Blue:
                    a = Color.blue;
                    break;

                case ColorPicker.PossibleColor.Cyan:
                    a = Color.cyan;
                    break;

                case ColorPicker.PossibleColor.White:
                    a = Color.white;
                    break;

                case ColorPicker.PossibleColor.Black:
                    a = Color.black;
                    break;

                case ColorPicker.PossibleColor.Gray:
                    a = Color.gray;
                    break;

                default:
                    a = Color.white;
                    break;
                }
                DataStructure dt;
                dt.color   = posibleColor;
                dt.colorUI = a;
                dt.text    = "Test";
                ml.AddItem(dt);
            }
            ml.Refresh();
        }
        txt.text = "Add";
    }
Example #24
0
	void Awake()
	{
		instance = this;
	}
Example #25
0
 private void Awake()
 {
     data = DataManager.GetInstance();
     menu = MenuLoader.instance;
 }