public override void Setup(Collider emitter, Collider target) { var pos = target.transform.position; pos.y += 0.01f; transform.position = pos; detector = gameObject.AddComponent <AutoDetection>(); detector.parent = emitter.GetComponent <AutoFighter>(); }
public MainWindow() { InitializeComponent(); Logger.Info("starting"); AppDet = new AutoDetection(); AppDet.DevicesChanged += CheckConnectedDevices; AppDet.Start(); // on load select the P25 Keyload function SwitchScreen(NavigateP25Keyload); }
public MainWindow() { InitializeComponent(); Logger.Info("starting"); AppDet = new AutoDetection(); AppDet.DevicesChanged += CheckConnectedDevices; AppDet.Start(); // on load select the P25 Keyload function NavigateP25Keyload.IsChecked = true; AppView.Content = new Control.P25Keyload(); UpdateTitle("P25 - Keyload"); }
private async void OptimizeSettings(bool optimize) { AutoDetection detect = new AutoDetection(); if (optimize) { mtTbResUtilization.Value = await detect.GetOptimizedValue(); SetResoureUtlizationLevel(mtTbResUtilization.Value); mtTbLogOption.Checked = optimize; mtcboLogtype.SelectedIndex = 0; mtAutoProfileDetect.Checked = optimize; mtAutoProfilePathDetect.Checked = optimize; mtAutoSaveSharedDevices.Checked = optimize; mtcboBRtype.SelectedIndex = 0; } }
private void InitAppDet() { AppDet = new AutoDetection(); AppDet.DevicesChanged += CheckConnectedDevices; }
private async void InitializeUIDefaults() { IAutoDetection detect = new AutoDetection(); sysdetails = await detect.DetectAsync(); //About InitializeAboutListView(); //ProgressBars HideProgressbar(); //Setting Tab CBO cbo = new CBO(); mtcboBRtype.DataSource = new BindingSource(cbo.GetBRTypes(), null); mtcboBRtype.DisplayMember = "Key"; mtcboBRtype.ValueMember = "Value"; mtcboBRtype.SelectedIndex = 0; mtcboLogtype.DataSource = new BindingSource(cbo.GetLogTypes(), null); mtcboLogtype.DisplayMember = "Key"; mtcboLogtype.ValueMember = "Value"; mtcboLogtype.SelectedIndex = 0; mtTbResUtilization.Value = 2; SetResoureUtlizationLevel(mtTbResUtilization.Value); mtAutoProfileDetect.Checked = true; mtbtnSettingUserProfile.Enabled = false; mtAutoProfilePathDetect.Checked = true; mtbtnSettingUserProfilePath.Enabled = false; mtAutoSaveSharedDevices.Checked = true; mtTbLogOption.Checked = true; mtTbAIOverride.Checked = true; //Backup Tab UIMessages msg = new UIMessages(); BackupResponseLabelWarning(msg.Show(5)); InitializeBackupListView(); //Restore Tab RestoreResponseLabelWarning(msg.Show(5)); InitializeRestoreListView(); //User ID Textbox mttxtboxUserID.UseCustomBackColor = true; mttxtboxUserID.UseCustomForeColor = true; mttxtboxUserID.BackColor = Color.FromArgb(252, 252, 252); mttxtboxUserID.ForeColor = Color.FromArgb(69, 69, 69); mttxtboxUserID.Text = Environment.UserName.ToUpper(); //Main UI mtbtnBackup.Enabled = false; mtbtnRestore.Visible = false; mtbtnRestore.Enabled = false; mtbtnCancel.Enabled = false; mtTabctrl.SelectedTab = mtPagebackup; EnableTabPage(mtPagerestore, true); EnableTabPage(mtPagesettings, true); EnableTabPage(mtPagebackup, true); lstViewDefaultPaths.ForeColor = Color.LimeGreen; lstViewDefaultPaths.BackColor = Color.FromArgb(48, 48, 48); lbldefaultPaths.ForeColor = Color.White; lbldefaultPaths.BackColor = Color.FromArgb(109, 84, 249); mtdefaultReslbl.Text = ""; lbldefaultPaths.Text = "Default Assigned Paths (These will be used as target paths for backup / restore)"; mtdefaultReslbl.UseCustomBackColor = true; mtdefaultReslbl.UseCustomForeColor = true; mtdefaultReslbl.ForeColor = Color.White; mtdefaultReslbl.BackColor = Color.FromArgb(211, 159, 23); mtdefaultReslbl.Text = "Pre-Defined paths for Backup && Restore operations."; }