public static void Draw(ConfigWindow window, Mod mod) { using var spacing = ImRaii.PushStyle(ImGuiStyleVar.ItemSpacing, new Vector2(3 * ImGuiHelpers.GlobalScale)); ImGui.SetNextItemWidth(window._inputTextWidth.X - window._iconButtonSize.X - 3 * ImGuiHelpers.GlobalScale); ImGui.InputTextWithHint("##newGroup", "Add new option group...", ref _newGroupName, 256); ImGui.SameLine(); var fileExists = File.Exists(mod.DefaultFile); var tt = fileExists ? "Open the default option json file in the text editor of your choice." : "The default option json file does not exist."; if (ImGuiUtil.DrawDisabledButton($"{FontAwesomeIcon.FileExport.ToIconString()}##defaultFile", window._iconButtonSize, tt, !fileExists, true)) { Process.Start(new ProcessStartInfo(mod.DefaultFile) { UseShellExecute = true }); } ImGui.SameLine(); var nameValid = Mod.Manager.VerifyFileName(mod, null, _newGroupName, false); tt = nameValid ? "Add new option group to the mod." : "Can not add a group of this name."; if (ImGuiUtil.DrawDisabledButton(FontAwesomeIcon.Plus.ToIconString(), window._iconButtonSize, tt, !nameValid, true)) { Penumbra.ModManager.AddModGroup(mod, SelectType.Single, _newGroupName); Reset(); } }
public void Start() { Instance = this; AsyncTasks = new Queue <Action>(300); FrameActions = new MapList <Action>(300); Config.InitConfig(); DataService.LoadData(); TextureService.LoadTextures(); DeckService.LoadForbiddenLists(); imgSelector = new Lazy <ImageSelector>(); tglSelector = new Lazy <ToggleSelector>(); confirmWindow = new Lazy <ConfirmWindow>(); annWindow = new Lazy <AnnounceWindow>(); opSelector = new Lazy <OptionSelector>(); inputBox = new Lazy <InputBox>(); hint = new Lazy <HintBox>(); lazyDescriptor = new Lazy <CardDescriptor>(); lazyChat = new Lazy <ChatWindow>(); ToolStrip = new ToolStrip(); DuelWindow = new DuelWindow(); DeckBuilder = new DeckBuilder(); RoomWindow = new RoomWindow(); Menu = new MainMenu(); ConfigWindow = new ConfigWindow(); ServerWindow = new ServerWindow(); Field = new Field(); Duel = new ClientDuel(); Menu.Show(); }
public virtual void Setup() { ConnectionInfo = ConfigWindowGeneralTests.ConstructConnectionInfo(Protocol, TestAgainstContainerInfo); ExpectedPropertyList = ConfigWindowGeneralTests.BuildExpectedConnectionInfoPropertyList(Protocol, TestAgainstContainerInfo); ConfigWindow = new ConfigWindow(); }
private void ShowConfig(ModuleBase configurable) { if (!configurable.HasConfig) { return; } MainWindow.DimMainWindow(true); Connection connection = Connection; DisabledEventArgs args = new DisabledEventArgs(true); bool wasEnabled = connection.IsEnabled; if (wasEnabled) { connection.Disable(args, null); } ConfigWindow config = new ConfigWindow((IWpfConfigurable)configurable); config.ShowDialog(); if (wasEnabled) { Connection.Enable(new EnablingEventArgs(true), null); } MainWindow.DimMainWindow(false); }
public HallOfFameBrowser() : base(Constants.WINDOW_ID_HALLOFFAMEBROWSER, FinalFrontier.Config.GetHallOfFameWindowTitle()) { styleKerbalButton = new GUIStyle(HighLogic.Skin.button); styleKerbalButton.fixedWidth = kButtonWidth; styleKerbalButton.clipping = TextClipping.Clip; styleKerbalStatus = new GUIStyle(HighLogic.Skin.button); styleKerbalStatus.fixedWidth = 20; styleKerbalArea = new GUIStyle(HighLogic.Skin.box); styleKerbalArea.fixedWidth = kAreaWidth; styleKerbalArea.fixedHeight = kAreaHeight; styleKerbalArea.clipping = TextClipping.Clip; styleKerbalAreaExpanded = new GUIStyle(HighLogic.Skin.box); styleKerbalAreaExpanded.fixedWidth = kAreaWidth; styleKerbalAreaExpanded.stretchHeight = true; styleKerbalAreaExpanded.clipping = TextClipping.Clip; styleKerbalInfo = new GUIStyle(HighLogic.Skin.label); styleRibbonArea = new GUIStyle(HighLogic.Skin.label); styleRibbonArea.stretchHeight = true; styleRibbonArea.stretchWidth = true; styleRibbonArea.padding = new RectOffset(10, 10, 2, 2); textureAvailable = ImageLoader.GetTexture(FinalFrontier.ResourcePath + "active"); textureAssigned = ImageLoader.GetTexture(FinalFrontier.ResourcePath + "assigned"); textureKilled = ImageLoader.GetTexture(FinalFrontier.ResourcePath + "killed"); ribbonBrowser = new RibbonBrowser(); display = new DisplayWindow(); about = new AboutWindow(); configWindow = new ConfigWindow(); }
private void ButtonSettings_Click(object sender, RoutedEventArgs e) { ConfigWindow objShowConf = new ConfigWindow(); this.Visibility = Visibility.Visible; objShowConf.Show(); }
/// <summary> /// Initializes a new instance of the <see cref="XIVComboExpandedPlugin"/> class. /// </summary> /// <param name="pluginInterface">Dalamud plugin interface.</param> public XIVComboExpandedPlugin(DalamudPluginInterface pluginInterface) { FFXIVClientStructs.Resolver.Initialize(); pluginInterface.Create <Service>(); Service.Configuration = pluginInterface.GetPluginConfig() as PluginConfiguration ?? new PluginConfiguration(); Service.Address = new PluginAddressResolver(); Service.Address.Setup(); if (Service.Configuration.Version == 4) { this.UpgradeConfig4(); } Service.ComboCache = new CustomComboCache(); Service.IconReplacer = new IconReplacer(); this.configWindow = new(); this.windowSystem = new("XIVComboExpanded"); this.windowSystem.AddWindow(this.configWindow); Service.Interface.UiBuilder.OpenConfigUi += this.OnOpenConfigUi; Service.Interface.UiBuilder.Draw += this.windowSystem.Draw; Service.CommandManager.AddHandler(Command, new CommandInfo(this.OnCommand) { HelpMessage = "Open a window to edit custom combo settings.", ShowInHelp = true, }); }
public void ShowConfigWindow() { log.Trace("Showing config window"); ConfigWin = new ConfigWindow(); ConfigWin.Closed += ConfigWin_Closed; ConfigWin.Show(); }
public GeneralPage() { _mainWindow = WindowBase.GetCurrentFirst <MainWindow>(); _configWindow = WindowBase.GetCurrentFirst <ConfigWindow>(); InitializeComponent(); ScannerViewModel = Services.Get <OsuFileScanner>().ViewModel; }
private void Draw() { ConfigWindow.Draw(); AetherGateWindow.Draw(); DebugWindow.Draw(); LinksWindow.Draw(); }
public HallOfFameBrowser() : base(Constants.WINDOW_ID_HALLOFFAMEBROWSER, FinalFrontier.configuration.GetHallOfFameWindowTitle()) { STYLE_KERBAL_BUTTON = new GUIStyle(HighLogic.Skin.button); STYLE_KERBAL_BUTTON.fixedWidth = KERBAL_BUTTON_WIDTH; STYLE_KERBAL_BUTTON.clipping = TextClipping.Clip; STYLE_KERBAL_STATUS = new GUIStyle(HighLogic.Skin.button); STYLE_KERBAL_STATUS.fixedWidth = 20; STYLE_KERBAL_AREA = new GUIStyle(HighLogic.Skin.box); STYLE_KERBAL_AREA.fixedWidth = KERBAL_AREA_WIDTH; STYLE_KERBAL_AREA.fixedHeight = KERBAL_AREA_HEIGHT; STYLE_KERBAL_AREA.clipping = TextClipping.Clip; STYLE_KERBAL_AREA_EXPANDED = new GUIStyle(HighLogic.Skin.box); STYLE_KERBAL_AREA_EXPANDED.fixedWidth = KERBAL_AREA_WIDTH; STYLE_KERBAL_AREA_EXPANDED.stretchHeight = true; STYLE_KERBAL_AREA_EXPANDED.clipping = TextClipping.Clip; STYLE_KERBAL_INFO = new GUIStyle(HighLogic.Skin.label); STYLE_RIBBON_AREA = new GUIStyle(HighLogic.Skin.label); STYLE_RIBBON_AREA.stretchHeight = true; STYLE_RIBBON_AREA.stretchWidth = true; STYLE_RIBBON_AREA.padding = new RectOffset(10, 10, 2, 2); TEXTURE_AVAILABLE = ImageLoader.GetTexture(FinalFrontier.RESOURCE_PATH + "active"); TEXTURE_ASSIGNED = ImageLoader.GetTexture(FinalFrontier.RESOURCE_PATH + "assigned"); TEXTURE_KILLED = ImageLoader.GetTexture(FinalFrontier.RESOURCE_PATH + "killed"); ribbonBrowser = new RibbonBrowser(); display = new DisplayWindow(); about = new AboutWindow(); configWindow = new ConfigWindow(); }
internal static void ShowConfigWindow() { if (_configWindow == null) { _configWindow = new ConfigWindow(_settings); var nppTbData = new NppTbData { hClient = _configWindow.Handle, pszName = $"{PluginName} Configuration", dlgID = _idConfigWindow, uMask = NppTbMsg.DWS_DF_CONT_RIGHT | NppTbMsg.DWS_ICONTAB | NppTbMsg.DWS_ICONBAR, hIconTab = (uint)ConfigWindowToolBarIcon.Handle, pszModuleName = PluginName }; var ptrNppTbData = Marshal.AllocHGlobal(Marshal.SizeOf(nppTbData)); Marshal.StructureToPtr(nppTbData, ptrNppTbData, false); Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_DMMREGASDCKDLG, 0, ptrNppTbData); } else { Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_DMMSHOW, 0, _configWindow.Handle); } }
public GeneralPage(MainWindow mainWindow, ConfigWindow configWindow) { _mainWindow = mainWindow; _configWindow = configWindow; InitializeComponent(); ScannerViewModel = InstanceManage.GetInstance <OsuFileScanner>().ViewModel; }
public void Setup() { _configWindow = new ConfigWindow { PropertiesVisible = true }; }
private void Window_Loaded(object sender, System.Windows.RoutedEventArgs e) { //DataInit(); ConfigWindow winConfig = new ConfigWindow("JiraManager.xml"); winConfig.ShowDialog(); }
public static void DrawPopup(ConfigWindow window) { if (_mod == null) { return; } using var popup = ImRaii.Popup(PopupName); if (!popup) { return; } if (ImGui.IsWindowAppearing()) { ImGui.SetKeyboardFocusHere(); } ImGui.InputTextMultiline("##editDescription", ref _newDescription, 4096, ImGuiHelpers.ScaledVector2(800, 800)); ImGui.Dummy(window._defaultSpace); var buttonSize = ImGuiHelpers.ScaledVector2(100, 0); var width = 2 * buttonSize.X + 4 * ImGui.GetStyle().FramePadding.X + ImGui.GetStyle().ItemSpacing.X; ImGui.SetCursorPosX((800 * ImGuiHelpers.GlobalScale - width) / 2); var oldDescription = _newDescriptionIdx == Input.Description ? _mod.Description : _mod.Groups[_newDescriptionIdx].Description; var tooltip = _newDescription != oldDescription ? string.Empty : "No changes made yet."; if (ImGuiUtil.DrawDisabledButton("Save", buttonSize, tooltip, tooltip.Length > 0)) { switch (_newDescriptionIdx) { case Input.Description: Penumbra.ModManager.ChangeModDescription(_mod.Index, _newDescription); break; case >= 0: Penumbra.ModManager.ChangeGroupDescription(_mod, _newDescriptionIdx, _newDescription); break; } ImGui.CloseCurrentPopup(); } ImGui.SameLine(); if (ImGui.Button("Cancel", buttonSize) || ImGui.IsKeyPressed(ImGui.GetKeyIndex(ImGuiKey.Escape))) { _newDescriptionIdx = Input.None; _newDescription = string.Empty; ImGui.CloseCurrentPopup(); } }
private void createConfigOnce() { if (configWindow == null) { configWindow = new ConfigWindow(gauges); configWindow.CallOnWindowClose(OnConfigClose); } }
/// <summary> /// Show our config window and add handlers to buttons /// </summary> public void OnConfig() { if (!_window.IsVisible) { _window = new ConfigWindow(); _window.Show(); } }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); var viewModel = CreateLomoConfigService(DataSourceType.Database); var configWindow = new ConfigWindow {DataContext = viewModel}; configWindow.Show(); }
private void Config_Button_Click(object sender, RoutedEventArgs e) { Window configWindow = new ConfigWindow(db); configWindow.ShowDialog(); db = new DatabaseHandler(); PerformInitialization(); }
private void OpenConfigCommandHandler(object state) { var window = new ConfigWindow(System.Windows.Application.Current.MainWindow, config); if (window.ShowDialog() == true) { client.TalkVKey = System.Windows.Input.KeyInterop.VirtualKeyFromKey(config.TalkKey); } }
private void editItem_Click(object sender, RoutedEventArgs e) { var configWindow = new ConfigWindow() { Owner = this, ShowInTaskbar = false }; configWindow.ShowDialog(); }
private void ShowConfigDialog() { ConfigWindow dlg = new ConfigWindow(_sys); if (dlg.ShowDialog() == true) { RestartSystem(); } }
private void ConfigMenuItem_Click(object sender, EventArgs e) { var configWindow = new ConfigWindow { DataContext = new ConfigWindowModel(this.environment) }; configWindow.ShowDialog(); }
private static void ShowWindow() { ConfigWindow window = GetWindow <ConfigWindow> ("配置文件", true); window.Open(configPath); window.position = new Rect(0, 0, 600, 500); window.minSize = new Vector2(600, 500); window.Show(); }
private void SetupInterface(out ConfigWindow cfg, out LaunchButton btn, out WindowSystem system) { cfg = new ConfigWindow(this); btn = new LaunchButton(_configWindow); system = new WindowSystem(Name); system.AddWindow(_configWindow); system.AddWindow(cfg.ModEditPopup); Dalamud.PluginInterface.UiBuilder.Draw += system.Draw; Dalamud.PluginInterface.UiBuilder.OpenConfigUi += cfg.Toggle; }
private void OnEditConfiguration() { var window = new ConfigWindow(); var configVM = new ConfigViewModel(); window.DataContext = configVM; configVM.OnSaved += window.Close; window.ShowDialog(); ListenToReceiversCommand.RaiseCanExecuteChanged(); }
private void ShowConfigButton_Click(object sender, RoutedEventArgs e) { ConfigWindow win2 = new ConfigWindow(); if (win2.ShowDialog() != true) { return; } ShowListButton.IsEnabled = ConfigLogic.Instance.IsConfigPresent; }
private void StripConfig_Click(object sender, EventArgs e) { using (var frm = new ConfigWindow()) { if (frm.ShowDialog() == DialogResult.OK) { this.StartServer(); } } }
public LaunchButton(ConfigWindow ui) { _configWindow = ui; _icon = Dalamud.PluginInterface.UiBuilder.LoadImage(Path.Combine(Dalamud.PluginInterface.AssemblyLocation.DirectoryName !, "tsmLogo.png")); if (_icon != null) { _entry = Dalamud.TitleScreenMenu.AddEntry("Manage Penumbra", _icon, OnTriggered); } }
public void ShowConfigWindow(string title) { if (configWindow == null || configWindow.IsDisposed) { var factory = ConfigWindowFactory.GetInstance(); configWindow = factory.CreateConfigWindow(this); } configWindow.Visible = !configWindow.Visible; //configWindow.WindowState = System.Windows.Forms.FormWindowState.Normal; configWindow.Text = title; }
void ShowConfig(object sender, EventArgs e) { // If we are already showing the window meerly focus it. if (ConfigWindow.Visible) { ConfigWindow.Focus(); } else { ConfigWindow.ShowDialog(); } }
public RegistrationWindow() { while (!Settings.LocalSettings.LoadSettings()) { ConfigWindow configWindow = new ConfigWindow(error: true); configWindow.ShowDialog(); } InitializeComponent(); StartServerInstance(); StartMessagingServer(); StartMessagingClient(); }
private void Loading() { try { try { app.Auth = new Authentication(); } catch (Exception ex) { ex.ToString(); ConfigWindow cfg = new ConfigWindow(); cfg.Owner = this; cfg.ShowDialog(); Settings s = Settings.Default; if (s.IsWindowsIntegrated) { app.Auth = new Authentication(s.ServerName, s.DataBaseName); } else { app.Auth = new Authentication(s.ServerName, s.DataBaseName, s.UserName, s.UserPass); } } ErrorText.Text = null; ErrorText.TextAlignment = TextAlignment.Center; login_btn.IsEnabled = true; nameBox.Focus(); TaskbarItemInfo.ProgressState = System.Windows.Shell.TaskbarItemProgressState.None; #if DEBUGERLOGIN nameBox.Text = "DEBUGER"; passwordBox.Password = "******"; //login_btn_Click(this, new RoutedEventArgs()); #endif } catch (SqlException ex) { TaskbarItemInfo.ProgressState = System.Windows.Shell.TaskbarItemProgressState.None; Title = "错误"; ErrorText.TextAlignment = TextAlignment.Left; ErrorText.Text = "错误:\r\n程序无法连接到数据库。请检查应用程序设置后重新启动应用程序。\r\n如果依旧出现此错误,请联系系统维护人员\r\n以下信息可以提供给维护人员帮助解决问题:\r\nSQL Server Client Error No." + ex.Number; ErrorText.Foreground = Brushes.Red; } catch (Exception ex) { TaskbarItemInfo.ProgressState = System.Windows.Shell.TaskbarItemProgressState.None; Title = "错误"; ErrorText.TextAlignment = TextAlignment.Left; ErrorText.Text = "错误:\r\n程序无法连接到数据库。请检查应用程序设置后重新启动应用程序。\r\n如果依旧出现此错误,请联系系统维护人员\r\n" + ex.Message; ErrorText.Foreground = Brushes.Red; } }
public override void OnAwake() { base.OnAwake(); Debug.Log("TAC Fuel Balancer [" + this.GetInstanceID().ToString("X") + "][" + Time.time + "]: OnAwake"); mainWindow = new MainWindow(this); configWindow = new ConfigWindow(this); helpWindow = new HelpWindow(this); resources = new Dictionary<string, ResourceInfo>(); numberParts = 0; filename = IOUtils.GetFilePathFor(this.GetType(), "TacFuelBalancer.cfg"); maxFuelFlow = 100.0; fuelWarningLevel = 25.0; fuelCriticalLevel = 5.0; debug = false; }
/// <summary> /// 设置按钮 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnConfig_Click(object sender, RoutedEventArgs e) { ConfigWindow pw = new ConfigWindow() { WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner, Owner = this }; pw.ShowDialog(); }
private void MenuItem_Click_1(object sender, RoutedEventArgs e) { ConfigWindow cfg = new ConfigWindow(); cfg.Owner = this; cfg.ShowDialog(); MessageBox.Show("设置将在应用程序重新启动后生效", "提示", MessageBoxButton.OK, MessageBoxImage.Information); }
public bool? StartConfigWindow(IEnumerable<TextInputConfigObject> textInputConfigs, IEnumerable<ItemSelectConfigObject> itemSelectConfigs, IEnumerable<RangeRestrictedSelectConfigObject> rangeRestrictedSelectConfigs) { bool? result = false; this.Dispatcher.Invoke(() => { result = new ConfigWindow(textInputConfigs, itemSelectConfigs, rangeRestrictedSelectConfigs).ShowDialog(); }); return result; }
private void MenuConfigClick(object sender, System.EventArgs e) { Console.Write ("click"); ConfigWindow cfg = new ConfigWindow (this); cfg.Show (); }
/// <summary> /// 設定画面を表示する /// </summary> private void showConfig() { ConfigWindow _cfgWin = new ConfigWindow(); _cfgWin.ShowDialog(); }