Exemplo n.º 1
0
 private void OnToPreferencesCommand()
 {
     try
     {
         _model.Validate();
         NextPage?.Invoke(this, null);
     } catch { }
 }
Exemplo n.º 2
0
 private void OnToRunCommand()
 {
     try
     {
         NextPage?.Invoke(this, null);
     }
     catch (Exception)
     {
     }
 }
Exemplo n.º 3
0
 public void PrintNextPage(PrintDocument Doc, PrintPageEventArgs ppea)
 {
     if (IsPreview)
     {
         ppea.HasMorePages = true;
         NewRow?.Invoke();
         return;
     }
     if (ppea.PageSettings.PrinterSettings.PrintRange == PrintRange.SomePages)
     {
         if (!PageInRange(ppea.PageSettings.PrinterSettings.FromPage, ppea.PageSettings.PrinterSettings.ToPage))
         {
             ppea.Graphics.Clear(Color.White);
             //doc_PrintPage(Doc, ppea);
             NextPage?.Invoke(Doc, ppea);
         }
         ppea.HasMorePages = PageNumber < ppea.PageSettings.PrinterSettings.ToPage;
         return;
     }
     ppea.HasMorePages = true;
 }
Exemplo n.º 4
0
 private void OnNextButtonPointerUp()
 {
     NextPage?.Invoke();
 }
Exemplo n.º 5
0
        protected override void OnMouseWheel(MouseEventArgs e)
        {
            Point pos = e.Location; // pnlPageContanier.PointToClient(e.Location);

            if (MouseInPage(pos))
            {
                int pointY = ScrollPosition.Y;
                if (e.Delta < 0)
                {
                    pointY = ScrollPosition.Y + 120 * PageBounds.Height / ViewBounds.Height / 6;
                }
                else if (e.Delta > 0)
                {
                    pointY = ScrollPosition.Y - 120 * PageBounds.Height / ViewBounds.Height / 6;
                }
                ScrollPosition = new Point(ScrollPosition.X, pointY);
                if (vsb.Maximum == 0)
                {
                    if (e.Delta < 0)
                    {
                        if (NextPage != null)
                        {
                            NextPage.Invoke(this);
                        }
                    }
                    else
                    {
                        if (PreviousPage != null)
                        {
                            PreviousPage.Invoke(this);
                        }
                    }
                }
                else
                {
                    if (vsb.Value == vsb.Maximum)
                    {
                        //GoNext
                        _deltasCount++;
                        if (_deltasCount > 1)
                        {
                            _deltasCount = 0;
                            if (NextPage != null)
                            {
                                bHasMorePagesD = NextPage.Invoke(this);
                            }
                            bHasMorePagesT = true;
                            if (bHasMorePagesD)
                            {
                                ScrollPosition = new Point(hsb.Value, 0);
                            }
                        }
                    }
                    if (vsb.Value == 0)
                    {
                        //GoNext
                        _deltasCount++;
                        if (_deltasCount > 1)
                        {
                            _deltasCount = 0;
                            //GoBack
                            if (PreviousPage != null)
                            {
                                bHasMorePagesT = PreviousPage.Invoke(this);
                            }
                            bHasMorePagesD = true;
                            if (bHasMorePagesT)
                            {
                                ScrollPosition = new Point(hsb.Value, vsb.Maximum);
                            }
                        }
                    }
                }
            }
            base.OnMouseWheel(e);
        }
Exemplo n.º 6
0
    /// <summary>
    /// Subscribing listeners to all other buttons.
    /// </summary>
    public static void SetReactionButtons()
    {
        Coroutines coroutines = GameObject.FindObjectOfType(typeof(Coroutines)) as Coroutines;

        GlobalSceneObjects.mainMenu.transform.Find("Content").Find("ButtonPlay").GetComponent <Button>().onClick.AddListener(delegate { StartGame.Invoke(); });
        GlobalSceneObjects.mainMenu.transform.Find("Content").Find("ButtonAboutUs").GetComponent <Button>().onClick.AddListener(delegate { AboutUs.Invoke(); });
        GlobalSceneObjects.mainMenu.transform.Find("Content").Find("ButtonWriteToUs").GetComponent <Button>().onClick.AddListener(delegate { WriteToUs.Invoke(); });
        GlobalSceneObjects.mainMenu.transform.Find("AchievmentButton").GetComponent <Button>().onClick.AddListener(delegate { Achievments.Invoke(); });
        GlobalSceneObjects.aboutUs.transform.Find("Frame").Find("Cross").GetComponent <Button>().onClick.AddListener(delegate { AboutUs.Exit(); });
        GlobalSceneObjects.aboutUs.transform.Find("Frame").Find("Table").Find("InstMadm1nd").GetComponent <Button>().onClick.AddListener(delegate { AboutUs.TransferURL(1); });
        GlobalSceneObjects.aboutUs.transform.Find("Frame").Find("Table").Find("InstPilgrim").GetComponent <Button>().onClick.AddListener(delegate { AboutUs.TransferURL(2); });
        GlobalSceneObjects.aboutUs.transform.Find("Frame").Find("Table").Find("CreditsButton").GetComponent <Button>().onClick.AddListener(delegate { AboutUs.TransferURL(3); });
        GlobalSceneObjects.aboutUs.transform.Find("Frame").Find("Table").Find("InstRaben_krausz").GetComponent <Button>().onClick.AddListener(delegate { AboutUs.TransferURL(4); });
        GlobalSceneObjects.aboutUs.transform.Find("Frame").Find("Table").Find("VKOleg").GetComponent <Button>().onClick.AddListener(delegate { AboutUs.TransferURL(5); });
        GlobalSceneObjects.writeToUs.transform.Find("Frame").Find("Cross").GetComponent <Button>().onClick.AddListener(delegate { WriteToUs.Exit(); });
        GlobalSceneObjects.achievmentsInCanvas.transform.Find("Frame").Find("Cross").GetComponent <Button>().onClick.AddListener(delegate { Achievments.Exit(); });
        GlobalSceneObjects.mainMenu.transform.Find("Sounds").GetComponent <Button>().onClick.AddListener(delegate { Sounds.Invoke(); SaveData.Save(); });
        GlobalSceneObjects.mainMenu.transform.Find("Language").Find("ButtonLanguageRus").GetComponent <Button>().onClick.AddListener(delegate { Language.SetRussian(); });
        GlobalSceneObjects.mainMenu.transform.Find("Language").Find("ButtonLanguageEng").GetComponent <Button>().onClick.AddListener(delegate { Language.SetEnglish(false); });

        GlobalSceneObjects.showNextPage.GetComponent <Button>().onClick.AddListener(delegate { NextPage.Invoke(); });

        GlobalSceneObjects.possessedTasks.transform.Find("BallLatestDevelopments").GetComponent <Button>().onClick.AddListener(delegate { SelectBall.Invoke("LatestDevelopments"); });
        GlobalSceneObjects.possessedTasks.transform.Find("BallMechanics").GetComponent <Button>().onClick.AddListener(delegate { SelectBall.Invoke("Mechanics"); });
        GlobalSceneObjects.possessedTasks.transform.Find("BallElementaryLaws").GetComponent <Button>().onClick.AddListener(delegate { SelectBall.Invoke("ElementaryLaws"); });
        GlobalSceneObjects.possessedTasks.transform.Find("BallSimpleLever").GetComponent <Button>().onClick.AddListener(delegate { SelectBall.Invoke("SimpleLever"); });

        GlobalSceneObjects.logicTasks.transform.Find("BallAcademicDegree").GetComponent <Button>().onClick.AddListener(delegate { SelectBall.Invoke("AcademicDegree"); });
        GlobalSceneObjects.logicTasks.transform.Find("BallExperimentalProcess").GetComponent <Button>().onClick.AddListener(delegate { SelectBall.Invoke("ExperimentalProcess"); });
        GlobalSceneObjects.logicTasks.transform.Find("BallScientistsNotes").GetComponent <Button>().onClick.AddListener(delegate { SelectBall.Invoke("ScientistsNotes"); });
        GlobalSceneObjects.logicTasks.transform.Find("BallBestPractices").GetComponent <Button>().onClick.AddListener(delegate { SelectBall.Invoke("BestPractices"); });
        GlobalSceneObjects.logicTasks.transform.Find("BallLightTests").GetComponent <Button>().onClick.AddListener(delegate { SelectBall.Invoke("LightTests"); });

        GlobalSceneObjects.mainMenuBack.GetComponent <Button>().onClick.AddListener(delegate { GlobalVariables.stateForAnimation = (int)GlobalVariables.NameAnimation.MainMenu; HideLevelContent.Invoke(); HideLevelButtons.Invoke(); });
        GlobalSceneObjects.selectLvlBack.GetComponent <Button>().onClick.AddListener(delegate { GlobalVariables.stateForAnimation = GlobalVariables.activeNameLevel; HideLevelContent.Invoke(); HideLevelButtons.Invoke(); });


        GlobalSceneObjects.continueButton.GetComponent <Button>().onClick.AddListener(delegate { ContinueButton.Press(); });

        GlobalSceneObjects.helpButton.transform.Find("CountHelp").Find("PictureHelp").GetComponent <Button>().onClick.AddListener(delegate { coroutines.InvokePressHelp(); });

        GlobalSceneObjects.helpButton.transform.Find("HelpButton").GetComponent <Button>().onClick.AddListener(delegate { HelpButton.Press(); });

        GlobalSceneObjects.skipLvl.GetComponent <Button>().onClick.AddListener(delegate { Skip.PressSkip(); });

        GlobalSceneObjects.helpBoard.transform.Find("Cross").GetComponent <Button>().onClick.AddListener(delegate
        {
            GlobalSceneObjects.helpBoard.GetComponent <Animator>().SetTrigger("HideTrigger"); GlobalVariables.stateForAnimation = (int)GlobalVariables.NameAnimation.HelpBoard;
        });

        GlobalSceneObjects.tableSkip.transform.Find("Yes").GetComponent <Button>().onClick.AddListener(delegate { Skip.PressYes(); });
        GlobalSceneObjects.tableSkip.transform.Find("No").GetComponent <Button>().onClick.AddListener(delegate { Skip.PressNo(); });

        GlobalSceneObjects.tableRate.transform.Find("Yes").GetComponent <Button>().onClick.AddListener(delegate { RateGame.PressYes(); });
        GlobalSceneObjects.tableRate.transform.Find("Later").GetComponent <Button>().onClick.AddListener(delegate { RateGame.PressLater(); });
        GlobalSceneObjects.tableRate.transform.Find("No").GetComponent <Button>().onClick.AddListener(delegate { RateGame.PressNo(); });
    }
Exemplo n.º 7
0
 private void OnToSetupCommand()
 {
     NextPage?.Invoke(this, null);
 }
Exemplo n.º 8
0
 public void GotoNextPage()
 {
     NextPage?.Invoke();
 }
Exemplo n.º 9
0
 private void button3_Click(object sender, EventArgs e)
 {
     InstallPath = textBox1.Text;
     InstallInfo.MainInstall.InstallationPage.InstallPath = InstallPath;
     NextPage?.Invoke();
 }