/// <summary> /// Default constructor for the settings form. /// </summary> /// <param name="parent"></param> public FrmSettings(FrmMain parent) { frmMain = parent; InitializeComponent(); SettingsControl = new SettingsControl(); LoadSettings(); }
private async void Window_Loaded(object sender, RoutedEventArgs e) { StartupWindow startupWindow = new StartupWindow(); startupWindow.Show(); FilesControlObject = new FilesControl(); SettingsControlObject = new SettingsControl(); PlayerControlObject = new PlayerControl(); UserRatingControlObject = new UserRatingControl(); SV_MainDisplay.Content = FilesControlObject; MakeButtonPressedOnLeft(Button_FileControl); await WarmupMediaInfoEngine(); await SearchForVLCDLL(); await LoadUserSettings(); startupWindow.Close(); if (WindowState == WindowState.Minimized) { WindowState = WindowState.Normal; } Activate(); }
private async void OpenSettings() { if (!IsSettingsDialogOpen) { using (var model = SimpleIoc.Default.GetInstance <SettingsViewModel>()) using (var settings = new SettingsControl() { DataContext = model }) { await DialogHost.Show(settings, new DialogOpenedEventHandler((obj, args) => IsSettingsDialogOpen = true), new DialogClosingEventHandler((obj, args) => { IsSettingsDialogOpen = false; if (args.Parameter.ToString() == "1") { Settings.Instance = model.Settings; Settings.Safe(); } })); } } }
/// <summary> /// Default constructor for the main form. /// </summary> public FrmMain() { InitializeComponent(); SettingsControl = new SettingsControl(); Settings = SettingsControl.GetSettings(); if (!SettingsControl.SettingsProfilesExist() || !SettingsControl.SettingsExist()) { SettingsControl.GenerateDefaultSettingsProfiles(); } if (!SettingsControl.SettingsExist()) { var profiles = SettingsControl.GetSettingsProfiles(); Settings = profiles.First(); SettingsControl.SaveSettings(Settings); } else { Settings = SettingsControl.GetSettings(); } RestartMonitor(); mainTimer.Start(); Text = "Mobu Upload " + FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).FileVersion; }
protected override void SetupSettingsControl(SettingsControl settingsControl, WorldSettings worldSettings) { settingsControl.AddToggle("Show dialog", null, worldSettings.GetBool <ExampleSettingsMod>(ShowDialogKey), () => worldSettings.SetBool <ExampleSettingsMod>(ShowDialogKey, true), () => worldSettings.SetBool <ExampleSettingsMod>(ShowDialogKey, false)); }
// Use this for initialization void Start() { rigController = GameObject.Find("RigController"); titleScreen = rigController.GetComponent <TitleScreen>(); functionControl = rigController.GetComponent <FunctionControl>(); settingsControl = rigController.GetComponent <SettingsControl>(); }
private void BtnSettings(object sender, RoutedEventArgs e) { //_settingsWindow.ShowDialog(); LoadParrotData(); SettingsControl.LoadStuff(_parrotData); EmulatorSettings.IsOpen = true; }
void Start() { Scale = 0; GetComponent<Renderer>().material.SetColor ("_TintColor", new Vector4(1,1,1,Scale)); Panel = GameObject.Find("SlideIn").GetComponent<SettingsControl>(); }
public override void Execute(VsCommandEventArgs e) { if (toolWindow != null) { toolWindow.Visible = true; return; } try { object programmableObject = null; DTE2 application = e.Application; AddIn addInInstance = e.Addin; Windows2 windows2 = (Windows2)application.Windows; Type userCtrlType = typeof(SettingsControl); Assembly userCtrlAssembly = userCtrlType.Assembly; string windowGuid = "{858C3FCD-3333-4540-A592-F31C1520B174}"; toolWindow = windows2.CreateToolWindow2(addInInstance, userCtrlAssembly.Location, userCtrlType.FullName, "CSql Settings", windowGuid, ref programmableObject); Type resourcesType = typeof(Resources); string imageResourceRoot = resourcesType.FullName; string imageResourcePath = imageResourceRoot + ".Images.Commands.Settings.bmp"; var icon = new VsCommandIcon(userCtrlAssembly, imageResourcePath); var iconPicture = icon.IconPicture; toolWindow.SetTabPicture(iconPicture); SettingsControl settingsControl = (SettingsControl)toolWindow.Object; settingsControl.SetApplication(application); toolWindow.Visible = true; } catch (Exception ex) { MessageBox.Show(ex.Message, "csql addin error"); } }
private void InitControls() { #region main_menu main_menu = new Controls.MainMenu(OnMainMenuResultChanged); main_menu.Visible = false; main_menu.Location = new Point(Size.Width / 2 - main_menu.Size.Width / 2, Size.Height / 2 - main_menu.Size.Height / 2); this.Controls.Add(main_menu); #endregion #region setting_control setting_control = new SettingsControl(OnSettingsConrolResultChanged); setting_control.Visible = false; //setting_control.Dock = DockStyle.Fill; setting_control.Location = new Point(Size.Width / 2 - setting_control.Size.Width / 2, Size.Height / 2 - setting_control.Size.Height / 2); this.Controls.Add(setting_control); #endregion #region info_control info_control = new InfoControl(OnInfoControlResultChanged); info_control.Visible = false; //info_control.Dock = DockStyle.Fill; info_control.Location = new Point(Size.Width / 2 - info_control.Size.Width / 2, Size.Height / 2 - info_control.Size.Height / 2); this.Controls.Add(info_control); #endregion #region pause_menu pause_menu = new PauseMenu(OnPauseMenuResultChanged); pause_menu.Visible = false; //pause_menu.Dock = DockStyle.Fill; pause_menu.Location = new Point(Size.Width / 2 - pause_menu.Size.Width / 2, Size.Height / 2 - pause_menu.Size.Height / 2); this.Controls.Add(pause_menu); #endregion }
void CheckSelected(bool check) { var items = SettingsControl.GetSelectedItems().Cast <Acronym>().ToArray(); foreach (var item in items) { item.Enabled = check; } }
/// <summary> /// Constructs the class. This constructor is useful for saving settings. /// </summary> public EndIsNighSettings(SplitCollection splitCollection, SplitCollectionControl collectionControl, SettingsControl settingsControl) { this.settingsControl = settingsControl; this.splitCollection = splitCollection; this.collectionControl = collectionControl; settingsControl.Settings = this; }
void OnTriggerExit(Collider other) { onZoom = false; dashBackground.color = SettingsControl.ThemeConverter(SettingsControl.backgroundTheme); dashBackground = null; movingDash = null; onPinch = false; Debug.Log("Left the board"); }
public void Setup() { _applicationSettings = new Mock <IApplicationSettings>(); _settings = new Mock <IAutoUpdateSettings>(); _settings.SetupAllProperties(); _applicationSettings.Setup(x => x.AutoUpdate).Returns(_settings.Object); _control = new SettingsControl(); _control.ProxyPasswordBox.ApplyTemplate(); }
/// <summary> /// Android method called first when an activity is launched. /// Sets up the activity with current settings. /// </summary> /// <param name="savedInstanceState">Bundle containing data passed from calling activity</param> protected override void OnCreate(Bundle savedInstanceState) { try { base.OnCreate(savedInstanceState); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Settings); settingsControl = new SettingsControl(); profiles = settingsControl.GetSettingsProfiles(); txtProfiles = FindViewById <TextView>(Resource.Id.txtProfiles); txtProfiles.Click += delegate { EnableCustomProfiles(); }; spinProfiles = FindViewById <Spinner>(Resource.Id.spinProfiles); spinProfiles.Adapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleSpinnerDropDownItem, profiles.Select(x => x.ProfileName).ToList()); spinProfiles.ItemSelected += delegate { PopulateForm(profiles[spinProfiles.SelectedItemPosition]); }; edtBackendUrl = FindViewById <EditText>(Resource.Id.edtBackendUrl); edtBackendTimeout = FindViewById <EditText>(Resource.Id.edtBackendTimeout); edtDomain = FindViewById <EditText>(Resource.Id.edtDomain); edtUsername = FindViewById <EditText>(Resource.Id.edtUsername); edtPassword = FindViewById <EditText>(Resource.Id.edtPassword); edtFragmentSize = FindViewById <EditText>(Resource.Id.edtFragmentSize); chkIsTestInstance = FindViewById <CheckBox>(Resource.Id.chkTestInstance); txtProfileName = FindViewById <TextView>(Resource.Id.txtProfileName); edtProfileName = FindViewById <EditText>(Resource.Id.edtProfileName); linButtons = FindViewById <LinearLayout>(Resource.Id.linButtons); btnSave = FindViewById <Button>(Resource.Id.btnSave); btnSave.Click += delegate { SaveProfile(); }; btnCancel = FindViewById <Button>(Resource.Id.btnCancel); btnCancel.Click += delegate { PopulateForm(currentProfile); }; btnDelete = FindViewById <Button>(Resource.Id.btnDelete); btnDelete.Click += delegate { DeleteCustomProfile(); }; SettingToast = new Toast(this.ApplicationContext); Window.SetSoftInputMode(SoftInput.StateAlwaysHidden); currentProfile = settingsControl.GetCurrentSettings(); var settingsIndex = profiles.FindIndex(x => x.ProfileName == currentProfile.ProfileName); if (settingsIndex >= 0) { spinProfiles.SetSelection(profiles.FindIndex(x => x.ProfileName == currentProfile.ProfileName)); } else { spinProfiles.SetSelection(0); } } catch (Exception e) { Log.Info("MobuAndroid", "Error while setting up settings activity.", e.Message); Finish(); } }
public void ResetDataTracker() { dataTracker.transform.position = new Vector3(0, 0, 0); if (dashBackground != null) { dashBackground.color = SettingsControl.ThemeConverter(SettingsControl.backgroundTheme); } zoomInitialPos.Clear(); Debug.Log("Pinch was released"); }
public Control CreateSettingPanel() { var control = new SettingsControl() { DataContext = new SettingsViewModel(settings) }; control.Unloaded += Control_Unloaded; return(control); }
/// <summary> /// Sets up references to UI components, controls and settings. /// </summary> private void SetupActivity() { try { RequestWindowFeature(WindowFeatures.NoTitle); SetContentView(Resource.Layout.Update); barProgressInner = FindViewById <ProgressBar>(Resource.Id.barProgressInner); barProgressOuter = FindViewById <ProgressBar>(Resource.Id.barProgressOuter); txtCompletedFragments = FindViewById <TextView>(Resource.Id.txtFragments); txtPercentage = FindViewById <TextView>(Resource.Id.txtPercentage); txtTime = FindViewById <TextView>(Resource.Id.txtTime); txtPackageDescription = FindViewById <TextView>(Resource.Id.txtPackageDescription); txtUpdateMessage = FindViewById <TextView>(Resource.Id.txtUpdateMessage); barProgressInner.Visibility = ViewStates.Invisible; barProgressOuter.Visibility = ViewStates.Invisible; txtCompletedFragments.Visibility = ViewStates.Invisible; txtPercentage.Visibility = ViewStates.Invisible; txtTime.Visibility = ViewStates.Invisible; barProgressInner.Progress = 0; barProgressOuter.Progress = 0; txtCompletedFragments.Text = "0 / 0"; txtPercentage.Text = "0 %"; txtTime.Text = "0 ms"; settingsControl = new SettingsControl(); if (settingsControl.CurrentSettingsExist()) { settings = settingsControl.GetCurrentSettings(); } else { AlertDialog.Builder alert = new AlertDialog.Builder(this); alert.SetTitle("No Settings"); alert.SetMessage("No settings profile has been setup in Mobu. Please select a settings profile in Mobu to allow updates."); alert.SetNeutralButton("OK", (senderAlert, args) => { EndActivity(); }); Dialog dialog = alert.Create(); dialog.Show(); return; } webServiceControl = new WebServiceControl(settings); fileControl = new FileControl(); } catch (Exception e) { Log.Info("MobuAndroid", "Error while setting up update activity.", e.Message); EndActivity(); } }
/// <summary> /// Show the caption settings /// </summary> /// <param name="command">the command</param> private void OnShowCaptionSettings(IUICommand command) { if (this.OnLoadCaptionSettings != null) { this.OnLoadCaptionSettings(this, new CustomCaptionSettingsEventArgs(this.Settings)); } this.windowBounds = Window.Current.Bounds; var transitions = new TransitionCollection(); transitions.Add(new EntranceThemeTransition()); Window.Current.Activated += this.Current_Activated; var control = new CaptionSettingsControl { CaptionSettings = this.Settings, IsDefault = this.IsDefault, }; control.OnApplyCaptionSettings += this.OnApplyCaptionSettings; control.IsDefaultChanged += delegate(object sender, System.EventArgs e) { this.IsDefault = control.IsDefault; this.ApplyCaptionSettings(this.Settings); }; var settingsControl = new SettingsControl { Style = this.Style, Label = this.Label, Content = control, Width = NarrowWidth, Height = this.windowBounds.Height }; this.settingsPopup = new Popup { Child = settingsControl, Transitions = transitions, IsLightDismissEnabled = true, Width = NarrowWidth, Height = this.windowBounds.Height, }; this.settingsPopup.Closed += this.OnPopupClosed; this.settingsPopup.SetValue(Canvas.LeftProperty, this.windowBounds.Width - NarrowWidth); this.settingsPopup.SetValue(Canvas.TopProperty, 0); this.settingsPopup.IsOpen = true; }
public void OnLoaded(object sender, RoutedEventArgs e) { testControl = new TestControl(this); overviewControl = new OverviewControl(this); generalControl = new GeneralControl(this); databaseControl = new DatabaseControl(this); settingsControl = new SettingsControl(this); advancedControl = new AdvancedControl(this); contentControl.Content = generalControl; }
void Awake() { mouseExitsSettingsPanel = true; gamePaused = false; mySettings = this; atomTouchGUI = Camera.main.GetComponent <AtomTouchGUI>(); nmToggle = nmOn.GetComponent <Toggle>(); trailsToggle = trailsOn.GetComponent <Toggle>(); atomRendererToggle = atomRendererOn.GetComponent <Toggle>(); simTypeChanged = false; }
protected override void CreateChildControls() { base.CreateChildControls(); m_Holder = new PlaceHolder(); m_Holder.ID = "Holder"; this.Controls.Add(m_Holder); m_InnerControl = this.Page.LoadControl(ResourceProvider.SettingsControlVirtualPath) as SettingsControl; m_InnerControl.ID = "Settings"; m_Holder.Controls.Add(m_InnerControl); }
/// <summary> /// Konstruktor. /// </summary> public Settings() { InitializeComponent(); SettingsControl actualSettings = GameParameters.ActualSettings; t1.Text = actualSettings.Up; t2.Text = actualSettings.Down; t3.Text = actualSettings.Left; t4.Text = actualSettings.Right; t5.Text = actualSettings.DropBomb; t6.Text = actualSettings.UseBonus; t7.Text = actualSettings.UsePlayerBonus; }
public Task <List <string> > UpdateInstalledVersionsAsync() { var task = Task.Factory.StartNew(new Func <List <string> >(() => { List <string> installedVersions = VersionsControl.GetInstalledVersions().OrderByAlphaNumeric(t => t).ToList(); SettingsControl.DeleteRestVerionsSettings(installedVersions); return(installedVersions); })); task.Start(); return(task); }
void ShowSettings() { int totalRecords = UserRecords != null?UserRecords.Count() : 0; int totalTemplates = DbTemplates != null?DbTemplates.Count() : 0; SettingsControl control = new SettingsControl(StateController, totalTemplates, totalRecords); control.StateNotifyer = _ApplicationStateChangeNotifyer; control.MessageNotifyer = _ApplicationMessageNotifyer; AddControl(control); }
/* * _____________________________________________________________________________________________________________________________________________________ * Game Time */ // Use this for initialization void Start() { //If the gameObject has not been created, initialize the singleton (variable to reference its own class) //and set the object to not be destroyed if (objectCreated == false) { stInstance = this; DontDestroyOnLoad(this.gameObject); objectCreated = true; Debug.Log("Awake: " + this.gameObject); } }
public UIElement GetSettingsElement() { bool showMessages = Settings.Default.ShowMessages; SettingsViewModel viewModel = new SettingsViewModel(showMessages); SettingsControl control = new SettingsControl(viewModel); viewModel.SettingsChanged += (s, e) => { Settings.Default.ShowMessages = viewModel.ShowMessages; Settings.Default.Save(); }; return(control); }
private void SettingsClick(object sender, RoutedEventArgs e) { if (settingsOpen) { settingsOpen = false; return; } var settingsControl = new SettingsControl(); settingsMenu = new SlideMenu(Dock.Top, settingsControl.Width) { InnerControl = settingsControl }; settingsOpen = true; }
private void Core_Login_Passed() { try { VSC = new VersionControl(); VSC.InitVersCheck(); SND = new Sounds(); SND.SoundsInit(); SCT = new SettingsControl(); SCT.SettingsInit(); VCT = new ViewControl(); VCT.ViewInit(); SCN = new Scanner(); SCN.ScannerInit(); MCL = new MacroLogic(); MCL.MacroInit(); LGM = new LogMethod(); LGM.LogInit(); DTH = new DeathParse(); DTH.ParseInit(); HUD = new HUDControl(); HUD.HUDInit(); if (lib.Autorelog == true) { if (RlgTmr.Enabled == true) { RlgTmr.Stop(); lib.Autorelog = false; MainView.Mode.Current = 0; lib.Mode = 0; Utility.AddWindowText(lib.MyServer + " : " + lib.MyName + " : " + lib.authtype + " : Current mode: SLAVE - Forced Login detected at " + DateTime.Now.ToString("h: mm:ss tt")); Utility.AddChatText("FORCED LOGIN DETECTED! Mode switched: SLAVE.", 6); } else if (RlgTmr.Enabled == false) { MainView.Mode.Current = 3; lib.Mode = 3; Utility.AddWindowText(lib.MyServer + " : " + lib.MyName + " : " + lib.authtype + " : Current mode: MACRO - Relogger is set to " + lib.Timer + " seconds."); if (lib.UseMacroLogic == true) { Utility.ActivateWindow(); } } } else if (lib.Autorelog == false) { MainView.Mode.Current = 0; lib.Mode = 0; Utility.AddWindowText(lib.MyServer + " : " + lib.MyName + " : " + lib.authtype + " : Current mode: SLAVE"); } REP = new Report(); REP.ReportInit(); Report.InitialLog("Login"); } catch (Exception ex) { Repo.RecordException(ex); } }
public bool Configure(IntPtr panelHandle) { if (_control == null || _control.IsDisposed) { _control = new SettingsControl(); _control.SetTagFields(Enum.GetNames(typeof(MetaDataType)).ToList()); } if (panelHandle != IntPtr.Zero) { Panel configPanel = (Panel)Panel.FromHandle(panelHandle); configPanel.Controls.Add(_control); } return(true); }
public ProjectViewModel(DTE application) { ThreadHelper.ThrowIfNotOnUIThread(); mApplication = application; mCurrentSolution = application.Solution; this.Items = new ProjectVersionCollection(); mSeparateVersions = SettingsControl.GetBooleanValue("SeparateVersions"); mUpdateClickOnce = SettingsControl.GetBooleanValue("UpdateClickOnce"); forceSemVer = SettingsControl.GetBooleanValue("ForceSemVer"); _updateNuget = SettingsControl.GetBooleanValue("UpdateNuget"); LoadProjects(); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ExerciseForm)); this.lstImg = new System.Windows.Forms.ImageList(this.components); this.settingsControl = new lucidcode.LucidScribe.Plugin.Pranayama.SettingsControl(); this.SuspendLayout(); // // lstImg // this.lstImg.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("lstImg.ImageStream"))); this.lstImg.TransparentColor = System.Drawing.Color.Transparent; this.lstImg.Images.SetKeyName(0, "Graph.Plugin2.bmp"); // // settingsControl // this.settingsControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.settingsControl.BackColor = System.Drawing.Color.LightSteelBlue; this.settingsControl.Location = new System.Drawing.Point(12, 12); this.settingsControl.Name = "settingsControl"; this.settingsControl.Size = new System.Drawing.Size(239, 158); this.settingsControl.TabIndex = 6; this.settingsControl.ExerciseChanged += new lucidcode.LucidScribe.Plugin.Pranayama.SettingsControl.ExerciseChangedEventHandler(this.settingsControl_ExerciseChanged); // // ExerciseForm // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.LightSteelBlue; this.ClientSize = new System.Drawing.Size(263, 182); this.Controls.Add(this.settingsControl); this.Font = new System.Drawing.Font("Verdana", 8.25F); this.ForeColor = System.Drawing.Color.MidnightBlue; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "ExerciseForm"; this.Text = "Lucid Scribe - Pranayama"; this.ResumeLayout(false); }
void Awake() { mySettings = this; mouseExitsSettingsPanel = true; gamePaused = false; atomTouchGUI = Camera.main.GetComponent<AtomTouchGUI>(); nmToggle = nmOn.GetComponent<Toggle>(); trailsToggle = trailsOn.GetComponent<Toggle>(); atomRendererToggle = atomRendererOn.GetComponent<Toggle>(); simTypeChanged = false; }