// Constructor private NoteBookLabel(DI.Diagram diagram) : base(1, 3, false) { _parent = null; _diagram = diagram; //this must change depending of the diagram's type string diagramType = ((DI.SimpleSemanticModelElement)diagram.SemanticModel).TypeInfo; _icon = GetIcon(diagramType); //_icon = new Gdk.Pixbuf (new Gdk.Colorspace(), false, 8, 15, 15); //_icon.Fill (0xffff0000); // Attach(new Gtk.Image(_icon), 0, 1, 0, 1); // _label = new Label(_diagram.Name); Attach(_label, 1, 2, 0, 1); // Image image = new Image(); image.Stock = Gtk.Stock.Close; _close_button = new Button(); _close_button.Add(image); _close_button.HeightRequest = 20; _close_button.WidthRequest = 20; _close_button.Relief = Gtk.ReliefStyle.None; _close_button.Clicked += OnCloseButtonClicked; Tooltips ttips = new Tooltips (); ttips.SetTip (_close_button, GettextCatalog.GetString ("Close diagram"), GettextCatalog.GetString ("Close diagram")); //_close_button. Attach(_close_button, 2, 3, 0, 1); ShowAll(); }
public static void ConfirmDecisionNoCallback() { Tooltips.EndTooltip(); UI.HideSkipButton(); Phases.FinishSubPhase(Phases.CurrentSubPhase.GetType()); Phases.CurrentSubPhase.Resume(); }
private void LoadTooltips() { // Merge SVE Config with main config var CustomMapTooltips = SVEConfig != null ? ModMain.Config.CustomMapTooltips.Concat(SVEConfig.CustomMapTooltips).ToLookup(x => x.Key, x => x.Value) .ToDictionary(x => x.Key, g => g.First()) : ModMain.Config.CustomMapTooltips; foreach (var tooltip in CustomMapTooltips) { string text = tooltip.Value.GetValue("SecondaryText") != null ? (string)tooltip.Value.GetValue("PrimaryText") + Environment.NewLine + tooltip.Value.GetValue("SecondaryText") : (string)tooltip.Value.GetValue("PrimaryText"); Tooltips.Add(new ClickableComponent( new Rectangle( (int)tooltip.Value.GetValue("X"), (int)tooltip.Value.GetValue("Y"), (int)tooltip.Value.GetValue("Width"), (int)tooltip.Value.GetValue("Height") ), text )); } }
public ExportWindow(IconSource source, ExportSettings template, string destination_path) { InitializeComponent(); this.Icon = source.GetImage(IconType.Save).Icon; CompressionBox.Items.Add(new CompressionDisplay("Uncompressed", NbtCompression.None)); CompressionBox.Items.Add(new CompressionDisplay("G-Zip", NbtCompression.GZip)); CompressionBox.Items.Add(new CompressionDisplay("ZLib", NbtCompression.ZLib)); CompressionBox.SelectedIndex = 0; if (template is not null) { RadioSnbt.Checked = template.Snbt; RadioNbt.Checked = !template.Snbt; CompressionBox.SelectedItem = CompressionBox.Items.Cast <CompressionDisplay>().FirstOrDefault(x => x.Compression == template.Compression); CheckMinify.Checked = template.Minified; CheckJson.Checked = template.Json; CheckLittleEndian.Checked = !template.BigEndian; CheckBedrockHeader.Checked = template.BedrockHeader; } else { string extension = Path.GetExtension(destination_path); bool? binary = NbtUtil.BinaryExtension(extension); RadioSnbt.Checked = binary == false; RadioNbt.Checked = binary == true; CheckLittleEndian.Checked = extension == ".mcstructure"; CheckJson.Checked = extension == ".json"; } SetEnables(); Tooltips.SetToolTip(CheckLittleEndian, "Required for all Bedrock Edition files"); Tooltips.SetToolTip(CheckBedrockHeader, "Required for Bedrock Edition level.dat files"); Tooltips.SetToolTip(CheckJson, "Quotes all keys, removes type suffixes and list indicators"); }
public static void UseDiceModification(string diceModificationName) { Tooltips.EndTooltip(); GameObject DiceModificationButton = GameObject.Find("UI/CombatDiceResultsPanel").transform.Find("DiceModificationsPanel").Find("Button" + diceModificationName).gameObject; DiceModificationButton.GetComponent <Button>().interactable = false; ActionsList.GenericAction diceModification = AvailableDecisions[diceModificationName]; if (!diceModification.IsOpposite) { Selection.ActiveShip = (AttackStep == CombatStep.Attack) ? Attacker : Defender; Selection.ActiveShip.AddAlreadyExecutedActionEffect(diceModification); } else { Selection.ActiveShip = (AttackStep == CombatStep.Attack) ? Defender : Attacker; Selection.ActiveShip.AddAlreadyExecutedOppositeActionEffect(diceModification); } //TODO: Re-generate list instead diceModification.ActionEffect(delegate { HideDiceModificationButtons(); ShowDiceModificationButtons(); }); }
public ActiveToolbarButton(IClickAction action, Tooltips tooltips) { _action = action; _actionEnabledChangedHandler = new EventHandler(OnActionEnabledChanged); _actionCheckedChangedHandler = new EventHandler(OnActionCheckedChanged); _action.EnabledChanged += _actionEnabledChangedHandler; _action.CheckedChanged += _actionCheckedChangedHandler; this.Sensitive = _action.Enabled; this.Active = _action.IsCheckAction && _action.Checked; this.SetTooltip(tooltips, _action.Tooltip, ""); this.Clicked += OnActivated; if (_action.IconSet != null) { try { // load the tool's icon from it's assembly System.Reflection.Assembly asm = _action.Target.GetType().Assembly; Image icon = new Image(asm, asm.GetName().Name + "." + _action.IconSet.LargeIcon); // icon.Pixbuf = icon.Pixbuf.AddAlpha(true, 255, 0, 0); // make "red" transparent this.IconWidget = icon; } catch (Exception e) { // TODO the icon was either null or not found - log some helpful message } } }
private void Init() { tooltips = new Tooltips(); CapStyle = Gdk.CapStyle.Round; JoinStyle = Gdk.JoinStyle.Round; if (Task.Priority == TaskPriority.High) { FillColor = highPriorityFillColor; OutlineColor = highPriorityOutlineColor; } else if (Task.Priority == TaskPriority.Medium) { FillColor = midPriorityFillColor; OutlineColor = midPriorityOutlineColor; } else { FillColor = lowPriorityFillColor; OutlineColor = lowPriorityOutlineColor; } SetupInfoWidget(); Task.PriorityChanged += OnPriorityChanged; Task.StartingHourChanged += OnTimeChanged; Task.StartingMinuteChanged += OnTimeChanged; WidthUnits = normalWidth; CanvasEvent += OnCanvasEvent; }
void SetInstallButtonTooltip(Tooltips.Choice tooltipChoice) { if (m_InstallButton != null) { m_InstallButton.tooltip = Tooltips.GetFormattedTooltip(tooltipChoice, m_ServiceInstance.title); } }
public void UseDiceModification(string diceModificationName) { Tooltips.EndTooltip(); if (AvailableDiceModifications.ContainsKey(diceModificationName)) { GenericAction diceModification = AvailableDiceModifications[diceModificationName]; Selection.ActiveShip.AddAlreadyUsedDiceModification(diceModification); diceModification.ActionEffect( delegate { Combat.CurrentDiceRoll.MarkAsModifiedBy(diceModification.HostShip.Owner.PlayerNo); Combat.DiceModifications.RefreshButtonsList(); ReplaysManager.ExecuteWithDelay(Combat.DiceModifications.AskPlayerToContinue); } ); } else if (diceModificationName == "OK") { HideAllButtons(); ReplaysManager.ExecuteWithDelay(ConfirmDiceResults); } else { Messages.ShowError("ERROR: Dice Modification is not found: " + diceModificationName); } }
private void ConfirmDecision() { Tooltips.EndTooltip(); Phases.FinishSubPhase(this.GetType()); CallBack(); }
public AppletWidget(AppletStyle style, int? size) { // Tooltips Tooltips = new Tooltips(); Tooltips.SetTip(this, Catalog.GetString("Deskop Drapes, click to switch wallpaper"), null); if (style == AppletStyle.APPLET_PANEL) { height = 22; // for now this always 22 since the gnome-panel lies to us, what an asshole } else { height = 22; } // Create the icon Icon = new Image(Theme.LoadIcon("drapes", height, Gtk.IconLookupFlags.UseBuiltin)); Add(Icon); // Set enabled status Enabled = DrapesApp.Cfg.ShuffleEnabled; // Keep track of what kind of applet we are // if we are a tray icon, then register a notification area widget this.AppletStyle = style; if (this.AppletStyle == AppletStyle.APPLET_TRAY) CreateNotifyIcon(); // What shall we do ButtonPressEvent += ButtonPress; // Show the tray ShowAll(); }
public static void CreateDiceModificationsButton(GenericAction actionEffect, Vector3 position) { GameObject prefab = (GameObject)Resources.Load("Prefabs/GenericButton", typeof(GameObject)); GameObject newButton = MonoBehaviour.Instantiate(prefab, GameObject.Find("UI").transform.Find("CombatDiceResultsPanel").Find("DiceModificationsPanel")); newButton.GetComponent <RectTransform>().localPosition = position; newButton.name = "Button" + actionEffect.DiceModificationName; newButton.transform.GetComponentInChildren <Text>().text = actionEffect.DiceModificationName; newButton.GetComponent <Button>().onClick.AddListener( delegate { if (DiceModificationsManager.IsLocked) { return; } DiceModificationsManager.IsLocked = true; GameCommand command = DiceModificationsManager.GenerateDiceModificationCommand(actionEffect.DiceModificationName); GameMode.CurrentGameMode.ExecuteCommand(command); } ); Tooltips.AddTooltip(newButton, actionEffect.ImageUrl); newButton.GetComponent <Button>().interactable = true; newButton.SetActive(ShowOnlyForHuman()); }
public static void UseDiceModification(string diceModificationName) { Tooltips.EndTooltip(); GameObject DiceModificationButton = GameObject.Find("UI/CombatDiceResultsPanel").transform.Find("DiceModificationsPanel").Find("Button" + diceModificationName).gameObject; DiceModificationButton.GetComponent <Button>().interactable = false; GenericAction diceModification = AvailableDecisions[diceModificationName]; switch (diceModification.DiceModificationTiming) { case DiceModificationTimingType.Normal: case DiceModificationTimingType.AfterRolled: Selection.ActiveShip = (AttackStep == CombatStep.Attack) ? Attacker : Defender; break; case DiceModificationTimingType.Opposite: Selection.ActiveShip = (AttackStep == CombatStep.Attack) ? Defender : Attacker; break; case DiceModificationTimingType.CompareResults: Selection.ActiveShip = Attacker; break; default: break; } Selection.ActiveShip.AddAlreadyUsedDiceModification(diceModification); diceModification.ActionEffect(delegate { ReGenerateListOfButtons(diceModification.DiceModificationTiming); }); }
protected override void ProcessRecord() { var chart = new PieChart { InnerRadius = InnerRadius, InnerValue = InnerValue }; if (Points != null) { foreach (var point in Points) { chart.Points.Add(point); } } if (Tooltips.IsPresent) { chart.Tooltips = Tooltips.ToBool(); } if (Legend.IsPresent) { chart.Legend = Legend.ToBool(); } SetControlProps(chart); WriteObject(chart); }
private static void CreateDiceModificationsButton(ActionsList.GenericAction actionEffect, Vector3 position) { GameObject prefab = (GameObject)Resources.Load("Prefabs/GenericButton", typeof(GameObject)); GameObject newButton = MonoBehaviour.Instantiate(prefab, GameObject.Find("UI/CombatDiceResultsPanel").transform.Find("DiceModificationsPanel")); newButton.name = "Button" + actionEffect.EffectName; newButton.transform.GetComponentInChildren <Text>().text = actionEffect.EffectName; newButton.GetComponent <RectTransform>().position = position; newButton.GetComponent <Button>().onClick.AddListener(delegate { Tooltips.EndTooltip(); newButton.GetComponent <Button>().interactable = false; if (!actionEffect.IsOpposite) { Selection.ActiveShip = (AttackStep == CombatStep.Attack) ? Attacker : Defender; Selection.ActiveShip.AddAlreadyExecutedActionEffect(actionEffect); } else { Selection.ActiveShip = (AttackStep == CombatStep.Attack) ? Defender : Attacker; Selection.ActiveShip.AddAlreadyExecutedOppositeActionEffect(actionEffect); } actionEffect.ActionEffect(delegate { }); }); Tooltips.AddTooltip(newButton, actionEffect.ImageUrl); newButton.GetComponent <Button>().interactable = true; newButton.SetActive(true); }
public static void UpdateStylesState(bool enabled) { Extensions.ConsoleExtensions.PrintWithLog("[UserInterface] Updating Styles..."); Methods.Internal.Theming.UpdateThemeForItemsWaiting(); Instance.EditorStatusBar.UpdateFilterButtonApperance(); Methods.Internal.Theming.UpdateButtonColors(); Tooltips.UpdateTooltips(); }
public Gtk.Window Create() { window = new Window("Tooltips"); window.DefaultSize = new Gdk.Size(200, 150); tooltips = new Tooltips(); return(window); }
public override void SetTooltips() { Tooltips.SetVisible(VRDevice.PrimaryController, Tooltips.Location.Primary, false); Tooltips.SetVisible(VRDevice.PrimaryController, Tooltips.Location.Secondary, false); Tooltips.SetVisible(VRDevice.PrimaryController, Tooltips.Location.Trigger, false); Tooltips.SetVisible(VRDevice.PrimaryController, Tooltips.Location.Grip, false); Tooltips.SetVisible(VRDevice.PrimaryController, Tooltips.Location.Joystick, false); }
private void UpdateTimer_Tick(object sender, EventArgs e) { List <Post> posts = fm.RefreshData(); for (int i = posts.Count - 1; i >= 0; i--) { LinkedButton button = new LinkedButton(posts[i].Link); button.Dock = DockStyle.Top; button.Name = "button"; button.button.BackColor = Color.Transparent; button.button.FlatStyle = FlatStyle.Flat; button.BackColor = Color.Transparent; button.button.FlatAppearance.MouseOverBackColor = Color.Transparent; button.button.FlatAppearance.BorderSize = 0; button.button.ForeColor = Color.LightGray; button.tags.ForeColor = Color.LightGray; button.name.ForeColor = Color.LightGray; button.tags.BackColor = Color.Transparent; button.tags.FlatStyle = FlatStyle.Flat; button.name.BackColor = Color.Transparent; button.name.FlatStyle = FlatStyle.Flat; button.tags.FlatAppearance.MouseOverBackColor = Color.Transparent; button.tags.FlatAppearance.BorderSize = 0; button.name.FlatAppearance.MouseOverBackColor = Color.Transparent; button.name.FlatAppearance.BorderSize = 0; Tooltips.SetToolTip(button.button, button.link); button.Height = 30; if (!posts[i].IsReply) { button.name.Text = posts[i].PosterName; button.tags.Hide(); ColorName(posts[i].PosterName, button); button.button.Text = $"posted {posts[i].PostTitle}: {posts[i].Content}"; Notify("Forum", $"{posts[i].PosterName} created post {posts[i].PostTitle}", posts[i].PosterName); } else { button.name.Text = posts[i].PosterName; button.tags.Hide(); ColorName(posts[i].PosterName, button); button.button.Text = $"replied with {posts[i].Content} on {posts[i].PostTitle}"; Notify("Forum", $"{posts[i].PosterName} replied on {posts[i].PostTitle}", posts[i].PosterName); } button.button.TextAlign = ContentAlignment.TopLeft; Tooltips.SetToolTip(button.button, button.link); Controls.Add(button); buttons.Insert(0, button); } if (buttons.Count > 50) { for (int i = 50; i < buttons.Count; i++) { buttons[i].Dispose(); } buttons.RemoveAll(x => buttons.IndexOf(x) >= 50); } VerticalScroll.Value = 0; }
// TAKE ACTION TRIGGERS public static void TakeAction(GenericAction action) { var ship = Selection.ThisShip; Tooltips.EndTooltip(); UI.HideSkipButton(); ship.AddAlreadyExecutedAction(action); CurrentAction = action; action.ActionTake(); }
public override void OnGUI(MaterialEditor editor, MaterialProperty[] properties) { foreach (var property in properties) { bool hideInInspector = (property.flags & MaterialProperty.PropFlags.HideInInspector) != 0; if (hideInInspector) { continue; } var tooltip = Tooltips.Get(editor, property.displayName); if (property.displayName.Contains("[Header]")) { DrawHeader(property, tooltip); continue; } if (property.displayName.Contains("[Space]")) { EditorGUILayout.Space(); continue; } var displayName = property.displayName; displayName = HandleTabs(displayName); displayName = RemoveEverythingInBrackets(displayName); if (property.type == MaterialProperty.PropType.Texture && property.name.Contains("GradientTexture")) { EditorGUILayout.Space(18); _gradientDrawer.OnGUI(Rect.zero, property, property.displayName, editor, tooltip); } else if (property.type == MaterialProperty.PropType.Vector && property.displayName.Contains("[Vector2]")) { EditorGUILayout.Space(18); _vectorDrawer.OnGUI(Rect.zero, property, displayName, editor, tooltip); } else { var guiContent = new GUIContent(displayName, tooltip); editor.ShaderProperty(property, guiContent); } } EditorGUILayout.Space(); EditorGUILayout.Space(); if (SupportedRenderingFeatures.active.editableMaterialRenderQueue) { editor.RenderQueueField(); } editor.EnableInstancingField(); editor.DoubleSidedGIField(); }
private void UseColonelJendonAbility(char letter) { Tooltips.EndTooltip(); SelectTargetForAbility( SelectColonelJendonAbilityTarget, FilterAbilityTargets, GetAiAbilityPriority, HostShip.Owner.PlayerNo ); }
public void PerformAttackWithWeapon(IShipWeapon weapon) { Tooltips.EndTooltip(); Combat.ChosenWeapon = weapon; Messages.ShowInfo("Attack with " + weapon.Name); Phases.FinishSubPhase(typeof(WeaponSelectionDecisionSubPhase)); CallBack(); }
public void PerformAttackWithWeapon(IShipWeapon weapon) { Tooltips.EndTooltip(); Messages.ShowInfo("Attacking with " + weapon.Name); Combat.ChosenWeapon = weapon; Combat.ShotInfo = new ShotInfo(Selection.ThisShip, Selection.AnotherShip, Combat.ChosenWeapon); Phases.FinishSubPhase(typeof(WeaponSelectionDecisionSubPhase)); CallBack(); }
/// <summary> /// Called on awake. /// </summary> void Awake() { if (tooltips == null) { tooltips = this; } else if (tooltips != this) { Destroy(gameObject); } }
/// <summary> /// <c>LearnSymbolDatabaseChooserDialog</c>'s constructor. /// </summary> /// <param name="parent"> /// The dialog's parent dialog, to which it's modal. /// </param> /// <param name="databases"> /// The databases the user can choose from. /// </param> public LearnSymbolDatabaseChooserDialog(Window parent, List <DatabaseFileInfo> databases) { XML gxml = new XML(null, "mathtextrecognizer.glade", "learnSymbolDatabaseChooserDialog", null); gxml.Autoconnect(this); learnSymbolDatabaseChooserDialog.Modal = true; learnSymbolDatabaseChooserDialog.Resizable = false; learnSymbolDatabaseChooserDialog.TransientFor = parent; databaseHash = new Dictionary <string, DatabaseFileInfo>(); optionsTooltips = new Tooltips(); RadioButton groupRB = new RadioButton("group"); foreach (DatabaseFileInfo databaseInfo in databases) { // We add a new option per database string label = System.IO.Path.GetFileName(databaseInfo.Path); RadioButton optionRB = new RadioButton(groupRB, label); optionRB.Clicked += new EventHandler(OnOptionRBClicked); optionsVB.Add(optionRB); MathTextDatabase database = databaseInfo.Database; optionsTooltips.SetTip(optionRB, String.Format("{0}\n{1}", database.ShortDescription, database.Description), "database description"); databaseHash.Add(label, databaseInfo); } // We add the option of creating a new database. newRB = new RadioButton(groupRB, "Crear nueva base de datos"); newRB.Clicked += new EventHandler(OnOptionRBClicked); optionsVB.Add(newRB); optionsTooltips.SetTip(newRB, "Te permite crear una base de datos nueva", "new databse description"); optionsTooltips.Enable(); learnSymbolDatabaseChooserDialog.ShowAll(); }
private void UseColonelJendonAbility(char letter) { Tooltips.EndTooltip(); SelectTargetForAbility( SelectColonelJendonAbilityTarget, new List <TargetTypes> { TargetTypes.OtherFriendly }, new UnityEngine.Vector2(1, 1) ); }
/// <summary> /// Resets values. /// </summary> public static void ResetValues() { DebugEx.Verbose("Assets.Common.ResetValues()"); Fonts.ResetValues(); Cursors.ResetValues(); Windows.ResetValues(); DockWidgets.ResetValues(); Popups.ResetValues(); Tooltips.ResetValues(); Toasts.ResetValues(); }
public SBWikiForumForm(Settings settings, NotifyIcon notifications) { InitializeComponent(); Notifications = notifications; Settings = settings; List <Post> posts = fm.GetData(); #region display for (int i = posts.Count - 1; i >= 0; i--) { LinkedButton button = new LinkedButton(posts[i].Link); button.Dock = DockStyle.Top; button.Name = "button"; button.button.BackColor = Color.Transparent; button.button.FlatStyle = FlatStyle.Flat; button.BackColor = Color.Transparent; button.button.FlatAppearance.MouseOverBackColor = Color.Transparent; button.button.FlatAppearance.BorderSize = 0; button.button.ForeColor = Color.LightGray; button.tags.ForeColor = Color.LightGray; button.name.ForeColor = Color.LightGray; button.tags.BackColor = Color.Transparent; button.tags.FlatStyle = FlatStyle.Flat; button.name.BackColor = Color.Transparent; button.name.FlatStyle = FlatStyle.Flat; button.tags.FlatAppearance.MouseOverBackColor = Color.Transparent; button.tags.FlatAppearance.BorderSize = 0; button.name.FlatAppearance.MouseOverBackColor = Color.Transparent; button.name.FlatAppearance.BorderSize = 0; Tooltips.SetToolTip(button.button, button.link); button.Height = 30; if (!posts[i].IsReply) { button.name.Text = posts[i].PosterName; ColorName(posts[i].PosterName, button); button.tags.Hide(); button.button.Text = $"posted {posts[i].PostTitle}: {posts[i].Content}"; } else { button.name.Text = posts[i].PosterName; ColorName(posts[i].PosterName, button); button.tags.Hide(); button.button.Text = $"replied with {posts[i].Content} on {posts[i].PostTitle}"; } button.button.TextAlign = ContentAlignment.TopLeft; Tooltips.SetToolTip(button.button, button.link); Controls.Add(button); buttons.Insert(0, button); } #endregion }
/// <summary> /// <c>LearnSymbolDatabaseChooserDialog</c>'s constructor. /// </summary> /// <param name="parent"> /// The dialog's parent dialog, to which it's modal. /// </param> /// <param name="databases"> /// The databases the user can choose from. /// </param> public LearnSymbolDatabaseChooserDialog(Window parent, List<DatabaseFileInfo> databases) { XML gxml = new XML(null, "mathtextrecognizer.glade", "learnSymbolDatabaseChooserDialog", null); gxml.Autoconnect(this); learnSymbolDatabaseChooserDialog.Modal=true; learnSymbolDatabaseChooserDialog.Resizable = false; learnSymbolDatabaseChooserDialog.TransientFor = parent; databaseHash = new Dictionary<string,DatabaseFileInfo>(); optionsTooltips = new Tooltips(); RadioButton groupRB = new RadioButton("group"); foreach(DatabaseFileInfo databaseInfo in databases) { // We add a new option per database string label = System.IO.Path.GetFileName(databaseInfo.Path); RadioButton optionRB = new RadioButton(groupRB, label); optionRB.Clicked += new EventHandler(OnOptionRBClicked); optionsVB.Add(optionRB); MathTextDatabase database = databaseInfo.Database; optionsTooltips.SetTip(optionRB, String.Format("{0}\n{1}", database.ShortDescription, database.Description), "database description"); databaseHash.Add(label, databaseInfo); } // We add the option of creating a new database. newRB = new RadioButton(groupRB, "Crear nueva base de datos"); newRB.Clicked += new EventHandler(OnOptionRBClicked); optionsVB.Add(newRB); optionsTooltips.SetTip(newRB, "Te permite crear una base de datos nueva", "new databse description"); optionsTooltips.Enable(); learnSymbolDatabaseChooserDialog.ShowAll(); }
public static void ReplaceUpgrade(GenericShip host, string oldName, string newName, string newImageUrl) { foreach (Transform upgradeLine in host.InfoPanel.transform.Find("ShipInfo/UpgradesBar").transform) { if (upgradeLine.GetComponent <Text>().text == oldName) { upgradeLine.GetComponent <Text>().text = newName; upgradeLine.GetComponent <Text>().color = Color.white; Tooltips.ReplaceTooltip(upgradeLine.gameObject, newImageUrl); return; } } }
/// <summary> /// Start is called before the first frame update /// </summary> void Start() { try { _tps = GetComponent <Tooltips>(); _tps.m_tooltipText = "training"; Localization.m_onLanguageChanged += ChangeLanguage; ChangeLanguage(); } catch (Exception ex) { Debug.LogError("Emoji Start exception" + ex.Message); } }
public static void UpdateTokensIndicator(GenericShip thisShip, System.Type type) { List <GameObject> keys = new List <GameObject>(); foreach (Transform icon in thisShip.InfoPanel.transform.Find("ShipInfo/TokensBar").transform) { keys.Add(icon.gameObject); } foreach (GameObject icon in keys) { icon.gameObject.SetActive(false); MonoBehaviour.Destroy(icon); } int columnCounter = 0; int rowCounter = 0; foreach (var token in GetTokensSorted(thisShip)) { GameObject prefab = (GameObject)Resources.Load("Prefabs/TokenPanel", typeof(GameObject)); GameObject tokenPanel = MonoBehaviour.Instantiate(prefab, thisShip.InfoPanel.transform.Find("ShipInfo").Find("TokensBar")); Sprite tokenSprite = Resources.Load <Sprite>("Sprites/Tokens/" + token.ImageName); if (tokenSprite == null) { Console.Write("Token's image was not found: " + token.ImageName, LogTypes.Errors, true, "red"); } tokenPanel.GetComponentInChildren <Image>().sprite = tokenSprite; tokenPanel.GetComponent <RectTransform>().localPosition = Vector3.zero; tokenPanel.name = token.Name; Tooltips.AddTooltip(tokenPanel, token.Tooltip); if (token.GetType().BaseType == typeof(GenericTargetLockToken)) { Text tokenText = tokenPanel.transform.Find("Image/Letter").GetComponent <Text>(); tokenText.text = (token as GenericTargetLockToken).Letter.ToString(); tokenText.color = (token is BlueTargetLockToken) ? new Color(0, 0.6f, 1) : Color.red; } tokenPanel.SetActive(true); tokenPanel.GetComponent <RectTransform>().localPosition = new Vector3(columnCounter * 37, tokenPanel.GetComponent <RectTransform>().localPosition.y + -37 * rowCounter, tokenPanel.GetComponent <RectTransform>().localPosition.z); columnCounter++; if (columnCounter == 8) { rowCounter++; columnCounter = 0; } } OrganizeRosters(); }
private Toolbar CreateToolbar() { Toolbar tb = new Toolbar(); ToolbarTooltips = new Tooltips(); SaveButton = new ToolButton(Gtk.Stock.Save); SaveButton.SetTooltip(ToolbarTooltips, Util.GS("Save the synchronization log"), "Toolbar/Save Log"); SaveButton.Clicked += new EventHandler(SaveLogHandler); tb.Insert(SaveButton, -1); ClearButton = new ToolButton(Gtk.Stock.Clear); ClearButton.SetTooltip(ToolbarTooltips, Util.GS("Clear the synchronization log"), "Toolbar/Clear Log"); ClearButton.Clicked += new EventHandler(ClearLogHandler); tb.Insert(ClearButton, -1); SaveButton.Sensitive = false; ClearButton.Sensitive = false; return tb; }
public static void BuildToolbar(Toolbar toolbar, Tooltips tooltips, ActionModelNode node, int depth) { if (node.Action != null) { // create the tool button ToolButton button = new ActiveToolbarButton((IClickAction)node.Action, tooltips); toolbar.Insert(button, toolbar.NItems); } else { foreach (ActionModelNode child in node.ChildNodes) { BuildToolbar(toolbar, tooltips, child, depth + 1); } } }
public ToolbarBase(UMLDiagram diagram) : base() { _diagram = diagram; ToolbarStyle = ToolbarStyle.Icons; Tooltips = true; _tooltips = new Tooltips (); _tbuttonGrid = new ToggleToolButton (); _tbuttonGrid.IconWidget = new Gtk.Image (MonoUML.IconLibrary.PixbufLoader.GetIcon ("grid_tbar.png")); _tbuttonGrid.SetTooltip (_tooltips, GettextCatalog.GetString ("Show grid"), GettextCatalog.GetString ("Show grid")); _tbuttonSnap2Grid = new ToggleToolButton (); _tbuttonSnap2Grid.IconWidget = new Gtk.Image (MonoUML.IconLibrary.PixbufLoader.GetIcon ("snap2grid_tbar.png")); _tbuttonSnap2Grid.SetTooltip (_tooltips, GettextCatalog.GetString ("Snap to grid"), GettextCatalog.GetString ("Snap to grid")); Insert (_tbuttonGrid, -1); Insert (_tbuttonSnap2Grid, -1); InsertSeparator (); DrawIcons (); }
protected DockItemGrip() { WidgetFlags |= WidgetFlags.NoWindow; Widget.PushCompositeChild (); closeButton = new Button (); Widget.PopCompositeChild (); closeButton.WidgetFlags &= ~WidgetFlags.CanFocus; closeButton.Parent = this; closeButton.Relief = ReliefStyle.None; closeButton.Show (); Image image = new Image (GdlStock.Close, IconSize.Menu); closeButton.Add (image); image.Show (); closeButton.Clicked += new EventHandler (CloseClicked); Widget.PushCompositeChild (); iconifyButton = new Button (); Widget.PopCompositeChild (); iconifyButton.WidgetFlags &= ~WidgetFlags.CanFocus; iconifyButton.Parent = this; iconifyButton.Relief = ReliefStyle.None; iconifyButton.Show (); image = new Image (GdlStock.MenuLeft, IconSize.Menu); iconifyButton.Add (image); image.Show (); iconifyButton.Clicked += new EventHandler (IconifyClicked); tooltips = new Tooltips (); tooltips.SetTip (iconifyButton, "Iconify", "Iconify this dock"); tooltips.SetTip (closeButton, "Close", "Close this dock"); }
protected override void OnDestroyed() { if (layout != null) layout = null; if (icon != null) icon = null; if (tooltips != null) tooltips = null; if (item != null) { // FIXME: Disconnect future signal handlers for notify. } item = null; base.OnDestroyed (); }
public MiniMode() : base(Branding.ApplicationLongName) { default_main_window = InterfaceElements.MainWindow; glade = new Glade.XML(null, "minimode.glade", "MiniModeWindow", null); glade.Autoconnect(this); Widget child = glade["mini_mode_contents"]; (child.Parent as Container).Remove(child); Add(child); BorderWidth = 12; Resizable = false; IconThemeUtils.SetWindowIcon(this); DeleteEvent += delegate { Globals.ActionManager["QuitAction"].Activate(); }; // Playback Buttons ActionButton previous_button = new ActionButton(Globals.ActionManager["PreviousAction"]); previous_button.LabelVisible = false; previous_button.Padding = 1; ActionButton next_button = new ActionButton(Globals.ActionManager["NextAction"]); next_button.LabelVisible = false; next_button.Padding = 1; ActionButton playpause_button = new ActionButton(Globals.ActionManager["PlayPauseAction"]); playpause_button.LabelVisible = false; playpause_button.Padding = 1; PlaybackBox.PackStart(previous_button, false, false, 0); PlaybackBox.PackStart(playpause_button, false, false, 0); PlaybackBox.PackStart(next_button, false, false, 0); PlaybackBox.ShowAll(); // Seek Slider/Position Label seek_slider = new SeekSlider(); seek_slider.SetSizeRequest(125, -1); seek_slider.SeekRequested += delegate { PlayerEngineCore.Position = (uint)seek_slider.Value; }; stream_position_label = new StreamPositionLabel(seek_slider); SeekContainer.PackStart(seek_slider, false, false, 0); SeekContainer.PackStart(stream_position_label, false, false, 0); SeekContainer.ShowAll(); // Volume button volume_button = new VolumeButton(); VolumeContainer.PackStart(volume_button, false, false, 0); volume_button.Show(); volume_button.VolumeChanged += delegate(int volume) { PlayerEngineCore.Volume = (ushort)volume; PlayerEngineCore.VolumeSchema.Set(volume); }; // Cover cover_art_thumbnail = new CoverArtThumbnail(90); Gdk.Pixbuf default_pixbuf = Banshee.Base.Branding.DefaultCoverArt; cover_art_thumbnail.NoArtworkPixbuf = default_pixbuf; CoverBox.PackStart(cover_art_thumbnail, false, false, 0); // Source combobox source_combo_box = new SourceComboBox(); SourceBox.PackStart(source_combo_box, true, true, 0); source_combo_box.ShowAll(); // Repeat/Shuffle buttons MultiStateToggleButton shuffle_toggle_button = new MultiStateToggleButton(); shuffle_toggle_button.AddState(typeof(ShuffleDisabledToggleState), Globals.ActionManager["ShuffleAction"] as ToggleAction); shuffle_toggle_button.AddState(typeof(ShuffleEnabledToggleState), Globals.ActionManager["ShuffleAction"] as ToggleAction); shuffle_toggle_button.Relief = ReliefStyle.None; shuffle_toggle_button.ShowLabel = false; try { shuffle_toggle_button.ActiveStateIndex = PlayerWindowSchema.PlaybackShuffle.Get() ? 1 : 0; } catch { shuffle_toggle_button.ActiveStateIndex = 0; } shuffle_toggle_button.ShowAll(); MultiStateToggleButton repeat_toggle_button = new MultiStateToggleButton(); repeat_toggle_button.AddState(typeof(RepeatNoneToggleState), Globals.ActionManager["RepeatNoneAction"] as ToggleAction); repeat_toggle_button.AddState(typeof(RepeatAllToggleState), Globals.ActionManager["RepeatAllAction"] as ToggleAction); repeat_toggle_button.AddState(typeof(RepeatSingleToggleState), Globals.ActionManager["RepeatSingleAction"] as ToggleAction); repeat_toggle_button.Relief = ReliefStyle.None; repeat_toggle_button.ShowLabel = false; try { repeat_toggle_button.ActiveStateIndex = (int)PlayerWindowSchema.PlaybackRepeat.Get(); } catch { repeat_toggle_button.ActiveStateIndex = 0; } repeat_toggle_button.ShowAll(); LowerButtonsBox.PackEnd(repeat_toggle_button, false, false, 0); LowerButtonsBox.PackEnd(shuffle_toggle_button, false, false, 0); LowerButtonsBox.ShowAll(); // Tooltips toolTips = new Tooltips(); SetTip(previous_button, Catalog.GetString("Play previous song")); SetTip(playpause_button, Catalog.GetString("Play/pause current song")); SetTip(next_button, Catalog.GetString("Play next song")); SetTip(fullmode_button, Catalog.GetString("Switch back to full mode")); SetTip(volume_button, Catalog.GetString("Adjust volume")); SetTip(repeat_toggle_button, Catalog.GetString("Change repeat playback mode")); SetTip(shuffle_toggle_button, Catalog.GetString("Toggle shuffle playback mode")); // Hook up everything PlayerEngineCore.EventChanged += OnPlayerEngineEventChanged; PlayerEngineCore.StateChanged += OnPlayerEngineStateChanged; SetHeightLimit(); }
public MainWindow() : base(Gtk.WindowType.Toplevel) { Build(); trayIcon = new StatusIcon(MainClass.GetResource("omvviewer-light.xpm")); trayIcon.Visible=true; trayIcon.Tooltip="Disconnected"; trayIcon.Activate+= delegate{ Visible=!Visible; this.Deiconify(); }; trayIcon.Activate += delegate { trayIcon.Blinking = false; this.UrgencyHint = false; }; trayIcon.PopupMenu += delegate { Gtk.Menu menu = new Gtk.Menu(); Gtk.ImageMenuItem menu_hide = new ImageMenuItem("Minimse"); Gtk.ImageMenuItem menu_restore = new ImageMenuItem("Restore"); AccelGroup ag=new AccelGroup(); Gtk.ImageMenuItem menu_quit = new ImageMenuItem("gtk-quit",ag); menu_quit.ButtonPressEvent += new ButtonPressEventHandler(menu_quit_fn); menu_restore.ButtonPressEvent += new ButtonPressEventHandler(menu_restore_fn); menu_hide.ButtonPressEvent += new ButtonPressEventHandler(menu_hide_fn); if(MainClass.win.Visible) menu.Append(menu_hide); else menu.Append(menu_restore); menu.Append(menu_quit); menu.ShowAll(); menu.Popup(); }; this.Icon=MainClass.GetResource("omvviewer-light.xpm"); status_location=new Gtk.Label("Location: Unknown (0,0,0)"); appearancesetting.Set(); status_balance=new Gtk.HBox(); status_balance_lable=new Gtk.Label("?"); Gtk.Image balicon=new Gtk.Image(); balicon.Pixbuf = MainClass.GetResource("status_money.png"); status_balance.PackStart(balicon); status_balance.PackStart(status_balance_lable); status_balance.SetChildPacking(balicon,false,false,0,PackType.Start); status_balance.SetChildPacking(status_balance_lable,false,false,0,PackType.Start); status_parcel=new Gtk.Label("Parcel: Unknown"); this.statusbar1.PackStart(status_location); this.statusbar1.PackStart(status_parcel); this.statusbar1.PackStart(status_balance); this.Title="omvviewer light v0.48.1"; chat=new ChatLayout(); chat_tab_lable=this.addtabwithicon("icn_voice-pvtfocus.png","Chat",chat); chat.passontablable(chat_tab_lable); this.notebook.SwitchPage += new SwitchPageHandler(chat.onSwitchPage); this.LocationAction.Active = MainClass.appsettings.tab_location; this.SearchAction.Active = MainClass.appsettings.tab_search; this.GroupsAction.Active = MainClass.appsettings.tab_groups; this.InventoryAction.Active = MainClass.appsettings.tab_inv; this.ObjectsAction.Active = MainClass.appsettings.tab_objects; this.ParcelAction.Active = MainClass.appsettings.tab_parcel; this.statusbar1.ShowAll(); MainClass.onRegister += new MainClass.register(MainClass_onRegister); MainClass.onDeregister += new MainClass.deregister(MainClass_onDeregister); if(MainClass.client != null ) { MainClass_onRegister(); } //this.menubar1.get this.AvaiableAction.Activate(); this.StandingAction.Activate(); this.AvaiableAction.Sensitive=false; this.AwayAction.Sensitive=false; this.BusyAction.Sensitive=false; this.StandingAction.Sensitive=false; this.CrouchAction.Sensitive=false; this.FlyAction.Sensitive=false; this.GroundSitAction.Sensitive=false; this.SittingAction.Sensitive=false; this.WindowStateEvent += delegate { if (this.Visible) { trayIcon.Blinking = false; this.UrgencyHint = false; };}; this.DeleteEvent += new DeleteEventHandler(MainWindow_DeleteEvent); GLib.Timeout.Add(1000,OnUpdateStatus); tooltips1 = new Tooltips(); this.statusbar1.Push(1, "Logged out"); }
public GtkCertificateViewer (string filename) { Application.Init(); Glade.XML gxml = new Glade.XML (null, "certview.glade", "CertificateViewer", null); gxml.Autoconnect (this); cf = new CertificateFormatter (filename); // init UI brokenSealImage.Pixbuf = new Pixbuf (null, "wax-seal-broken.png"); sealImage.Pixbuf = new Pixbuf (null, "wax-seal.png"); Tooltips tt = new Tooltips (); issuedToEntry.Text = cf.Issuer (false); tt.SetTip (issuedToEntry, issuedToEntry.Text, issuedToEntry.Text); issuedByEntry.Text = cf.Subject (false); tt.SetTip (issuedByEntry, issuedByEntry.Text, issuedByEntry.Text); subjectAltNameLabel.Text = cf.SubjectAltName (false); subjectAltNameLabel.Visible = (subjectAltNameLabel.Text != null); notBeforeEntry.Text = cf.Certificate.ValidFrom.ToString ("yyyy-MM-dd"); notAfterEntry.Text = cf.Certificate.ValidUntil.ToString ("yyyy-MM-dd"); TextBuffer tb = new TextBuffer (null); if (cf.Status != null) tb.SetText (cf.Status); certStatusTextview.Buffer = tb; if (cf.Status != null) { certInfoTextview.Buffer = tb; certInfoTextview.ModifyText (StateType.Normal, new Gdk.Color (0xff, 0x00, 0x00)); } sealImage.Visible = (cf.Status == null); brokenSealImage.Visible = !sealImage.Visible; Type[] storeType = new Type [4] { typeof (string), typeof (string), typeof (string), typeof (int) }; allStore = new ListStore (storeType); v1Store = new ListStore (storeType); extensionsStore = new ListStore (storeType); criticalStore = new ListStore (storeType); propertiesStore = new ListStore (storeType); emptyStore = new ListStore (storeType); AddToStores (CertificateFormatter.FieldNames.Version, cf.Version (false), cf.Version (true), 1); AddToStores (CertificateFormatter.FieldNames.SerialNumber, cf.SerialNumber (false), cf.SerialNumber (true), 0); AddToStores (CertificateFormatter.FieldNames.SignatureAlgorithm, cf.SignatureAlgorithm (false), cf.SignatureAlgorithm (true), 0); AddToStores (CertificateFormatter.FieldNames.Issuer, cf.Issuer (false), cf.Issuer (true), 0); AddToStores (CertificateFormatter.FieldNames.ValidFrom, cf.ValidFrom (false), cf.ValidFrom (true), 0); AddToStores (CertificateFormatter.FieldNames.ValidUntil, cf.ValidUntil (false), cf.ValidUntil (true), 0); AddToStores (CertificateFormatter.FieldNames.Subject, cf.Subject (false), cf.Subject (true), 0); AddToStores (CertificateFormatter.FieldNames.PublicKey, cf.PublicKey (false), cf.PublicKey (true), 0); for (int i=0; i < cf.Certificate.Extensions.Count; i++) { X509Extension xe = cf.GetExtension (i); string name = xe.Name; int icon = 2; if (xe.Critical) icon = 3; string exts = xe.ToString (); string details; if (xe.Name == xe.Oid) { exts = cf.Extension (i, false); details = cf.Extension (i, true); } else { details = xe.ToString (); exts = CertificateFormatter.OneLine (details); } AddToStores (name, exts, details, icon); } AddToStores (CertificateFormatter.PropertyNames.ThumbprintAlgorithm, cf.ThumbprintAlgorithm, cf.ThumbprintAlgorithm, 4); string ftb = CertificateFormatter.Array2Word (cf.Thumbprint); AddToStores (CertificateFormatter.PropertyNames.Thumbprint, ftb, ftb, 4); // select appropriate store to show OnShowComboChanged (null, null); TreeViewColumn fieldColumn = new TreeViewColumn (); CellRendererPixbuf pr = new CellRendererPixbuf (); CellRenderer fieldRenderer = new CellRendererText (); fieldColumn.PackStart (pr, false); fieldColumn.SetCellDataFunc (pr, CellDataFunc, IntPtr.Zero, null); fieldColumn.Title = "Field"; fieldColumn.PackStart (fieldRenderer, false); fieldColumn.AddAttribute (fieldRenderer, "text", 0); detailsTreeview.AppendColumn (fieldColumn); TreeViewColumn valueColumn = new TreeViewColumn (); CellRenderer valueRenderer = new CellRendererText (); valueColumn.Title = "Value"; valueColumn.PackStart (valueRenderer, true); valueColumn.AddAttribute (valueRenderer, "text", 1); detailsTreeview.AppendColumn (valueColumn); // detailsTreeview.ModifyText (StateType.Selected, new Gdk.Color (0x33, 0xff, 0x33)); Application.Run(); }
private PhotoEditorUI(ArrayList selectedphotos, DeskFlickrUI.ModeSelected mode) { Glade.XML gxml = new Glade.XML (null, "organizer.glade", "window2", null); gxml.Autoconnect (this); _isconflictmode = (mode == DeskFlickrUI.ModeSelected.ConflictMode); _isuploadmode = (mode == DeskFlickrUI.ModeSelected.UploadMode); _isblogmode = (mode == DeskFlickrUI.ModeSelected.BlogMode); if (mode == DeskFlickrUI.ModeSelected.BlogAndConflictMode) { _isconflictmode = true; _isblogmode = true; } _tags = new ArrayList(); _comments = new ArrayList(); window2.Title = "Edit information for " + selectedphotos.Count + " photos"; window2.SetIconFromFile(DeskFlickrUI.ICON_PATH); notebook1.SetTabLabelText(notebook1.CurrentPageWidget, "Information"); notebook1.NextPage(); notebook1.SetTabLabelText(notebook1.CurrentPageWidget, "Tags"); notebook1.NextPage(); notebook1.SetTabLabelText(notebook1.CurrentPageWidget, "Comments"); tips = new Tooltips(); SetCommentsToolBar(); tips.Enable(); SetCommentsTree(); if (_isconflictmode) { notebook1.NextPage(); notebook1.SetTabLabelText(notebook1.CurrentPageWidget, "Information at Server"); } else { notebook1.RemovePage(3); } if (_isblogmode) { notebook1.NextPage(); notebook1.SetTabLabelText(notebook1.CurrentPageWidget, "Blog Entry"); notebook1.Page = 3; // Default page is blog entry if editor is in Blog mode. } else { if (_isconflictmode) notebook1.RemovePage(4); else notebook1.RemovePage(3); notebook1.Page = 0; // Default page is photo editing. } table1.SetColSpacing(0, 50); // Set Labels label6.Text = "Edit"; label5.Text = "Title:"; label4.Text = "Description:"; label3.Text = "Visibility:"; label2.Text = "License:"; if (_isuploadmode) label2.Sensitive = false; // Labels for blog tab. label17.Text = "Title: "; label18.Text = "Description: "; // Search box label15.Markup = "<span weight='bold'>Search: </span>"; entry2.Changed += new EventHandler(OnFilterEntryChanged); // Revert button button9.Label = "Revert Photo(s)"; button9.Clicked += new EventHandler(OnRevertButtonClicked); // entry1.ModifyFont(Pango.FontDescription.FromString("FreeSerif 10")); SetPrivacyComboBox(); SetLicenseComboBox(); SetTagTreeView(); // Make previous and next buttons insensitive. They'll become sensitive // only when the user ticks the 'Per Photo' checkbutton. button3.Sensitive = false; button4.Sensitive = false; checkbutton1.Toggled += new EventHandler(OnPerPageCheckToggled); button3.Clicked += new EventHandler(OnPrevButtonClick); button4.Clicked += new EventHandler(OnNextButtonClick); button5.Clicked += new EventHandler(OnSaveButtonClick); button6.Clicked += new EventHandler(OnCancelButtonClick); entry1.Changed += new EventHandler(OnTitleChanged); textview5.Buffer.Changed += new EventHandler(OnDescChanged); combobox1.Changed += new EventHandler(OnPrivacyChanged); combobox2.Changed += new EventHandler(OnLicenseChanged); entry4.Changed += new EventHandler(OnBlogTitleChanged); textview7.Buffer.Changed += new EventHandler(OnBlogDescChanged); textview3.Buffer.Changed += new EventHandler(OnTagsChanged); TextTag texttag = new TextTag("conflict"); texttag.Font = "Times Italic 10"; texttag.WrapMode = WrapMode.Word; texttag.ForegroundGdk = new Gdk.Color(0x99, 0, 0); textview4.Buffer.TagTable.Add(texttag); // Showing photos should be the last step. this._selectedphotos = selectedphotos; if (selectedphotos.Count == 1) { checkbutton1.Sensitive = false; ShowInformationForCurrentPhoto(); } else { EmbedCommonInformation(); } // Save a copy of the original photos, so that only those photos // which have been edited, would have their dirty bit set. Advantage: // this would reduce the number of dirty photos, and hence there'll // be lesser photos to update when sycing with server. _originalphotos = new System.Collections.Generic.Dictionary<string, Photo>(); foreach (DeskFlickrUI.SelectedPhoto sel in _selectedphotos) { Photo p = sel.photo; _originalphotos.Add(p.Id, new Photo(p)); } eventbox5.ButtonPressEvent += OnLinkPressed; eventbox5.EnterNotifyEvent += MouseOnLink; eventbox5.LeaveNotifyEvent += MouseLeftLink; window2.ShowAll(); }
public override void Destroy() { if (master != null) { master.LayoutChanged -= new EventHandler (OnLayoutChanged); master = null; } if (tooltips != null) { tooltips = null; } base.Destroy (); }
internal PropertyGrid(EditorManager editorManager) : base(false, 0) { this.editorManager = editorManager; tips = new Tooltips (); #region Toolbar toolbar = new Toolbar (); toolbar.ToolbarStyle = ToolbarStyle.Icons; toolbar.IconSize = IconSize.SmallToolbar; base.PackStart (toolbar, false, false, 0); catButton = new RadioToolButton (new GLib.SList (IntPtr.Zero)); catButton.IconWidget = new Image (new Gdk.Pixbuf (null, "AspNetEdit.UI.PropertyGrid.SortByCat.png")); catButton.SetTooltip (tips, "Sort in categories", null); catButton.Toggled += new EventHandler (toolbarClick); toolbar.Insert (catButton, 0); alphButton = new RadioToolButton (catButton, Stock.SortAscending); alphButton.SetTooltip (tips, "Sort alphabetically", null); alphButton.Clicked += new EventHandler (toolbarClick); toolbar.Insert (alphButton, 1); catButton.Active = true; SeparatorToolItem sep = new SeparatorToolItem(); toolbar.Insert (sep, 2); #endregion vpaned = new VPaned (); descFrame = new Frame (); descFrame.Shadow = ShadowType.In; desc = new VBox (false, 0); descFrame.Add (desc); descTitle = new Label (); descTitle.SetAlignment(0, 0); descTitle.SetPadding (5, 5); descTitle.UseMarkup = true; desc.PackStart (descTitle, false, false, 0); textScroll = new ScrolledWindow (); textScroll.HscrollbarPolicy = PolicyType.Never; textScroll.VscrollbarPolicy = PolicyType.Automatic; desc.PackEnd (textScroll, true, true, 0); //TODO: Use label, but wrapping seems dodgy. descText = new TextView (); descText.WrapMode = WrapMode.Word; descText.WidthRequest = 1; descText.HeightRequest = 100; descText.Editable = false; descText.LeftMargin = 5; descText.RightMargin = 5; textScroll.Add (descText); scrolledWindow = new ScrolledWindow (); scrolledWindow.HscrollbarPolicy = PolicyType.Automatic; scrolledWindow.VscrollbarPolicy = PolicyType.Automatic; vpaned.Pack1 (scrolledWindow, true, true); vpaned.Pack2 (descFrame, false, true); AddPropertyTab (new DefaultPropertyTab ()); AddPropertyTab (new EventPropertyTab ()); base.PackEnd (vpaned); Populate (); }
private void Init() { tooltips = new Tooltips (); CapStyle = Gdk.CapStyle.Round; JoinStyle = Gdk.JoinStyle.Round; if (Task.Priority == TaskPriority.High) { FillColor = highPriorityFillColor; OutlineColor = highPriorityOutlineColor; } else if (Task.Priority == TaskPriority.Medium) { FillColor = midPriorityFillColor; OutlineColor = midPriorityOutlineColor; } else { FillColor = lowPriorityFillColor; OutlineColor = lowPriorityOutlineColor; } SetupInfoWidget (); Task.PriorityChanged += OnPriorityChanged; Task.StartingHourChanged += OnTimeChanged; Task.StartingMinuteChanged += OnTimeChanged; WidthUnits = normalWidth; CanvasEvent += OnCanvasEvent; }
protected void PopulateFilterToolbar() { int i = 0; foreach (CommandSpec CmdSpec in PipeEng.CmdSpecs) { ToolButton TheButton = new ToolButton(CmdSpec.IconName); TheButton.Name = CmdSpec.Name + "Button"; TheButton.Label = CmdSpec.Name; Tooltips TT = new Tooltips(); TheButton.SetTooltip (TT, CmdSpec.ShortDesc, CmdSpec.ShortDesc); TheButton.Sensitive = true; TheButton.Clicked += FilterButton_OnActivated; TheButton.Show(); CommandsToolbar.Insert(TheButton,i++); } }
private Widget CreateiFolderActionButtonArea() { EventBox buttonArea = new EventBox(); VBox actionsVBox = new VBox(false, 0); actionsVBox.WidthRequest = 100; buttonArea.ModifyBg(StateType.Normal, this.Style.Background(StateType.Normal)); buttonArea.Add(actionsVBox); buttontips = new Tooltips(); HBox ButtonControl = new HBox (false, 0); actionsVBox.PackStart(ButtonControl, false, false, 0); Image stopImage = new Image(Stock.Stop, Gtk.IconSize.Menu); stopImage.SetAlignment(0.5F, 0F); CancelSearchButton = new Button(stopImage); CancelSearchButton.Sensitive = false; CancelSearchButton.Clicked += new EventHandler(OnCancelSearchButton); CancelSearchButton.Visible = false; HBox spacerHBox = new HBox(false, 0); ButtonControl.PackStart(spacerHBox, false, false, 0); HBox vbox = new HBox(false, 0); spacerHBox.PackStart(vbox, true, true, 0); HBox hbox = new HBox(false, 0); AddiFolderButton = new Button(hbox); vbox.PackStart(AddiFolderButton, false, false, 0); Label buttonText = new Label( string.Format("<span>{0}</span>", Util.GS("Upload a folder..."))); hbox.PackStart(buttonText, false, false, 4); buttonText.UseMarkup = true; buttonText.UseUnderline = false; buttonText.Xalign = 0; AddiFolderButton.Image = new Image(new Gdk.Pixbuf(Util.ImagesPath("ifolder48.png"))); AddiFolderButton.Clicked += new EventHandler(AddiFolderHandler); buttontips.SetTip(AddiFolderButton, Util.GS("Create iFolder"),""); hbox = new HBox(false, 0); ShowHideAllFoldersButton = new Button(hbox); vbox.PackStart(ShowHideAllFoldersButton, false, false, 0); ShowHideAllFoldersButtonText = new Label( string.Format("<span>{0}</span>", Util.GS("View available iFolders"))); hbox.PackStart(ShowHideAllFoldersButtonText, false, false, 4); ShowHideAllFoldersButtonText.UseMarkup = true; ShowHideAllFoldersButtonText.UseUnderline = false; ShowHideAllFoldersButtonText.Xalign = 0; ShowHideAllFoldersButton.Image = new Image(new Gdk.Pixbuf(Util.ImagesPath("ifolder48.png"))); ShowHideAllFoldersButton.Clicked += new EventHandler(ShowHideAllFoldersHandler); buttontips.SetTip(ShowHideAllFoldersButton, Util.GS("Show or Hide iFolder"),""); hbox = new HBox(false, 0); DownloadAvailableiFolderButton = new Button(hbox); vbox.PackStart(DownloadAvailableiFolderButton, false, false, 0); buttonText = new Label( string.Format("<span>{0}</span>", Util.GS("Download..."))); hbox.PackStart(buttonText, true, true, 4); buttonText.UseMarkup = true; buttonText.UseUnderline = false; buttonText.Xalign = 0; DownloadAvailableiFolderButton.Sensitive = false; DownloadAvailableiFolderButton.Image= new Image(new Gdk.Pixbuf(Util.ImagesPath("ifolder-download48.png"))); DownloadAvailableiFolderButton.Clicked += new EventHandler(DownloadAvailableiFolderHandler); buttontips.SetTip(DownloadAvailableiFolderButton, Util.GS("Download"),""); hbox = new HBox(false, 0); MergeAvailableiFolderButton = new Button(hbox); vbox.PackStart(MergeAvailableiFolderButton, false, false, 0); buttonText = new Label( string.Format("<span>{0}</span>", Util.GS("Merge"))); hbox.PackStart(buttonText, true, true, 4); buttonText.UseMarkup = true; buttonText.UseUnderline = false; buttonText.Xalign = 0; MergeAvailableiFolderButton.Sensitive = false; MergeAvailableiFolderButton.Image = new Image(new Gdk.Pixbuf(Util.ImagesPath("merge48.png"))); MergeAvailableiFolderButton.Clicked += new EventHandler(MergeAvailableiFolderHandler); buttontips.SetTip(MergeAvailableiFolderButton, Util.GS("Merge"),""); hbox = new HBox(false, 0); RemoveMembershipButton = new Button(hbox); vbox.PackStart(RemoveMembershipButton, false, false, 0); buttonText = new Label( string.Format("<span>{0}</span>", Util.GS("Remove My Membership"))); hbox.PackStart(buttonText, true, true, 4); buttonText.UseMarkup = true; buttonText.UseUnderline = false; buttonText.Xalign = 0; RemoveMembershipButton.Sensitive = false; RemoveMembershipButton.Visible = false; RemoveMembershipButton.Image = new Image(new Gdk.Pixbuf(Util.ImagesPath("ifolder-error48.png"))); RemoveMembershipButton.Clicked += new EventHandler(RemoveMembershipHandler); buttontips.SetTip(RemoveMembershipButton, Util.GS("Remove My Membership"),""); hbox = new HBox(false, 0); DeleteFromServerButton = new Button(hbox); vbox.PackStart(DeleteFromServerButton, false, false, 0); buttonText = new Label( string.Format("<span>{0}</span>", Util.GS("Delete from server"))); hbox.PackStart(buttonText, true, true, 4); buttonText.UseMarkup = true; buttonText.UseUnderline = false; buttonText.Xalign = 0; DeleteFromServerButton.Sensitive = false; DeleteFromServerButton.Image = new Image(new Gdk.Pixbuf(Util.ImagesPath("delete_48.png"))); DeleteFromServerButton.Clicked += new EventHandler(DeleteFromServerHandler); buttontips.SetTip(DeleteFromServerButton, Util.GS("Delete from server"),""); hbox = new HBox(false, 0); ShareSynchronizedFolderButton = new Button(hbox); vbox.PackStart(ShareSynchronizedFolderButton, false, false, 0); buttonText = new Label( string.Format("<span>{0}</span>", Util.GS("Share with..."))); hbox.PackStart(buttonText, true, true, 4); buttonText.UseMarkup = true; buttonText.UseUnderline = false; buttonText.Xalign = 0; ShareSynchronizedFolderButton.Sensitive= false; ShareSynchronizedFolderButton.Image = new Image(new Gdk.Pixbuf(Util.ImagesPath("ifolder_share48.png"))); ShareSynchronizedFolderButton.Clicked += new EventHandler(OnShareSynchronizedFolder); buttontips.SetTip(ShareSynchronizedFolderButton, Util.GS("Share with"),""); hbox = new HBox(false, 0); ResolveConflictsButton = new Button(hbox); vbox.PackStart(ResolveConflictsButton, false, false, 0); buttonText = new Label( string.Format("<span>{0}</span>", Util.GS("Resolve conflicts..."))); hbox.PackStart(buttonText, false, false, 4); buttonText.UseMarkup = true; buttonText.UseUnderline = false; buttonText.Xalign = 0; ResolveConflictsButton.Sensitive = false; ResolveConflictsButton.Image = new Image(new Gdk.Pixbuf(Util.ImagesPath("ifolder-conflict48.png"))); ResolveConflictsButton.Clicked += new EventHandler(OnResolveConflicts); buttontips.SetTip(ResolveConflictsButton, Util.GS("Resolve conflicts"),""); SynchronizedFolderTasks = new VBox(false, 0); ButtonControl.PackStart(SynchronizedFolderTasks, false, false, 0); spacerHBox = new HBox(false, 0); SynchronizedFolderTasks.PackStart(spacerHBox, false, false, 0); hbox = new HBox(false, 0); OpenSynchronizedFolderButton = new Button(hbox); vbox.PackStart(OpenSynchronizedFolderButton, false, false, 0); buttonText = new Label( string.Format("<span>{0}</span>", Util.GS("Open..."))); hbox.PackStart(buttonText, false, false, 4); buttonText.UseMarkup = true; buttonText.UseUnderline = false; buttonText.Xalign = 0; OpenSynchronizedFolderButton.Visible = false; OpenSynchronizedFolderButton.Image = new Image(new Gdk.Pixbuf(Util.ImagesPath("ifolder48.png"))); OpenSynchronizedFolderButton.Clicked += new EventHandler(OnOpenSynchronizedFolder); buttontips.SetTip(OpenSynchronizedFolderButton, Util.GS("Open iFolder"),""); hbox = new HBox(false, 0); SynchronizeNowButton = new Button(hbox); vbox.PackStart(SynchronizeNowButton, false, false, 0); buttonText = new Label( string.Format("<span>{0}</span>", Util.GS("Synchronize Now"))); hbox.PackStart(buttonText, true, true, 4); buttonText.UseMarkup = true; buttonText.UseUnderline = false; buttonText.Xalign = 0; SynchronizeNowButton.Sensitive = false; SynchronizeNowButton.Image = new Image(new Gdk.Pixbuf(Util.ImagesPath("ifolder-sync48.png"))); SynchronizeNowButton.Clicked += new EventHandler(OnSynchronizeNow); buttontips.SetTip(SynchronizeNowButton, Util.GS("Synchronize Now"),""); hbox = new HBox(false, 0); RemoveiFolderButton = new Button(hbox); vbox.PackStart(RemoveiFolderButton, false, false, 0); buttonText = new Label( string.Format("<span>{0}</span>", Util.GS("Revert to a Normal Folder"))); hbox.PackStart(buttonText, true, true, 4); buttonText.UseMarkup = true; buttonText.UseUnderline = false; buttonText.Xalign = 0; RemoveiFolderButton.Sensitive = false; RemoveiFolderButton.Image = new Image(new Gdk.Pixbuf(Util.ImagesPath("revert48.png"))); RemoveiFolderButton.Clicked += new EventHandler(RemoveiFolderHandler); buttontips.SetTip(RemoveiFolderButton, Util.GS("Revert to a Normal Folder"),""); hbox = new HBox(false, 0); ViewFolderPropertiesButton = new Button(hbox); vbox.PackStart(ViewFolderPropertiesButton, false, false, 0); buttonText = new Label( string.Format("<span>{0}</span>", Util.GS("Properties..."))); hbox.PackStart(buttonText, true, true, 4); buttonText.UseMarkup = true; buttonText.UseUnderline = false; buttonText.Xalign = 0; ViewFolderPropertiesButton.Visible = false; ViewFolderPropertiesButton.Image = new Image(new Gdk.Pixbuf(Util.ImagesPath("ifolder48.png"))); ViewFolderPropertiesButton.Clicked += new EventHandler(OnShowFolderProperties); buttontips.SetTip(ViewFolderPropertiesButton, Util.GS("Properties"),""); ButtonControl.PackStart(new Label(""), false, false, 4); HBox searchHBox = new HBox(false, 4); searchHBox.WidthRequest = 110; ButtonControl.PackEnd(searchHBox, false, false, 0); SearchEntry = new Entry(); searchHBox.PackStart(SearchEntry, true, true, 0); SearchEntry.SelectRegion(0, -1); SearchEntry.CanFocus = true; SearchEntry.Changed += new EventHandler(OnSearchEntryChanged); Label l = new Label("<span size=\"small\"></span>"); l = new Label( string.Format( "<span size=\"large\">{0}</span>", Util.GS("Filter"))); ButtonControl.PackEnd(l, false, false, 0); l.UseMarkup = true; l.ModifyFg(StateType.Normal, this.Style.Base(StateType.Selected)); l.Xalign = 0.0F; VBox viewChanger = new VBox(false,0); string[] list = {Util.GS("Open Panel"),Util.GS("Close Panel"),Util.GS("Thumbnail View"),Util.GS("List View") }; viewList = new ComboBoxEntry (list); viewList.Active = 0; viewList.WidthRequest = 110; viewList.Changed += new EventHandler(OnviewListIndexChange); VBox dummyVbox = new VBox(false,0); Label labeldummy = new Label( string.Format( "")); labeldummy.UseMarkup = true; dummyVbox.PackStart(labeldummy,false,true,0); viewChanger.PackStart(dummyVbox,false,true,0); viewChanger.PackStart(viewList,false,true,0); ButtonControl.PackEnd(viewChanger, false, true,0); return buttonArea; }
private void CreatePropertyWidgets(string title) { VBox box = new VBox(); tooltips = new Tooltips(); Label titleLabel = new Label(); titleLabel.Xalign = 0; titleLabel.Xpad = 12; titleLabel.Ypad = 6; titleLabel.Markup = "<b>" + title + "</b>"; box.PackStart(titleLabel, true, false, 0); // iterate over all fields and properties Type type = Object.GetType(); fieldTable.Clear(); List<Widget> editWidgets = new List<Widget>(); foreach(FieldOrProperty field in FieldOrProperty.GetFieldsAndProperties(type)) { CustomSettingsWidgetAttribute customSettings = (CustomSettingsWidgetAttribute) field.GetCustomAttribute(typeof(CustomSettingsWidgetAttribute)); if(customSettings != null) { Type customType = customSettings.Type; ICustomSettingsWidget customWidget = (ICustomSettingsWidget) CreateObject(customType); customWidget.Object = Object; customWidget.Field = field; editWidgets.Add(customWidget.Create(this)); continue; } LispChildAttribute ChildAttrib = (LispChildAttribute) field.GetCustomAttribute(typeof(LispChildAttribute)); if(ChildAttrib == null) continue; PropertyPropertiesAttribute propertyProperties = (PropertyPropertiesAttribute) field.GetCustomAttribute(typeof(PropertyPropertiesAttribute)); if ((propertyProperties != null) && (propertyProperties.Hidden)) continue; if(field.Type == typeof(string) || field.Type == typeof(float) || field.Type == typeof(int)) { Entry entry = new Entry(); entry.Name = field.Name; object val = field.GetValue(Object); if(val != null) entry.Text = val.ToString(); fieldTable[field.Name] = field; entry.Changed += OnEntryChanged; editWidgets.Add(entry); AddTooltip(propertyProperties, entry); } else if(field.Type == typeof(bool)) { CheckButton checkButton = new CheckButton(field.Name); checkButton.Name = field.Name; checkButton.Active = (bool) field.GetValue(Object); fieldTable[field.Name] = field; checkButton.Toggled += OnCheckButtonToggled; editWidgets.Add(checkButton); AddTooltip(propertyProperties, checkButton); } else if(field.Type.IsEnum) { // Create a combobox containing all the names of enum values. ComboBox comboBox = new ComboBox(Enum.GetNames(field.Type)); // Set the name of the box. comboBox.Name = field.Name; // FIXME: This will break if: // 1) the first enum isn't 0 and/or // 2) the vaules are not sequential (0, 1, 3, 4 wouldn't work) object val = field.GetValue(Object); if (val != null) comboBox.Active = (int)val; fieldTable[field.Name] = field; comboBox.Changed += OnComboBoxChanged; editWidgets.Add(comboBox); // FIXME: Why doesn't this work for the ComboBox? AddTooltip(propertyProperties, comboBox); } } Table table = new Table((uint) editWidgets.Count, 2, false); table.ColumnSpacing = 6; table.RowSpacing = 6; table.BorderWidth = 12; for(uint i = 0; i < editWidgets.Count; ++i) { Widget widget = editWidgets[(int) i]; if(widget is CheckButton) { table.Attach(widget, 0, 2, i, i+1, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Shrink, 0, 0); } else { Label label = new Label(widget.Name + ":"); label.SetAlignment(0, 1); table.Attach(label, 0, 1, i, i+1, AttachOptions.Fill, AttachOptions.Shrink, 0, 0); table.Attach(widget, 1, 2, i, i+1, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Shrink, 0, 0); } } box.PackStart(table, true, true, 0); // TODO add a (!) image in front of the label (and hide/show it depending // if there was an error) errorLabel = new Label(""); errorLabel.Xalign = 0; errorLabel.Xpad = 12; box.PackStart(errorLabel, true, false, 0); box.ShowAll(); Foreach(Remove); AddWithViewport(box); }
public TagView (Tooltips tips) : this () { parent_tips = tips; }
public void ShowControlBox( Gtk.VBox labels, Gtk.VBox widgets ) { Tooltips tooltips = new Tooltips(); coresize = new HScale( 0, 100, 5 ); coresize.Value = coresizevalue; coresize.ValueChanged += new EventHandler( coresize_ValueChanged ); tooltips.SetTip( coresize, "Radius of core. Core has no fall-off", "Radius of core. Inside core, brush has full effect; outside of core, brush effect falls off towards the edge." ); tooltips.Enable(); labels.PackEnd( new Label( "Brush core radius:" ) ); widgets.PackEnd( coresize ); labels.ShowAll(); widgets.ShowAll(); }
public static void BuildToolbar(Toolbar toolbar, Tooltips tooltips, ActionModelNode node) { BuildToolbar(toolbar, tooltips, node, 0); }
public void CreateGUI() { Application.Init(); Glade.XML gxml = new Glade.XML (null, "organizer.glade", "window1", null); gxml.Autoconnect (this); // Wao! Loading an image from file, didn't work when it was located // in object constructor i.e. DeskFlickrUI(). Shifting it to this // place, magically works! _nophotothumbnail = new Gdk.Pixbuf(SQTHUMBNAIL_PATH); tips = new Tooltips(); // Popup upload window, and label box. eventbox6.ModifyBg(StateType.Normal, tabcolor); // The value of stream button in this toolbar is being used by // other initializations. So, this should be positioned _before_ them. SetHorizontalToolBar(); SetTopLeftToolBar(); // Set Text for the label label1.Text = "Desktop Flickr Organizer"; label12.Markup = "<span weight='bold'>Search: </span>"; label19.Text = ""; Gdk.Color greycolor = new Gdk.Color(0x7F, 0x7C, 0x7C); eventbox11.ModifyBg(StateType.Normal, greycolor); // Set Flames window label size. label11.Wrap = true; int height; int width; eventbox3.GetSizeRequest(out width, out height); label11.SetSizeRequest(width, height); tips.SetTip(eventbox3, "Flames Window", "Flames Window"); tips.Enable(); // Set upload window label. popuplabel = new Label(); entry5.Changed += new EventHandler(OnFilterEntryChanged); checkbutton2.Toggled += new EventHandler(OnFilterEntryChanged); checkbutton3.Toggled += new EventHandler(OnFilterEntryChanged); checkbutton4.Toggled += new EventHandler(OnFilterEntryChanged); SetLeftTextView(); SetLeftTreeView(); SetRightTreeView(); // Set the menu bar SetMenuBar(); SetVerticalBar(); SetFlamesWindow(); SetIsConnected(0); progressbar2.Text = "Upload Status"; // Set window properties window1.SetIconFromFile(ICON_PATH); window1.DeleteEvent += OnWindowDeleteEvent; RestoreWindow(); window1.ShowAll(); Application.Run(); }
private void CreateWidgets() { dialogTips = new Tooltips(); VBox vbox = new VBox (false, 0); // Menubar? TODO // vbox.PackStart (CreateMenuBar (), false, false, 0); // Content Area (Sidebar and PersonView) vbox.PackStart (CreateContentArea (), true, true, 0); // Bottom Bar vbox.PackStart (CreateBottomBar (), false, false, 0); vbox.ShowAll (); Add (vbox); }
public SqlQueryView() : base() { control = new Frame (); control.Show (); VBox vbox = new VBox (); vbox.Show (); Tooltips tips = new Tooltips (); Toolbar toolbar = new Toolbar (); vbox.PackStart (toolbar, false, true, 0); toolbar.Show (); Image image = new Image (); image.Pixbuf = Gdk.Pixbuf.LoadFromResource ("MonoQuery.Execute"); image.Show (); Button execute = new Button (image); execute.Clicked += new EventHandler (OnExecute); execute.Relief = ReliefStyle.None; tips.SetTip (execute, "Execute", ""); toolbar.Add (execute); execute.Show (); image = new Image (); image.Pixbuf = Gdk.Pixbuf.LoadFromResource ("MonoQuery.RunFromCursor"); image.Show (); Button run = new Button (image); run.Clicked += new EventHandler (OnRunFromCursor); run.Relief = ReliefStyle.None; tips.SetTip (run, "Run from cursor", ""); toolbar.Add (run); run.Show (); image = new Image (); image.Pixbuf = Gdk.Pixbuf.LoadFromResource ("MonoQuery.Explain"); image.Show (); Button explain = new Button (image); explain.Clicked += new EventHandler (OnExplain); explain.Relief = ReliefStyle.None; tips.SetTip (explain, "Explain query", ""); toolbar.Add (explain); explain.Show (); image = new Image (); image.Pixbuf = Gdk.Pixbuf.LoadFromResource ("MonoQuery.Stop"); image.Show (); Button stop = new Button (image); stop.Clicked += new EventHandler (OnStop); stop.Relief = ReliefStyle.None; stop.Sensitive = false; tips.SetTip (stop, "Stop", ""); toolbar.Add (stop); stop.Show (); VSeparator sep = new VSeparator (); toolbar.Add (sep); sep.Show (); model = new ListStore (typeof (string), typeof (DbProviderBase)); providers = new ComboBox (); providers.Model = model; CellRendererText ctext = new CellRendererText (); providers.PackStart (ctext, true); providers.AddAttribute (ctext, "text", 0); toolbar.Add (providers); providers.Show (); SourceLanguagesManager lm = new SourceLanguagesManager (); SourceLanguage lang = lm.GetLanguageFromMimeType ("text/x-sql"); SourceBuffer buf = new SourceBuffer (lang); buf.Highlight = true; sourceView = new SourceView (buf); sourceView.ShowLineNumbers = true; sourceView.Show (); ScrolledWindow scroller = new ScrolledWindow (); scroller.Add (sourceView); scroller.Show (); vbox.PackStart (scroller, true, true, 0); control.Add (vbox); service = (MonoQueryService) ServiceManager.GetService (typeof (MonoQueryService)); changedHandler = (EventHandler) Runtime.DispatchService.GuiDispatch ( new EventHandler (OnProvidersChanged)); service.Providers.Changed += changedHandler; foreach (DbProviderBase p in service.Providers) { model.AppendValues (p.Name, p); } }
private void BuildToolbars(IWorkspace workspace) { _toolBarBox.Remove(_toolBar); _toolBar.Destroy(); // make sure the old one is cleaned up! _toolBar = new Toolbar(); _toolBar.ToolbarStyle = ToolbarStyle.Icons; _toolBarBox.PackStart(_toolBar, true, true, 0); _tooltips = new Tooltips(); ActionModelRoot model = new ActionModelRoot(""); //model.Merge(WorkstationModel.ToolManager.ToolbarModel); model.Merge(DesktopApplication.ToolSet.ToolbarModel); if(workspace != null) { //model.Merge(workspace.ToolManager.ToolbarModel); model.Merge(workspace.ToolSet.ToolbarModel); } GtkToolbarBuilder.BuildToolbar(_toolBar, _tooltips, model); _toolBar.ShowAll(); }
public DockBar(Dock dock) { items = new ArrayList (); tooltips = new Tooltips (); Master = dock.Master; }
/// <summary> /// Inicializa los controles de la ventana. /// </summary> private void Initialize() { mainWindow.Title=title; imageAreaOriginal = new ImageArea(); imageAreaOriginal.ImageMode = ImageAreaMode.Zoom; frameOriginal.Add(imageAreaOriginal); imageAreaProcessed = new ImageArea(); imageAreaProcessed.ImageMode = ImageAreaMode.Zoom; frameProcessed.Add(imageAreaProcessed); logView = new LogView(); expanderLog.Add(logView); // La imagen reducida en la primera columna imagesIV.PixbufColumn = 0; imagesIV.SelectionChanged += new EventHandler(OnImagesIVSelectionChanged); imagesStore = new ListStore(typeof(Gdk.Pixbuf), typeof(Gdk.Pixbuf)); imagesIV.Model = imagesStore; imagesStore.RowInserted += OnImagesStoreRowInserted; imagesStore.RowDeleted += OnImagesStoreRowDeleted; toolNewDatabase.IconWidget = ImageResources.LoadImage("database-new22"); menuDatabase.Image =ImageResources.LoadImage("database-new16"); symbolLabelEditor = new SymbolLabelEditorWidget(); symbolEditorPlaceholder.Add(symbolLabelEditor); labelTooltips = new Tooltips(); mainWindow.ShowAll(); }
// Use this for initialization void Start () { instance = this; }