/// <summary>
        /// Method for showing meter window
        /// </summary>
        /// <param name="meter"></param>
        public void ShowPacWindow(ModbusMeterBase meter)
        {
            PACWindow window = new PACWindow();

            window.Init(meter);
            window.Show();
        }
Exemple #2
0
        /// <summary>
        /// Method invokes when list box id doubleclicked
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CenterListBox_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            try
            {
                if (Simulator.CurrentDevice != null)
                {
                    PACWindow window = new PACWindow();
                    window.Init(Simulator.CurrentDevice);

                    window.ShowDialog();
                }
            }
            catch (Exception err)
            {
                MessageBox.Show("Error while opening window", err.Message, MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }