Пример #1
0
        //Pull
        private void button6_Click(object sender, EventArgs e)
        {
            GitMessage msg = new GitMessage(branch.Text, "pull");

            File.WriteAllText("./GitOutMessages/out.json", JsonConvert.SerializeObject(msg));

            readPull();
        }
Пример #2
0
        //Push
        private void button5_Click(object sender, EventArgs e)
        {
            string      id          = Guid.NewGuid().ToString();
            string      msg_sender  = "git://../sudoku_communicate?remoteName=origin&remotePath=https://github.com/sudokuGit/sudoku_communicate.git";
            string      instruction = "display";
            JsonMessage push_sudoku = new JsonMessage(msg_sender, instruction, sudokuValues, id);

            Directory.CreateDirectory("../../../../sudoku_communicate/" + branch.Text);
            File.WriteAllText("../../../../sudoku_communicate/" + branch.Text + "/sudoku.json", JsonConvert.SerializeObject(push_sudoku));

            GitMessage msg      = new GitMessage(branch.Text, "push");
            string     push_msg = JsonConvert.SerializeObject(msg);

            File.WriteAllText("./GitOutMessages/out.json", push_msg);
        }