|
142
|
Programación / Desarrollo Web / Formato Completo del manifest.json de extensiones del Google Chrome
|
en: 10 Junio 2021, 22:40 pm
|
Hola, como dice en el titulo, necesito el formato completo del archivo "manifest.json" de extensiones para navegador google chrome. Por ejemplo, tengo el ejmplo de Google aqui que es :{ // Required "manifest_version": 3, "name": "My Extension", "version": "versionString", // Recommended "action": {...}, "default_locale": "en", "description": "A plain text description", "icons": {...}, // Optional "action": ..., "author": ..., "automation": ..., "background": { // Required "service_worker": }, "chrome_settings_overrides": {...}, "chrome_url_overrides": {...}, "commands": {...}, "content_capabilities": ..., "content_scripts": [{...}], "content_security_policy": "policyString", "converted_from_user_script": ..., "current_locale": ..., "declarative_net_request": ..., "devtools_page": "devtools.html", "differential_fingerprint": ..., "event_rules": [{...}], "externally_connectable": { "matches": ["*://*.example.com/*"] }, "file_browser_handlers": [...], "file_system_provider_capabilities": { "configurable": true, "multiple_mounts": true, "source": "network" }, "homepage_url": "http://path/to/homepage", "host_permissions": [...], "import": [{"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}], "incognito": "spanning, split, or not_allowed", "input_components": ..., "key": "publicKey", "minimum_chrome_version": "versionString", "nacl_modules": [...], "natively_connectable": ..., "oauth2": ..., "offline_enabled": true, "omnibox": { "keyword": "aString" }, "optional_permissions": ["tabs"], "options_page": "options.html", "options_ui": { "chrome_style": true, "page": "options.html" }, "permissions": ["tabs"], "platforms": ..., "replacement_web_app": ..., "requirements": {...}, "sandbox": [...], "short_name": "Short Name", "storage": { "managed_schema": "schema.json" }, "system_indicator": ..., "tts_engine": {...}, "update_url": "http://path/to/updateInfo.xml", "version_name": "aString", "web_accessible_resources": [...] }
Hay todo bien, pero cuando voy a una extension de las que tengo instaladas en mi navegador, y reviso el archivo "manifest.json" de dicha extension, me doy cuenta que hay campos que nos salen en el ejemplo de google. Por ejemplo : { "background": { "persistent": false, "scripts": [ "common.js", "mirroring_common.js", "background_script.js" ] }, "content_security_policy": "default-src 'self'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; script-src 'self' https://apis.google.com https://feedback.googleusercontent.com https://www.google.com https://www.gstatic.com; child-src https://accounts.google.com https://content.googleapis.com https://www.google.com; connect-src 'self' http://*:* https://*:*; font-src https://fonts.gstatic.com;", "default_locale": "en", "description": "Provider for discovery and services for mirroring of Chrome Media Router", "differential_fingerprint": "1.3bba8f43f392ecbc35b582986edcbf7c6591081b63f3f0214f8eed1d239b0f60", "externally_connectable": { "ids": [ "idmofbkcelhplfjnmmdolenpigiiiecc", "ggedfkijiiammpnbdadhllnehapomdge", "njjegkblellcjnakomndbaloifhcoccg" ] }, "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDNTWJoPZ9bT32yKxuuVa9LSEYobjPoXCLX3dgsZ9djDrWKNikTECjdRe3/AFXb+v8jkmmtYQPnOgSYn06J/QodDlCIG6l470+gkOoobUM7fOs1AVOse23qYUV4jbuRW3+YZlCvaWCFeczCNbGIUgKEi5B2fyQazy60AL1sLW3utQIDAQAB", "manifest_version": 2, "minimum_chrome_version": "37", "name": "Chrome Media Router", "oauth2": { "client_id": "919648714761-55j965o0km033psv3i9qls5mo3qtdrb0.apps.googleusercontent.com", "scopes": [ "https://www.googleapis.com/auth/calendar.readonly", "https://www.googleapis.com/auth/hangouts", "https://www.googleapis.com/auth/hangouts.readonly", "https://www.googleapis.com/auth/meetings", "https://www.googleapis.com/auth/userinfo.email" ] }, "permissions": [ "alarms", "cast", "declarativeWebRequest", "desktopCapture", "gcm", "http://*/*", "identity", "identity.email", "management", "mdns", "mediaRouterPrivate", "metricsPrivate", "networkingPrivate", "processes", "storage", "system.cpu", "settingsPrivate", "tabCapture", "tabs", "https://hangouts.google.com/*", "https://*.google.com/cast/chromecast/home/gsse" ], "update_url": "https://clients2.google.com/service/update2/crx", "version": "9121.329.0.0", "web_accessible_resources": [ "cast_sender.js" ] }
Como ves, es ese ejemplo , estan campos que en el ejemplo de google no hay, los cuales son : "persistent" y "scripts" , entro otros campos.
En pocas palabras , necesito un "manifest.json" Completo , con todos los campos y que hallan.
|
|
|
143
|
Foros Generales / Foro Libre / Re: Mis dudas existenciales.
|
en: 9 Junio 2021, 18:52 pm
|
No se de que va este post, pero no me voy a leer pinche 34 paginas....
Pero siempre he tenido curiosidad, por saber : "¿Que pasa después de la muerte?"
Tengo esa duda, y me causa mas curiosidad, que cualquier otra. he visto muchos videos de youtube. algunas que otras religiones; el Valhalla , el infierto/cielo , La reencarnación .
hasta me he leído varios post de redit, de personas que han muerto durante unos minutos y vuelve a la vida. la mayoria, dice que como si te desmayaras. otros, tienen una experiencia tipo viaje astral....
En fin... esa es mi duda existencial. y si la llego a saber con seguridad, podría morir en "Paz"
|
|
|
144
|
Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets para VB.NET !! (Compartan aquí sus snippets)
|
en: 9 Junio 2021, 01:19 am
|
Defender WatcherMonitoriza la desactivacion em tiempo real del Windows Defender. ( click en la imagen para ir código fuente en Github) Codigo FuenteDefenderWatcher.vb' *********************************************************************** ' Author : Destroyer ' Modified : 8-June-2021 ' Github : https://github.com/DestroyerDarkNess ' Twitter : https://twitter.com/Destroy06933000 ' *********************************************************************** ' <copyright file="DefenderWatcher.vb" company="S4Lsalsoft"> ' Copyright (c) S4Lsalsoft. All rights reserved. ' </copyright> ' *********************************************************************** #Region " Usage Examples " ' ''' <summary> ' ''' The DefenderWatcher instance to monitor Windows Defender Realtime Status Changed. ' ''' </summary> 'Friend WithEvents DefenderMon As New DefenderWatcher ' ''' ---------------------------------------------------------------------------------------------------- ' ''' <summary> ' ''' Handles the <see cref="DefenderWatcher.DefenderStatusChanged"/> event of the <see cref="DefenderMon"/> instance. ' ''' </summary> ' ''' ---------------------------------------------------------------------------------------------------- ' ''' <param name="sender"> ' ''' The source of the event. ' ''' </param> ' ''' ' ''' <param name="e"> ' ''' The <see cref="DefenderWatcher.DefenderStatusChangedEventArgs"/> instance containing the event data. ' ''' </param> ' ''' ---------------------------------------------------------------------------------------------------- 'Private Sub DefenderMon_DefenderStatusChanged(ByVal sender As Object, ByVal e As DefenderWatcher.DefenderStatusChangedEventArgs) Handles DefenderMon.DefenderStatusChanged ' Dim sb As New System.Text.StringBuilder ' sb.AppendLine(" Defender Configuration change - Windows Defender RealtimeMonitoring") ' sb.AppendLine(String.Format("DisableRealtimeMonitoring......: {0}", e.TargetInstance.ToString)) ' sb.AppendLine(String.Format("Old Value......................: {0}", e.PreviousInstance.ToString)) ' Me.BeginInvoke(Sub() ' TextBox1.Text += (sb.ToString) & Environment.NewLine & Environment.NewLine ' End Sub) 'End Sub #End Region #Region " Imports " Imports System.ComponentModel Imports System.Management Imports System.Windows.Forms #End Region Namespace Core.Engine.Watcher Public Class DefenderWatcher : Inherits NativeWindow : Implements IDisposable #Region " Constructor " ''' ---------------------------------------------------------------------------------------------------- ''' <summary> ''' Initializes a new instance of <see cref="DefenderWatcher"/> class. ''' </summary> ''' ---------------------------------------------------------------------------------------------------- <DebuggerStepThrough> Public Sub New() Me.events = New EventHandlerList End Sub #End Region #Region " Properties " ''' ---------------------------------------------------------------------------------------------------- ''' <summary> ''' Gets a value that determines whether the monitor is running. ''' </summary> ''' ---------------------------------------------------------------------------------------------------- Public ReadOnly Property IsRunning As Boolean <DebuggerStepThrough> Get Return Me.isRunningB End Get End Property Private isRunningB As Boolean #End Region Private Scope As New ManagementScope("root\Microsoft\Windows\Defender") Private WithEvents DefenderState As ManagementEventWatcher = New ManagementEventWatcher(Scope, New WqlEventQuery("SELECT * FROM __InstanceModificationEvent WITHIN 5 WHERE TargetInstance ISA 'MSFT_MpPreference' AND TargetInstance.DisableRealtimeMonitoring=True")) #Region " Events " ''' ---------------------------------------------------------------------------------------------------- ''' <summary> ''' A list of event delegates. ''' </summary> ''' ---------------------------------------------------------------------------------------------------- Private ReadOnly events As EventHandlerList Public Custom Event DefenderStatusChanged As EventHandler(Of DefenderStatusChangedEventArgs) <DebuggerNonUserCode> <DebuggerStepThrough> AddHandler(ByVal value As EventHandler(Of DefenderStatusChangedEventArgs)) Me.events.AddHandler("DefenderStatusChangedEvent", value) End AddHandler <DebuggerNonUserCode> <DebuggerStepThrough> RemoveHandler(ByVal value As EventHandler(Of DefenderStatusChangedEventArgs)) Me.events.RemoveHandler("DefenderStatusChangedEvent", value) End RemoveHandler <DebuggerNonUserCode> <DebuggerStepThrough> RaiseEvent(ByVal sender As Object, ByVal e As DefenderStatusChangedEventArgs) Dim handler As EventHandler(Of DefenderStatusChangedEventArgs) = DirectCast(Me.events("DefenderStatusChangedEvent"), EventHandler(Of DefenderStatusChangedEventArgs)) If (handler IsNot Nothing) Then handler.Invoke(sender, e) End If End RaiseEvent End Event #End Region ' Dim oInterfaceType As String = TIBase?.Properties("DisableRealtimeMonitoring")?.Value.ToString() ' Prevent Defender Disable Public Sub DefenderState_EventArrived(ByVal sender As Object, ByVal e As EventArrivedEventArgs) Handles DefenderState.EventArrived Dim DefenderTargetInstance As Boolean = Nothing Dim DefenderPreviousInstance As Boolean = Nothing Using TIBase = CType(e.NewEvent.Properties("TargetInstance").Value, ManagementBaseObject) DefenderTargetInstance = CBool(TIBase.Properties("DisableRealtimeMonitoring").Value) End Using Using PIBase = CType(e.NewEvent.Properties("PreviousInstance").Value, ManagementBaseObject) DefenderPreviousInstance = CBool(PIBase.Properties("DisableRealtimeMonitoring").Value) End Using Me.OnDefenderStatusChanged(New DefenderStatusChangedEventArgs(DefenderTargetInstance, DefenderPreviousInstance)) End Sub #Region " Event Invocators " <DebuggerStepThrough> Protected Overridable Sub OnDefenderStatusChanged(ByVal e As DefenderStatusChangedEventArgs) RaiseEvent DefenderStatusChanged(Me, e) End Sub #End Region #Region " Events Data " Public NotInheritable Class DefenderStatusChangedEventArgs : Inherits EventArgs #Region " Properties " Private ReadOnly TargetInstanceB As Boolean Public ReadOnly Property TargetInstance As Boolean <DebuggerStepThrough> Get Return Me.TargetInstanceB End Get End Property Private ReadOnly PreviousInstanceB As Boolean Public ReadOnly Property PreviousInstance As Boolean <DebuggerStepThrough> Get Return Me.PreviousInstanceB End Get End Property #End Region #Region " Constructors " <DebuggerNonUserCode> Private Sub New() End Sub <DebuggerStepThrough> Public Sub New(ByVal TI As Boolean, ByVal PI As Boolean) Me.TargetInstanceB = TI Me.PreviousInstanceB = PI End Sub #End Region End Class #End Region #Region " Public Methods " ''' ---------------------------------------------------------------------------------------------------- ''' <summary> ''' Starts monitoring. ''' </summary> ''' ---------------------------------------------------------------------------------------------------- ''' <exception cref="Exception"> ''' Monitor is already running. ''' </exception> ''' ---------------------------------------------------------------------------------------------------- <DebuggerStepThrough> Public Overridable Sub Start() If (Me.Handle = IntPtr.Zero) Then MyBase.CreateHandle(New CreateParams) DefenderState.Start() Me.isRunningB = True Else Throw New Exception(message:="Monitor is already running.") End If End Sub ''' ---------------------------------------------------------------------------------------------------- ''' <summary> ''' Stops monitoring. ''' </summary> ''' ---------------------------------------------------------------------------------------------------- ''' <exception cref="Exception"> ''' Monitor is already stopped. ''' </exception> ''' ---------------------------------------------------------------------------------------------------- <DebuggerStepThrough> Public Overridable Sub [Stop]() If (Me.Handle <> IntPtr.Zero) Then DefenderState.Stop() MyBase.DestroyHandle() Me.isRunningB = False Else Throw New Exception(message:="Monitor is already stopped.") End If End Sub #End Region #Region " IDisposable Implementation " ''' ---------------------------------------------------------------------------------------------------- ''' <summary> ''' To detect redundant calls when disposing. ''' </summary> ''' ---------------------------------------------------------------------------------------------------- Private isDisposed As Boolean ''' ---------------------------------------------------------------------------------------------------- ''' <summary> ''' Releases all the resources used by this instance. ''' </summary> ''' ---------------------------------------------------------------------------------------------------- <DebuggerStepThrough> Public Sub Dispose() Implements IDisposable.Dispose Me.Dispose(isDisposing:=True) GC.SuppressFinalize(obj:=Me) End Sub ''' ---------------------------------------------------------------------------------------------------- ''' <summary> ''' Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. ''' Releases unmanaged and - optionally - managed resources. ''' </summary> ''' ---------------------------------------------------------------------------------------------------- ''' <param name="isDisposing"> ''' <see langword="True"/> to release both managed and unmanaged resources; ''' <see langword="False"/> to release only unmanaged resources. ''' </param> ''' ---------------------------------------------------------------------------------------------------- <DebuggerStepThrough> Protected Overridable Sub Dispose(ByVal isDisposing As Boolean) If (Not Me.isDisposed) AndAlso (isDisposing) Then Me.events.Dispose() Me.Stop() End If Me.isDisposed = True End Sub #End Region End Class End Namespace
|
|
|
145
|
Programación / .NET (C#, VB.NET, ASP) / [Ayuda] Chrome69Tabcontrol - Control Extendido
|
en: 4 Junio 2021, 22:28 pm
|
Hola, hoy vengo a pedirles ayuda . Tome el Tabcontrol, " Chrome69Tabcontrol " , lo pase a vb, y le agregue la posibilidad de arrastrar las pestañas de tabcontrol. El problema es que quiero que desaparezca los botones de navigacion y no se como hacerlo : Lo que quiero lograr es yo mismo calcular el tamaño disponible, y auto ajustar el tamaño de las pestañas, asi como lo hace Google Chrome. Aqui el codigo : Imports System.Drawing.Drawing2D Namespace DragonTubeControls Public Class Helpers Public Shared Function Base64ToImage(ByVal Base64str As String) As System.Drawing.Image Dim Fixb64 As String = Base64str.Replace(" ", "+") Dim MemStream As System.IO.MemoryStream = New System.IO.MemoryStream(Convert.FromBase64String(Fixb64)) Dim ImageStream As Image = System.Drawing.Image.FromStream(MemStream) MemStream.Close() Return ImageStream End Function End Class Public Class Chrome69Tabcontrol Inherits TabControl #Region " Decalre's " Private AddImageBlack As String = "iVBORw0KGgoAAAANSUhEUgAAABsAAAAcCAYAAACQ0cTtAAAAN0lEQVR42mNgGAWjYMiCyMiEh3SzLCoq8f+oZaOWgVMdyGBiMU1S6WicjVo2eMrGUTAKRsHgBgBNazNxj/heLwAAAABJRU5ErkJggg==" Private CloseImageBlack As String = "iVBORw0KGgoAAAANSUhEUgAAAA8AAAAQCAYAAADJViUEAAAAU0lEQVR42mNgGOHA3Nx8FRDboIubmZnZAsVX49UMVfQc2QCo2AsQTdB2mGKQASRpxGIAaRqhfrchSzNU43OQJpKcjayR5AADRRU2RVAD1jCMAgYAuEUszUWy7F8AAAAASUVORK5CYII=" Private predraggedTab As TabPage Private ReferenceTabSize As New Size(505, 505) #End Region Const CLOSE_SIZE As Integer = 16 Public Sub New() MyBase.New() SetStyles() Me.SizeMode = TabSizeMode.Fixed Me.Dock = DockStyle.Fill Me.Font = New Font("Microsoft Yahei", 9.0F) Me.ItemSize = New Size(245, 35) Me.DoubleBuffered = True Me.AllowDrop = True ' Me.Multiline = True ' Me.AutoSize = False End Sub Private Sub SetStyles() MyBase.SetStyle(ControlStyles.DoubleBuffer Or ControlStyles.UserPaint Or ControlStyles.OptimizedDoubleBuffer Or ControlStyles.AllPaintingInWmPaint Or ControlStyles.ResizeRedraw Or ControlStyles.SupportsTransparentBackColor, True) MyBase.UpdateStyles() End Sub Public Overrides ReadOnly Property DisplayRectangle As Rectangle Get Dim rect As Rectangle = MyBase.DisplayRectangle Return New Rectangle(rect.Left - 8, rect.Top - 1, rect.Width + 12, rect.Height + 8) End Get End Property Protected Overrides Sub OnResize(ByVal e As EventArgs) MyBase.OnResize(e) Me.Refresh() Me.Update() End Sub Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs) MyBase.OnPaint(e) Dim rect As Rectangle = Me.ClientRectangle e.Graphics.SmoothingMode = SmoothingMode.HighQuality e.Graphics.InterpolationMode = InterpolationMode.HighQualityBilinear Using bufferedGraphics As BufferedGraphics = BufferedGraphicsManager.Current.Allocate(e.Graphics, rect) bufferedGraphics.Graphics.FillRectangle(New SolidBrush(Color.FromArgb(230, 232, 236)), rect) For index As Integer = 0 To Me.TabCount - 1 DrawTabPage(bufferedGraphics.Graphics, Me.GetTabRect(index), index) Next bufferedGraphics.Render(e.Graphics) End Using End Sub Private Sub DrawTabPage(ByVal graphics As Graphics, ByVal rectangle As Rectangle, ByVal index As Integer) graphics.SmoothingMode = SmoothingMode.HighQuality graphics.InterpolationMode = InterpolationMode.HighQualityBilinear graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias ' Me.TabPages(index).AutoSize = False ' rectangle.Size = Me.ItemSize Dim sf As StringFormat = New StringFormat() sf.Trimming = StringTrimming.EllipsisCharacter sf.FormatFlags = StringFormatFlags.NoWrap Dim fontRect As Rectangle = New Rectangle(rectangle.X + 40, rectangle.Y + 7, rectangle.Width, Me.TabPages(index).Font.Height) Dim rectClose As Rectangle = GetCloseRect(rectangle) Dim p5 As Point = New Point(rectangle.Left, 7) Dim p6 As Point = New Point(rectClose.X - 12, 12) Try If index = Me.TabCount - 1 Then Using Add As Bitmap = Helpers.Base64ToImage(AddImageBlack) graphics.DrawImage(Add, p5) End Using Else If index = Me.SelectedIndex Then graphics.FillPath(New SolidBrush(Color.FromArgb(255, 255, 255)), CreateTabPath(rectangle)) graphics.DrawString(Me.TabPages(index).Text, Me.TabPages(index).Font, New SolidBrush(Color.SlateGray), fontRect, sf) If Me.ImageList IsNot Nothing Then Dim imgindex As Integer = Me.TabPages(index).ImageIndex Dim key As String = Me.TabPages(index).ImageKey Dim icon As Image = New Bitmap(32, 32) If imgindex > -1 Then icon = Me.ImageList.Images(imgindex) End If If Not String.IsNullOrEmpty(key) Then icon = Me.ImageList.Images(key) End If graphics.DrawImage(icon, rectangle.Left + 22, rectangle.Top + 9) End If Using Close As Bitmap = Helpers.Base64ToImage(CloseImageBlack) graphics.DrawImage(Close, p6) End Using Else graphics.FillPath(New SolidBrush(Color.FromArgb(230, 232, 236)), CreateTabPath(rectangle)) graphics.DrawString(Me.TabPages(index).Text, Me.TabPages(index).Font, New SolidBrush(Color.Gray), fontRect, sf) If Me.ImageList IsNot Nothing Then Dim imgindex As Integer = Me.TabPages(index).ImageIndex Dim key As String = Me.TabPages(index).ImageKey Dim icon As Image = New Bitmap(32, 32) If imgindex > -1 Then icon = Me.ImageList.Images(imgindex) End If If Not String.IsNullOrEmpty(key) Then icon = Me.ImageList.Images(key) End If graphics.DrawImage(icon, rectangle.Left + 22, rectangle.Top + 9) End If Using Close As Bitmap = Helpers.Base64ToImage(CloseImageBlack) graphics.DrawImage(Close, p6) End Using End If End If Catch __unusedNullReferenceException1__ As System.NullReferenceException End Try End Sub Protected Overrides Sub OnSelecting(ByVal e As TabControlCancelEventArgs) If e.TabPageIndex = Me.TabPages.Count - 1 Then e.Cancel = True End Sub #Region " Mause Event " Protected Overrides Sub OnMouseMove(ByVal e As MouseEventArgs) If e.Button = MouseButtons.Left AndAlso predraggedTab IsNot Nothing Then Me.DoDragDrop(predraggedTab, DragDropEffects.Move) End If MyBase.OnMouseMove(e) End Sub Protected Overrides Sub OnMouseUp(ByVal e As MouseEventArgs) predraggedTab = Nothing MyBase.OnMouseUp(e) End Sub Protected Overrides Sub OnMouseDown(ByVal e As MouseEventArgs) MyBase.OnMouseDown(e) Dim lastIndex As Integer = Me.TabCount - 1 Dim AddImage As Bitmap = Helpers.Base64ToImage(AddImageBlack) Dim p5 As Point = New Point(Me.GetTabRect(lastIndex).Left, 5) Dim AddImgRec = New Rectangle(p5, AddImage.Size) If Me.GetTabRect(lastIndex).Contains(e.Location) Then If AddImgRec.Contains(e.Location) Then Me.TabPages.Insert(lastIndex, "Chrome Tab") Me.SelectedIndex = lastIndex End If End If If e.Button = MouseButtons.Left Then ' Incomplete Bug ' If Not Me.TabCount <= 3 Then ' Dim Xw As Integer = Me.Width / Me.TabCount ' If Xw > 245 Then Xw = 245 ' Me.ItemSize = New Size(Me.Width / Me.TabCount, Me.ItemSize.Height) ' End If Dim x As Integer = e.X, y As Integer = e.Y Dim myTabRect As Rectangle = Me.GetTabRect(Me.SelectedIndex) myTabRect.Offset(myTabRect.Width - (CLOSE_SIZE + 23), 5) myTabRect.Width = CLOSE_SIZE myTabRect.Height = CLOSE_SIZE Dim isClose As Boolean = x > myTabRect.X AndAlso x < myTabRect.Right AndAlso y > myTabRect.Y AndAlso y < myTabRect.Bottom If isClose = True Then If Me.TabPages.Count > 2 Then Dim tab As TabPage = Me.SelectedTab Me.TabPages.Remove(tab) Me.SelectedTab.Refresh() Me.SelectedIndex = Me.TabPages.Count - 2 tab.Dispose() GC.Collect() GC.WaitForPendingFinalizers() Else System.Environment.[Exit](0) Dispose() End If End If End If predraggedTab = getPointedTab() End Sub #End Region #Region " Private Methods " Private Function CreateTabPath(ByVal tabBounds As Rectangle) As GraphicsPath Dim path As GraphicsPath = New GraphicsPath() Dim spread, eigth, sixth, quarter As Integer spread = CInt(Math.Floor(CDec(tabBounds.Height))) eigth = CInt(Math.Floor(CDec(tabBounds.Height) * 1 / 11)) sixth = CInt(Math.Floor(CDec(tabBounds.Height) * 3 / 10)) quarter = CInt(Math.Floor(CDec(tabBounds.Height) * 2 / 3)) path.AddCurve(New Point() {New Point(tabBounds.X + 2, tabBounds.Bottom + 2), New Point(tabBounds.X + sixth, tabBounds.Bottom - eigth), New Point(tabBounds.X + spread - quarter, tabBounds.Y + eigth), New Point(tabBounds.X + spread, tabBounds.Y)}) path.AddLine(tabBounds.X + spread, tabBounds.Y, tabBounds.Right - spread, tabBounds.Y) path.AddCurve(New Point() {New Point(tabBounds.Right - spread, tabBounds.Y), New Point(tabBounds.Right - spread + quarter, tabBounds.Y + eigth), New Point(tabBounds.Right - sixth, tabBounds.Bottom - eigth), New Point(tabBounds.Right + 2, tabBounds.Bottom + 2)}) path.CloseFigure() Return path End Function Private Function GetCloseRect(ByVal myTabRect As Rectangle) As Rectangle myTabRect.Offset(myTabRect.Width - (CLOSE_SIZE + 10), 5) myTabRect.Width = CLOSE_SIZE myTabRect.Height = CLOSE_SIZE Return myTabRect End Function #End Region #Region " Other Events " Protected Overrides Sub OnDragOver(ByVal drgevent As DragEventArgs) Dim draggedTab = CType(drgevent.Data.GetData(GetType(TabPage)), TabPage) Dim pointedTab = getPointedTab() If ReferenceEquals(draggedTab, predraggedTab) AndAlso pointedTab IsNot Nothing Then drgevent.Effect = DragDropEffects.Move If Not ReferenceEquals(pointedTab, draggedTab) Then Me.ReplaceTabPages(draggedTab, pointedTab) End If End If MyBase.OnDragOver(drgevent) End Sub Private Function getPointedTab() As TabPage For i = 0 To Me.TabPages.Count - 1 If Me.GetTabRect(i).Contains(Me.PointToClient(Cursor.Position)) Then Return Me.TabPages(i) End If Next Return Nothing End Function Private Sub ReplaceTabPages(ByVal Source As TabPage, ByVal Destination As TabPage) Try Dim SourceIndex = Me.TabPages.IndexOf(Source) Dim DestinationIndex = Me.TabPages.IndexOf(Destination) Me.TabPages(DestinationIndex) = Source Me.TabPages(SourceIndex) = Destination If Me.SelectedIndex = SourceIndex Then Me.SelectedIndex = DestinationIndex ElseIf Me.SelectedIndex = DestinationIndex Then Me.SelectedIndex = SourceIndex End If Me.Refresh() Catch ex As Exception End Try End Sub #End Region End Class End Namespace
Gracias de antemano.
|
|
|
146
|
Informática / Software / Re: Monitor ReFix - Solución fácil y Rápida para ajustar la Resolucion de tu pantalla.
|
en: 3 Junio 2021, 01:04 am
|
Procura usar nombres más propicios para tus programas... Monitor, no solo se refiere a un terminal de vídeo, en español tiene varias acepciones, y 'refix'... puede no indicar nada si no se acierta con lo de 'monitor'...
Sería más aceptable por ejemplo algo como: 'Sincronización de la resolución de la señal de vídeo', que tu puedes acortar para el nombre (pero dejarlo para su descripción), luego jugando con las palabras: sincro - resolucion - video (aunque luego lo pongas en inglés).
Tomare tu consejo, a la próxima versión, le cambiare el nombre. y un pequeño bug menor, que se me paso. La verdad es que siempre me cuesta , el nombrar un proyecto nuevo, no tengo ni idea de como llamarlo. de hecho si revisas el ensamblado con dnspy, te podras dar cuenta que el nombre origial del proyecto era : WinMonitorAA , también se me había ocurrido llamarlo de una forma mas genérica : Windows Resolution Manager . El problema, es que llamarlo de formas genéricas, muchas veces conlleva a que cueste encontrarlo, ya que el buscador de google no lo lista. osea me refiero a que le coloco un nombre un tanto "Original" . el buscador listara solo mis software. Como por ejemplo " xylateware" . me costo crear ese nombre origial, y si lo buscas en google , en los resultados solo aparecerá mi software.
|
|
|
148
|
Informática / Software / Monitor ReFix - Solución fácil y Rápida para ajustar la Resolucion de tu pantalla.
|
en: 2 Junio 2021, 02:30 am
|
Hola, soy yo de nuevo. Les cuento algo rapido.... El fin de semana, me lleve mi PC (DELL Hybrid 140g). a la casa de un amigo. al llegar , el me presto un monitor, teclado y mause, pero resulto que el único monitor que tenia VGA , era de menor resolución al mío, entonces no puede configurar la resolución del Windows . La resolución Máxima que soporta mi monitor es 1400x1050 y la del monitor que me prestaron era 1280x1024 , entonces el monitor se queda en negro. Bueno , busque varias soluciones, no al final no logre nada. no la pude usar.
Ahora en casa, con mi monitor, hice un pequeño programa de menos de 1mb para solucionar esto. Introduccion En Windows, si cambia de monitor y la configuración de Windows es más alta que la resolución del nuevo monitor, el monitor estará completamente negro y, si no tiene otro monitor, no podrá configurar la resolución de Windows. Podrías resolverlo de alguna forma tediosas. Con este programa de menos de 1 MB, resuelves este problema.
Cuando se ejecuta por primera vez, el Programa le preguntará si desea agregarlo al inicio de Windows. (Debe dar que SI) Utilice las teclas de acceso rápido para configurar:- Ctrl + ALT + A (Establece la resolución más baja del sistema)
- Ctrol + ALT + R (Establecer la configuración anterior)
|
|
|
149
|
Media / Juegos y Consolas / Re: Among Us Gratis hasta el 03 de Junio
|
en: 2 Junio 2021, 02:11 am
|
Que Among Us no siempre fue gratis? alv
Recuerdo que lo descargue actualizado de un video de YouTube. y le hice cheat, por aquella época que se había vuelto famoso.
Después se pusieron a actualizarlo cada mes y valió madre, que tedioso actualizar el cheat a cada rato.
También me refiero a que por que Comprarlo ? , si se puede encontrar fácilmente actualizado y sobre todo GRATIS.
|
|
|
150
|
Informática / Software / Re: DragonTube - El mejor cliente de Youtube!
|
en: 1 Junio 2021, 04:33 am
|
Hola, hago una breve actualización. Estoy usando 000webhost como es gratuito y fácil de manejar . para la aplicación. pero llego al limite, así que tuve que crearme otra cuenta y actualizar. En la nueva actualización cambie mucho código. y lo ordene, ahora es mas rápido. y con menos bugs. Por los momentos no agregue una nueva función, pero en comparación con las versiones anteriores. esta nueva versión es completamente diferente (en código). También removí muchos recursos innecesarios, también quite la librería HtmlAgilityPack y cambie las funciones que requerían dicha librería por nuevas funciones independientes.
|
|
|
|
|
|
|