コード例 #1
0
 private bool AreEquals ( ReportProject a, ReportProject b)
 {
     return false || a.TotalTime == b.TotalTime && string.Compare (a.Project, b.Project, StringComparison.Ordinal) == 0 && a.Color == b.Color;
 }
コード例 #2
0
        private void SetProjectInfo ( ReportProject selectedProject)
        {
            totalTimeLabel.Text = selectedProject.FormattedTotalTime;
            int currCount = selectedProject.Currencies.Count;

            if (currCount > 0) {
                totalTimeLabel.Center = new CGPoint ( donutChart.PieCenter.X, donutChart.PieCenter.Y - 10);
                string moneyInfo = "";

                currCount = (selectedProject.Currencies.Count > 3) ? 3 : selectedProject.Currencies.Count;
                var  projectCurrencies = selectedProject.Currencies.OrderBy (s => s.Amount.ToString().Length).Reverse<ReportCurrency> ().ToList<ReportCurrency>();
                for (int i = 0; i < currCount; i++) {
                    moneyInfo += projectCurrencies[i].Amount + " " + projectCurrencies[i].Currency + "\n";
                }

                moneyInfo = moneyInfo.Substring (0, moneyInfo.Length - 1);
                moneyLabel.Alpha = 1.0f;
                moneyLabel.Text = moneyInfo;
            } else {
                totalTimeLabel.Center = new CGPoint ( donutChart.PieCenter.X, donutChart.PieCenter.Y);
                moneyLabel.Alpha = 0.0f;
            }
            moneyLabel.SizeToFit ();
        }