示例#1
0
            public GfxItem(Confetti owner, IItem item)
            {
                m_owner = owner;
                m_item  = item;

                Icon  = m_item.Icon;
                Label = m_item.Label;
                Icon.MouseLeftButtonDown += HandleMouseLeftButtonDown;
            }
示例#2
0
        // Notes:
        //  - This chart is used to show comparitive account value over time.
        //  - The axes are common value vs. time.
        //  - Time0 = The bitcoin epoch. 1 unit = 1 day
        //  - Use current prices
        public EquityChart(Model model)
        {
            InitializeComponent();
            DockControl        = new DockControl(this, "Equity");
            Chart              = m_chart_equity;
            Equity             = new Equity(model);
            GfxEquity          = new GfxObjects.Equity(Equity);
            GfxCompletedOrders = new GfxObjects.Confetti();
            GfxTransfers       = new GfxObjects.Confetti();
            Model              = model;

            // Commands
            ShowChartOptions          = Command.Create(this, ShowChartOptionsInternal);
            ToggleIncludeTransfers    = Command.Create(this, ToggleIncludeTransfersInternal);
            ToggleShowCompletedOrders = Command.Create(this, ToggleShowCompletedOrdersInternal);
            ToggleShowTransfers       = Command.Create(this, ToggleShowTransfersInternal);
            AutoRange = Command.Create(this, AutoRangeInternal);

            IsVisibleChanged += delegate { AutoRangeIfNeeded(); };
            ModifyContextMenus();
            DataContext = this;
        }