Esempio n. 1
0
 public void DeleteConfig()
 {
     configs.Remove(selectedConfig);
     RegistrySaver.RemoveRegistryValue(RegistrySaver.configList, selectedConfig);
     AppLogger.Add("Configuration file [" + selectedConfig + "] deleted");
     selectedConfig = configs.FirstOrDefault();
 }
Esempio n. 2
0
 public void DeleteConfig()
 {
     Configs.Remove(SelectedConfig);
     RegistrySaver.RemoveRegistryValue(RegistrySaver.RegCategoryConfigList, SelectedConfig);
     AppLogger.Log("Configuration file [" + SelectedConfig + "] deleted");
     SelectedConfig = Configs.FirstOrDefault();
 }
Esempio n. 3
0
        public void DeleteApplication()
        {
            Applications.Remove(SelectedApplication);
            RegistrySaver.RemoveRegistryValue(RegistrySaver.RegCategoryAppList, SelectedApplication);
            AppLogger.Log("Application [" + SelectedApplication + "] removed from the list");

            SelectedApplication = null;
        }
Esempio n. 4
0
        public void DeleteApplication()
        {
            Applications.Remove(SelectedApplication);
            RegistrySaver.RemoveRegistryValue(RegistrySaver.RegAppList, SelectedApplication);
            AppLogger.Add("Application [" + SelectedApplication + "] deleted");

            SelectedApplication = null;
        }
Esempio n. 5
0
        public void DeleteApplication()
        {
            applications.Remove(selectedApplication);
            RegistrySaver.RemoveRegistryValue(RegistrySaver.appList, selectedApplication);
            AppLogger.Add("Application [" + selectedApplication + "] deleted");

            selectedApplication = null;
        }
        private void ctrlBtnEventDelete_Click(object sender, RoutedEventArgs e)
        {
            if (ctrlListClusterEvents.SelectedItems.Count > 0)
            {
                List <ClusterEvent> ItemsToDelete = new List <ClusterEvent>();

                foreach (ClusterEvent Evt in ctrlListClusterEvents.SelectedItems)
                {
                    ItemsToDelete.Add(Evt);
                }

                foreach (ClusterEvent Evt in ItemsToDelete)
                {
                    ClusterEvents.Remove(Evt);
                    RegistrySaver.RemoveRegistryValue(RegistrySaver.RegCategoryClusterEvents, Evt.SerializeToString());
                }
            }
        }
        private void ctrlBtnEventModify_Click(object sender, RoutedEventArgs e)
        {
            if (ctrlListClusterEvents.SelectedItems.Count > 0)
            {
                List <ClusterEvent> ItemsToModify = new List <ClusterEvent>();

                foreach (ClusterEvent Evt in ctrlListClusterEvents.SelectedItems)
                {
                    ItemsToModify.Add(Evt);
                }

                foreach (ClusterEvent Evt in ItemsToModify)
                {
                    int Idx = ClusterEvents.IndexOf(Evt);
                    if (Idx >= 0)
                    {
                        ClusterEventWindow Wnd = new ClusterEventWindow();
                        Wnd.WindowStartupLocation = WindowStartupLocation.CenterOwner;
                        Wnd.Owner = this;

                        Wnd.AvailableCategories = GetAvailableCategories();
                        Wnd.AvailableTypes      = GetAvailableTypes();
                        Wnd.AvailableNames      = GetAvailableNames();
                        Wnd.SelectedCategory    = Evt.Category;
                        Wnd.SelectedType        = Evt.Type;
                        Wnd.SelectedName        = Evt.Name;
                        Wnd.SetArgDictionary(Evt.Parameters);

                        bool?RetVal = Wnd.ShowDialog();
                        if (RetVal.HasValue && RetVal == true)
                        {
                            RegistrySaver.RemoveRegistryValue(RegistrySaver.RegCategoryClusterEvents, ClusterEvents[Idx].SerializeToString());
                            ClusterEvents[Idx] = new ClusterEvent(Wnd.SelectedCategory, Wnd.SelectedType, Wnd.SelectedName, Wnd.GetArgDictionary());
                            RegistrySaver.AddRegistryValue(RegistrySaver.RegCategoryClusterEvents, ClusterEvents[Idx].SerializeToString());
                        }
                    }
                }

                UpdateJsonInfo();
            }
        }