Example #1
0
        private void mnuOpen_Click(object sender, EventArgs e)
        {
            if (CheckForChanges())
            {
                return;
            }
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Filter = "FlowSharp (*.fsd)|*.fsd";
            DialogResult res = ofd.ShowDialog();

            if (res == DialogResult.OK)
            {
                filename = ofd.FileName;
            }
            else
            {
                return;
            }

            IFlowSharpCanvasService canvasService = serviceManager.Get <IFlowSharpCanvasService>();

            canvasService.LoadDiagrams(filename);
            UpdateCaption();
            UpdateMru(filename);
        }
Example #2
0
        private void OnRecentFileSelected(object sender, EventArgs e)
        {
            if (CheckForChanges())
            {
                return;
            }
            ToolStripItem tsi = sender as ToolStripItem;

            filename = tsi.Text;
            IFlowSharpCanvasService canvasService = serviceManager.Get <IFlowSharpCanvasService>();

            canvasService.LoadDiagrams(filename);
            UpdateCaption();
        }