private void savedLamps_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            object selected = savedLamps.SelectedItem;

            if (selected == null)
            {
                return;
            }
            if (selected.GetType().Name == "".GetType().Name)
            {
                if (selected.ToString() == "Add Lamp")
                {
                    AddLampWindow dialog = new AddLampWindow();
                    dialog.ShowDialog();
                    Controller.MainController.GetInstance().SaveLamp(dialog.ReturnValue);
                    //RefreshInterfaceData();
                    refreshData();
                }
                CurrentLamp = null;
                refreshData();
                return;
            }
            if (selected as FireLamp != null)
            {
                CurrentLamp = savedLamps.SelectedItem as FireLamp;
                CurrentLamp.RefreshInitData();
                refreshData();
            }
        }
        private void MenuItem_Click_2(object sender, RoutedEventArgs e)
        {
            var dialog = new AddLampWindow();

            dialog.ShowDialog();
            if (dialog.ReturnValue != null)
            {
                CurrentLamp = dialog.ReturnValue;
            }
            refreshData();
            CurrentLamp.RefreshInitData();
        }
        private void ipAndPort_MouseUp(object sender, MouseButtonEventArgs e)
        {
            var dialog = new AddLampWindow();

            dialog.ShowDialog();
            if (dialog.ReturnValue != null)
            {
                CurrentLamp = dialog.ReturnValue;
            }
            refreshData();
            CurrentLamp.RefreshInitData();
        }