using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using uit=UIType.Ownership;
namespace UIInterface
{
namespace TransactionItems
{
/*
View Presenter
*<- SetPresenter(this) <-|
*<- Init({"BTW", "DAR"},{"EMGroc", "EPGroc"}, false)<-|
*<- SetRowCount(2) <-|
*<- SetDescrip("milk" ,0) <-|
*<- SetAmount( "245" ,0) <-|
*<- SetAccount("EMGroc",0) <-|
*<- SetShare( "1" ,0, 0) <-|
*<- SetShare( "1" ,0, 1) <-|
*<- SetDescrip("liver" ,1) <-|
*<- SetAmount( "245" ,1) <-|
*<- SetAccount("EMGroc",1) <-|
*<- SetShare( "1" ,1, 0) <-|
*<- SetShare( "0" ,1, 1) <-|
*<- SetBalance("0" ,1, 1) <-|
*<- ShowUntilUserDoneAndThenDestroy() <-|
|-> DisplayAsCentsDesired(true) ->*
*<- IndicateCentsBeingDisplayed(true) <-|
|-> DisplayWithReverseSignDesired(true) ->*
*<- IndicateSignReversed(true) <-|
|-> EditDescripDesired(0) ->* (Editting)
(Ed) *<- true <-| (Editting)
(Ed) (Editting)
(Ed) |-> SetValueAndEndEditOrReturnError("Org Milk") ->*
*<- null <-|
|-> EditShareDesired(0, 1) ->* (Editting)
(Ed) *<- true <-| (Editting)
(Ed) (Editting)
(Ed) |-> SetValueAndEndEditOrReturnError("one") ->* (Editting)
(Ed) *<- "must be a number" <-| (Editting)
(Ed) (Editting)
|-> CancelEdit() ->*
*<- SetShare( "1" ,0, 1) <-|
|-> NewRecordDesired() ->*
*<- FreezeDisplay() <-|
*<- SetRowCount(3) <-|
*<- SetDescrip("MiscItem" ,2) <-|
*<- SetAmount( "0" ,2) <-|
*<- SetAccount("EMGroc" ,2) <-|
*<- SetShare( "1" ,2, 0) <-|
*<- SetShare( "1" ,2, 1) <-|
*<- UpdateDisplay() <-|
*/
public interface IPresenter
{
void NewRecordDesired();
bool EditDescripDesired(int iRow);
bool EditAmountDesired(int iRow);
bool EditAccountDesired(int iRow);
bool EditShareDesired(int iRow, int iParticipantIndex);
string SetValueAndEndEditOrReturnError(string strNewVal);
void CancelEdit();
void BeginBatchUpdates();
void EndBatchUpdates();
void DisplayAsCentsDesired(bool b);
void DisplayWithReverseSignDesired(bool b);
void CloseAndAcceptDesired();
}
public interface IView : UIInterface.IView
{
void SetPresenter(IPresenter aPresenter);
void Init(string[] arrParticipants, string[] arrAccountOptions, bool bReadOnly);
void SetRowCount(int iRows);
void SetDescrip(string str, int iRow);
void SetAmount(string str, int iRow);
void SetAccount(string str, int iRow);
void SetShare(string str, int iRow, int iParticipantIndex);
void IndicateCentsBeingDisplayed(bool b);
void IndicateSignReversed(bool b);
void SetBalance(string str, bool bInBalance);
void FreezeDisplay();
void UpdateDisplay();
void ShowUntilUserDoneAndThenDestroy();
void Close();
}
}
}