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
G

gritter

@gritter
About
Posts
9
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Why I Hate VB Today
    G gritter

    You forgot VB for DOS, with its ansi controls.

    The Lounge csharp visual-studio

  • VS2005 doesn't like my XML Schema
    G gritter

    Thanks everyone, but never mind. Although it makes perfect sense to me, apparently an element can not include both attributes and a value. Hmmm... Maybe in the next version. Below is how I am fixing the problem.

                    <xsd:element name="Well\_Volumes">
                      <xsd:complexType>
                        <xsd:sequence>
                          
                          <xsd:element name="Well">
                            <xsd:complexType>
                              <xsd:sequence>
                                <xsd:element name="volume" type="xsd:decimal"/>
                              </xsd:sequence>
                              <xsd:attribute name="channel" type="xsd:string"/>
                              <xsd:attribute name="dispense\_order" type="xsd:string"/>
                              <xsd:attribute name="plate\_column" type="xsd:string"/>
                              <xsd:attribute name="plate\_row" type="xsd:string"/>
                            </xsd:complexType>
                          </xsd:element>
                        
                        </xsd:sequence>
                      </xsd:complexType>
                    </xsd:element>
    
    XML / XSL visual-studio xml help tutorial csharp

  • VS2005 doesn't like my XML Schema
    G gritter

    I am using Visual Studio 2005 to create my first XML Schema. Generally it's going well. The intellisense in VS is very helpful. My only issue is that VS is flagging the element "Well" in my example, saying "The type attribute cannot be present with either simpleType or complexType." I'm not sure how to structure it if this way isn't acceptable. I've also included a XML snippet of what I am trying define in the schema. Any help appreciated.

                   <xsd:element name="Well\_Volumes">
                      <xsd:complexType>
                        <xsd:sequence>
                          
                          <xsd:element name="Well" type="xsd:decimal">
                            <xsd:complexType>
                              <xsd:attribute name="channel" type="xsd:string"/>
                              <xsd:attribute name="dispense\_order" type="xsd:string"/>
                              <xsd:attribute name="plate\_column" type="xsd:string"/>
                              <xsd:attribute name="plate\_row" type="xsd:string"/>
                            </xsd:complexType>
                          </xsd:element>
                        
                        </xsd:sequence>
                      </xsd:complexType>
                    </xsd:element>
    
    
    
     <Well\_Volumes>
        <Well channel="A" dispense\_order="1" plate\_column="1" plate\_row="1">0.209</Well>
        <Well channel="A" dispense\_order="2" plate\_column="2" plate\_row="1">0.212</Well>
        <Well channel="A" dispense\_order="3" plate\_column="3" plate\_row="1">0.219</Well>
        <Well channel="B" dispense\_order="1" plate\_column="4" plate\_row="2">0.212</Well>
        <Well channel="B" dispense\_order="2" plate\_column="5" plate\_row="2">0.222</Well>
        <Well channel="B" dispense\_order="3" plate\_column="6" plate\_row="2">0.212</Well>
    </Well\_Volumes>
    
    XML / XSL visual-studio xml help tutorial csharp

  • testing if window is loaded.
    G gritter

    Actually I think I got. It's probably not the best way, but I can do what I need by playing with the "topmost" property. Thanks.

    WPF csharp wpf testing beta-testing help

  • testing if window is loaded.
    G gritter

    Thanks! That works, except it does shift focus to the "called window". If you can help me out here too, I would appreciate it. WPF makes me feel pretty helpless. I didn't realize it was so different from WinForms.

    WPF csharp wpf testing beta-testing help

  • testing if window is loaded.
    G gritter

    I changed the line with TryFindResource() to:

    Dim nextWindow As Window = CType(Application.Current.TryFindResource("Window3"), Window)

    The change made no difference. It still doesn't find the existing instance of Window3.

    WPF csharp wpf testing beta-testing help

  • testing if window is loaded.
    G gritter

    I am writing a WPF app that loops thru a series of windows. The first time thru, I need to create the next window, but on subsequent times, I want it to re-display the previously created window. I believe the function TryFindResource() should help me do this, but it's not working. See code below.

    Private Sub btnGo_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)

        Dim nextWindow As Window = CType(TryFindResource("Window3"), Window)
        If (nextWindow Is Nothing) Then
            nextWindow = New Window3
            nextWindow.Show()
        Else
            nextWindow.Show()
        End If
    
    End Sub
    

    Appreciate any help with this. Yes, this is my first WPF app.

    WPF csharp wpf testing beta-testing help

  • WPF - staggering storyboard executions
    G gritter

    I think I solved my own problem. Rather than trying to run multiple storyboards, each containing animations for a single target, I tired putting all of the animations for all of the targets into a single storyboard and arrange them on the timeline so they appear to fire in a random order. That seems to be working fairly well. My only issue now is how to set it up so it runs continuously. What complicates this is that each target has 3 animations associated with it. Each target is a droplet. The first 2 animations are an X and a Y scale transformations, to make the droplet grow. The third is a translate transformation as the droplet falls down the screen. I use this set of 3 animations for each of the droplets. I am not sure yet how to set this up so the animations for a target are repeated automatically in the proper sequence. If anyone has an ideas on this, again I would appreciate the help.

    WPF csharp help database wpf testing

  • WPF - staggering storyboard executions
    G gritter

    I am developing my first WPF app. It has some animations are essentially the same, but with different targets. I want to stagger their execution so they look random. I developed a storyboard for each target and gave each sb a unique name. To insert the delay, I am calling the storyboards from the code-behind. For testing I am using a button for my trigger. Eventually, form_load will trigger the animations. Also for testing purpose, I am only trying to run two storyboards, begin the 2nd one 8 seconds after the first. My problem is that my storyboards both execution at the same time. After clicking the button, there's an 8 second delay and then they both run. I've tried separating the storyboards in two separate sub's. I've tried dimensioning individual storyboard variables. So far nothing seems to make a difference. I am sure this should be possible. In fact I imagine it's fairly common. Any help will be appreciated. See code below...

    Imports System
    Imports System.IO
    Imports System.Net
    Imports System.Windows
    Imports System.Threading
    Imports System.Windows.Media
    Imports System.Windows.Media.Animation
    Imports System.Windows.Navigation

    Class Window1

    Private Sub cmdStart\_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
    
        'Call RunStoryBoard("GrowDrop1")
        Call RunStoryBoard1()
    
        'Thread.Sleep(800)
        Call Delay(8000)
    
        'Call RunStoryBoard("GrowDrop2")
        Call RunStoryBoard2()
    
    End Sub
    
    Private Sub RunStoryBoard(ByVal sbName As String)
        Dim myStoryBoard As Storyboard = DirectCast(FindResource(sbName), Storyboard)
    
        myStoryBoard.Begin(Me)
    
    End Sub
    
    Private Sub RunStoryBoard1()
        Dim myStoryBoard1 As Storyboard = DirectCast(FindResource("GrowDrop1"), Storyboard)
    
        myStoryBoard1.Begin(Me)
    
    End Sub
    
    Private Sub RunStoryBoard2()
        Dim myStoryBoard2 As Storyboard = DirectCast(FindResource("GrowDrop2"), Storyboard)
    
        myStoryBoard2.Begin(Me)
    
    End Sub
    
    Public Sub Delay(ByVal Milliseconds As UShort)
        Dim DelayTime As TimeSpan
        Dim NewTime As DateTime = DateTime.Now.AddSeconds(Milliseconds / 1000)
        Do
            DelayTime = NewTime.Subtract(DateTime.Now)
    
        Loop While DelayTime.Seconds > 0
    End Sub
    

    End Class

    WPF csharp help database wpf testing
  • Login

  • Don't have an account? Register

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