private void Button_Click(object sender, RoutedEventArgs e)
        {
            Window3 setting = new Window3();

            setting.Owner = this;
            setting.Show();
        }
Exemplo n.º 2
0
        private void Sign_Button_Click(object sender, RoutedEventArgs e)
        {
            var window = new Window3();

            window.Show();
            this.Close();
        }
Exemplo n.º 3
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Window3 w3 = new Window3();

            w3.Show();
            this.Close();
        }
        private void cahngeInfo(object sender, RoutedEventArgs e)
        {
            Window3 x = new Window3();

            x.Show();
            this.Close();
        }
Exemplo n.º 5
0
        private void loginclick(object sender, RoutedEventArgs e)
        {
            Window3 obj = new Window3();

            this.Visibility = Visibility.Hidden;
            obj.Show();
        }
Exemplo n.º 6
0
        private async void dohvatiAway()
        {
            Task <List <StartingEleven> > task = new Task <List <StartingEleven> >(getstartinhAway);//new Task<List<StartingEleven>>(repo.GetStartingElevenForCountry(fifa_Code));

            task.Start();
            away = await task;

            Window3 w3 = new Window3(home, away, Match);

            w3.Show();
        }
Exemplo n.º 7
0
        public void ButtonDecrypt_full(object sender, RoutedEventArgs e)
        {
            if (File.Exists("obrazek.png") == true)
            {
                Window3 password = new Window3();
                bool    r1       = (bool)password.ShowDialog();
                if (r1 == true)
                {
                    //I get the password and I need to find the User_password via open alphabet on first lines.
                    //then I need to find the alphabet and generate alphabet file from this line
                    // and then I can run "almost" normal decryption :D
                    GenerateOpenAlphabet();
                    string User_message = PasswordFinder(password.password.Text);
                    //string Text = Decrypt();
                    char             uvozovky = '"';
                    MessageBoxResult r        = MessageBox.Show("The clear message is: " + uvozovky + User_message + uvozovky, "Do you want to save your message?", MessageBoxButton.YesNo);
                    if (r == MessageBoxResult.Yes)
                    {
                        Microsoft.Win32.SaveFileDialog dlg = new Microsoft.Win32.SaveFileDialog();
                        dlg.FileName   = "encrypted";                   // Default file name
                        dlg.DefaultExt = ".txt";                        // Default file extension
                        dlg.Filter     = "Text documents (.txt)|*.txt"; // Filter files by extension

                        Nullable <bool> result = dlg.ShowDialog();

                        // Process save file dialog box results
                        if (result == true)
                        {
                            // Save document
                            string filename = dlg.FileName;
                            System.IO.File.WriteAllText(filename + ".txt", User_message);
                        }
                        if (result == false)
                        {
                            MessageBox.Show("I am sorry, but you didn´t choose the location", "Save-Error");
                        }
                    }
                }
                else
                {
                    MessageBox.Show("I am sorry, but you didn´t input the password", "Password_Input-Error");
                }
            }
            else
            {
                MessageBox.Show("I am sorry, but there is no picture added", "No_picture_added-Error");
            }
        }
Exemplo n.º 8
0
        private void zatwierdz_Click(object sender, RoutedEventArgs e)
        {
            //otwieranie okna

            string imie       = podaj_imie.Text;
            string nazwisko   = podaj_nazwisko.Text;
            string adres      = podaj_adres.Text;
            string prawoJazdy = podaj_prawojazdy.Text;
            string dowód      = podaj_dowód.Text;

            Klient klient = new Klient(imie, nazwisko, dowód, prawoJazdy, adres);

            Klient.DodajKlienta(klient);

            Window3 okno3 = new Window3();

            okno3.ShowDialog();
        }
Exemplo n.º 9
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (FirstProblem.IsChecked == true)
     {
         Window1 subWindow = new Window1();
         subWindow.Show();
     }
     else if (SecondProblem.IsChecked == true)
     {
         Window2 subWindow = new Window2();
         subWindow.Show();
     }
     else if (ThirdProblem.IsChecked == true)
     {
         Window3 subWindow = new Window3();
         subWindow.Show();
     }
 }
Exemplo n.º 10
0
        private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            pDown   = e.GetPosition(canvas1);
            pDown.X = Math.Max(Math.Min(pDown.X, canvas1.RenderSize.Width), 0);
            pDown.Y = Math.Max(Math.Min(pDown.Y, canvas1.RenderSize.Height), 0);
            Ellipse el = new Ellipse();

            el.Visibility = System.Windows.Visibility.Visible;
            el.Width      = 5;
            el.Height     = 5;
            Point tl = new Point(pDown.X - 5, pDown.Y - 5);

            el.Margin = new Thickness(tl.X, tl.Y, 0, 0);
            el.Fill   = Brushes.Blue;
            textBox1.Clear();
            Point pNorm =
                new Point(Math.Round(pDown.X / canvas1.RenderSize.Width * 10000) / 10000, Math.Round(pDown.Y / canvas1.RenderSize.Height * 10000) / 10000);

            textBox1.AppendText(pNorm.ToString());
            canvas1.Children.Add(el);
            tracksData.currTrack.Add(new Point(pNorm.X, pNorm.Y));
            duringTrack       = true;
            button1.IsEnabled = true;
            if (firstInTrack)
            {
                tracksData.t = 0;
                tracksData.currTimes.Add(tracksData.t);
            }
            else
            {
                Window3 timeWin = new Window3(tracksData);
                timeWin.Owner = this;
                timeWin.ShowDialog();
            }
            firstInTrack = false;
        }
Exemplo n.º 11
0
        private void MenuItem_Click_1(object sender, RoutedEventArgs e)
        {
            Window3 wind = new Window3(recepts);

            wind.Show();
        }
Exemplo n.º 12
0
        private void AddEmailFolder_Click(object sender, RoutedEventArgs e)
        {
            Window3 W = new Window3(FoldersList);

            W.Show();
        }
Exemplo n.º 13
0
        private void Encrypt_full_button(object sender, RoutedEventArgs e)
        {
            GenerateOpenAlphabet();
            Window3 password = new Window3();
            bool    r        = (bool)password.ShowDialog();

            if (r == true)
            {
                string passphrase = password.password.Text;
                for (int m = 10 - passphrase.Length; m > 0; m = m - 1)
                {
                    passphrase = passphrase + ']';
                }
                List <string> Passlist = new List <string>();
                Passlist = passphrase2passlist(passphrase);

                Userinput = UserText.Text;
                if (Userinput.Length < 251)
                {
                    if (Userinput.Length == 250)
                    {
                        //Nothing :)
                    }
                    else
                    {
                        for (int n = 250 - Userinput.Length; n > 0; n = n - 1)
                        {
                            Userinput = Userinput + ']';
                        }
                    }
                    char[] arr;
                    arr = Userinput.ToCharArray(0, Userinput.Length);
                    //is always 250 chars -->list of all positions :)
                    Positionnumber = 0;
                    for (int i = 0; i < Userinput.Length; i++)
                    {
                        char       Char       = arr[i];
                        List <int> RGBnumbers = RGBset(Char, 0);
                        RGBsettolister(RGBnumbers);
                        Positionnumber = Positionnumber + 1;
                    }
                    Editpicture_experimental(RGBsettolists, Passlist);
                    //create list of RGBnumbers
                }
                else
                {
                    MessageBox.Show("The input is longer than 250 chars, please, rewrite it", "Input is too large for me");
                }
                if (Saved == 1)
                {
                    MessageBox.Show("The process was succesfull", "Hurray, your words are now secret");
                    File.Delete("Aplhabet_open.txt");
                }
                else
                {
                    MessageBox.Show("Sorry, please, use the encrypt button again to save your picture", "You cancelled your save :(");
                }
            }
            else
            {
                MessageBox.Show("I am sorry, please, write your password and hit enter to proceed", "Password-input error");
            }
        }
Exemplo n.º 14
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Window3 w = new Window3(this);

            w.Show();
        }
Exemplo n.º 15
0
        private void Vaasa_Click(object sender, RoutedEventArgs e)
        {
            Window3 sääTiedot3 = new Window3();

            sääTiedot3.Show();
        }