Beispiel #1
0
        private void Register(_IFeature[] features, GroupBox groupbox)
        {
            int length = features.Length;

            groupbox.Height = 28 + length * 23;

            for (int index = 0; index < length; index++)
            {
                _IFeature feature = features[index];

                CheckBox checkbox = new CheckBox()
                {
                    Text     = string.Concat(feature.Name),
                    Size     = new Size(groupbox.Width - 12, 17),
                    Location = new Point(10, 22 + index * 23),
                };
                _register.Add(checkbox, feature);
                groupbox.Controls.Add(checkbox);
            }
        }
Beispiel #2
0
        private void WinFix_Load(object sender, EventArgs e)
        {
            _output = new TextBoxStreamWriter(errorLog);
            Console.SetOut(_output);

            /**
             * Privacy
             */
            _IFeature[] Privacy_items = new _IFeature[]
            {
                new Privacy.Disable_Cortana(),
                new Privacy.Disable_Telemetry(),
                new Privacy.Disable_Biometry(),
                new Privacy.Disable_Geolocation(),
                new Privacy.Disable_Sensors(),
                new Privacy.Disable_Experiments(),
                new Privacy.Disable_HiddenShares(),
                new Privacy.Disable_RemoteReg(),
                new Privacy.Disable_ShareAcrossDevices(),
                new Privacy.Disable_Inventory(),
                new Privacy.Disable_WifiSense(),
                new Privacy.Disable_TypingInkingDictionary(),
                //Disallow apps to sync and access data
            };
            Register(Privacy_items, Privacy_box);

            /**
             * Services and Features
             */
            _IFeature[] ServicesFeatures_items = new _IFeature[]
            {
                new Services.Backup_Shadow_Copy(),
                new Services.Diagnostic_Services(),
                new Services.Error_Report(),
                new Services.Delivery_Optimization(),
                new Services.Data_Usage_Subscription(),
                new Services.DistributedLinkTracking(),
                new Services.Compatibility_Assistant(),
                new Services.FontCache(),
                new Services.SuperfetchPrefetch(),
                new Services.NFC_Support(),
                new Services.Wifi_Direct(),
                new Services.Phone_Services(),
                new Services.InkWorkspace(),
                new Services.TabletInput(),
                new Services.UserAccessControl(),
                new Services.Security_Center(),
                new Services.Windows_Defender(),
                new Services.Windows_Search(),
            };
            Register(ServicesFeatures_items, ServicesFeatures_box);

            /**
             * Performance and Stability
             */
            _IFeature[] PerformanceStability_items = new _IFeature[]
            {
                new Performance.Disable_AutolaunchDelay(),
                new Performance.Disable_BackgroundApps(),
                new Performance.Enhance_NTFS(),
                new Performance.Run_ExplorerSeparate(),
                new Performance.Disable_Hibernate(),
            };
            Register(PerformanceStability_items, PerformanceStability_box);

            /**
             * Tweaks
             */
            _IFeature[] Tweaks_items = new _IFeature[]
            {
                new Tweaks.NumlockOnBoot(),
                new Tweaks.Disable_LogonBackgroundImage(),
                new Tweaks.Disable_TipsNotifications(),
                new Tweaks.TakeOwnership_CM(),
                new Tweaks.AlwaysShowExtension(),
                new Tweaks.Remove3DObjectsExplorer(),
            };
            Register(Tweaks_items, Tweaks_box);

            foreach (KeyValuePair <CheckBox, _IFeature> Feature in _register)
            {
                Feature.Key.MouseEnter += new EventHandler(delegate(object obj, EventArgs ev)
                {
                    descriptionBox.Text = Feature.Value.Description;
                });
                Feature.Key.MouseLeave += new EventHandler(delegate(object obj, EventArgs ev)
                {
                    descriptionBox.Text = "Hover over a tweak to find out more ..";
                });
            }

            GetCurrent();

            Enabled = true;
        }