Announcement

Collapse
No announcement yet.

how do you control transitions in .Net

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • how do you control transitions in .Net

    How do you change the transitions of items you add in a dotNet addin. What command do I use? Thanks.

  • #2
    Can you elaborate?
    2006 Lancer Evolution IX MR In-Dash PC Project - WIP

    Planning:
    [----------] 100%
    Purchasing:
    [----------] 90%
    Installation/Fab/Assembly (Revised v2):
    [----------] 90%

    Comment


    • #3
      I'm building a dotnet app and I added some objects to the module. When I run the app and exit and enter my app the objects don't fly in or fly out. Within the Dev environment I can change the "transition" properties for each object. But in Dotnet I can't find the call to change the transition. I can change the Height, width, top, left, focus, caption......NO Transition.
      example:
      lblHome.Height = 25
      lblHome.visible = true
      lblHome.transition = ?....this property doesn't exist

      I'm using VB.net.

      Comment


      • #4
        There's no such attribute that I know of. You have to run a timer and increment the location on each tick...there may be a class built to do it that you can download somewhere though.

        Comment


        • #5
          You should be able to change transitions through the skin editor in the next update.
          StreetDeck.com Developer (I am Chuck)
          Get StreetDeck at http://www.streetdeck.com
          The Official StreetDeck Forums have moved, please visit us at http://www.streetdeck.com/forum for official support for Streetdeck.

          Comment


          • #6
            Originally posted by god_of_cpu View Post
            You should be able to change transitions through the skin editor in the next update.
            I might be kidnapping this thread, but it's a similar "problem":

            Will it also be possible to access skin items created in the Dev Env (e.g buttons, lists etc) from the .Net addin?

            The fact that you cannot do this today, make the more elaborate addins unskinnable.

            /A

            Comment


            • #7
              Originally posted by aeroanderz View Post
              I might be kidnapping this thread, but it's a similar "problem":

              Will it also be possible to access skin items created in the Dev Env (e.g buttons, lists etc) from the .Net addin?

              The fact that you cannot do this today, make the more elaborate addins unskinnable.

              /A
              You can already do this through using GetHeadPanelPos and GetNextPanel
              StreetDeck.com Developer (I am Chuck)
              Get StreetDeck at http://www.streetdeck.com
              The Official StreetDeck Forums have moved, please visit us at http://www.streetdeck.com/forum for official support for Streetdeck.

              Comment


              • #8
                Originally posted by god_of_cpu View Post
                You can already do this through using GetHeadPanelPos and GetNextPanel
                And it is obvious to everyone but me how to use these? According to the .idl file, they aren't there so an updated .idl file would be nice, but..

                what "position" is GetNextPanel(int position) requiring?
                what does GetHeadPanelPos() give me? (an int of course, but is it a "position"? of what?)
                Are the panels in a module in a list and the "position" is the index in the list? So it is possible to just loop through the list and find my panel? And a getNextPanel call with a "position" larger than the number of available panels will give me null? I guess I can identify my panels by using GetFunctionName() and that will get me the name of the panel from the Dev Env?

                (Would have been so much easier to have a GetPanel(str FunctionName), but...)

                If this is true, the NICE.. I will have to do some refactoring.. Thanks g_o_c!

                Comment


                • #9
                  Originally posted by aeroanderz View Post
                  And it is obvious to everyone but me how to use these?
                  Ok.. so these are my findings (C#):

                  Code:
                  uint pos = module.GetHeadPanelPos();
                  IDualPanel panel = module.GetNextPanel(ref pos);
                  
                  while (panel != null) // could be just about anything
                  {
                      if (panel.GetFunctionName().Equals("presetList")) //last panel in the module
                          break;
                      panel = module.GetNextPanel(ref pos);
                  }
                  This will get me all panels in the module. The problems:
                  ONE:
                  The only way I have found to avoid exceptions in the StreetDeck API is to break the loop when you know that you have found the last component. My assumption that a call to GetNextPanel() where the "list pointer" or whatever is at the end of available panels would return null, doesn't work. It just crashes.

                  TWO:
                  After doing the above (without crashes) the module doesn't render ANY panels at all. Why? I tried doing a GetHeadPanelPos() at the end just to "reset the pointer" but that doesn't work either.

                  I would happily add code snippets to the addin wiki page to help others create their addins. If could just get some hints on how to solve common problems.. please..

                  /A

                  Comment


                  • #10
                    Panel iteration works just like MFC CList iteration, since well thats what its actually doing.

                    Position is actually just a pointer to an object in the list. Whenever GetNextPanel is called, it returns the panel at the position you passed in and increments the position and returns it by reference. The reason why it is crashing is because you are passing in a NULL position at the end, so it tries to dereference the panel at the NULL pointer position. YOu should just be able to make your code work by simply checking to see if pos != NULL rather then panel. The following code also works.
                    Code:
                    for (uint iPos = module.GetHeadPanelPos();
                                        iPos != 0;)
                                    {
                                        StreetDeck.IDualPanel p =  module.GetNextPanel(ref iPos);
                                        module.MsgBox(p.GetFunctionName(), "Panel  Name");
                                    }
                    StreetDeck.com Developer (I am Chuck)
                    Get StreetDeck at http://www.streetdeck.com
                    The Official StreetDeck Forums have moved, please visit us at http://www.streetdeck.com/forum for official support for Streetdeck.

                    Comment


                    • #11
                      Thanks GoC!

                      I'm no MFC coder so.. But when you say it, it's quite obvious..

                      This will make things SO MUCH EASIER!..

                      Comment


                      • #12
                        .. and now I've actually tried. I can't get it to work.

                        my code:
                        Code:
                        for (uint iPos = module.GetHeadPanelPos(); iPos != 0; )
                        {
                            IDualPanel panel = module.GetNextPanel(ref iPos);
                            Tex.WriteLine("{0:d} {1:s}", iPos, panel.GetFunctionName());
                        
                        }
                        This is what I get if I just output the ipos variable and the function names:
                        Code:
                        177406544 Header
                        177406544 Section
                        177406544 SubSection
                        177406544 SubSection1
                        177406544 SubSection2
                        177406544 TuneLabel
                        ... (lots of panels..)
                        177406544 ButtonMoreSettings
                        177406544 Home
                        177406544 Back
                        177406544 VolumeOverlayToggle
                        177406544 presetList
                        And it still crashes..

                        Comment


                        • #13
                          I can run the code I posted just fine.

                          If you create a new module and put nothing but that code in it, does it still crash?

                          Does it look like it gets through the entire list before crashing or is it crashing on one of the panels its returning?
                          StreetDeck.com Developer (I am Chuck)
                          Get StreetDeck at http://www.streetdeck.com
                          The Official StreetDeck Forums have moved, please visit us at http://www.streetdeck.com/forum for official support for Streetdeck.

                          Comment


                          • #14
                            My exact code is:

                            Code:
                                        try
                                        {
                                            FileInfo f = new FileInfo("c:\\CHQCTRadioModulePanels.txt");
                                            StreamWriter Tex = f.CreateText();
                            
                                            for (uint iPos = module.GetHeadPanelPos(); iPos != 0; )
                                            {
                                                IDualPanel panel = module.GetNextPanel(ref iPos);
                                                Tex.WriteLine("{0:d} {1:s}", iPos, panel.GetFunctionName());
                                                Tex.Flush();
                                            }
                                            Tex.Close();
                                        }
                                        catch (Exception e)
                                        {
                            
                                        }
                            It will ALWAYS end up in the catch statement since the GetNextPanel call will generate an AccessViolation after going through ALL the panels. Streetdeck does not crash, but the addin module is dead (doesn't render anything..) The iPos variable will always have the same value and will never be 0 (or NULL).

                            If I remove the try catch statements, entering the module will give me a BLACK screen, not even the static background.

                            I can try to create a completely new addin and see if I can get it to work..

                            UPDATE:
                            I added a new addin using the example on the wiki and ONLY added the code above. I get the same result. Access violation. I added the code after row 46 in Class1.cs.
                            I get the file with panels and the pointer, but its the same:
                            Code:
                            177290972 Header
                            177290972 Section
                            177290972 SubSection
                            177290972 SubSection1
                            177290972 SubSection2
                            177290972 Home
                            177290972 Back
                            177290972 VolumeOverlayToggle
                            177290972 ShowOverlay
                            I'm running 1.1.0.0...

                            Comment


                            • #15
                              One again, I'm getting "no" help from the StreetDeck guys...

                              You could at least ask me to report it as a bug or convince me that it is working...
                              More or less all the "advanced" questions I have had have gone unanswered... sad really..

                              SHAPE UP!

                              Comment

                              Working...
                              X