コード例 #1
0
ファイル: MainViewModel.cs プロジェクト: Toudahl/KanbanBoard
 /// <summary>
 /// Opens the Save As dialog, and allow the user to pick the location and name for storing the Kanban Board file
 /// </summary>
 private void SaveAsDialog()
 {
     _saveAsFileDialog.ShowDialog();
     if (_saveAsFileDialog.FileName != "")
     {
         _boardFileNameAndPath = _saveAsFileDialog.FileName;
         PersistenceHandler.Save(_boardContainer, _boardFileNameAndPath);
     }
 }
コード例 #2
0
ファイル: MainViewModel.cs プロジェクト: Toudahl/KanbanBoard
 /// <summary>
 /// Saves the board to a file, using the allready set file name and path.
 /// If it has not been set, it will open the <see cref="SaveAsDialog()"/>
 /// </summary>
 private void SaveBoard()
 {
     if (_boardFileNameAndPath != null)
     {
         PersistenceHandler.Save(_boardContainer, _boardFileNameAndPath);
     }
     else
     {
         SaveAsDialog();
     }
 }