WaitControl.xaml.cs
上传用户:lvyingde
上传日期:2018-04-24
资源大小:610k
文件大小:4k
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Net;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Animation;
- using System.Windows.Shapes;
- namespace wxwinter.WFDesignerSl
- {
- public partial class WaitControl : ActivityControl
- {
- public WaitControl()
- {
- InitializeComponent();
- 显示分支选项();
- }
- public override string 标题
- {
- set
- { this.title.Text = value; }
- get
- { return this.title.Text; }
- }
- public override string 说明
- {
- set
- { this.description.Text = value; }
- get
- { return this.description.Text; }
- }
- public override void 显示分支选项()
- {
- submtOption.ItemsSource = null;
- submtOption.ItemsSource = this.分支集合;
- }
- public override void 设为活动()
- {
- img_activite.Visibility = Visibility.Visible;
- }
- private void thumb_DragDelta(object sender, System.Windows.Controls.Primitives.DragDeltaEventArgs e)
- {
- Canvas.SetLeft(this, Canvas.GetLeft(this) + e.HorizontalChange);
- Canvas.SetTop(this, Canvas.GetTop(this) + e.VerticalChange);
- On刷新事件();
- }
- private void Thumb_Link(object sender, System.Windows.Controls.Primitives.DragDeltaEventArgs e)
- {
- System.Windows.UIElement ui = (System.Windows.UIElement)sender;
- double x = Canvas.GetLeft(ui) + e.HorizontalChange; //移动的水平距离
- double y = Canvas.GetTop(ui) + e.VerticalChange; //移动的坚直距离
- Canvas.SetLeft(ui, x);
- Canvas.SetTop(ui, y);
- }
-
- private void del_MouseUp(object sender, MouseButtonEventArgs e)
- {
- var v = System.Windows.MessageBox.Show("删除" + this.标题 + "?", "", MessageBoxButton.OKCancel);
- if (v == MessageBoxResult.OK)
- {
- this.删除();
- }
- }
- private void ActivityControl_MouseEnter(object sender, MouseEventArgs e)
- {
- if (myContext.mouseMove)
- {
- object o = myContext.sourceName;
- On连接事件(o.ToString());
- On刷新事件();
- myContext.mouseMove = false;
- myContext.sourceName = "";
- }
- }
- private void link_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
- {
- myContext.mouseMove = false;
- myContext.sourceName = "";
- }
- private void link_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
- {
- string v = "";
- if (sender is TextBlock)
- {
- TextBlock ui = sender as TextBlock;
- v = this.Name + "," + ui.Text;
- }
- if (sender is Image)
- {
- Image ui = sender as Image;
- v = this.Name + "," + this.Name;
- }
- myContext.mouseMove = true;
- myContext.sourceName = v;
- }
- private void Image_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
- {
- SetWindowWaitControl swc = new SetWindowWaitControl(this);
- myContext.root.Children.Add(swc);
- }
- }
- }