Esempio n. 1
0
        public FormMain()
        {
            InitializeComponent();

            invoker  = new AccountingInvoker();
            receiver = new InfoAccountingReceiver();

            modifyDateCommnad                  = new ModifyDateNameCommand(receiver, this);
            modifyDatePriceCommand             = new ModifyDatePriceCommand(receiver, this);
            modifyDateTableAndPriceCommand     = new ModifyDateTableAndPriceCommand(receiver, this);
            modifyItemNameCommand              = new ModifyItemNameCommand(receiver, this);
            modifyItemPriceCommand             = new ModifyItemPriceCommand(receiver, this);
            modifyItemTableNameAndPriceCommand = new ModifyItemTableNameAndPriceCommand(receiver, this);
            modifyTotalCommand                 = new ModifyTotalCommand(receiver, this);
            getDateMoneyCommand                = new GetDateMoneyCommand(receiver, this);
            getItemMoneyCommnad                = new GetItemMoneyCommnad(receiver, this);
            deleteItemCommand                  = new DeleteItemCommand(receiver, this);
            selectPathCommand                  = new SelectPathCommand(receiver, this);
            saveAllCommand     = new SaveAllCommand(receiver, this);
            readFileCommand    = new ReadFileCommand(receiver, this);
            saveToExcelCommand = new SaveToExcelCommand(receiver, this);

            AccountingInvoker.ShowDialogEvent += SetDialogShow;

            label_Choose_Date.Text = MyMonthCalendar.TodayDate.ToString("yyyy/M/d");

            MyListView.GridLines     = true;
            MyListView.FullRowSelect = true;

            MyListView.View        = View.Details;
            MyListView.Scrollable  = true;
            MyListView.MultiSelect = false;

            MyListView.Columns.Add("Additional Item", 150, HorizontalAlignment.Center);
            MyListView.Columns.Add("Price", 50, HorizontalAlignment.Center);
        }
Esempio n. 2
0
 public AccountingCommand(InfoAccountingReceiver accountingInfo, FormMain formMain)
 {
     this.accountingInfo = accountingInfo;
     this.formMain       = formMain;
 }
 public ReadFileCommand(InfoAccountingReceiver accountingInfo, FormMain formMain) : base(accountingInfo, formMain)
 {
     return;
 }
 public SaveToExcelCommand(InfoAccountingReceiver accountingInfo, FormMain formMain) : base(accountingInfo, formMain)
 {
     return;
 }
 public SaveExecelFileCommand(InfoAccountingReceiver accountingInfo, FormMain formMain) : base(accountingInfo, formMain)
 {
     _isOpenFileDialog = false;
     _filterName       = "Txt file|*.txt|Acc file|*.acc";
     _title            = "Save Account File";
 }
 public SaveFileCommand(InfoAccountingReceiver accountingInfo, FormMain formMain) : base(accountingInfo, formMain)
 {
     _isOpenFileDialog = true;
     _filterName       = "excel file|*.xlsx";
     _title            = "Save Account File";
 }
 public SelectPathCommand(InfoAccountingReceiver accountingInfo, FormMain formMain) : base(accountingInfo, formMain)
 {
     return;
 }
 public SelectReadFileCommand(InfoAccountingReceiver accountingInfo, FormMain formMain) : base(accountingInfo, formMain)
 {
     _filterName       = "Txt file|*.txt|Acc file|*.acc";
     _title            = "Read Account File";
     _isOpenFileDialog = true;
 }
 public DeleteItemCommand(InfoAccountingReceiver accountingInfo, FormMain formMain) : base(accountingInfo, formMain)
 {
     return;
 }
 public GetItemMoneyCommnad(InfoAccountingReceiver accountingInfo, FormMain formMain) : base(accountingInfo, formMain)
 {
     return;
 }
 public GetDateMoneyCommand(InfoAccountingReceiver accountingInfo, FormMain formMain) : base(accountingInfo, formMain)
 {
     return;
 }
 public ModifyTotalCommand(InfoAccountingReceiver accountingInfo, FormMain formMain) : base(accountingInfo, formMain)
 {
     return;
 }
 public ModifyItemTableNameAndPriceCommand(InfoAccountingReceiver accountingInfo, FormMain formMain) : base(accountingInfo, formMain)
 {
     return;
 }