Exemplo n.º 1
0
 public static void AssertTypes(this AlarmView view, AlarmLevel level, AlarmCategory category, AlarmType type,
                                string typeDescription)
 {
     Assert.AreEqual(view.AlarmTypeDescription, typeDescription);
     Assert.AreEqual(view.AlarmCategoryDescription, category.GetEnumDescription());
     Assert.AreEqual(view.AlarmLevelDescription, level.GetEnumDescription());
 }
Exemplo n.º 2
0
        /// <summary>
        /// On Picker Date Changed
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnValueChanged(object sender, Microsoft.Phone.Controls.DateTimeValueChangedEventArgs e)
        {
            KreyosUtils.Log("SimpleAlarmScreen::OnValueChanged", "Value Changed..");
            KreyosTimePicker timePicker = sender as KreyosTimePicker;
            DateTime?        timeSet    = timePicker.Value;
            AlarmView        view       = m_alarmViews[m_selectedIndex];

            view.SetAlarm((DateTime)timeSet);
            view.UpdateView((bool)view.ToggleSwitch.IsChecked);
        }
Exemplo n.º 3
0
        // 알람
        private void alarm(string data)
        {
            string name    = data.Split('&')[0];
            string message = data.Split('&')[1];

            App.Current.Dispatcher.Invoke((Action) delegate
            {
                AlarmView alarmView = new AlarmView(name, message);
                alarmView.Topmost   = true;
                alarmView.Show();
            });
        }
Exemplo n.º 4
0
        /****************************************************************
         * Constructor
         **/
        public SilentAlarmScreen()
        {
            InitializeComponent();

            m_alarmViews    = new AlarmView[3];
            m_alarmViews[0] = new AlarmView(this, 0);
            m_alarmViews[1] = new AlarmView(this, 1);
            m_alarmViews[2] = new AlarmView(this, 2);

            // this must always be invisible and disabled
            m_ctpContainer = this.ctp_time_picker;
        }
Exemplo n.º 5
0
        private void OnUpdateWatch(object sender, System.Windows.Input.GestureEventArgs e)
        {
            KreyosUtils.Log("SimpleAlarmScreen::OnUpdateWatch", "Update..");

            for (int i = 0; i < m_alarmViews.Length; i++)
            {
                /*
                 * AlarmView view = m_alarmViews[0];
                 * KreyosUtils.Log("Alarm Status", "" + view.ToggleSwitch.IsChecked);
                 * KreyosUtils.Log("Alarm Time", "" + view.AlarmData.Hour);
                 */

                AlarmView alarm = m_alarmViews[i];
                if (!(bool)alarm.ToggleSwitch.IsChecked)
                {
                    continue;
                }

                BluetoothManager.Instance.SetAlarm(i, true, alarm.AlarmData.Hour, alarm.AlarmData.Minute);
            }
        }
Exemplo n.º 6
0
        public void Process(string listFile)
        {
            alarmList = new List <AlarmInfo>();
            // List作成
            var list = Utils.Utils.GetOrderList(listFile);

            if (list == null)
            {
                alarmList.Add(new AlarmInfo()
                {
                    Time   = DateTime.Now,
                    Result = "リストの作成に失敗しました"
                });

                var alarmView = new AlarmView(alarmList);
                alarmView.Topmost = true;
                alarmView.Show();
                return;
            }

            // ブランクマップ作成処理
            foreach (var order in list)
            {
                CreateMap(order);
            }

            if (alarmList.Count > 0)
            {
                var alarmView = new AlarmView(alarmList);
                alarmView.Topmost = true;
                alarmView.Show();
            }

            /*
             * if (WindowManager.IsOpenWindow<AlarmView>() == false)
             * {
             *  Application.Current.Shutdown();
             * }
             */
        }
Exemplo n.º 7
0
        /****************************************************************
         * UI Callbacks
         **/
        /// <summary>
        /// Toggle Switch Button Callback
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnEnabledAlarm(object sender, System.Windows.Input.GestureEventArgs e)
        {
            KreyosToggleSwitchButton button = sender as KreyosToggleSwitchButton;

            KreyosUtils.Log("SimpleAlarmScreen::OnEnabledAlarm", "Tap SelectedItem:" + e + " IsChecked:" + button.IsChecked);

            int index = AlarmView.GetIndex(button.Name);

            if (index >= 0 && index <= m_alarmViews.Length - 1)
            {
                AlarmView view = m_alarmViews[index];
                view.UpdateView((bool)button.IsChecked);
                m_selectedIndex = index;

                // show picker
                if ((bool)button.IsChecked)
                {
                    m_ctpContainer.Value = (DateTime?)view.AlarmData;
                    m_ctpContainer.ClickTemplateButton();
                }
            }
        }
Exemplo n.º 8
0
        void ReleaseDesignerOutlets()
        {
            if (AddToMyProfileButton != null)
            {
                AddToMyProfileButton.Dispose();
                AddToMyProfileButton = null;
            }

            if (AlarmDetailsBottomConstraint != null)
            {
                AlarmDetailsBottomConstraint.Dispose();
                AlarmDetailsBottomConstraint = null;
            }

            if (AlarmDetailsLabel != null)
            {
                AlarmDetailsLabel.Dispose();
                AlarmDetailsLabel = null;
            }

            if (AlarmDetailsTopConstraint != null)
            {
                AlarmDetailsTopConstraint.Dispose();
                AlarmDetailsTopConstraint = null;
            }

            if (AlarmTextLabel != null)
            {
                AlarmTextLabel.Dispose();
                AlarmTextLabel = null;
            }

            if (AlarmView != null)
            {
                AlarmView.Dispose();
                AlarmView = null;
            }

            if (DeleteButton != null)
            {
                DeleteButton.Dispose();
                DeleteButton = null;
            }

            if (MedicineDoseLabel != null)
            {
                MedicineDoseLabel.Dispose();
                MedicineDoseLabel = null;
            }

            if (MedicineNameLabel != null)
            {
                MedicineNameLabel.Dispose();
                MedicineNameLabel = null;
            }

            if (ReadMoreView != null)
            {
                ReadMoreView.Dispose();
                ReadMoreView = null;
            }
        }
Exemplo n.º 9
0
 public static void AssertBasicParameters(this AlarmView view, int eNodebId, string details)
 {
     Assert.AreEqual(view.ENodebId, eNodebId);
     Assert.AreEqual(view.Details, details);
 }
Exemplo n.º 10
0
 public static void AssertPosition(this AlarmView view, string position, double duration)
 {
     Assert.AreEqual(view.Position, position);
     Assert.AreEqual(view.Duration, duration);
 }