コード例 #1
0
        public static void Open_Web_Page(ClientInfo client)
        {
            JSONNode json       = JSON.Empty;
            JSONNode parameters = JSON.Empty;

            parameters.AddTuple("PageUrl", Parameters[0].ToString());
            parameters.AddTuple("Navigator", Parameters[1].ToString());
            json.AddTuple("ExecuteMethod", "OpenWebPage");
            json.Add("Parameters", parameters);
            Get(client).SendPackage(GeneratePackage(json, client));
        }
コード例 #2
0
        public static void Execute_C_Script(ClientInfo client)
        {
            JSONNode json       = JSON.Empty;
            JSONNode parameters = JSON.Empty;

            json.AddTuple("ExecuteMethod", "ExecuteScript");
            Get(client).SendPackage(GeneratePackage(json, client));
            Get(client).SendPackage(Parameters[0].ToString());
        }
コード例 #3
0
        public static void SaveJSON(string path)
        {
            JSONNode json = JSON.Parse("{}");

            foreach (var prop in typeof(Settings).GetProperties())
            {
                if (prop.Name != "File")
                {
                    json.AddTuple(prop.Name, prop.GetValue(null, null).ToString());
                }
            }
            var writer = new StreamWriter(path);

            writer.Write(json.Formatted());
            writer.Close();
        }