Пример #1
0
            public void AddValue(DateTime Date, SteamStatus Status)
            {
                if (Status != previousAddition)
                {
                    switch (previousAddition)
                    {
                    case SteamStatus.InGame:
                        InGameValues.Add(new DateModel {
                            DateTime = Date, Value = 4
                        });
                        InGameValues.Add(new DateModel {
                            DateTime = Date, Value = Double.NaN
                        });
                        break;

                    case SteamStatus.Online:
                        OnlineValues.Add(new DateModel {
                            DateTime = Date, Value = 3
                        });
                        OnlineValues.Add(new DateModel {
                            DateTime = Date, Value = Double.NaN
                        });
                        break;

                    case SteamStatus.Away:
                        AwayValues.Add(new DateModel {
                            DateTime = Date, Value = 2
                        });
                        AwayValues.Add(new DateModel {
                            DateTime = Date, Value = Double.NaN
                        });
                        break;

                    case SteamStatus.Snooze:
                        SnoozeValues.Add(new DateModel {
                            DateTime = Date, Value = 1
                        });
                        SnoozeValues.Add(new DateModel {
                            DateTime = Date, Value = Double.NaN
                        });
                        break;

                    case SteamStatus.Offline:
                        OfflineValues.Add(new DateModel {
                            DateTime = Date, Value = 0
                        });
                        OfflineValues.Add(new DateModel {
                            DateTime = Date, Value = Double.NaN
                        });
                        break;
                    }
                    previousAddition = Status;
                }
                switch (Status)
                {
                case SteamStatus.InGame:
                    InGameValues.Add(new DateModel {
                        DateTime = Date, Value = 4
                    });
                    break;

                case SteamStatus.Online:
                    OnlineValues.Add(new DateModel {
                        DateTime = Date, Value = 3
                    });
                    break;

                case SteamStatus.Away:
                    AwayValues.Add(new DateModel {
                        DateTime = Date, Value = 2
                    });
                    break;

                case SteamStatus.Snooze:
                    SnoozeValues.Add(new DateModel {
                        DateTime = Date, Value = 1
                    });
                    break;

                case SteamStatus.Offline:
                    OfflineValues.Add(new DateModel {
                        DateTime = Date, Value = 0
                    });
                    break;
                }
            }