Ejemplo n.º 1
0
 public void RegenerateAuthCode()
 {
     this.CSRF           = AppHelper.ReturnAllTime();
     this.CSRF           = AppHelper.incChars(this.CSRF, 5);
     this.CSRF           = AppHelper.Trimnonint(this.CSRF);
     this.controlsession = AppHelper.RandomString(30);
 }
Ejemplo n.º 2
0
        public static void Exec()
        {
            FormMain main = new FormMain();
            string   d    = AppHelper.ReturnAllTime();

            bool isAcceptedLicense = true;

            d = "Last Edit at " + d;
            try
            {
                System.IO.File.WriteAllText(Application.StartupPath + "\\lastInfo.txt", d);
            }
            catch { }


            if (!SettingsEditor.GetDonotViewIntro())
            {
                if (new Forms.FrmIntro().ShowDialog() != DialogResult.OK)
                {
                    isAcceptedLicense = false;
                }
            }


            if (isAcceptedLicense)
            {
                MessageBox.Show("this is beta version , project still under Development , \r\n we would like to get text from you \r\n >> [email protected]", "must said");
                Application.Run(main);
            }
        }
Ejemplo n.º 3
0
        private static void BuildCount()
        {
            string ex = "Build=";
            int    i  = 100;
            string p  = Application.StartupPath + "\\build.ini";

            p = p.Replace("\\\\", "\\");
            string ud = AppHelper.ReturnAllTime();

            ud = "Last Edit at " + ud;
            try
            {
                string   d = AppHelper.ReadFileLines(p)[0];
                string[] x = d.Split('=');
                string   t = x[1];
                i = int.Parse(t.Trim()); i++;
            }
            catch { }
            ex += i.ToString();
            ex  = ex + "\r\n" + ud + "\r\nversion:" + Program._Version;
            AppHelper.writeToFile(p, ex);
        }
Ejemplo n.º 4
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            FormMain main = new FormMain();
            string   d    = AppHelper.ReturnAllTime();

            bool isAcceptedLicense = true;

            d = "Last Edit at " + d;
            try
            {
                System.IO.File.WriteAllText(Application.StartupPath + "lastInfo.txt", d);
            }
            catch { }

            if (!AppHelper.IsUserAdministrator())
            {
                AppHelper.ViewHowToRunAsAdmin(true);
                return;
            }

            if (!SettingsEditor.GetDonotViewIntro())
            {
                if (new Forms.FrmIntro().ShowDialog() != DialogResult.OK)
                {
                    isAcceptedLicense = false;
                }
            }


            if (isAcceptedLicense)
            {
                Application.Run(main);
            }
        }
Ejemplo n.º 5
0
        internal static string VideoDefaultIndex(string rootdir, string prefx, string port_)
        {
            string[] files;
            int      count = 0;

            try
            {
                files = System.IO.Directory.GetFiles(rootdir + "Video");
                string doc = string.Format("<body background=\"bg.jpg\"><a href 'http://{0}:{1}'> Refresh page </a><br />", prefx, port_);
                doc += "<h2>Enjoy watching  !!  Rykon Videos </h2><center>\r\n";


                foreach (string f in files)
                {
                    if (!WebServer.isMediaFile(f))
                    {
                        continue;
                    }
                    count++;
                    string filmn = AppHelper.LastPeice(f, "\\");

                    doc += "<video width=\"220\" height=\"140\" controls>";
                    doc += "  <source src=\"" + filmn + "\" type=\"video/mp4\">";
                    doc += "</video>";
                }
                if (count < 1)
                {
                    doc += WebDesigner.NoMediaFoundTelladmin;
                }

                return(Htmlbeg + doc + "</center> </body><b><p style=\"color:red\">This page was created on " + AppHelper.ReturnAllTime() + "</p></b>" + WebDesigner.HtmlEnd);
            }
            catch { return("no media found "); }
        }
Ejemplo n.º 6
0
        internal static string ListenDefaultIndex(string rootdir, string prefx, string port_)
        {
            string[] files;
            int      count = 0;

            try
            {
                files = System.IO.Directory.GetFiles(rootdir + "Listen");
                string doc = string.Format("<body background=\"bg.jpg\"><a href 'http://{0}:{1}'> Refresh page </a><br />", prefx, port_);
                doc += "<h2>Enjoy Listening  !!  Rykon Listen </h2><center>\r\n";

                foreach (string f in files)
                {
                    if (!WebServer.isMediaFile(f))
                    {
                        continue;
                    }
                    count++;
                    string filmn = AppHelper.LastPeice(f, "\\");
                    doc += "<h2>" + filmn + "</h2><div class='header' ><br /><audio controls>\r\n";
                    doc += "  <source src=\"" + filmn + "\" type=\"audio/mpeg\">\r\n</audio>\r\n";
                    doc += "<hr /><br />\r\n\r\n</div><style>#header {    background-color:black;    color:white;    text-align:center;    padding:5px;}#nav {    line-height:30px;    background-color:#eeeeee;    height:300px;    width:100px;    float:left;    padding:5px;	      }#section {    width:350px;    float:left;    padding:10px;	  }#footer {    background-color:black;    color:white;    clear:both;    text-align:center;   padding:5px;	  }</style>";
                }
                if (count < 1)
                {
                    doc += WebDesigner.NoMediaFoundTelladmin;
                }
                return(Htmlbeg + doc + "</center> </body><b><p style=\"color:red\">This page was created on " + AppHelper.ReturnAllTime() + "</p></b>" + WebDesigner.HtmlEnd);
            }
            catch { return("no media found "); }
        }