void ReleaseDesignerOutlets()
        {
            if (BMILable != null)
            {
                BMILable.Dispose();
                BMILable = null;
            }

            if (CalculateButton != null)
            {
                CalculateButton.Dispose();
                CalculateButton = null;
            }

            if (HeightTextField != null)
            {
                HeightTextField.Dispose();
                HeightTextField = null;
            }

            if (WeightTextField != null)
            {
                WeightTextField.Dispose();
                WeightTextField = null;
            }
        }
Esempio n. 2
0
        private void ExampleButton_Click(object sender, EventArgs e)
        {
            Length.Text = "60";
            Width.Text  = "40";

            CalculateButton.PerformClick();
        }
Esempio n. 3
0
        private void ClearButton_Click(object sender, EventArgs e)
        {
            FruitSaladradioButton.Checked = false;
            PastaSaladradioButton.Checked = false;
            SmoothieradioButton.Checked   = false;
            FruitJuiceradioButton.Checked = false;
            CupcakeradioButton.Checked    = false;
            ShortcakeradioButton.Checked  = false;

            SaladPricetextBox.Text      = "";
            DrinkPricetextBox.Text      = "";
            DessertPricetextBox.Text    = "";
            SaladQuantitytextBox.Text   = "";
            DrinkQuantitytextBox.Text   = "";
            DessertQuantitytextBox.Text = "";

            MessageLabel.Text    = string.Empty;
            SalasSelLabel.Text   = "";
            DrinkSelLabel.Text   = "";
            DessertSelLabel.Text = "";

            CalculateButton.Focus();

            SaladPricetextBox.Text      = "0";
            DrinkPricetextBox.Text      = "0";
            DessertPricetextBox.Text    = "0";
            SaladQuantitytextBox.Text   = "0";
            DrinkQuantitytextBox.Text   = "0";
            DessertQuantitytextBox.Text = "0";
        }
Esempio n. 4
0
        void ReleaseDesignerOutlets()
        {
            if (bmiLabel != null)
            {
                bmiLabel.Dispose();
                bmiLabel = null;
            }

            if (CalculateButton != null)
            {
                CalculateButton.Dispose();
                CalculateButton = null;
            }

            if (heightTextField != null)
            {
                heightTextField.Dispose();
                heightTextField = null;
            }

            if (weightTextField != null)
            {
                weightTextField.Dispose();
                weightTextField = null;
            }
        }
Esempio n. 5
0
        /// <summary>
        /// Overriden method to add animations and create gameboard.
        /// </summary>
        protected override async void OnAppearing()
        {
            _gameBoard = await Task.Run(() => GameBoard.CreateAsync(AlternativeIcons));

            base.OnAppearing();

            // Showing animations unless user has chosen to skip starting animations
            // from the app's settings or app is resuming.
            if (!App.AppResumed && !App.SkipStartingAnimations)
            {
                await Task.WhenAll(
                    _gameBoardGrid.FadeTo(1, 1000, Easing.Linear),
                    _gameBoardGrid.RotateTo(360, 1500, Easing.CubicOut),
                    _gameBoardGrid.ScaleTo(1.1, 1500, Easing.Linear)
                    );

                await Task.WhenAny(
                    _gameBoardGrid.ScaleTo(1, 2000, Easing.Linear),
                    AppTitle.FadeTo(1, 1500),
                    AppTitle.ScaleTo(1, 1500, Easing.SinInOut)
                    );

                await Task.WhenAll(
                    SettingsIcon.FadeTo(1, 1000),
                    SettingsIcon.ScaleTo(1, 1500, Easing.SpringOut),
                    SettingsIcon.RotateTo(720, 2000, Easing.SinOut),
                    CalculateButton.FadeTo(1, 1000),
                    CalculateButton.ScaleTo(1, 1500, Easing.SpringOut)
                    );

                // Rotating icon back to 0, so that further animations work as intended.
                SettingsIcon.Rotation = 0;
            }
        }
 void ReleaseDesignerOutlets()
 {
     if (CalcButton != null)
     {
         CalcButton.Dispose();
         CalcButton = null;
     }
     if (CalculateButton != null)
     {
         CalculateButton.Dispose();
         CalculateButton = null;
     }
     if (CallButton1 != null)
     {
         CallButton1.Dispose();
         CallButton1 = null;
     }
     if (CallButton2 != null)
     {
         CallButton2.Dispose();
         CallButton2 = null;
     }
     if (DurationMessage != null)
     {
         DurationMessage.Dispose();
         DurationMessage = null;
     }
 }
Esempio n. 7
0
        void ReleaseDesignerOutlets()
        {
            if (CalculateButton != null)
            {
                CalculateButton.Dispose();
                CalculateButton = null;
            }

            if (CallButton != null)
            {
                CallButton.Dispose();
                CallButton = null;
            }

            if (PeopleEntry != null)
            {
                PeopleEntry.Dispose();
                PeopleEntry = null;
            }

            if (PizzaCountLabel != null)
            {
                PizzaCountLabel.Dispose();
                PizzaCountLabel = null;
            }
        }
Esempio n. 8
0
        protected override async void OnAppearing()
        {
            base.OnAppearing();

            if (!_initialized)
            {
                await Task.WhenAll(
                    WelcomeLabel.TranslateTo(_formsWidth, 0, 0, null),
                    PosyLabel.TranslateTo(_formsWidth, 0, 0, null),
                    FormLayout.TranslateTo(0, _formsHeight, 0, null),
                    CalculateButton.TranslateTo(0, _formsHeight, 0, null),
                    IntroLabel.TranslateTo(_formsWidth, 0, 0, null)
                    );

                PositionStars();
                RotateStars();

                await Task.WhenAll(
                    WelcomeLabel.TranslateTo(0, 0, 400, Easing.CubicInOut),
                    PosyLabel.TranslateTo(0, 0, 450, Easing.CubicInOut),
                    IntroLabel.TranslateTo(0, 0, 500, Easing.CubicInOut),
                    FormLayout.TranslateTo(0, 0, 550, Easing.CubicInOut),
                    CalculateButton.TranslateTo(0, 0, 550, Easing.CubicInOut)
                    );

                _initialized = true;
            }
        }
Esempio n. 9
0
 protected void Recalculate_Click(object sender, EventArgs e)
 {
     alterStep1DivVisibility(true, getHardcodedPriceInfoOrGoBackToPricePage(), 0, 0, 0, 0);
     CalcInfoDiv.Visible = false;
     CommitDiv.Visible   = false;
     CalculateButton.Focus();
 }
Esempio n. 10
0
        void ReleaseDesignerOutlets()
        {
            if (CalculateButton != null)
            {
                CalculateButton.Dispose();
                CalculateButton = null;
            }

            if (FirstNumberTextField != null)
            {
                FirstNumberTextField.Dispose();
                FirstNumberTextField = null;
            }

            if (ResultLabel != null)
            {
                ResultLabel.Dispose();
                ResultLabel = null;
            }

            if (SecondNumberTextField != null)
            {
                SecondNumberTextField.Dispose();
                SecondNumberTextField = null;
            }
        }
 private void ToggleCalculateButtonFunction()
 {
     if ((string)CalculateButton.Content == "CALCULAR")
     {
         CalculateButton.Click     -= CalculateButton_Click;
         CalculateButton.Click     += CancelButton_Click;
         CalculateButton.Content    = "CANCELAR";
         CalculateButton.Foreground = Brushes.Red;
     }
     else
     {
         CalculateButton.Click  -= CancelButton_Click;
         CalculateButton.Click  += CalculateButton_Click;
         CalculateButton.Content = "CALCULAR";
         CalculateButton.ClearValue(ForegroundProperty);
     }
 }
        void ReleaseDesignerOutlets()
        {
            if (BarabanView != null)
            {
                BarabanView.Dispose();
                BarabanView = null;
            }

            if (CalculateButton != null)
            {
                CalculateButton.Dispose();
                CalculateButton = null;
            }

            if (FirstCurrencyLabel != null)
            {
                FirstCurrencyLabel.Dispose();
                FirstCurrencyLabel = null;
            }

            if (FirstValueTextField != null)
            {
                FirstValueTextField.Dispose();
                FirstValueTextField = null;
            }

            if (MainView != null)
            {
                MainView.Dispose();
                MainView = null;
            }

            if (SecondCurrencyLabel != null)
            {
                SecondCurrencyLabel.Dispose();
                SecondCurrencyLabel = null;
            }

            if (SecondValueLabel != null)
            {
                SecondValueLabel.Dispose();
                SecondValueLabel = null;
            }
        }
Esempio n. 13
0
        void ReleaseDesignerOutlets()
        {
            if (CalculateButton != null)
            {
                CalculateButton.Dispose();
                CalculateButton = null;
            }

            if (NText != null)
            {
                NText.Dispose();
                NText = null;
            }

            if (ResultLabel != null)
            {
                ResultLabel.Dispose();
                ResultLabel = null;
            }
        }
Esempio n. 14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // This comes from a logged in user

        NiceASP.SessionData.LoggedOnOrRedirectToLogin(Session, Response, Request);

        sd = ConstantStrings.GetSessionData(Session);

        if (!IsPostBack)
        {
            // check if a committed request exists, if so display it
            Data_AppUserWallet existingWallet = DSSwitch.appWallet().RetrieveOne(
                sd.LoggedOnUserEmail, MyLog.GetVoidLogger());
            Data_AppUserFile user = DSSwitch.appUser().RetrieveOne(sd.LoggedOnUserEmail, MyLog.GetVoidLogger());


            if ((user != null) && (user.AccountStatus != Data_AppUserFile.eUserStatus.free_account))
            {
                MainSection_Normal.Visible = false;
                TitleId.Text = "Upgrade Request";
                string niceName = Data_AppUserFile.GetNiceStatusText(user.AccountStatus);
                Literal1.Text = "You currently hold a " + niceName + " account. Please contact us to do the upgrade.";
            }
            else if ((existingWallet != null) && (existingWallet.HasUpgradeRequest()))
            {
                // display existing request
                showStoredData(existingWallet);
            }
            else
            {
                // no commit yet
                UpdateInfo priceInfo = getHardcodedPriceInfoOrGoBackToPricePage();
                TitleId.Text  = priceInfo.Title + " - Upgrade Request";
                userName.Text = sd.LoggedOnUserName;
                InfoText.Text = new UpgradeTextList(priceInfo.Info).GetAsHTML;
                alterStep1DivVisibility(true, priceInfo, 0, 0, 0, 0);
                CalculateButton.Focus();
            }
        }
    }
        void ReleaseDesignerOutlets()
        {
            if (CalculateButton != null)
            {
                CalculateButton.Dispose();
                CalculateButton = null;
            }

            if (EntryTxtField != null)
            {
                EntryTxtField.Dispose();
                EntryTxtField = null;
            }

            if (PrincipalTxtField != null)
            {
                PrincipalTxtField.Dispose();
                PrincipalTxtField = null;
            }

            if (ResultLabel != null)
            {
                ResultLabel.Dispose();
                ResultLabel = null;
            }

            if (TargetTxtField != null)
            {
                TargetTxtField.Dispose();
                TargetTxtField = null;
            }

            if (TradeImage != null)
            {
                TradeImage.Dispose();
                TradeImage = null;
            }
        }
Esempio n. 16
0
        private void SendButton_Click_1(object sender, EventArgs e)
        {
            CalculateButton.PerformClick();
            //send file
            Stream fileStream = File.OpenRead(FileName);

            // Alocate memory space for the file
            byte[] fileBuffer = new byte[fileStream.Length];
            fileStream.Read(fileBuffer, 0, (int)fileStream.Length);
            // Open a TCP/IP Connection and send the data
            TcpClient     clientSocket  = new TcpClient("localhost", 8080);
            NetworkStream networkStream = clientSocket.GetStream();

            networkStream.Write(fileBuffer, 0, fileBuffer.GetLength(0));
            networkStream.Close();
            //send messege
            UdpClient udpClient = new UdpClient();

            udpClient.Connect("localhost", 8080);
            genarateMsg();
            Byte[] sendBytes = Encoding.ASCII.GetBytes(Messege);
            udpClient.Send(sendBytes, sendBytes.Length);
        }
Esempio n. 17
0
        void ReleaseDesignerOutlets()
        {
            if (CalculateButton != null)
            {
                CalculateButton.Dispose();
                CalculateButton = null;
            }

            if (DivideButton != null)
            {
                DivideButton.Dispose();
                DivideButton = null;
            }

            if (EightButton != null)
            {
                EightButton.Dispose();
                EightButton = null;
            }

            if (FiveButton != null)
            {
                FiveButton.Dispose();
                FiveButton = null;
            }

            if (FourButton != null)
            {
                FourButton.Dispose();
                FourButton = null;
            }

            if (MinusButton != null)
            {
                MinusButton.Dispose();
                MinusButton = null;
            }

            if (MultiplyButton != null)
            {
                MultiplyButton.Dispose();
                MultiplyButton = null;
            }

            if (NineButton != null)
            {
                NineButton.Dispose();
                NineButton = null;
            }

            if (OneButton != null)
            {
                OneButton.Dispose();
                OneButton = null;
            }

            if (PlusButton != null)
            {
                PlusButton.Dispose();
                PlusButton = null;
            }

            if (ResultBox != null)
            {
                ResultBox.Dispose();
                ResultBox = null;
            }

            if (SevenButton != null)
            {
                SevenButton.Dispose();
                SevenButton = null;
            }

            if (SixButton != null)
            {
                SixButton.Dispose();
                SixButton = null;
            }

            if (ThreeButton != null)
            {
                ThreeButton.Dispose();
                ThreeButton = null;
            }

            if (TwoButton != null)
            {
                TwoButton.Dispose();
                TwoButton = null;
            }

            if (ZeroButton != null)
            {
                ZeroButton.Dispose();
                ZeroButton = null;
            }
        }
Esempio n. 18
0
 public void Calculate()
 {
     CalculateButton.Click();
 }
Esempio n. 19
0
 private void UpdateButton_Click(object sender, EventArgs e)
 {
     CalculateButton.PerformClick();
     updateOrder();
 }
Esempio n. 20
0
 public CalculatorPage Calculate()
 {
     CalculateButton.Click();
     return(this);
 }
Esempio n. 21
0
        private void CalculateButton_Click(object sender, EventArgs e)
        {
            if (false == CheckInput())
            {
                MessageBox.Show("Input error!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            List <double> method_result = new List <double>();

            DataGridViewRowCollection rows = Table.Rows;

            rows.Clear();

            double nm_result;
            double mk1_result;
            double mk2_result;

            double nm_avg  = 0.0;
            double mk1_avg = 0.0;
            double mk2_avg = 0.0;

            CalculateButton.Hide();

            for (uint i = 0u; i < S; ++i)
            {
                if (results.ContainsKey(N))
                {
                    nm_result  = ((List <double>)(results[N]))[0];
                    mk1_result = ((List <double>)(results[N]))[1];
                    mk2_result = ((List <double>)(results[N]))[2];
                }
                else
                {
                    method_result.Clear();

                    nm_result  = Math.Abs(exact - NM());
                    mk1_result = Math.Abs(exact - MK1());
                    mk2_result = Math.Abs(exact - MK2());

                    method_result.Add(nm_result);
                    method_result.Add(mk1_result);
                    method_result.Add(mk2_result);

                    results.Add(N, new List <double>(method_result));
                }

                rows.Add(N, nm_result, mk1_result, mk2_result);

                N *= 10;

                nm_avg  += nm_result;
                mk1_avg += mk1_result;
                mk2_avg += mk2_result;
            }

            // Fill averages
            rows.Add();
            rows.Add();
            rows[rows.Count - 1].Cells[1].Value = nm_avg / S;
            rows[rows.Count - 1].Cells[2].Value = mk1_avg / S;
            rows[rows.Count - 1].Cells[3].Value = mk2_avg / S;

            CalculateButton.Show();
        }