示例#1
0
        private static int Run(string Arguments)
        {
            ProgramExecuter exec = new ProgramExecuter();

            exec.ErrorExecuteProgram += (sender, message) => ErrorChangeMode?.Invoke(message);
            return(exec.ExecuteProgramWithElevation(CurentAppDirectory.CreateFullPathForFile("ChangeWorkMode.exe"), Arguments));
        }
示例#2
0
        private void  LoadFromFile()
        {
            using (FileStream fs = new FileStream(WebPlaceSettings.ConfigUri, FileMode.OpenOrCreate))
            {
                XmlSerializer formatter = new XmlSerializer(typeof(GeneralSettings));
                WebPlaceSettings.AlterStartURL = CurentAppDirectory.CreateFullPathForFile("indexwebplace.html");

                WebPlaceSettings.StartUrl = "https://oncebet.com/WebPlace2.html";
                //WebPlaceSettings.StartUrl = WebPlaceSettings.AlterStartURL;
                try
                {
                    GeneralSettings GS = (GeneralSettings)formatter.Deserialize(fs);
                    WebPlaceSettings.PasswordHash = GS.PasswordHash;
                    WebPlaceSettings.CustomerMode = GS.CustomerMode;
                }
                catch
                {
                    WebPlaceSettings.PasswordHash = "";
                    WebPlaceSettings.FirstBoot    = true;
                    WebPlaceSettings.CustomerMode = false;
                }
            }
        }