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
E

Eric Vonjacson

@Eric Vonjacson
About
Posts
13
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • why soap serializaiton take much time
    E Eric Vonjacson

    Hi, I use the wsdl command to generate the client proxy for the java web service. And the service contain only one method and it like this:[System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace="namespacess", ResponseNamespace="namespacess", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [return: System.Xml.Serialization.XmlElementAttribute("return", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] public string execute([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string arg0) { object[] results = this.Invoke("execute", new object[] { arg0}); return ((string)(results[0])); }
    I create a custom SoapExtension class that is used to calculate the serialize and deserialize time when calling this method. I found that serialize will take more than 2000 Milliseconds. The soap serialization take much time and it's not acceptable. the soapextension class is like this: public class TraceSoapExtension : SoapExtension { public override void ProcessMessage(SoapMessage message) { string methodname = message.MethodInfo.Name; string tmpInfo = "Call web method: " + methodname + " "; switch (message.Stage) { case SoapMessageStage.BeforeSerialize: stc.Reset(); stc.Start(); tmpInfo = tmpInfo + "Before the soap message serialize: " + Environment.NewLine + "Time is: " + System.DateTime.Now.ToUniversalTime().ToString("MM/dd/yyyy hh:mm:ss.ffffff"); break; case SoapMessageStage.AfterSerialize: stc.Stop(); tmpInfo = tmpInfo + "After the soap message serialize: " + Environment.NewLine + "Time is: " + System.DateTime.Now.ToUniversalTime().ToString("MM/dd/yyyy hh:mm:ss.ffffff"); tmpInfo += " Client serialize stop watch take time: " + stc.ElapsedMilliseconds; break; case SoapMessageStage.BeforeDeserialize: stc.Reset(); stc.Start(); tmpInfo = tmpInfo + "Receive soap message before deserialize: " + Environment.NewLine + "Time is: " + System.DateTime.Now.ToUniversalTime().ToStrin

    Web Development xml wcf java database json

  • How to get configuration file's path
    E Eric Vonjacson

    Hi, I created a class library to do some logging and this class library need a configuraiton file to do some initialization work. I set the configuraiton file's build action to "Content". Then I add reference to this class library from a asp.net application project. After build, the class lirary and the configuration file were put the output folder "bin". As I begin to get the configuration files address in running, there are some errors occur because I ca't correctly locate the configuration file's address. Please help: how could I get the configuration file's path? thanks,

    ASP.NET csharp asp-net help tutorial question

  • Got some problem with wpf multibinding
    E Eric Vonjacson

    Hi, I have some problem withe multi binding in wpf: 1) In the widnow cs file, I define a property like this:

    private ObservableCollection<string> colltest = new ObservableCollection<string>();
    public ObservableCollection<string> Coll
    {
      get
      {
        return this.colltest;
      }
    }
    
    1. In the xaml file define a multi binding to the "togglebutton".

      <ToggleButton Tag="dd" Content="TT" Width="50" Height="50">
      <ToggleButton.IsChecked>
      <MultiBinding Mode="OneWay" Converter="{x:Static app:SimpleConverter.Instance}">
      <Binding Mode="OneWay" RelativeSource="{RelativeSource Mode=FindAncestor,AncestorType={x:Type app:Window1}}"
      Path="Coll" />
      <Binding Mode="OneWay" RelativeSource="{RelativeSource Mode=Self}" Path="Tag" />
      </MultiBinding>
      </ToggleButton.IsChecked>
      </ToggleButton>

    2. and the covnert function of the converter is like this:

      public object Convert(object[] value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
      {
      bool bflag = false;

      if (value[0] == DependencyProperty.UnsetValue || value[0] == null||
      value[1] == DependencyProperty.UnsetValue ||
      value[1] == null)
      return bflag;

      ObservableCollection<string> v1 = value[0] as ObservableCollection<string>;
      string v2 = (string)value[1];

      if (v1 != null)
      {
      bflag = v1.Contains(v2);
      }

      return bflag;
      }

    It's working after the window is loadded. But however, after I add some new string to the collection "colltest", the togglebutton's "IsChecked" is not updated automatically. I want it working in this way: If any changes are made to the collection "colltest". The togglebutton's "IsChecked" could update accordingly. So how to resolve this problem? thanks.

    WPF wpf csharp wcf help tutorial

  • How to convert a handle to a wpf window?
    E Eric Vonjacson

    Hi, I have one problem: In code, I call a function which is provided by others and this function will pop out a dialog. The function return a object and it has long integer value. I think the value is a window handle. So how to convert this handle to a wpf window? thanks, eric

    WPF csharp wpf help tutorial question

  • Do to detect outlook is running or not in client?
    E Eric Vonjacson

    Hi, I have one client application that have send email function which use the EmailInterop. The code is like this: NMailItem itemEmail = EmailInterop.OpenEmailItem("", "", "", Enums.EmailType.Normal); But if the outlook is not running in the client, the application have problem. I want to prevent user send mail if the outlook is not running now. So how to detect the outlook is running or not in the client? thanks.

    .NET (Core and Framework) help tutorial question

  • Wpf button problem
    E Eric Vonjacson

    In window form, the control "ToolStripButton" has a property "CheckOnClick". When the button is click, the button is checked, once it's clicked another time, the button is unchecked. I want to have the same function like this button in wpf. But there are no existing controls like this one. Do you know which control have similar function like this? thanks, Eric

    WPF csharp wpf help question

  • How to assign customer object to the dependency property in xaml?
    E Eric Vonjacson

    Hi All, I have one class that has a dependency property that like this:

    public partial class BSTreeNode : UserControl
    {

    //....
    public static readonly DependencyProperty ParentNodeProperty = DependencyProperty.Register(
    "ParentNode", typeof(BSTreeNode), typeof(BSTreeNode),
    new FrameworkPropertyMetadata(null, null), null);

        public BSTreeNode ParentNode
        {
            \[DebuggerStepThrough\]
            get
            {
                return (BSTreeNode)this.GetValue(BSTreeNode.ParentNodeProperty);
            }
            \[DebuggerStepThrough\]
            set
            {
                this.SetValue(BSTreeNode.ParentNodeProperty, value);
            }
        }
    

    }

    The type of property "ParentNode" is same as this class. In the xaml file, I defined and used them like this:

      <local:BSTreeNode NodeContent="A" Canvas.Left="100" Canvas.Top="20" x:Name="A"> 
      <local:BSTreeNode NodeContent="B" Canvas.Left="20" Canvas.Top="200" x:Name="B" **ParentNode="A"**\></local:BSTreeNode>
    

    However, the application will throw out an exception. So how to set the dependency property in the xaml file like this? Is it possible? thanks, GuoYu Feng

    WCF and WF wpf sales tutorial question

  • How to binding to the actual width and height of the control in doubleanimation?
    E Eric Vonjacson

    I tried that. It works. Thanks a lot. Eric

    WPF tutorial css wpf wcf question

  • How to binding to the actual width and height of the control in doubleanimation?
    E Eric Vonjacson

    Hi, I add a expander to a window and the double animation when is expanded. However, the to property of the doubleanimation is hardcoded, in my example, the "to" property is 200 and 400. I want to ask that how could it binding to the actual width or height of the expander control? Is this possible?

    <Expander Grid.Column="3" Grid.RowSpan="2" Header="expander1" Margin="3,12,-83,18" Name="expander1" BorderBrush="Red" BorderThickness="2" Width="200" Height="400">
    <StackPanel>
    <Button Width="100">This is the button one</Button>
    <Button Width="100">This is the button two</Button>
    </StackPanel>

      <Expander.Triggers>
        <EventTrigger RoutedEvent="Expander.Expanded">
          <BeginStoryboard>
            <Storyboard>
              <DoubleAnimation Storyboard.TargetName="expander1" Storyboard.TargetProperty="Width"
                               From="0" To="200" Duration="0:0:0.25" />
              <DoubleAnimation Storyboard.TargetName="expander1" Storyboard.TargetProperty="Height"
                               From="0" To="400" Duration="0:0:0.25" />
            </Storyboard>
          </BeginStoryboard>
        </EventTrigger>
      </Expander.Triggers>
    </Expander>
    

    thanks.

    WPF tutorial css wpf wcf question

  • SetBitmap Problem
    E Eric Vonjacson

    The code is like this:

    {
    CBitmap tempBitmap;
    ...
    HBITMAP hBitmap = HBITMAP(tempBitmap);
    m_picHolder.SetBitmap(hBitmap);
    ...
    }

    When call SetBitmap again, the bitmap can be shown out. But it will disappear after minimize and maximize the dialog. Thanks, Eric

    C / C++ / MFC graphics help tutorial question

  • SetBitmap Problem
    E Eric Vonjacson

    Hi All, I use a CStatic to show a bitmap in a dialog. The bitmap is a thumbnail of a file. Everytime when a file is chosen, the code call CStattic::SetBitmap to associates a new bitmap with the static control and the bitmap will be shown out immediately. But I minimize the dialog and maximize the dialog again, the bitmap in the CStatic control can't be shown out. Do you know how to show the picture out again when the dialog is maximized? thanks, Eric

    C / C++ / MFC graphics help tutorial question

  • Why it can't work wih "__uuidof(MSXML2::DOMDocument60)"?
    E Eric Vonjacson

    Hi All, I have a problem with MSXML6 which bother me a lot. First I have a xml file named "Infor.xml" like this: Eric 24 Then the codes to analyze this file is like this: #import //... MSXML2::IXMLDOMDocument2Ptr pNewDocument; pNewDocument.CreateInstance(__uuidof(MSXML2::DOMDocument)); //load the xml file pNewDocument->load(_bstr_t("Infor.xml")); MSXML2::IXMLDOMNodeListPtr pNodeList; //get he sub node "Root/SubNode" pNodeList = pNewDocument->selectNodes(_bstr_t("Root/SubNode")); cout<<"The new Node length is "<Getlength()<Getitem(0); MSXML2::IXMLDOMElementPtr pElement = pSubNode->selectSingleNode(_bstr_t("Name")); if(pElement != NULL) { cout<<"Name is: "<Gettext()<selectSingleNode(_bstr_t("Age")); if(pElement != NULL) { cout<<"Age is: "<Gettext()<

    XML / XSL xml help question

  • How to migrate c# projects to 64-bit platforms? [modified]
    E Eric Vonjacson

    Hi, I have a big solutions which includes many c# projects and c++ projects. Some c++ project use the dll files generated by the c# projects. Now I begin to migrate the whole solution to 64-bit platforms. After setting the project, I found all the c# projects in this solution can not generate the expected dlll files. I am a little confused. Could you help me if you are familiar with this? Thanks a lot. -- modified at 1:44 Thursday 29th June, 2006

    C# csharp c++ help tutorial question
  • Login

  • Don't have an account? Register

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