Exemple #1
0
    /// <summary>
    /// Copies coordinates to clipboard
    /// </summary>
    public void SaveToFile()
    {
        var path = FileBrowser.SaveFile("Save", Environment.SpecialFolder.Desktop.ToString(), "GearEdit", "txt");

        if (path != "")
        {
            StreamWriter writer = new StreamWriter(path);
            writer.Write(text);
            writer.Close();
            copiedAnimator.Blink();
        }
    }
Exemple #2
0
    /// <summary>
    /// Locates gear positions and types from clipboard text
    /// </summary>
    public void LoadFromFile()
    {
        string[] path = FileBrowser.OpenFiles("Open", Environment.SpecialFolder.Desktop.ToString(), "txt", false);
        if (path.Length == 0)
        {
            return;
        }

        StreamReader reader = new StreamReader(path[0]);
        string       _text  = reader.ReadToEnd();

        reader.Close();

        PlaceGearsFromCoordinates(_text);

        pastedAnimator.Blink();
    }