Experience Index Returns (Open-source)

Discussion in 'MDL Projects and Applications' started by K4onashi, Apr 7, 2016.

  1. K4onashi

    K4onashi MDL Debugger

    Mar 7, 2012
    1,683
    1,694
    60
    #421 K4onashi, Jul 9, 2019
    Last edited: Jul 9, 2019
    (OP)
    Adding option to use a custom Imgur API client id key. I'm just waiting on a response from Imgur on some specifics regarding the client id.
    Adding GetWinsatVisual to WinsatApi class.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Carlos Detweiller

    Carlos Detweiller MDL Spinning Tortoise

    Dec 21, 2012
    3,112
    2,722
    120
    Convenience Rollup? Sorry, I will never install malware-infected updates.

    Great to have both Hotfixes now. The Internet never forgets, right?
     
  3. K4onashi

    K4onashi MDL Debugger

    Mar 7, 2012
    1,683
    1,694
    60
    Yeah, the rollups contain telemetry to your hearts content.

    I'm working on Xiret checking a backlist for the rollup and the original fix if the rollup isn't present. I'm also going to make Xiret download the Segoe UI font, I'm not happy the app has grown in size 10x.

    Or remember, a M$ says, you can always UPGRADE TO WINDOWS 10 PEASANTS.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. K4onashi

    K4onashi MDL Debugger

    Mar 7, 2012
    1,683
    1,694
    60
    #424 K4onashi, Jul 10, 2019
    Last edited: Jul 15, 2019
    (OP)
    I've changed my mind, as usual. Here is the preliminary changelog:

    Code:
    New:
    1. Enabled 'Metrics' in the main window
    2. Option added to allow use of a custom Imgur API Client ID (Settings > Imgur API)
    3. Parts of Xiret have now been seperated into DLL files (Gambol.dll, Core.dll)
    4. Changes to the settings system
       - Changed how settings are loaded
       - paths.xml renamed to paths.xir and changed to indented format
       - Added application directory to paths.xir
    
    Enhancements:
    1. Shortcut keys have been amended
    2. Form animation improvements
    3. UI improvements
    4. WinsatApi improvements
       - Added GetWinsatVisuals() to retrieve score bitmaps
       - Better error handling
    5. Minor adjustments to improve Vista compatibility
       - Added message if seguisb.ttf is installed
       - Fixed UI string that was too long
    6. Application size reduced by removing unused resources
    7. Blocked attempts to load hardware information on unrated systems
    8. Blocked multiple attempts loading the latest formal xml file path
       - Caused when loading hardware information (WSR\WinsatReader > GetWinsatHardwareXMLInfo())
       - Fixed by caching the formal xml location and reloading when changes in the strings are detected
         - This change improved loading time when starting the application
    
    Bugs:
    1. Fixed an issue where hardware information would not refresh when switching modes (ItielMaN)
    2. Fixed UI inconsistencies with frame buttons (ItielMaN)
    3. Fixed missing web link 'Help > Check for updates > View Changelog'
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. K4onashi

    K4onashi MDL Debugger

    Mar 7, 2012
    1,683
    1,694
    60
    I'm thinking of migrating some parts of the application out into it's own DLL. I'm not all for adding duplicate code for the updater. Thoughts?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Carlos Detweiller

    Carlos Detweiller MDL Spinning Tortoise

    Dec 21, 2012
    3,112
    2,722
    120
    Whatever is best for development.
     
  7. Michaela Joy

    Michaela Joy MDL Crazy Lady

    Jul 26, 2012
    3,926
    4,380
    120
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. K4onashi

    K4onashi MDL Debugger

    Mar 7, 2012
    1,683
    1,694
    60
    Yes, everything within the appllication will be commited to the git, including DLL files. Thanks for your advice MJ, what I've done is to make sure bitness is wide enough for the platform architecture with each API call, all is working with one DLL, but built for ANYCPU. I'm pretty sure .net framework does the rest as after the edits x86 and x64 seem to work fine. Lazy mans dream.

    We now have Xiret.exe, Updater.exe, Core.dll, Gambol.dll :D

    QB :hug2:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. K4onashi

    K4onashi MDL Debugger

    Mar 7, 2012
    1,683
    1,694
    60
    I've updated the git. I f**ked everything up and have to remove all and replace. I can't be bothered to go through info this evening. Don't do stuff when you're tired.

    QB.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. K4onashi

    K4onashi MDL Debugger

    Mar 7, 2012
    1,683
    1,694
    60
    I'm backed up rewriting the settings sytem, it's too clunky. Working hard so don't worry.

    Regards, QB.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. K4onashi

    K4onashi MDL Debugger

    Mar 7, 2012
    1,683
    1,694
    60
    RC2 changelog updated, sorry it's a bit of a read.

    Code:
    New:
    1. Enabled 'Metrics' in the main window
    2. Option added to allow use of a custom Imgur API Client ID (Settings > Imgur API)
    3. Parts of Xiret have now been seperated into DLL files (Gambol.dll, Core.dll)
    4. Changes to the settings system
       - Changed how settings are loaded
       - paths.xml renamed to paths.xir and changed to indented format
       - Added application directory to paths.xir
    
    Enhancements:
    1. Shortcut keys have been amended
    2. Form animation improvements
    3. UI improvements
    4. WinsatApi improvements
       - Added GetWinsatVisuals() to retrieve score bitmaps
       - Better error handling
    5. Minor adjustments to improve Vista compatibility
       - Added message if seguisb.ttf is installed
       - Fixed UI string that was too long
    6. Application size reduced by removing unused resources
    7. Blocked attempts to load hardware information on unrated systems
    8. Blocked multiple attempts loading the latest formal xml file path
       - Caused when loading hardware information (WSR\WinsatReader > GetWinsatHardwareXMLInfo())
       - Fixed by caching the formal xml location and reloading when changes in the strings are detected
         - This change improved loading time when starting the application
    
    Bugs:
    1. Fixed an issue where hardware information would not refresh when switching modes (ItielMaN)
    2. Fixed UI inconsistencies with frame buttons (ItielMaN)
    3. Fixed missing web link 'Help > Check for updates > View Changelog'
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. K4onashi

    K4onashi MDL Debugger

    Mar 7, 2012
    1,683
    1,694
    60
    #432 K4onashi, Jul 15, 2019
    Last edited: Jul 15, 2019
    (OP)
    Settings > Done
    Hotfix check > Implemented

    Core.dll
    Code:
    Imports System.Management
    Imports System.Windows.Forms
    
    Namespace WMI
    
        Public Class CheckKB
    
            Shared Function CheckForHotfix(ByVal HotfixID As String) As Boolean
    
                'Checks if any given hotfix ID is installed
                'Example usage: If CheckForHotfix("KB4499728") Then : MessageBox.Show("KB4499728 is installed") : End If
    
                Try
                    Dim s As String = ""
                    Dim mos As New ManagementObjectSearcher("root\CIMV2", "SELECT HotFixID FROM Win32_QuickFixEngineering")
                    For Each obj As ManagementObject In mos.Get()
                        s = obj.GetPropertyValue("HotFixID").ToString
                        If s.Contains(HotfixID) Then
                            Return True
                        End If
                    Next
                    Return False
                Catch
                    MessageBox.Show("Could not query for hotfix " & HotfixID, "Core.WMI.CheckForHotfix", MessageBoxButtons.OK, MessageBoxIcon.Error)
                    Return False
                End Try
    
            End Function
    
        End Class
    
    End Namespace
    
    Program startup
    Code:
            'Check Hotfix
            If OSHWinIsSeven() Then
                'Check convenience rollup KB3125574
                If Not CheckKB.CheckForHotfix("KB3125574") Then
                    BoolMissingHotfix = True 'Missing
                Else
                    BoolMissingHotfix = False 'Installed
                End If
                'If KB3125574 missing then check for older patch KB2687862
                If BoolMissingHotfix Then
                    If Not CheckKB.CheckForHotfix("KB2687862") Then
                        BoolMissingHotfix = True 'Still missing
                    Else
                        BoolMissingHotfix = False 'Installed
                    End If
                End If
            End If
    
    QB :hug2:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. Carlos Detweiller

    Carlos Detweiller MDL Spinning Tortoise

    Dec 21, 2012
    3,112
    2,722
    120
    Strangely, even a patched system still reports the old WinSAT and WinSATAPI versions. Microsoft...
     
  14. K4onashi

    K4onashi MDL Debugger

    Mar 7, 2012
    1,683
    1,694
    60
    #434 K4onashi, Jul 15, 2019
    Last edited: Jul 28, 2019
    (OP)
    Yes, which is odd. The async case that isn't handled is within the bugged winsat executable. Lazy bar stewards couldn't even be bothered to change the revision number.

    I've attached an image of the new hotfix installer dialog. A font installer dialog is coming for vista too, then I can remove the embedded resource seguisb.ttf which frees 900+ kb. I'm late with RC2 but again, there's a lot that has come up.
     

    Attached Files:

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. K4onashi

    K4onashi MDL Debugger

    Mar 7, 2012
    1,683
    1,694
    60
    I have added DWM composition to the toast notifications, it gives a much better effect. I'm just working out compatibility and making sure the implimentation is correct.

    See the image attached.
     

    Attached Files:

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. K4onashi

    K4onashi MDL Debugger

    Mar 7, 2012
    1,683
    1,694
    60
    #436 K4onashi, Jul 26, 2019
    Last edited: Jul 27, 2019
    (OP)
    I've made some quality of life changes to animation, which includes moving multiple sub routines into just four. This saves code and improves ability to bugtrack.

    Code:
    Imports System.Threading
    
    Module FadeForm
    
    #Region "Main"
        Public Sub FadeIn(Form As Form)
    
            Try
                For FIn = 0.0 To 1.0 Step 0.2
                    Form.Opacity = FIn
                    Form.Refresh()
                    Thread.Sleep(10)
                Next
            Catch
                Form.Opacity = 1.0
            End Try
    
        End Sub
        Public Sub FadeOut(Form As Form)
    
            Try
                For FOut = 1.0 To 0.0 Step -0.2
                    Form.Opacity = FOut
                    Form.Refresh()
                    Thread.Sleep(10)
                Next
            Catch
                Form.Close()
            End Try
    
        End Sub
    #End Region
    #Region "Child"
        Public Sub FadeBehindChild(Form As Form)
            Try
                For FOut = 1.0 To 0.4 Step -0.2
                    Form.Opacity = FOut
                    Form.Refresh()
                    Thread.Sleep(10)
                Next
            Catch
                Form.Opacity = 0.4
            End Try
        End Sub
        Public Sub RefadeIn(Form As Form)
            Try
                If Form.Opacity <> 0.4 Then
                    For FIn = 0.4 To 1.0 Step 0.2
                        Form.Opacity = FIn
                        Form.Refresh()
                        Thread.Sleep(10)
                    Next
                End If
            Catch
                Form.Opacity = 1.0
            End Try
        End Sub
    #End Region
    
    End Module
    This way we can simply call FadeIn(Me) in the 'Shown' event, or FadeOut(Me) in the form closed event. Also included is FadeBehindChild() and RefadeIn() that can be allocated within an AddHandler statement, etc. In the below code we can see FadeBehindChild(Me) is called and the Addhandler statement waits for the child to close and calls RefadeIn(Me) which brings the form back into focus.

    Code:
        Private Sub SomeRoutine()
            FadeBehindChild(Me)
    
            Dim FChangelog As New FormChangelog
            AddHandler FChangelog.FormClosed, AddressOf ChildFormClosedNoRefresh
            FChangelog.ShowDialog()
        End Sub()
    
        Private Sub ChildFormClosedRefreshUI(ByVal sender As Object, ByVal e As EventArgs)
            RefadeIn(Me)
            'Does some other routines
        End Sub
    
        Private Sub ChildFormClosedNoRefresh(ByVal sender As Object, e As EventArgs)
            RefadeIn(Me)
        End Sub
    
    P.S Sorry for taking so long (not sorry). It's not that I don't care about timeframes, I generally overstate and then realise this much code is a lot for a busy person. The update is coming on really great though, thanks for everyones patience.

    I'm also working on a GFWL project to re-enable games that have become faulty, like fable 3.

    Regards, QB.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. K4onashi

    K4onashi MDL Debugger

    Mar 7, 2012
    1,683
    1,694
    60
    #437 K4onashi, Jul 28, 2019
    Last edited: Jul 29, 2019
    (OP)
    Okay - pushing forward and I've implimented the notification system finally. There is an image attached. This has turned out to be a bigger update than previously expected.

    I tried to be as unintrusive I could be with with the notification system. Please let me know if you have any questions or pointers.

    Lastely, the Segoe UI font will stay embedded. I realise now some people will want to use offline so I'm keeping the option open. The only issue I have now is whether to embed hotfixes and must make a decision on how to keep a good balance.

    Preliminary changelog:

    Code:
    New:
    1. Enabled 'Metrics' in the main window
    2. Option added to allow use of a custom Imgur API Client ID (Settings > Imgur API)
    3. Parts of Xiret have now been seperated into DLL files (Gambol.dll, Core.dll)
    4. Changes to the settings system
       - Changed how settings are loaded
       - paths.xml renamed to paths.xir and changed to indented format
       - Added application directory to paths.xir
    5. Implimented final fix for missing "Segoe UI Semibold" font (Win Vista)
    6. Implimented final fix for "Failed to properly assess the disk. The parameter is incorrect." (Win 7)
    7. Implimented notification counter
    
    Enhancements:
    1. Shortcut keys have been amended
    2. Form animation improvements
    3. UI improvements
       - And added pink to the theme colors (Settings > Theme Color)
       - Theme color changes
       - General edits and balancing
    4. WinsatApi improvements
       - Added GetWinsatVisuals() to retrieve score bitmaps
       - Better error handling
    5. Minor adjustment to improve Vista compatibility
       - Fixed UI string that was too long
    6. Blocked attempts to load hardware information on unrated systems
    7. Blocked multiple attempts loading the latest formal xml file path
       - Caused when loading hardware information (Winsat\WinsatReader > GetWinsatHardwareXMLInfo())
        - Fixed by caching the formal xml location and reloading when changes in the strings are detected
          - This change improved loading time when starting the application
    8. Removed unused embedded resources
    
    Bugs:
    1. Fixed an issue where hardware information would not refresh when switching modes (ItielMaN)
    2. Fixed UI inconsistencies with frame buttons (ItielMaN)
    3. Fixed missing web link 'Help > Check for updates > View Changelog'
    
    Some changes are not listed as they only relate to internal cleanup and do not affect usage.
    Many thanks!
     

    Attached Files:

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. K4onashi

    K4onashi MDL Debugger

    Mar 7, 2012
    1,683
    1,694
    60
    #438 K4onashi, Jul 31, 2019
    Last edited: Jul 31, 2019
    (OP)
    Okay, the deprecated memory management system has been rewritten and re-implemented. It's now at a point where I'm happy to finally leave it in the application. It will execute rarely but necessarily. I do not approve of how often the windows garbage collector kicks in and this way memory overhead is kept low without being detrimental to performance.

    The update system will now make an initial check and += 1 to the notification count if an update is available, and then enable the help menu link and display that there is a notification. At all other times the update link will be hidden as everything is automatic.

    Finally, hotfixes are now embedded resources. The whole package with Xiret.exe, Core.dll and Gambol.dll is still under 5MB (Not including the updater). I'll be honest, I never wanted it downloading anything but updates anyway. 5MB is nothing and I'm happy as everyone can use it offline.

    Regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. K4onashi

    K4onashi MDL Debugger

    Mar 7, 2012
    1,683
    1,694
    60
    #439 K4onashi, Aug 2, 2019
    Last edited: Aug 2, 2019
    (OP)
    Metrics is coming on, very sloppy. I've never dealt with automatically parsing so much XML at once and it's a little complicated for me. This is the last thing to do before R2 is available.

    I've attached an image, however, be aware it's not final.

    Regards.

    EDIT: Okay now I'm getting somewhere thanks to Linq. This is turning out to be easier than expected. It was just a case of blacklisting certain nodes from being read and then running that specific node through the parsing routine on its own.
     

    Attached Files:

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  20. K4onashi

    K4onashi MDL Debugger

    Mar 7, 2012
    1,683
    1,694
    60
    #440 K4onashi, Aug 7, 2019
    Last edited: Aug 7, 2019
    (OP)
    Hi all,

    A quick update. Everything is moving forward here. I've moved the rest of all necessary statements into Core.dll and had a extensive internal cleanup so everyone can understand the source better. A lot of files and code have moved too, soon I will purge the github and upload the RC2 commit. At the moment i'm still figuring out how XML parsing loops work, but it shouldn't take too much longer.

    Just a quick note. I've added some integrity checks for the accompanied .dll files, so if you're supplied an edited version of MY hash, you will be notified by the application but still have the option to run the application at your own discretion. Remember to ALWAYS check the supplied checksums on github or here. Whitelisted locations for my software are:- MyDigitalLife, Github, Majorgeeks and Bitmight, everywhere else should be considered untrusted if the source-code is not released with any third-party variant and the license vertabim.

    Regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...