示例#1
0
文件: Sidebar.cs 项目: amka/Norka
        public Sidebar()
        {
            Orientation = Orientation.Vertical;

            DocumentsList = new DocumentsList();

            var addButton = new Button();

            addButton.Image      = Image.NewFromIconName("list-add-symbolic", IconSize.SmallToolbar);
            addButton.ActionName = "document.create";

            var removeButton = new Button();

            removeButton.Image      = Image.NewFromIconName("list-remove-symbolic", IconSize.SmallToolbar);
            removeButton.ActionName = "document.remove";

            ActionBar = new ActionBar();
            ActionBar.Add(addButton);
            ActionBar.Add(removeButton);

            var scrolled = new ScrolledWindow();

            scrolled.Add(DocumentsList);

            Add(scrolled);
            Add(ActionBar);
        }
示例#2
0
 public PersonManagerViewModel()
 {
     LoadSelectedPerson = new Command(LoadSelectedPersonMethod);
     LoadNewPerson      = new Command(LoadNewPersonMethod);
     try
     {
         _GetRecordsCommand = new AsynchronousCommand(SearchMethod);
         actionbar          = new ActionBar();
         actionbar.Add(new ToolBarButton {
             Content = "Person Details", Command = LoadSelectedPerson
         });
         actionbar.Add(new ToolBarButton {
             Content = "New Person", Command = LoadNewPerson
         });
     }
     catch (Exception e)
     {
         ExepionLogger.Logger.LogException(e);
         ExepionLogger.Logger.Show(e);
     }
 }
示例#3
0
        public TransactionManagerViewModel()
        {
            try
            {
                if (DesignerProperties.GetIsInDesignMode(new System.Windows.DependencyObject()))
                {
                    return;
                }

                Transaction  = new skTransaction();
                _NewPurchase = new Command(OpenNewPurchase);
                _UpdateList  = new AsynchronousCommand(SearchMethod);
                _TranDetails = new Command(OpenTranDetails);
                _Export      = new Command(ExportList);
                actionbar    = new ActionBar();
                _Loaded      = new AsynchronousCommand(SearchMethod);

                actionbar.Add(new ToolBarButton {
                    Content = "Add New Purchase", Command = _NewPurchase
                });
                actionbar.Add(new ToolBarButton {
                    Content = "Transaction Details", Command = _TranDetails
                });
                actionbar.Add(new ToolBarButton {
                    Content = "Refresh List", Command = _UpdateList
                });
                actionbar.Add(new ToolBarButton {
                    Content = "Export Current", Command = _Export
                });

                // SourceList = new List<dynamic>(Transaction.GetTransactionList());
                // QuickSearch = new QuickSearch(SourceList);
            }
            catch (Exception E)
            {
                ExepionLogger.Logger.LogException(E);
                ExepionLogger.Logger.Show(E);
            }
        }