コード例 #1
0
 private void BtnSave_Click(object sender, EventArgs e)
 {
     if (sfdSave.ShowDialog() == DialogResult.OK)
     {
         using (var stream = sfdSave.OpenFile())
         {
             SlaeIO.Write(Matrix, B, stream);
         }
         NotificationManager.ShowInfo($"File has been saved to directory:{Environment.NewLine}{sfdSave.FileName}");
     }
 }
コード例 #2
0
        private void BtnFileInput_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd;

            if ((ofd = new OpenFileDialog()).ShowDialog() == DialogResult.OK)
            {
                try
                {
                    using (var stream = ofd.OpenFile())
                    {
                        Slae = SlaeIO.Read(stream);
                    }
                    NotificationManager.ShowInfo("Reading completed successfully");
                }
                catch (Exception exc)
                {
                    NotificationManager.ShowError(exc);
                }
            }
        }