Example #1
0
        private string CreateArguments()
        {
            // < Convert.ToBase64String(Encoding.UTF8.GetBytes("l.o.g.i.n")) == bC5vLmcuaS5u >
            string ret = "";

            if (LoginToken.toggle)
            {
                string login           = LoginToken.email;
                string password        = LoginToken.password;
                string hashedLoginData = "{ email: " + login + ", password: "******", remember: true, timestamp: " + DateTime.Now.ToFileTime() + "}";
                int    ProfileID       = ProfileSettings.GetProfile(login, password);
                ret += "-bC5vLmcuaS5u=" + Convert.ToBase64String(Encoding.UTF8.GetBytes(hashedLoginData)) + " -token=" + ProfileID.ToString();
            }
            string mode = ((ScreenMode.SelectedItem as ComboBoxItem).Content as string).ToLowerInvariant();

            ret += (ScreenMode.SelectedIndex != 0) ? " -screenmode=" + ((ScreenMode.SelectedIndex != 2) ? mode + " -popupwindow": mode) : "";
            return(ret);
        }
Example #2
0
        private string CreateArguments()
        {
            string ret = "";

            if (LoggedIn)
            {
                string login           = LoginEmail.Text;
                string password        = LoginPassword.Text;
                string hashedLoginData = "{ email: " + login + ", password: "******", remember: true, timestamp: " + DateTime.Now.ToFileTime() + "}";
                int    ProfileID       = ProfileSettings.GetProfile(login, password);
                // < Convert.ToBase64String(Encoding.UTF8.GetBytes("l.o.g.i.n")) == bC5vLmcuaS5u >
                ret += "-bC5vLmcuaS5u=" + Convert.ToBase64String(Encoding.UTF8.GetBytes(hashedLoginData)) + " -token=" + ProfileID.ToString();
            }
            ret += (ScreenMode.SelectedIndex != 0) ? " -screenmode=" + ((ScreenMode.SelectedItem as ComboBoxItem).Content as string) : "";
            return(ret);
        }