Forum Replies Created

Viewing 15 posts - 1 through 15 (of 14,507 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064

    A bit cumbersome implementation:
    Is there a more elegant one?

            public static byte[] ZipBytes(byte[] ba, string entryName)
            {
                var memStream = new MemoryStream(ba);
                var streamFile = new StreamFile(memStream);
                streamFile.Name = entryName;

                var memFile = new MemoryFile(“MyMemFileRootName”, “MyMemFileFullName.zip”);
                streamFile.CopyTo(new ZipArchive(memFile), true);

                byte[] result = memFile.ToArray();

                memFile.Delete(); // Must call memFile.Delete, as it keeps static data (Is it using MemoryMappedFile?)
                return result;
            }

     My test code:

            private static void ZipTestByteArray()
            {
                byte[] ba = new byte[100];
                for (int i0 = 0; i0 < 100; i0++)
                    ba[i0] = (byte)i0;

                for (int i = 1; i < 3; i++)
                {
                    string targetPath = @”c:\tmp\tmp_” + i + “.zip”;
                    if (File.Exists(targetPath))
                        File.Delete(targetPath);
                    string entryName = “MyEntryName_” + i;

                    var ba2 = ZipBytes(ba, entryName);
                    File.WriteAllBytes(targetPath, ba2);

                }

                // Manual check – open the two files from file system
                // verify that the each file contains only one entry with correct name

            }
     

    Imported from legacy forums. Posted by Dekel (had 14 views)

    User (Old forums)
    Member
    Post count: 23064

    Sure thing, the image is located here:

    http://i.imgur.com/r4PCX6O.png&nbsp;

    and the pastebin of the control setup, sans the data source:

    http://pastebin.com/Rznyezgp&nbsp;

    It is as if the background is bleeding through. 

    Imported from legacy forums. Posted by John (had 17 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi Fawzi,

    I am still struggling with this.

    I have merged your code in my MainWindow AXML file to add a Soldo window on the left side

    Added a new ViewModel named it SaldoViewModel.

    added a new contentId to my viewmodel and axml file named it Saldo. 

    Changed the code in my WorkSpace File to add the ViewModel to the collection of ToolViewModels. 

    But still my Saldo window shows in the same dock as the info window.

    the whole problem is that the Avalondock is somehow tying the viewmodels to the views and I do not understand how this works. 

    I did add the files with this post as txt files. is it possible you check what I do wrong?

    regards,

    Rob 

     

    Imported from legacy forums. Posted by Rob (had 11 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi Fawzi,

    i reinstalled the Xceed Datagrid, but in the ‘New Project’ dialog there neither a Xcced folder nor a Datagrid Theme template  listed.

    Imported from legacy forums. Posted by Oliver (had 6 views)

    User (Old forums)
    Member
    Post count: 23064

    Thanks for Fawzi there is a workout for the MergedColumn issue: Use double quotes 

    For example in xaml :

    ChildColumnNames=”&quot;p.name&quot;
    &quot;p.age&quot; &quot;p.phone&quot;”

    Or in code behind
    :

    MergedColumn.ChildColumnNames = “\”p.name\”; \”p.age\”
    \”p.phone\””;

     

    And for the statFunctions issue the workout is: Use DataGridItemProperty to help the DataGridCollectionView extract values from sub-properties

     in code behind :

     DataGridCollectionView i = new DataGridCollectionView(datasrc);

     i.ItemProperties.Add(new DataGridItemProperty(“p.age”, typeof(int)));

     

    Imported from legacy forums. Posted by Jaiwei (had 28 views)

    User (Old forums)
    Member
    Post count: 23064

    Never mind. It has been so long since starting a new project that requires the grid. Application Startup is where it needs to go and not Form.Load.

    Thanks anyway. 

    Imported from legacy forums. Posted by Emerson (had 8 views)

    User (Old forums)
    Member
    Post count: 23064

    WPF

    Imported from legacy forums. Posted by Ming (had 22 views)

    User (Old forums)
    Member
    Post count: 23064

    Has anybody an idea where i could find it or does it no longer exist?

    Imported from legacy forums. Posted by Oliver (had 33 views)

    User (Old forums)
    Member
    Post count: 23064

    how to add the bottomside panel in LayoutPanel 

    Imported from legacy forums. Posted by Sathish (had 26 views)

    User (Old forums)
    Member
    Post count: 23064

    Also I have the same problem of this post http://xceed.com/CS/forums/thread/27452.aspx

    If I typed something like

    <xcdg:SumFunction ResultPropertyName="age_sum" SourcePropertyName="c.age"/>
     
    I will get an exception. 

    Imported from legacy forums. Posted by Jaiwei (had 16 views)

    User (Old forums)
    Member
    Post count: 23064

    Hello Bob.  I’m in a similar situation where I need to use both Xceed.Ftp and Xceed.Sftp in the same application.  Do you know if there is a way to leverage existing Xceed.Ftp code over SSH?

    Applies to Xceed SFTP for .NET. Imported from legacy forums. Posted by john (had 49 views)

    User (Old forums)
    Member
    Post count: 23064

    how to Programatically add the bottomside panel in avalondock

    Imported from legacy forums. Posted by Sathish (had 32 views)

    User (Old forums)
    Member
    Post count: 23064

    Finally I got it.. my mistake.

    When the filters are applied, it needs to be passed value by value, and not by throwing the whole collection in one shot :

    foreach (string key in Filters.Keys)

                        {

                            ObservableHashList values;

                            if (Filters.TryGetValue(key, out values) && values.Count > 0)

                            {

                                ((DataGridCollectionView)dgc.ItemsSource).AutoFilterValues[key].Clear();

                                foreach (var val in values)

                                {

                                    ((DataGridCollectionView)dgc.ItemsSource).AutoFilterValues[key].Add(val);

                                }

                            }

                        }

     

    Hope that help someone… 

    Imported from legacy forums. Posted by François (had 48 views)

    User (Old forums)
    Member
    Post count: 23064

    YES.The line you mentioned is correct. I am pointing at problem with Ismatch Method. 

    var StartDate = DateTime.Now.AddHours(-1).ToUniversalTime();
                var EndDate = DateTime.Now.AddHours(1).ToUniversalTime();
                FilterCriterion abc = new AndFilterCriterion(
                  new GreaterThanOrEqualToFilterCriterion(StartDate),
                  new LessThanOrEqualToFilterCriterion(EndDate));
                if(abc.IsMatch(dtlocal))

                Console.WriteLine(“xcedd criteria is in range “);

    This is not returning correct value.  As defined in code dateTime.Now is within range defined in UTC Criteria return false.

    Imported from legacy forums. Posted by Ravindra (had 73 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi Diane,

     

    We just ran into this exact same issue with a customer using the 5.7 libraries.   here’s the stack trace:

    failed to process the ‘Test.txt’ file with a size of 4 bytes and last write timestamp of 12/23/2015 2:13:06 PM from the FTP Server. SSHPacketIOManager has been disconnected from an exception in the read thread. See the inner exception for details. —> Xceed.SSH.Core.SSHDisconnectedException: SSHPacketIOManager has been disconnected from an exception in the read thread. See the inner exception for details. —> System.IO.EndOfStreamException: Attempted to read past the end of the stream.

       at Xceed.SSH.Protocols.SSHTransportLayerProtocol.ReadFull(Stream stream, Byte[] buffer, Int32 offset, Int32 toRead, Boolean throwException)

       at Xceed.SSH.Protocols.SSHTransportLayerProtocol.ReadPacket(IEnumerator`1 enumerator, Stream stream, Int32& packetLength, SSHPacket& packet, Int32& count)

       at Xceed.SSH.Core.SSHPacketIOManager.ReceivePacket()

       at Xceed.SSH.Core.SSHPacketIOManager.ReadThread()

       — End of inner exception stack trace —

       at Xceed.SSH.Core.SSHPacketIOManager.VerifyConnection()

       at Xceed.SSH.Core.SSHPacketIOManager.ReceivePayloadCore(Predicate`1 match, Boolean wait, Boolean trace, Type[] payloadTypes, LinkedListNode`1& packetSelectorNode)

       at Xceed.SSH.Core.SSHPacketIOManager.ReceivePayload(Predicate`1 match, Int32 timeout, Boolean trace, Type[] payloadTypes)

       at Xceed.SSH.Protocols.SSHConnectionProtocol.ReceiveChannelPayload(SSHPacketIOManager packetIOManager, Int32 channelNumber, Type[] payloadTypes)

       at Xceed.SSH.Protocols.SSHConnectionProtocol.OpenInteractiveSessionChannel(Int32 initialLocalWindowSize, Int32 windowAdjustmentThreshold, Int32 windowTargetSize, Int32 maximumLocalPacketSize)

       at Xceed.SSH.Client.SFtpClient.Connect(SSHClient sshClient, Int32 sftpVersion)

       at Xceed.SSH.Client.SFtpSession..ctor(SSHClient sshClient)

     

    this happens when they are trying to read a small 4K file.  When they try to read a larger file, they get this error:

     

    SSHPacketIOManager is in
    the disconnected state. —> Xceed.SSH.Core.SSHDisconnectedException:
    SSHPacketIOManager is in the disconnected state.

       at
    Xceed.SSH.Core.SSHPacketIOManager.VerifyConnection()

       at Xceed.SSH.Core.SSHPacketIOManager.ReceivePayloadCore(Predicate`1
    match, Boolean wait, Boolean trace, Type[] payloadTypes, LinkedListNode`1&
    packetSelectorNode)

       at
    Xceed.SSH.Core.SSHPacketIOManager.ReceivePayload(Predicate`1 match, Int32
    timeout, Boolean trace, Type[] payloadTypes)

       at
    Xceed.SSH.Protocols.SSHConnectionProtocol.ReceiveChannelPayload(SSHPacketIOManager
    packetIOManager, Int32 channelNumber, Type[] payloadTypes)

       at
    Xceed.SSH.Protocols.SSHConnectionProtocol.OpenInteractiveSessionChannel(Int32 initialLocalWindowSize,
    Int32 windowAdjustmentThreshold, Int32 windowTargetSize, Int32
    maximumLocalPacketSize)

       at
    Xceed.SSH.Client.SFtpClient.Connect(SSHClient sshClient, Int32 sftpVersion)

       at
    Xceed.SSH.Client.SFtpSession..ctor(SSHClient sshClient)
     

    How do we solve this? 

    Applies to Xceed SFTP for .NET. Imported from legacy forums. Posted by Martin (had 59 views)

Viewing 15 posts - 1 through 15 (of 14,507 total)