public void Run_Profile_Setup(bool App_isalready_opend)///check if profile already been created if not start Profile Setup
 {
     if (App_isalready_opend == false)
     {
         if (File.Exists(System.IO.Directory.GetCurrentDirectory() + "/Resources/DA_Profile"))
         {
             DA_MainWindow ma = new DA_MainWindow(0);
             ma.Show();
             this.Close();
         }
         else
         {
             this.Visibility            = Visibility.Visible;
             CIDGRID.Visibility         = Visibility.Hidden;
             AlertCIDGRID.Visibility    = Visibility.Hidden;
             Step5NextButton.Visibility = Visibility.Hidden;
             System.Threading.Thread.Sleep(2000);
             tab0.Visibility             = Visibility.Hidden;
             tab1.Visibility             = Visibility.Hidden;
             tab2.Visibility             = Visibility.Hidden;
             tab3.Visibility             = Visibility.Hidden;
             tab4.Visibility             = Visibility.Hidden;
             tab5.Visibility             = Visibility.Hidden;
             tab6.Visibility             = Visibility.Hidden;
             tab7.Visibility             = Visibility.Hidden;
             mediaElement.LoadedBehavior = MediaState.Play;
             mediaElement.Source         = new Uri(System.IO.Directory.GetCurrentDirectory() + @"\Resources\img\SA_bckg.mp4", UriKind.Absolute);
             Step1_2MediaElement.Stop();
             Step2MediaElement.Stop();
             Step3MediaElement.Stop();
             Step4MediaElement.Stop();
             Tabcontrol1.SelectedIndex = 7;
         }
     }
 }
예제 #2
0
        public StartUp()
        {
            var exists = System.Diagnostics.Process.GetProcessesByName(System.IO.Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetEntryAssembly().Location)).Count() > 1;


            if (System.Diagnostics.Process.GetProcessesByName(System.IO.Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetEntryAssembly().Location)).Count() > 1)
            {
                MessageBoxResult result = MessageBox.Show("The Application is already running in the background do you want to close it before continuing?", "WARNING", MessageBoxButton.YesNo, MessageBoxImage.Warning);
                switch (result)
                {
                case MessageBoxResult.Yes:
                    System.Diagnostics.Process.Start(System.IO.Directory.GetCurrentDirectory() + "/ExtrenalAppRestart.exe");
                    const string processName = "YPBBT";     // without '.exe'
                    Process.GetProcesses()
                    .Where(pr => pr.ProcessName == processName)
                    .ToAsyncEnumerable()
                    .ForEachAsync(p => p.Kill());
                    break;

                case MessageBoxResult.No:

                    break;
                }
            }
            if (File.Exists(System.IO.Directory.GetCurrentDirectory() + "/Resources/Profile"))
            {
                MainWindow ma = new MainWindow(0);
                ma.Show();
                this.Close();
            }
            InitializeComponent();

            mediaElement.Source = new Uri(System.IO.Directory.GetCurrentDirectory() + "/Resources/bckg.mp4");
            mediaElement.Play();
            System.Threading.Thread.Sleep(2000);
            tab0.Visibility = Visibility.Hidden;
            tab1.Visibility = Visibility.Hidden;
            tab2.Visibility = Visibility.Hidden;
            tab3.Visibility = Visibility.Hidden;
            tab4.Visibility = Visibility.Hidden;
            tab5.Visibility = Visibility.Hidden;
            tab6.Visibility = Visibility.Hidden;
            tab7.Visibility = Visibility.Hidden;
            Step1_2MediaElement.Stop();
            Step2MediaElement.Stop();
            Step3MediaElement.Stop();
            Step4MediaElement.Stop();
            Tabcontrol1.SelectedIndex = 7;
        }
        private void Step4NextButton_Click(object sender, RoutedEventArgs e)///Step 4 Tabcontrol 4 Next_button Event
        {
            var servers = discord.Guilds;

            foreach (var server in servers)///Get Server Id's And Names and add them to servercollection list
            {
                SidCombobox.Items.Add(server.ToString()); ServersCollection.Add(server.Id.ToString());
            }
            Step4MediaElement.Position = new TimeSpan(0, 0, 0);
            Step4MediaElement.Stop();
            DoubleAnimation da = new DoubleAnimation();

            da.From        = 0;
            da.To          = 1;
            da.Duration    = new Duration(TimeSpan.FromSeconds(2));
            da.AutoReverse = false;
            Tabcontrol1.BeginAnimation(OpacityProperty, da);
            Tabcontrol1.SelectedIndex = 5;
        }
예제 #4
0
 private void Step4MediaElement_MouseLeave(object sender, MouseEventArgs e)
 {
     Step4MediaElement.Position = new TimeSpan(0, 0, 0);
     Step4MediaElement.Stop();
     Step4MediaElement.Visibility = Visibility.Hidden;
 }
예제 #5
0
 private void Step4MediaElement_LostFocus(object sender, RoutedEventArgs e)
 {
     Step4MediaElement.Position = new TimeSpan(0, 0, 0);
     Step4MediaElement.Stop();
     Step4MediaElement.Visibility = Visibility.Hidden;
 }
        private void Load_Language_File(string SL = "en")///Load Language Files
        {
            Step1_2MediaElement.Stop();
            Step2MediaElement.Stop();
            Step3MediaElement.Stop();
            Step4MediaElement.Stop();
            Default_Language = SL;
            try { LanguageLinesCollection.Clear(); } catch (Exception) { }
            string lines = File.ReadAllText(System.IO.Directory.GetCurrentDirectory() + "/Resources/Languages/" + SL);

            string[] RefferalsFilter = lines.Split('}');
            foreach (var rf in RefferalsFilter)
            {
                LanguageLinesCollection.Add(rf);
            }
            S0Label0.Text         = LanguageLinesCollection[0].ToString();
            Tc0SkipButton.Content = LanguageLinesCollection[1].ToString();        // skip
            Tc0NextButton.Content = LanguageLinesCollection[2].ToString();        // Next
            S1L0.Content          = LanguageLinesCollection[3].ToString() + " 1"; //Step
            S1L1.Text             = LanguageLinesCollection[5].ToString();
            Step1_OpenDiscordDevUrl_Button.ToolTip = LanguageLinesCollection[6].ToString();
            Step1_2Label.Text       = LanguageLinesCollection[7].ToString();
            Step1NextButton.Content = LanguageLinesCollection[2].ToString();
            S2L0.Content            = LanguageLinesCollection[3].ToString() + " 2";//Step
            //LanguageLinesCollection[4].ToString() is Empty
            S2L1.Text = LanguageLinesCollection[8].ToString();
            Step2NextButton.Content = LanguageLinesCollection[2].ToString();        // Next
            S3L0.Content            = LanguageLinesCollection[3].ToString() + " 3"; //Step
            S3L1.Text                    = LanguageLinesCollection[9].ToString();
            ClientIDLABEL.Content        = LanguageLinesCollection[10].ToString();
            Step3CIDTextbox.Text         = LanguageLinesCollection[10].ToString().Remove(LanguageLinesCollection[10].Length - 2, 1);
            Step3InviteBotButton.Content = LanguageLinesCollection[11].ToString();       //Invite
            Step3NextButton.Content      = LanguageLinesCollection[2].ToString();        // Next
            S4L0.Content                 = LanguageLinesCollection[3].ToString() + " 4"; //Step
            S4L1.Text                    = LanguageLinesCollection[12].ToString();
            TokenLabel.Content           = LanguageLinesCollection[13].ToString();       //Token:
            Step4TokenTextbox.Text       = LanguageLinesCollection[13].ToString().Remove(LanguageLinesCollection[13].Length - 2, 1);
            Step4TestTokenButton.Content = LanguageLinesCollection[14].ToString();       //Test Token
            Step4NextButton.Content      = LanguageLinesCollection[2].ToString();        // Next
            S5L0.Content                 = LanguageLinesCollection[3].ToString() + " 5"; //Step
            S5L1.Text                    = LanguageLinesCollection[15].ToString();
            ServerIDLAbel.Content        = LanguageLinesCollection[16].ToString();
            ChannelIDLabel.Content       = LanguageLinesCollection[17].ToString();
            S5L2.Text                    = LanguageLinesCollection[18].ToString();
            Step5NextButton.Content      = LanguageLinesCollection[2].ToString(); // Next
            S6L0.Content                 = LanguageLinesCollection[19].ToString();
            S6L1.Text                    = LanguageLinesCollection[20].ToString();
            //LanguageLinesCollection[21].ToString() is "WARNING"
            //LanguageLinesCollection[22].ToString() is "The Application is already running in the background do you want to close it before continuing?"
            //LanguageLinesCollection[23].ToString() is "Ok"
            //LanguageLinesCollection[24].ToString() is "No"
            //LanguageLinesCollection[25].ToString() is "Yes"
            AlertChannelIDLabel.Content = LanguageLinesCollection[26].ToString(); //Alert Channel ID:
            //LanguageLinesCollection[27].ToString() is > **Welcome To Yuri Project Bdo Boss Timer Self Rolling Settings**
            //LanguageLinesCollection[28].ToString() is > **U can customize all the settings on the self rolling menu**
            DesktopSetupButton.Content = LanguageLinesCollection[29].ToString();


            #region "animate Selected Language Tab"
            selctedlangImg.Source = new BitmapImage(new Uri(System.IO.Directory.GetCurrentDirectory() + "/Resources/img/" + SL + ".png"));
            var left = Tabcontrol1.Margin.Left;
            TranslateTransform trans = new TranslateTransform();
            Tabcontrol1.RenderTransform = trans;
            DoubleAnimation anim1 = new DoubleAnimation(left, 1000 + left, TimeSpan.FromSeconds(1));
            anim1.AutoReverse = true;
            trans.BeginAnimation(TranslateTransform.XProperty, anim1);

            DoubleAnimation da = new DoubleAnimation();
            da.From        = 1;
            da.To          = 0;
            da.Duration    = new Duration(TimeSpan.FromSeconds(1));
            da.AutoReverse = false;
            da.Completed  += (s, _) => {
                Tabcontrol1.SelectedIndex = 0;
            };
            Tabcontrol1.BeginAnimation(OpacityProperty, da);

            DoubleAnimation dar = new DoubleAnimation();
            dar.Duration    = new Duration(TimeSpan.FromSeconds(2));
            dar.AutoReverse = false;
            Tabcontrol1.BeginAnimation(OpacityProperty, dar);
            #endregion
        }