Ejemplo n.º 1
0
 public FENSpecifier(SerializationModes mode, string startValue)
 {
     InitializeComponent();
     this.saveDiag.Filter = Main.FILETYPE_FEN;
     this.openDiag.Filter = Main.FILETYPE_FEN;
     this.setMode(mode);
     this.Result = startValue;
 }
Ejemplo n.º 2
0
        public FENSpecifier(SerializationModes mode, Board b)
        {
            InitializeComponent();
            this.saveDiag.Filter = Main.FILETYPE_FEN;
            this.openDiag.Filter = Main.FILETYPE_FEN;
            this.setMode(mode);

            if (b != null)
                this.Result = new FENSerializer().Serialize(b);
        }
Ejemplo n.º 3
0
        public void setMode(SerializationModes mode)
        {
            this.mode = mode;

            switch (mode)
            {
                case SerializationModes.Input:
                    pnlInput.Enabled = true;
                    txtInput.ReadOnly = false;
                    pnlOutput.Enabled = false;
                    break;
                case SerializationModes.Output:
                default:
                    pnlInput.Enabled = false;
                    pnlOutput.Enabled = true;
                    txtInput.ReadOnly = true;
                    break;
            }
        }
Ejemplo n.º 4
0
 public FENSpecifier(SerializationModes mode)
     : this(mode, String.Empty)
 {
 }