Winforms MVP Passive View

Multi tool use
$begingroup$
I am currently in the process of refactoring a monolithic Winforms MVP application to make it testable. I have decided to utilise the Winforms MVP Passive View pattern. After reading many blog posts including Mark Heath I wanted to ensure that my understanding is correct.
Any tips or guidance is greatly appreciated.
IView.cs
public interface IView
{
event EventHandler Load;
event EventHandler CloseClicked;
void CloseView();
}
IClientAView.cs
public interface IClientAImportView : IImportView, IView
{
int BatchRef { get;set; }
void SetGasTotal(int total);
void SetElectricTotal(int total);
void SetDualFuelTotal(int total);
}
IImportView.cs
public interface IImportView
{
string FilePath { get; set; }
event EventHandler BrowseClicked;
event EventHandler ReportsClicked;
event EventHandler ImportClicked;
event EventHandler TransferClicked;
void ShowFileDialog();
}
frmClientAImport.cs
public partial class frmClientAImport : frmTemplate, IClientAImportView
{
public frmClientAImport()
{
InitializeComponent();
}
public void ShowFileDialog()
{
ofdFile.ShowDialog();
FilePath = ofdFile.FileName;
}
public void CloseView()
{
Close();
}
public void SetGasTotal(int total)
{
lblGD.Text = total.ToString();
}
public void SetElectricTotal(int total)
{
lblED.Text = total.ToString();
}
public void SetDualFuelTotal(int total)
{
lblDFD.Text = total.ToString();
}
public int BatchRef
{
get { return int.Parse(txtBatchRef.Text); }
set { txtBatchRef.Text = value.ToString(); }
}
public string FilePath
{
get { return txtFilePath.Text; }
set { txtFilePath.Text = value; }
}
public event EventHandler BrowseClicked
{
add { btnBrowse.Click += value; }
remove { btnBrowse.Click -= value; }
}
public event EventHandler ImportClicked
{
add { btnImport.Click += value; }
remove { btnImport.Click -= value; }
}
public event EventHandler ReportsClicked
{
add { btnReports.Click += value; }
remove { btnReports.Click -= value; }
}
public event EventHandler TransferClicked
{
add { btnTransfer.Click += value; }
remove { btnTransfer.Click -= value; }
}
public event EventHandler CloseClicked
{
add { btnClose.Click += value; }
remove { btnClose.Click -= value; }
}
}
ClientARepository
public class ClientARepository : IClientARepository
{
private DataTable _excelImportTable;
public int GetBatchRef()
{
return SQLHelper.ExecuteScalarDapper<int>("SELECT MAX(BatchRef) + 1 FROM tblCase C WHERE ClientID IN (1234, 5678));
}
public void GetExcelContents(string filePath)
{
_excelImportTable = new DataTable().FromExcel(filePath, true);
}
public void TruncateImportTable()
{
SQLHelper.ExecuteNonQueryDapper("TRUNCATE TABLE tblUMImportClientA");
}
public void TransferFileToDatabase(int batchRef)
{
using (var cn = new SqlConnection(Settings.DBConnectionString))
{
cn.Open();
var dtBCP = new DataTable();
var sqlImportTable = new DataTable();
var adapter = new SqlDataAdapter("SELECT * FROM tblUMImportClientA", cn);
adapter.FillSchema(dtBCP, SchemaType.Source);
SetupImportTable(dtBCP);
using (var bc = new SqlBulkCopy(cn))
{
bc.DestinationTableName = "tblUMImportClientA";
bc.BatchSize = 500;
bc.WriteToServer(dtBCP);
}
SQLHelper.ExecuteNonQueryDapper("prcUMClientAImportProcess", new { BatchRef = batchRef }, CommandType.StoredProcedure );
adapter.Fill(sqlImportTable);
}
}
private void SetupImportTable(DataTable bcpTable)
{
foreach (DataColumn col in _excelImportTable.Columns)
col.ColumnName = bcpTable.Columns[col.Ordinal].ColumnName;
foreach (DataRow rawRow in _excelImportTable.Rows)
{
foreach (DataColumn rawCol in _excelImportTable.Columns)
{
if (rawRow[rawCol].ToString().Trim().Length == 0)
rawRow[rawCol] = DBNull.Value;
DateTime date;
if (rawRow[rawCol].ToString().Trim().Length > 4 && !rawRow[rawCol].ToString().Contains(".") && DateTime.TryParse(rawRow[rawCol].ToString().Trim(), out date))
rawRow[rawCol] = date;
if (bcpTable.Columns[rawCol.Ordinal].DataType == typeof(string) && !string.IsNullOrEmpty(rawRow[rawCol].ToString()) &&
rawRow[rawCol].ToString().Length > bcpTable.Columns[rawCol.Ordinal].MaxLength)
rawRow[rawCol] = rawRow[rawCol].ToString().Substring(0, bcpTable.Columns[rawCol.Ordinal].MaxLength);
}
_excelImportTable.AcceptChanges();
bcpTable.ImportRow(rawRow);
}
}
}
ClientAImportPresenter.cs
public class ClientAImportPresenter
{
private IClientAImportView _view;
private IClientARepository _repository;
private DataTable _importFile;
public ClientAImportPresenter(IClientAImportView view, IClientARepository repository)
{
_view = view;
_repository = repository;
AssignEventHandlers();
}
private void AssignEventHandlers()
{
_view.Load += OnLoad;
_view.CloseClicked += OnClose;
_view.BrowseClicked += OnBrowseClicked;
_view.ImportClicked += OnImportClicked;
}
private void OnLoad(object sender, EventArgs e)
{
_view.BatchRef = _repository.GetBatchRef();
}
private void OnBrowseClicked(object sender, EventArgs e)
{
_view.ShowFileDialog();
}
private void OnImportClicked(object sender, EventArgs e)
{
_repository.GetExcelContents(_view.FilePath);
_repository.TruncateImportTable();
_repository.TransferFileToDatabase(_view.BatchRef);
}
private void OnClose(object sender, EventArgs e)
{
_view.CloseView();
}
c# winforms mvp
$endgroup$
add a comment |
$begingroup$
I am currently in the process of refactoring a monolithic Winforms MVP application to make it testable. I have decided to utilise the Winforms MVP Passive View pattern. After reading many blog posts including Mark Heath I wanted to ensure that my understanding is correct.
Any tips or guidance is greatly appreciated.
IView.cs
public interface IView
{
event EventHandler Load;
event EventHandler CloseClicked;
void CloseView();
}
IClientAView.cs
public interface IClientAImportView : IImportView, IView
{
int BatchRef { get;set; }
void SetGasTotal(int total);
void SetElectricTotal(int total);
void SetDualFuelTotal(int total);
}
IImportView.cs
public interface IImportView
{
string FilePath { get; set; }
event EventHandler BrowseClicked;
event EventHandler ReportsClicked;
event EventHandler ImportClicked;
event EventHandler TransferClicked;
void ShowFileDialog();
}
frmClientAImport.cs
public partial class frmClientAImport : frmTemplate, IClientAImportView
{
public frmClientAImport()
{
InitializeComponent();
}
public void ShowFileDialog()
{
ofdFile.ShowDialog();
FilePath = ofdFile.FileName;
}
public void CloseView()
{
Close();
}
public void SetGasTotal(int total)
{
lblGD.Text = total.ToString();
}
public void SetElectricTotal(int total)
{
lblED.Text = total.ToString();
}
public void SetDualFuelTotal(int total)
{
lblDFD.Text = total.ToString();
}
public int BatchRef
{
get { return int.Parse(txtBatchRef.Text); }
set { txtBatchRef.Text = value.ToString(); }
}
public string FilePath
{
get { return txtFilePath.Text; }
set { txtFilePath.Text = value; }
}
public event EventHandler BrowseClicked
{
add { btnBrowse.Click += value; }
remove { btnBrowse.Click -= value; }
}
public event EventHandler ImportClicked
{
add { btnImport.Click += value; }
remove { btnImport.Click -= value; }
}
public event EventHandler ReportsClicked
{
add { btnReports.Click += value; }
remove { btnReports.Click -= value; }
}
public event EventHandler TransferClicked
{
add { btnTransfer.Click += value; }
remove { btnTransfer.Click -= value; }
}
public event EventHandler CloseClicked
{
add { btnClose.Click += value; }
remove { btnClose.Click -= value; }
}
}
ClientARepository
public class ClientARepository : IClientARepository
{
private DataTable _excelImportTable;
public int GetBatchRef()
{
return SQLHelper.ExecuteScalarDapper<int>("SELECT MAX(BatchRef) + 1 FROM tblCase C WHERE ClientID IN (1234, 5678));
}
public void GetExcelContents(string filePath)
{
_excelImportTable = new DataTable().FromExcel(filePath, true);
}
public void TruncateImportTable()
{
SQLHelper.ExecuteNonQueryDapper("TRUNCATE TABLE tblUMImportClientA");
}
public void TransferFileToDatabase(int batchRef)
{
using (var cn = new SqlConnection(Settings.DBConnectionString))
{
cn.Open();
var dtBCP = new DataTable();
var sqlImportTable = new DataTable();
var adapter = new SqlDataAdapter("SELECT * FROM tblUMImportClientA", cn);
adapter.FillSchema(dtBCP, SchemaType.Source);
SetupImportTable(dtBCP);
using (var bc = new SqlBulkCopy(cn))
{
bc.DestinationTableName = "tblUMImportClientA";
bc.BatchSize = 500;
bc.WriteToServer(dtBCP);
}
SQLHelper.ExecuteNonQueryDapper("prcUMClientAImportProcess", new { BatchRef = batchRef }, CommandType.StoredProcedure );
adapter.Fill(sqlImportTable);
}
}
private void SetupImportTable(DataTable bcpTable)
{
foreach (DataColumn col in _excelImportTable.Columns)
col.ColumnName = bcpTable.Columns[col.Ordinal].ColumnName;
foreach (DataRow rawRow in _excelImportTable.Rows)
{
foreach (DataColumn rawCol in _excelImportTable.Columns)
{
if (rawRow[rawCol].ToString().Trim().Length == 0)
rawRow[rawCol] = DBNull.Value;
DateTime date;
if (rawRow[rawCol].ToString().Trim().Length > 4 && !rawRow[rawCol].ToString().Contains(".") && DateTime.TryParse(rawRow[rawCol].ToString().Trim(), out date))
rawRow[rawCol] = date;
if (bcpTable.Columns[rawCol.Ordinal].DataType == typeof(string) && !string.IsNullOrEmpty(rawRow[rawCol].ToString()) &&
rawRow[rawCol].ToString().Length > bcpTable.Columns[rawCol.Ordinal].MaxLength)
rawRow[rawCol] = rawRow[rawCol].ToString().Substring(0, bcpTable.Columns[rawCol.Ordinal].MaxLength);
}
_excelImportTable.AcceptChanges();
bcpTable.ImportRow(rawRow);
}
}
}
ClientAImportPresenter.cs
public class ClientAImportPresenter
{
private IClientAImportView _view;
private IClientARepository _repository;
private DataTable _importFile;
public ClientAImportPresenter(IClientAImportView view, IClientARepository repository)
{
_view = view;
_repository = repository;
AssignEventHandlers();
}
private void AssignEventHandlers()
{
_view.Load += OnLoad;
_view.CloseClicked += OnClose;
_view.BrowseClicked += OnBrowseClicked;
_view.ImportClicked += OnImportClicked;
}
private void OnLoad(object sender, EventArgs e)
{
_view.BatchRef = _repository.GetBatchRef();
}
private void OnBrowseClicked(object sender, EventArgs e)
{
_view.ShowFileDialog();
}
private void OnImportClicked(object sender, EventArgs e)
{
_repository.GetExcelContents(_view.FilePath);
_repository.TruncateImportTable();
_repository.TransferFileToDatabase(_view.BatchRef);
}
private void OnClose(object sender, EventArgs e)
{
_view.CloseView();
}
c# winforms mvp
$endgroup$
add a comment |
$begingroup$
I am currently in the process of refactoring a monolithic Winforms MVP application to make it testable. I have decided to utilise the Winforms MVP Passive View pattern. After reading many blog posts including Mark Heath I wanted to ensure that my understanding is correct.
Any tips or guidance is greatly appreciated.
IView.cs
public interface IView
{
event EventHandler Load;
event EventHandler CloseClicked;
void CloseView();
}
IClientAView.cs
public interface IClientAImportView : IImportView, IView
{
int BatchRef { get;set; }
void SetGasTotal(int total);
void SetElectricTotal(int total);
void SetDualFuelTotal(int total);
}
IImportView.cs
public interface IImportView
{
string FilePath { get; set; }
event EventHandler BrowseClicked;
event EventHandler ReportsClicked;
event EventHandler ImportClicked;
event EventHandler TransferClicked;
void ShowFileDialog();
}
frmClientAImport.cs
public partial class frmClientAImport : frmTemplate, IClientAImportView
{
public frmClientAImport()
{
InitializeComponent();
}
public void ShowFileDialog()
{
ofdFile.ShowDialog();
FilePath = ofdFile.FileName;
}
public void CloseView()
{
Close();
}
public void SetGasTotal(int total)
{
lblGD.Text = total.ToString();
}
public void SetElectricTotal(int total)
{
lblED.Text = total.ToString();
}
public void SetDualFuelTotal(int total)
{
lblDFD.Text = total.ToString();
}
public int BatchRef
{
get { return int.Parse(txtBatchRef.Text); }
set { txtBatchRef.Text = value.ToString(); }
}
public string FilePath
{
get { return txtFilePath.Text; }
set { txtFilePath.Text = value; }
}
public event EventHandler BrowseClicked
{
add { btnBrowse.Click += value; }
remove { btnBrowse.Click -= value; }
}
public event EventHandler ImportClicked
{
add { btnImport.Click += value; }
remove { btnImport.Click -= value; }
}
public event EventHandler ReportsClicked
{
add { btnReports.Click += value; }
remove { btnReports.Click -= value; }
}
public event EventHandler TransferClicked
{
add { btnTransfer.Click += value; }
remove { btnTransfer.Click -= value; }
}
public event EventHandler CloseClicked
{
add { btnClose.Click += value; }
remove { btnClose.Click -= value; }
}
}
ClientARepository
public class ClientARepository : IClientARepository
{
private DataTable _excelImportTable;
public int GetBatchRef()
{
return SQLHelper.ExecuteScalarDapper<int>("SELECT MAX(BatchRef) + 1 FROM tblCase C WHERE ClientID IN (1234, 5678));
}
public void GetExcelContents(string filePath)
{
_excelImportTable = new DataTable().FromExcel(filePath, true);
}
public void TruncateImportTable()
{
SQLHelper.ExecuteNonQueryDapper("TRUNCATE TABLE tblUMImportClientA");
}
public void TransferFileToDatabase(int batchRef)
{
using (var cn = new SqlConnection(Settings.DBConnectionString))
{
cn.Open();
var dtBCP = new DataTable();
var sqlImportTable = new DataTable();
var adapter = new SqlDataAdapter("SELECT * FROM tblUMImportClientA", cn);
adapter.FillSchema(dtBCP, SchemaType.Source);
SetupImportTable(dtBCP);
using (var bc = new SqlBulkCopy(cn))
{
bc.DestinationTableName = "tblUMImportClientA";
bc.BatchSize = 500;
bc.WriteToServer(dtBCP);
}
SQLHelper.ExecuteNonQueryDapper("prcUMClientAImportProcess", new { BatchRef = batchRef }, CommandType.StoredProcedure );
adapter.Fill(sqlImportTable);
}
}
private void SetupImportTable(DataTable bcpTable)
{
foreach (DataColumn col in _excelImportTable.Columns)
col.ColumnName = bcpTable.Columns[col.Ordinal].ColumnName;
foreach (DataRow rawRow in _excelImportTable.Rows)
{
foreach (DataColumn rawCol in _excelImportTable.Columns)
{
if (rawRow[rawCol].ToString().Trim().Length == 0)
rawRow[rawCol] = DBNull.Value;
DateTime date;
if (rawRow[rawCol].ToString().Trim().Length > 4 && !rawRow[rawCol].ToString().Contains(".") && DateTime.TryParse(rawRow[rawCol].ToString().Trim(), out date))
rawRow[rawCol] = date;
if (bcpTable.Columns[rawCol.Ordinal].DataType == typeof(string) && !string.IsNullOrEmpty(rawRow[rawCol].ToString()) &&
rawRow[rawCol].ToString().Length > bcpTable.Columns[rawCol.Ordinal].MaxLength)
rawRow[rawCol] = rawRow[rawCol].ToString().Substring(0, bcpTable.Columns[rawCol.Ordinal].MaxLength);
}
_excelImportTable.AcceptChanges();
bcpTable.ImportRow(rawRow);
}
}
}
ClientAImportPresenter.cs
public class ClientAImportPresenter
{
private IClientAImportView _view;
private IClientARepository _repository;
private DataTable _importFile;
public ClientAImportPresenter(IClientAImportView view, IClientARepository repository)
{
_view = view;
_repository = repository;
AssignEventHandlers();
}
private void AssignEventHandlers()
{
_view.Load += OnLoad;
_view.CloseClicked += OnClose;
_view.BrowseClicked += OnBrowseClicked;
_view.ImportClicked += OnImportClicked;
}
private void OnLoad(object sender, EventArgs e)
{
_view.BatchRef = _repository.GetBatchRef();
}
private void OnBrowseClicked(object sender, EventArgs e)
{
_view.ShowFileDialog();
}
private void OnImportClicked(object sender, EventArgs e)
{
_repository.GetExcelContents(_view.FilePath);
_repository.TruncateImportTable();
_repository.TransferFileToDatabase(_view.BatchRef);
}
private void OnClose(object sender, EventArgs e)
{
_view.CloseView();
}
c# winforms mvp
$endgroup$
I am currently in the process of refactoring a monolithic Winforms MVP application to make it testable. I have decided to utilise the Winforms MVP Passive View pattern. After reading many blog posts including Mark Heath I wanted to ensure that my understanding is correct.
Any tips or guidance is greatly appreciated.
IView.cs
public interface IView
{
event EventHandler Load;
event EventHandler CloseClicked;
void CloseView();
}
IClientAView.cs
public interface IClientAImportView : IImportView, IView
{
int BatchRef { get;set; }
void SetGasTotal(int total);
void SetElectricTotal(int total);
void SetDualFuelTotal(int total);
}
IImportView.cs
public interface IImportView
{
string FilePath { get; set; }
event EventHandler BrowseClicked;
event EventHandler ReportsClicked;
event EventHandler ImportClicked;
event EventHandler TransferClicked;
void ShowFileDialog();
}
frmClientAImport.cs
public partial class frmClientAImport : frmTemplate, IClientAImportView
{
public frmClientAImport()
{
InitializeComponent();
}
public void ShowFileDialog()
{
ofdFile.ShowDialog();
FilePath = ofdFile.FileName;
}
public void CloseView()
{
Close();
}
public void SetGasTotal(int total)
{
lblGD.Text = total.ToString();
}
public void SetElectricTotal(int total)
{
lblED.Text = total.ToString();
}
public void SetDualFuelTotal(int total)
{
lblDFD.Text = total.ToString();
}
public int BatchRef
{
get { return int.Parse(txtBatchRef.Text); }
set { txtBatchRef.Text = value.ToString(); }
}
public string FilePath
{
get { return txtFilePath.Text; }
set { txtFilePath.Text = value; }
}
public event EventHandler BrowseClicked
{
add { btnBrowse.Click += value; }
remove { btnBrowse.Click -= value; }
}
public event EventHandler ImportClicked
{
add { btnImport.Click += value; }
remove { btnImport.Click -= value; }
}
public event EventHandler ReportsClicked
{
add { btnReports.Click += value; }
remove { btnReports.Click -= value; }
}
public event EventHandler TransferClicked
{
add { btnTransfer.Click += value; }
remove { btnTransfer.Click -= value; }
}
public event EventHandler CloseClicked
{
add { btnClose.Click += value; }
remove { btnClose.Click -= value; }
}
}
ClientARepository
public class ClientARepository : IClientARepository
{
private DataTable _excelImportTable;
public int GetBatchRef()
{
return SQLHelper.ExecuteScalarDapper<int>("SELECT MAX(BatchRef) + 1 FROM tblCase C WHERE ClientID IN (1234, 5678));
}
public void GetExcelContents(string filePath)
{
_excelImportTable = new DataTable().FromExcel(filePath, true);
}
public void TruncateImportTable()
{
SQLHelper.ExecuteNonQueryDapper("TRUNCATE TABLE tblUMImportClientA");
}
public void TransferFileToDatabase(int batchRef)
{
using (var cn = new SqlConnection(Settings.DBConnectionString))
{
cn.Open();
var dtBCP = new DataTable();
var sqlImportTable = new DataTable();
var adapter = new SqlDataAdapter("SELECT * FROM tblUMImportClientA", cn);
adapter.FillSchema(dtBCP, SchemaType.Source);
SetupImportTable(dtBCP);
using (var bc = new SqlBulkCopy(cn))
{
bc.DestinationTableName = "tblUMImportClientA";
bc.BatchSize = 500;
bc.WriteToServer(dtBCP);
}
SQLHelper.ExecuteNonQueryDapper("prcUMClientAImportProcess", new { BatchRef = batchRef }, CommandType.StoredProcedure );
adapter.Fill(sqlImportTable);
}
}
private void SetupImportTable(DataTable bcpTable)
{
foreach (DataColumn col in _excelImportTable.Columns)
col.ColumnName = bcpTable.Columns[col.Ordinal].ColumnName;
foreach (DataRow rawRow in _excelImportTable.Rows)
{
foreach (DataColumn rawCol in _excelImportTable.Columns)
{
if (rawRow[rawCol].ToString().Trim().Length == 0)
rawRow[rawCol] = DBNull.Value;
DateTime date;
if (rawRow[rawCol].ToString().Trim().Length > 4 && !rawRow[rawCol].ToString().Contains(".") && DateTime.TryParse(rawRow[rawCol].ToString().Trim(), out date))
rawRow[rawCol] = date;
if (bcpTable.Columns[rawCol.Ordinal].DataType == typeof(string) && !string.IsNullOrEmpty(rawRow[rawCol].ToString()) &&
rawRow[rawCol].ToString().Length > bcpTable.Columns[rawCol.Ordinal].MaxLength)
rawRow[rawCol] = rawRow[rawCol].ToString().Substring(0, bcpTable.Columns[rawCol.Ordinal].MaxLength);
}
_excelImportTable.AcceptChanges();
bcpTable.ImportRow(rawRow);
}
}
}
ClientAImportPresenter.cs
public class ClientAImportPresenter
{
private IClientAImportView _view;
private IClientARepository _repository;
private DataTable _importFile;
public ClientAImportPresenter(IClientAImportView view, IClientARepository repository)
{
_view = view;
_repository = repository;
AssignEventHandlers();
}
private void AssignEventHandlers()
{
_view.Load += OnLoad;
_view.CloseClicked += OnClose;
_view.BrowseClicked += OnBrowseClicked;
_view.ImportClicked += OnImportClicked;
}
private void OnLoad(object sender, EventArgs e)
{
_view.BatchRef = _repository.GetBatchRef();
}
private void OnBrowseClicked(object sender, EventArgs e)
{
_view.ShowFileDialog();
}
private void OnImportClicked(object sender, EventArgs e)
{
_repository.GetExcelContents(_view.FilePath);
_repository.TruncateImportTable();
_repository.TransferFileToDatabase(_view.BatchRef);
}
private void OnClose(object sender, EventArgs e)
{
_view.CloseView();
}
c# winforms mvp
c# winforms mvp
edited 3 hours ago
JammoD
asked 4 hours ago


JammoDJammoD
15517
15517
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
});
});
}, "mathjax-editing");
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "196"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f215532%2fwinforms-mvp-passive-view%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Code Review Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f215532%2fwinforms-mvp-passive-view%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
qN8vyKPyIKti79RK3Rd6P3Qa,A1qy1gP PWHon1TmjKwiRQ1n sq55,TDe