Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

andycruce

@andycruce
About
Posts
3
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Writing to UI Thread in a Real time Application
    A andycruce

    I am building a system to record 6DOF information during an aerobatic flight. I grab data from a hardware set including an IMU, a GPS and a Baro altimeter and 20 to 30ms intervals. I attempted to use the WinForms Timer to schedule data recording using BW to allow me the collect the data in the DoWork method and then write the data to the WinForm in the WorkCompleted method. All this worked properly but the WinForms timer didn't provide the accuracy for scheduling the data properly. I did a test using a multimedia timer which provided the necessary update timing accuracy but when I used it to drive a BW the WorkCompleted method was no longer in the UI string and I get an error for trying to access a UI element from outside the UI string. I can make this work doing a BeginInvoke((MethodInvoker) delegate {all updates to UI elements in here}). What I would like to know if there is a way to force the WorkCompleted method back to the UI string. Also, not sure why changing the timer made the BW operation change and no longer have the WorkCompleted method in the UI string. The code for the program is below. The first set is my code and the second set it the C# code that implements the timer that I got off the internet. I'm not sure I used the

    correctly but at least I tried. Appreciate any suggestions as I am still trying to figure out C# and the .net/Winforms environment.

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Diagnostics;

    namespace Simple_BW_Timing_with_Winforms
    {
    public partial class Form1 : Form
    {
    Stopwatch systemTimer;
    long time1 = 0, time2 = 0;
    public long timeBetweenCalls;
    int count;
    BackgroundWorker updateInfoBW;

        public delegate void \_writeForm();
    
        public readonly MicroLibrary.MicroTimer \_microTimer;
    

    // public BackgroundWorker updateInfoBW;

        public Form1()
        {
            updateInfoBW = new BackgroundWorker();
            updateInfoBW.DoWork += updateInfoDoWork;
            updateInfoBW.RunWorkerCompleted += updateInfoWorkCompleted;
    
            InitializeComponent();
            systemTimer = new Stopwatch();
            systemTimer.Start();
    
            \_microTimer = new MicroLibrary.MicroTimer();
            \_microTimer.MicroTimerElapsed +=
    
    C# csharp winforms linq graphics design

  • Using SerializationEngine to input .obj file
    A andycruce

    I am using the following code line to input a .obj file with an associated .mtl file and several associated .jpg files pointed to by the .mtl file: aerobaticsSceneControl.Scene - SerializationEngine.Instance.LoadScene(modelFile); where model file the pointer to the .obj file. I have on .obj file that loads correctly. However in another file I have downloaded I get the following exception message at the line above: An unhandled exception of type System.ArgumentNullException; occurred in mscorlib.dll Additional Information Value can not be null I get the following debug messages which as someone new to this type of programming doesn't make any sense:

    'Aerobatics Scene.vshost.exe' (CLR v4.0.30319: Aerobatics Scene.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'Aerobatics Scene.vshost.exe' (CLR v4.0.30319: Aerobatics Scene.vshost.exe): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\14.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'Aerobatics Scene.vshost.exe' (CLR v4.0.30319: Aerobatics Scene.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'Aerobatics Scene.vshost.exe' (CLR v4.0.30319: Aerobatics Scene.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'Aerobatics Scene.vshost.exe' (CLR v4.0.30319: Aerobatics Scene.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'Aerobatics Scene.vshost.exe' (CLR v4.0.30319: Aerobatics Scene.vshost.exe): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\14.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sy

    C# dotnet debugging csharp graphics

  • SharpGL
    A andycruce

    I downloaded the SharpGL extensions for 2013 in the .vsix file. However, when I click on that file it get the message that no app handles .vsix filetypes. I am using Visual Studio 2015. Is there a down load for this version of the IDE? Is there something I can do to import these extensions into Visual Studio? I tried tools:options:manage file associations and put the .vsix file in a directory pointed to in the file association window. When I did that I got the message that Visual Studio didn't have the authorization to open that folder? Any Suggestions?

    Visual Studio 2015 & .NET 4.6
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups