/// <summary>
        /// 控件的值发生变化时调用的方法
        /// </summary>
        /// <param name="d"></param>
        /// <param name="e"></param>
        private static void OnValuePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DigitalPanelControl leds = d as DigitalPanelControl;
            string newValue          = (string)e.NewValue;

            leds.DisplayData(newValue);
        }
Example #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mainHolder = ((System.Windows.Controls.Grid)(target));
                return;

            case 2:
                this.MyMapView = ((Esri.ArcGISRuntime.Controls.MapView)(target));
                return;

            case 3:
                this.Map = ((Esri.ArcGISRuntime.Controls.Map)(target));
                return;

            case 4:
                this.ProjectGraphicsLayer = ((Esri.ArcGISRuntime.Layers.GraphicsLayer)(target));
                return;

            case 5:
                this.ledHolder = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 6:
                this.ProjectTitleTB = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 7:
                this.ledTest1 = ((iS3.Client.Controls.LedDigitalControl.LedDigital.DigitalPanelControl)(target));
                return;

            case 8:
                this.UserTB = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 9:
                this.RemindBtn = ((iS3.Client.Controls.PromptableButtonControl.PromptableButton)(target));
                return;

            case 10:
                this.MessageBtn = ((iS3.Client.Controls.PromptableButtonControl.PromptableButton)(target));
                return;

            case 11:
                this.SignoutTB = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 12:
                this.domainTreeViewHolder = ((System.Windows.Controls.Grid)(target));
                return;

            case 13:
                this.DGObjectDG = ((iS3.Client.DGObjectsView)(target));
                return;
            }
            this._contentLoaded = true;
        }
        /// <summary>
        /// 截断长度变化时调用的方法
        /// </summary>
        /// <param name="d"></param>
        /// <param name="e"></param>
        private static void OnBevelWidthPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DigitalPanelControl leds = d as DigitalPanelControl;

            for (int i = 0; i < leds.digitalsList.Count; i++)
            {
                leds.digitalsList[i].BevelWidth = (double)e.NewValue;
            }
        }
        /// <summary>
        /// LED颜色发生变化时调用的方法
        /// </summary>
        /// <param name="d"></param>
        /// <param name="e"></param>
        private static void OnDigitalColorPropertyChange(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DigitalPanelControl leds = d as DigitalPanelControl;

            for (int i = 0; i < leds.digitalsList.Count; i++)
            {
                leds.digitalsList[i].LEDColor = (Color)e.NewValue;
            }
        }
        /// <summary>
        /// 当Led数量发生变化时调用的方法
        /// </summary>
        /// <param name="d"></param>
        /// <param name="e"></param>
        private static void OnDigitalCountPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DigitalPanelControl leds = d as DigitalPanelControl;

            leds.digitalsList.Clear();

            if (leds.rootPanel != null)
            {
                leds.rootPanel.Children.Clear();
                leds.DrawDigitals((int)e.NewValue);
                //将Digitals 加入到rootPanel中
                foreach (DigitalControl digital in leds.digitalsList)
                {
                    leds.rootPanel.Children.Add(digital);
                }

                //显示值
                leds.DisplayData(leds.Value);
            }
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
                return;

            case 2:
                this.MyMapView = ((Esri.ArcGISRuntime.Controls.MapView)(target));
                return;

            case 3:
                this.Map = ((Esri.ArcGISRuntime.Controls.Map)(target));
                return;

            case 4:
                this.ProjectGraphicsLayer = ((Esri.ArcGISRuntime.Layers.GraphicsLayer)(target));
                return;

            case 5:
                this.mapTip = ((System.Windows.Controls.Border)(target));
                return;

            case 6:
                this.ledHolder = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 7:
                this.ledTest1 = ((iS3.Client.Controls.LedDigitalControl.LedDigital.DigitalPanelControl)(target));
                return;

            case 8:
                this.UserTB = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 9:
                this.RemindBtn = ((iS3.Client.Controls.PromptableButtonControl.PromptableButton)(target));
                return;

            case 10:
                this.MessageBtn = ((iS3.Client.Controls.PromptableButtonControl.PromptableButton)(target));
                return;

            case 11:
                this.SignoutTB = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 12:
                this.listBtn = ((System.Windows.Controls.Button)(target));

            #line 158 "..\..\..\ProjectListPage\ProjectListPageForMon.xaml"
                this.listBtn.Click += new System.Windows.RoutedEventHandler(this.listBtn_Click);

            #line default
            #line hidden
                return;

            case 13:
                this.addProjectBtn = ((System.Windows.Controls.Button)(target));

            #line 168 "..\..\..\ProjectListPage\ProjectListPageForMon.xaml"
                this.addProjectBtn.Click += new System.Windows.RoutedEventHandler(this.addProjectBtn_Click);

            #line default
            #line hidden
                return;

            case 14:
                this.projectListLB = ((System.Windows.Controls.ListBox)(target));

            #line 181 "..\..\..\ProjectListPage\ProjectListPageForMon.xaml"
                this.projectListLB.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.projectListLB_MouseDoubleClick);

            #line default
            #line hidden
                return;

            case 17:
                this.ProjectDetailHolder = ((System.Windows.Controls.Border)(target));
                return;

            case 18:
                this.DetailView = ((System.Windows.Controls.Button)(target));

            #line 233 "..\..\..\ProjectListPage\ProjectListPageForMon.xaml"
                this.DetailView.Click += new System.Windows.RoutedEventHandler(this.DetailView_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }