Пример #1
0
 private void navBarItemAll_LinkPressed(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
 {
     System.Diagnostics.Trace.WriteLine("navBarItemAll_LinkPressed");
     System.Diagnostics.Debug.WriteLine("navBarItemAll_LinkPressed"); AsyncDemoClass newAsyncDemoClass = new AsyncDemoClass();
 }
Пример #2
0
 private void navBarItemAll_ItemChanged(object sender, EventArgs e)
 {
     System.Diagnostics.Trace.WriteLine("navBarItemAll_ItemChanged");
     System.Diagnostics.Debug.WriteLine("navBarItemAll_ItemChanged"); AsyncDemoClass newAsyncDemoClass = new AsyncDemoClass();
 }
Пример #3
0
        public void ShowMessageInAsyncCallbackDemo(object sender, object message)
        {
            if (this.IsHandleCreated)
            {
                System.Diagnostics.Trace.WriteLine("ShowMessageInAsyncCallbackDemo");
                System.Diagnostics.Debug.WriteLine("ShowMessageInAsyncCallbackDemo"); AsyncDemoClass newAsyncDemoClass = new AsyncDemoClass();

                new Thread(new ParameterizedThreadStart(delegate(object threadObject)
                {
                    String messageString = threadObject as String;
                    IAsyncResult iar     = this.BeginInvoke(new MethodInvoker(delegate
                    {
                        MessageBox.Show(messageString);
                    }));
                    this.EndInvoke(iar);
                })).Start(message);
            }
        }
Пример #4
0
 private void navBarControl_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
 {
     if (this.IsHandleCreated)
     {
         System.Diagnostics.Trace.WriteLine("navBarControl_LinkClicked");
         System.Diagnostics.Debug.WriteLine("navBarControl_LinkClicked"); AsyncDemoClass newAsyncDemoClass = new AsyncDemoClass();
     }
 }
Пример #5
0
 private void navBarItemAsyncMethod_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
 {
     if (this.IsHandleCreated)
     {
         System.Diagnostics.Trace.WriteLine("navBarItemAsyncMethod_LinkClicked");
         System.Diagnostics.Debug.WriteLine("navBarItemAsyncMethod_LinkClicked"); AsyncDemoClass newAsyncDemoClass = new AsyncDemoClass();
         newAsyncDemoClass.DoSomethingInAsyncTaskDemo     += new DoSomethingInAsyncTaskDemoEventHandler(DoSomethingInAsyncTaskDemo);
         newAsyncDemoClass.ShowMessageInAsyncCallbackDemo += new ShowMessageInAsyncCallbackDemoEventHandler(ShowMessageInAsyncCallbackDemo);
         //newAsyncDemoClass.ShowMessageInAsyncDemo += new ShowMessageInAsyncDemoEventHandler(ShowMessageInAsyncDemo);
         //newAsyncDemoClass.ShowMessageInAsyncDemo += new ShowMessageInAsyncDemoEventHandler(ShowMessageInAsyncDemo);
         //newAsyncDemoClass.ShowMessageInAsyncDemo += new ShowMessageInAsyncDemoEventHandler(ShowMessageInAsyncDemo);
         //newAsyncDemoClass.ShowMessageInAsyncDemo += new ShowMessageInAsyncDemoEventHandler(ShowMessageInAsyncDemo);
         var varTask = newAsyncDemoClass.taskStartAsyncDelegate(3000);
         MessageBox.Show("varTask");
     }
 }