//TODO: to get bar data
        //TODO: create new Chart model
        public ActionResult <List <BarModel> > GetBarData()
        {
            BarModel data1 = new BarModel
            {
                Count = 10,
                Month = "January"
            };
            BarModel data2 = new BarModel
            {
                Count = 10,
                Month = "January"
            };
            BarModel data3 = new BarModel
            {
                Count = 10,
                Month = "January"
            };
            List <BarModel> charts = new List <BarModel>
            {
                data1,
                data2,
                data3
            };

            return(charts);
        }
Beispiel #2
0
        /// <summary>
        /// Replace text and visibility of element
        /// </summary>
        /// <param name="element"></param>
        /// <param name="formatProvider"></param>
        public void ReplaceItem(BarModel element, IFormatProvider formatProvider)
        {
            SetVisibilityFromContext(element);

            if (!string.IsNullOrEmpty(element.Title))
            {
                element.Title = ReplaceText(element.Title, formatProvider);
            }
            if (!string.IsNullOrEmpty(element.DataLabelColor))
            {
                element.DataLabelColor = ReplaceText(element.DataLabelColor, formatProvider);
            }
            if (!string.IsNullOrEmpty(element.FontName))
            {
                element.FontName = ReplaceText(element.FontName, formatProvider);
            }
            if (!string.IsNullOrEmpty(element.FontColor))
            {
                element.FontColor = ReplaceText(element.FontColor, formatProvider);
            }
            if (!string.IsNullOrEmpty(element.MajorGridlinesColor))
            {
                element.MajorGridlinesColor = ReplaceText(element.MajorGridlinesColor, formatProvider);
            }
        }
Beispiel #3
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Graph);
            string lip = Intent.GetStringExtra("DataFromOrder") ?? "Data not available";

            int lateOrderY = Convert.ToInt16(NetHttp.FetchWaitAsync(App.Instance.GetUrl("lateOrderYear")).Result);
            int lateOrderM = Convert.ToInt16(NetHttp.FetchWaitAsync(App.Instance.GetUrl("lateOrderMonth")).Result);
            int lateOrderD = Convert.ToInt16(NetHttp.FetchWaitAsync(App.Instance.GetUrl("lateOrderToday")).Result);

            var data  = new[] { lateOrderD, lateOrderM, lateOrderY };
            var color = new Android.Graphics.Color[3] {
                Android.Graphics.Color.DarkGoldenrod, Android.Graphics.Color.Chocolate, Android.Graphics.Color.ForestGreen
            };
            var leg = new[] { "Today", "Current Month", "Current Year" };

            BarModel[] datab = new BarModel[3];
            for (int i = 0; i < 3; i++)
            {
                datab[i] = new BarModel()
                {
                    Value = data[i], Legend = leg[i], Color = color[i]
                };
            }
            var chart = new BarChartView(this);

            chart             = FindViewById <BarChart.BarChartView>(Resource.Id.barChart);
            chart.ItemsSource = datab;
            chart.Invalidate();
            chart.BarWidth       = 150;
            chart.LegendColor    = Android.Graphics.Color.Black;
            chart.LegendFontSize = 24;
        }
Beispiel #4
0
 public BarViewModel(BarModel model)
 {
     _model = model;
     _isExpanded = model.IsExpanded;
     _expand = new RelayCommand(p => this.IsExpanded = true, p => !this.IsExpanded);
     _collapse = new RelayCommand(p => this.IsExpanded = false, p => this.IsExpanded);
 }
 public bool MouseInsideBar(Point mousePosition, BarModel bar)
 {
     return(mousePosition.X >= bar.BarRectangle.Left &&
            mousePosition.X <= bar.BarRectangle.Right &&
            mousePosition.Y >= bar.BarRectangle.Top &&
            mousePosition.Y <= bar.BarRectangle.Bottom);
 }
Beispiel #6
0
        private void DrawBarAndRowText(BarModel newBar, ICollection <string> rowTitleList, Graphics graphics)
        {
            var barBrush = new SolidBrush(newBar.Color);

            if (newBar.IsMouseOver || newBar.IsClicked)
            {
                barBrush = HoverClickSolidBrush;
            }

            graphics.FillRectangle(barBrush, newBar.BarRectangle);
            graphics.DrawRectangle(Pens.Black, newBar.BarRectangle);

            // Draws the rowtext, only once for each machine
            if (!rowTitleList.Contains(newBar.Name))
            {
                graphics.DrawString(newBar.Name,
                                    RowFont,
                                    Brushes.Black,
                                    0,
                                    ChartConstants.BarStartTop + (ChartConstants.BarHeight * (newBar.RowIndex - this.ScrollPosition)) +
                                    (ChartConstants.BarSpace * (newBar.RowIndex - this.ScrollPosition)));

                rowTitleList.Add(newBar.Name);
            }
        }
Beispiel #7
0
        /// <summary>
        /// 添加吧
        /// </summary>
        /// <returns></returns>
        public static bool Add(BarModel model)
        {
            string sql = @"
insert into bar
(Name)
values
(@Name);
select @@identity;
";

            MySqlParameter[] _parameter =
            {
                new MySqlParameter("@Name", MySqlDbType.VarChar, 100)
                {
                    Value = model.Name
                },
            };
            var _ds = DbHelperMySqlForWeiBar.Query(sql, _parameter);

            if (_ds.Tables[0].Rows.Count > 0)
            {
                model.ID = long.Parse(_ds.Tables[0].Rows[0][0].ToString());
                return(true);
            }
            return(false);
        }
Beispiel #8
0
        public ActionResult GetBarData(string Id)
        {
            int             id      = Convert.ToInt32(Id);
            List <BarModel> data    = new List <BarModel>();
            Charity         charity = db.Charities.Find(id);
            //Here MyDatabaseEntities  is our dbContext
            var ABN = charity.ABN;
            List <FinancialNew> finList = db.FinancialNews.Where(i => i.ABN == ABN).ToList();
            BarModel            bar2014 = new BarModel();

            bar2014.year = "2014";
            List <FinancialNew> flist = finList.Where(f => f.FYear == "2014").ToList();

            if (flist.Count != 0)
            {
                bar2014.TotalGrossIncome = finList.Where(f => f.FYear == "2014").ToList()[0].TotalGrossIncome.Value;
                bar2014.Expense          = finList.Where(f => f.FYear == "2014").ToList()[0].Expense.Value;
            }
            BarModel bar2015 = new BarModel();

            bar2015.year = "2015";
            flist        = finList.Where(f => f.FYear == "2015").ToList();
            if (flist.Count != 0)
            {
                bar2015.TotalGrossIncome = finList.Where(f => f.FYear == "2015").ToList()[0].TotalGrossIncome.Value;
                bar2015.Expense          = finList.Where(f => f.FYear == "2015").ToList()[0].Expense.Value;
            }
            BarModel bar2016 = new BarModel();

            bar2016.year = "2016";
            flist        = finList.Where(f => f.FYear == "2016").ToList();
            if (flist.Count != 0)
            {
                bar2016.TotalGrossIncome = finList.Where(f => f.FYear == "2016").ToList()[0].TotalGrossIncome.Value;
                bar2016.Expense          = finList.Where(f => f.FYear == "2016").ToList()[0].Expense.Value;
            }
            data.Add(bar2014);
            data.Add(bar2015);
            data.Add(bar2016);


            var chartData = new object[data.Count + 1];

            chartData[0] = new object[] {
                "Year",
                "Revenue",
                "Expense"
            };

            int j = 0;

            foreach (var i in data)
            {
                j++;
                chartData[j] = new object[] { i.year, i.TotalGrossIncome, i.Expense };
            }
            return(Json(chartData, JsonRequestBehavior.AllowGet));
        }
Beispiel #9
0
        public ActionResult Index(BarModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            return(RedirectToAction("Index"));
        }
Beispiel #10
0
 /// <summary>
 /// Map bussines object into data object
 /// Mapping for id has excluded because for this example i don't need it in mapping from bo to do
 /// </summary>
 /// <param name="bar"></param>
 /// <returns></returns>
 public static Bar MapBussinesObjectToDataObject(BarModel bar)
 {
     return(new Bar()
     {
         Name = bar.Name,
         Size = bar.Size,
         Color = bar.Color,
         DeleteDate = bar.DeleteDate
     });
 }
Beispiel #11
0
 public Game()
 {
     Ball = new BallModel();
     Bar1 = new BarModel {
         PlayerName = "Player1"
     };
     Bar2 = new BarModel {
         PlayerName = "Player2"
     };
     Reset();
 }
Beispiel #12
0
        public ActionResult GetNavBar(BarModel model)
        {
            var identity = (ClaimsIdentity)User.Identity;
            IEnumerable <Claim> claims = identity.Claims;
            Guid id = Guid.Parse(claims.ElementAt(0).Value);

            Account tbl_Accounts = (from e in SISDB.Accounts where e.AccountID == id select e).FirstOrDefault();

            model.FullName = tbl_Accounts.PersonalInformation.FullName;
            return(PartialView("_Navbar", model));
        }
        /// <summary>
        /// Render a table element
        /// </summary>
        /// <param name="table"></param>
        /// <param name="parent"></param>
        /// <param name="context"></param>
        /// <param name="documentPart"></param>
        /// <param name="formatProvider"></param>
        /// <returns></returns>
        public static Run Render(this BarModel barChart, OpenXmlElement parent, ContextModel context, OpenXmlPart documentPart, IFormatProvider formatProvider)
        {
            context.ReplaceItem(barChart, formatProvider);

            Run runItem = null;

            if (!string.IsNullOrWhiteSpace(barChart.DataSourceKey) && context.ExistItem <BarChartModel>(barChart.DataSourceKey))
            {
                // We construct categories and series from the context object
                var contextModel = context.GetItem <BarChartModel>(barChart.DataSourceKey);

                if (contextModel.BarChartContent != null && contextModel.BarChartContent.Categories != null &&
                    contextModel.BarChartContent.Series != null)
                {
                    // Update barChart object :
                    barChart.Categories = contextModel.BarChartContent.Categories.Select(e => new BarCategory()
                    {
                        Name  = e.Name,
                        Color = e.Color
                    }).ToList();

                    // We update
                    barChart.Series = contextModel.BarChartContent.Series.Select(e => new BarSerie()
                    {
                        LabelFormatString = e.LabelFormatString,
                        Color             = e.Color,
                        DataLabelColor    = e.DataLabelColor,
                        Values            = e.Values,
                        Name = e.Name
                    }).ToList();
                }
                else
                {
                    return(runItem);
                }
            }

            switch (barChart.BarChartType)
            {
            case BarChartType.BarChart:
                runItem = CreateBarGraph(barChart, documentPart);
                break;
            }

            if (runItem != null)
            {
                parent.AppendChild(runItem);
            }

            return(runItem);
        }
        public async Task <BarModel> Post()
        {
            var key   = Guid.NewGuid();
            var value = Guid.NewGuid().ToString("N");

            var model = new BarModel
            {
                Key   = key,
                Value = value
            };

            await _service.SetAsync(model);

            return(model);
        }
        /// <summary>
        /// The GenerateDummyData.
        /// </summary>
        /// <param name="viewModel">The viewModel<see cref="BarChartViewModel"/>.</param>
        private void GenerateDummyData(BarChartViewModel viewModel)
        {
            viewModel.Title    = "Bar Chart Test App";
            viewModel.Subtitle = "Show Bar Chart with Dummy Data";
            var n     = 5;
            var range = new RangeDouble(0, 1000);

            for (var i = 0; i < n; i++)
            {
                var model = new BarModel {
                    Index = i, Name = $"Bar Test {i}", Value = (n - i) * (range.Length() / n), VisibleRange = range
                };
                viewModel.BarModels.Add(model);
            }
        }
Beispiel #16
0
        private void InitializeViewModel()
        {
            viewModel = new ViewModel.ViewModel();
            BarModel clipboardBar = new BarModel()
            {
                Name = "工具栏"
            };


            viewModel.Bars.Add(clipboardBar);
            MyCommand printCommand = new MyCommand(printVisa)
            {
                Caption    = "打印",
                LargeGlyph = null,
                SmallGlyph = null
            };
            MyCommand setCommand = new MyCommand(setQZID)
            {
                Caption    = "设置签证号",
                LargeGlyph = null,
                SmallGlyph = null
            };
            MyCommand saveQZIDCommand = new MyCommand(saveQZID)
            {
                Caption    = "保存签证号码",
                LargeGlyph = null,
                SmallGlyph = null
            };
            MyCommand printTable4Command = new MyCommand(printTable4)
            {
                Caption    = "打印表四",
                LargeGlyph = null,
                SmallGlyph = null
            };
            MyCommand showAllSendNoCommand = new MyCommand(showAllSendNo)
            {
                Caption    = "显示所有签证",
                LargeGlyph = null,
                SmallGlyph = null
            };


            clipboardBar.Commands.Add(printCommand);
            clipboardBar.Commands.Add(setCommand);
            clipboardBar.Commands.Add(saveQZIDCommand);
            clipboardBar.Commands.Add(printTable4Command);
            clipboardBar.Commands.Add(showAllSendNoCommand);
        }
Beispiel #17
0
        public ActionResult Index(string id)
        {
            // 查询吧信息
            var bar = BarHelper.GetModelByName(id);

            if (bar == null)
            {
                // 吧不存在,创建一个
                bar = new BarModel()
                {
                    Name = id
                };
                BarHelper.Add(bar);
            }
            return(View(bar));
        }
Beispiel #18
0
        private void InitializeViewModel()
        {
            ViewModel.ViewModel viewModel    = new ViewModel.ViewModel();
            BarModel            clipboardBar = new BarModel()
            {
                Name = "工具栏"
            };


            viewModel.Bars.Add(clipboardBar);
            MyCommand newCommand = new MyCommand(newList)
            {
                Caption    = "新建报审名单",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand sendCommand = new MyCommand(SendList)
            {
                Caption    = "提交报审名单",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand exportCommand = new MyCommand(exportList)
            {
                Caption    = "生成excel表格",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand refreshCommand = new MyCommand(refreshList)
            {
                Caption    = "刷新",
                LargeGlyph = null,
                SmallGlyph = null
            };


            clipboardBar.Commands.Add(newCommand);
            clipboardBar.Commands.Add(sendCommand);
            clipboardBar.Commands.Add(exportCommand);
            clipboardBar.Commands.Add(refreshCommand);

            DataContext = viewModel;
        }
Beispiel #19
0
        /// <summary>
        /// The UpdateBarModels.
        /// </summary>
        /// <param name="barModels">The barModels<see cref="ObservableCollection{BarModel}"/>.</param>
        /// <param name="barValuesModels">The barValuesModels<see cref="IList{BarValuesModel}"/>.</param>
        /// <param name="stringToImageUrlDictionary">The stringToImageUrlDictionary<see cref="Dictionary{string, string}"/>.</param>
        public static void UpdateBarModels(this IList <BarModel> barModels, IList <BarValuesModel> barValuesModels, Dictionary <string, string> stringToImageUrlDictionary)
        {
            barModels.Clear();
            foreach (var valuesModel in barValuesModels)
            {
                var barModel = new BarModel {
                    Index = valuesModel.RankSteps[0], Name = valuesModel.Name, Value = valuesModel.Values[0]
                };
                var icon = stringToImageUrlDictionary.GetImageUrl(barModel.Name);
                if (!string.IsNullOrEmpty(icon))
                {
                    barModel.Icon = icon;
                }

                barModels.Add(barModel);
            }
        }
Beispiel #20
0
        private void ThisAddIn_Startup(object sender, EventArgs e)
        {
            // http://stackoverflow.com/a/12030801/752142
            // http://stackoverflow.com/a/4317263/752142
            XmlDocument doc = new XmlDocument();

            doc.LoadXml(Resources.log4net);
            XmlConfigurator.Configure(doc.DocumentElement);

            IBarModel      barModel      = new BarModel();
            IBarController barController = new BarController(barModel);

            ShapeNameHelper    nameHelper        = new ShapeNameHelper();
            IPowerPointAdapter powerpointAdapter = new PowerPointAdapter(Globals.ThisAddIn.Application, nameHelper);

            Globals.Ribbons.Ribbon.Setup(barController, barModel, powerpointAdapter, nameHelper);
        }
        public List <BarModel> GetBarList(List <ItemModel> itemList)
        {
            var barList = new List <BarModel>();

            itemList.ForEach(x =>
            {
                var bar = new BarModel
                {
                    Name       = x.ItemName,
                    StartValue = x.StartDate,
                    EndValue   = x.StartDate + x.Duration,
                    Duration   = x.Duration,
                    Color      = x.ItemColor,
                    RowIndex   = GetRowIndex(x.ItemName)
                };
                barList.Add(bar);
            });
            return(barList);
        }
Beispiel #22
0
        //void InitmenuList()
        //{
        //    menuList = visaORM.TB_Menu.Where(m=>m.FStatus==true).ToList();
        //}


        private void InitializeViewModel()
        {
            ViewModel.ViewModel viewModel    = new ViewModel.ViewModel();
            BarModel            clipboardBar = new BarModel()
            {
                Name = "工具栏"
            };

            viewModel.Bars.Add(clipboardBar);


            MyCommand addCommand = new MyCommand(UserAdd)
            {
                Caption    = "新增",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand delCommand = new MyCommand(UserDel)
            {
                Caption    = "删除",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand saveCommand = new MyCommand(UserSave)
            {
                Caption    = "保存",
                LargeGlyph = null,
                SmallGlyph = null
            };

            if (MainContext.UserCompanyName.ToUpper() == "ADMIN")
            {
                clipboardBar.Commands.Add(addCommand);
                clipboardBar.Commands.Add(delCommand);
            }
            clipboardBar.Commands.Add(saveCommand);
            DataContext = viewModel;
        }
Beispiel #23
0
        private void InitializeViewModel()
        {
            ViewModel.ViewModel viewModel    = new ViewModel.ViewModel();
            BarModel            clipboardBar = new BarModel()
            {
                Name = "工具栏"
            };


            viewModel.Bars.Add(clipboardBar);

            MyCommand addCommand = new MyCommand(NewModel)
            {
                Caption    = "新增",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand delCommand = new MyCommand(DelModel)
            {
                Caption    = "删除",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand saveCommand = new MyCommand(SaveModel)
            {
                Caption    = "保存",
                LargeGlyph = null,
                SmallGlyph = null
            };


            clipboardBar.Commands.Add(addCommand);
            clipboardBar.Commands.Add(delCommand);
            clipboardBar.Commands.Add(saveCommand);

            DataContext = viewModel;
        }
Beispiel #24
0
        private void InitializeViewModel()
        {
            ViewModel.ViewModel viewModel    = new ViewModel.ViewModel();
            BarModel            clipboardBar = new BarModel()
            {
                Name = "工具栏"
            };


            viewModel.Bars.Add(clipboardBar);
            MyCommand newCommand = new MyCommand(auditList)
            {
                Caption    = "审核签证",
                LargeGlyph = null,
                SmallGlyph = null
            };


            clipboardBar.Commands.Add(newCommand);

            DataContext = viewModel;
        }
        internal BarModel GetBar(BarModel bar, DateTime startDate, double pixelsPerSecond, int scrollPosition, int chartWidth)
        {
            var availableWidth = chartWidth - ChartConstants.BarStartLeft - ChartConstants.BarStartRight;

            bar.Visible = true;

            var startTimeSpan = bar.StartValue - startDate;
            var startLocation = (int)(pixelsPerSecond * startTimeSpan.TotalSeconds);
            var x             = ChartConstants.BarStartLeft + startLocation;
            var y             = ChartConstants.BarStartTop + (ChartConstants.BarHeight * (bar.RowIndex - scrollPosition)) +
                                (ChartConstants.BarSpace * (bar.RowIndex - scrollPosition)) + 4;
            var width = (int)(pixelsPerSecond * bar.Duration.TotalSeconds);

            //restrict the width if longer than the right size
            if (x + width > (chartWidth - ChartConstants.BarStartRight))
            {
                width = availableWidth + ChartConstants.BarStartLeft - x;
            }

            bar.BarRectangle = new Rectangle(x, y, width, ChartConstants.BarHeight);

            return(bar);
        }
Beispiel #26
0
        private void InitializeViewModel()
        {
            ViewModel.ViewModel viewModel    = new ViewModel.ViewModel();
            BarModel            clipboardBar = new BarModel()
            {
                Name = "工具栏"
            };


            viewModel.Bars.Add(clipboardBar);
            MyCommand prevCommand = new MyCommand(submitVisa)
            {
                Caption    = "提交签证申请",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand printCommand = new MyCommand(printVisa)
            {
                Caption    = "打印名单号签证列表(表1)",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand refreshCommand = new MyCommand(refreshSubmit)
            {
                Caption    = "刷新",
                LargeGlyph = null,
                SmallGlyph = null
            };

            clipboardBar.Commands.Add(prevCommand);
            clipboardBar.Commands.Add(printCommand);
            clipboardBar.Commands.Add(refreshCommand);

            DataContext = viewModel;
        }
Beispiel #27
0
        private static List <BarModel> GenerateCndelStickBars(int maxBars)
        {
            var random    = new Random();
            var lastPrice = (float)random.Next(100);
            var bars      = new List <BarModel>();
            var time      = 0f;

            var dateTime = DateTime.Now;

            for (int i = 0; i < maxBars; i++)
            {
                var bar = new BarModel
                {
                    Time = dateTime,
                    Open = lastPrice,
                    High = lastPrice + (float)random.Next(1000) / 100,
                    Low  = lastPrice - (float)random.Next(1000) / 100,
                };

                bar.Close = (float)Math.Round(random.NextDouble() * (bar.High - bar.Low) + bar.Low, 3);
                bar.High  = Math.Max(bar.High, bar.Open);
                bar.Low   = Math.Min(bar.Low, bar.Open);
                if (bar.Close < bar.Open)
                {
                    bar.IsBear = true;
                }

                bars.Add(bar);
                lastPrice     = (float)bar.Close;
                bar.LastPrice = lastPrice;
                time         += 40f;
                dateTime      = dateTime.AddMinutes(1);
            }

            return(bars);
        }
Beispiel #28
0
        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
            var testModels = new List <TestModel>
            {
                new() { Id = Guid.NewGuid(), FooId = 1 },
                new() { Id = Guid.NewGuid(), FooId = 2 },
                new() { Id = Guid.NewGuid(), FooId = 3 },
                new() { Id = Guid.NewGuid(), FooId = 4 },
                new() { Id = Guid.NewGuid(), FooId = 5 },
                new() { Id = Guid.NewGuid(), FooId = 5 }
            };

            modelBuilder.Entity <TestModel>().HasData(testModels);
            var barModel = new BarModel {
                Id = Guid.NewGuid(), TestId = testModels.First().Id
            };

            modelBuilder.Entity <BarModel>().HasData(barModel);
            modelBuilder.Entity <FooModel>().HasData(new FooModel {
                Id = Guid.NewGuid(), BarId = barModel.Id
            });
        }
    }
Beispiel #29
0
        //[HttpGet("locales/{locale}/{file}.json")]
        //public IActionResult GetTranslation([FromRoute]string locale, [FromRoute] string file)
        //{
        //    var path = $"https://raw.githubusercontent.com/cryptoworkplace/translations/master/site/locales/{locale}/{file}.json";

        //    return RedirectPermanent(path);
        //}

        public async Task <IActionResult> Index()
        {
            int sold, cap;

            try
            {
                sold = (int)UnitConversion.Convert.FromWei(await _contract.TokenSoldAsync());
                sold = sold > 0 ? sold : 8031923;
                cap  = (int)UnitConversion.Convert.FromWei(await _contract.GetCapAsync());
                cap  = cap > 0 ? cap : 15000000;
            }
            catch
            {
                sold = 8031923;
                cap  = 15000000;
            }
            var model = new BarModel
            {
                Sold = sold,
                Cap  = cap
            };

            return(View(model));
        }
Beispiel #30
0
 public static HudBar FromModel(BarModel model, TextStyle textStyle) => (model == null) || model.Hidden ? null : new HudBar(model, textStyle);
Beispiel #31
0
 private HudBar(BarModel model, TextStyle textStyle) : this(model.Label, model.Value, model.Max, model.ValueStyle, textStyle, model.Tooltip, model.Thresholds, model.OnClick)
 {
 }
Beispiel #32
0
 public MainWindowViewModel()
 {
     _barModel = new BarModel();
     _showBar = new RelayCommand(p => this.Bar = new BarViewModel(_barModel), p => null == _bar);
     _hideBar = new RelayCommand(p => this.Bar = null, p => null != _bar);
 }