Exemple #1
0
        protected virtual void OnToggleCheckedChanged(string propertyName, bool isChecked)
        {
            if (this is ServiceDesignerViewModel && propertyName == "ShowLarge")
            {
                if (isChecked)
                {
                    ActivityDesignerToggle activityDesignerToggle = TitleBarToggles.FirstOrDefault(c => c.AutomationID == "HelpToggle");
                    if (activityDesignerToggle == null)
                    {
                        //AddTitleBarHelpToggle();
                    }
                }
                else
                {
                    RemoveHelpToggle();
                }
            }

            var isSelectedOrMouseOver = IsSelectedOrMouseOver;
            var showSmall             = ShowSmall;

            ThumbVisibility     = isSelectedOrMouseOver && !showSmall ? Visibility.Visible : Visibility.Collapsed;
            ConnectorVisibility = isSelectedOrMouseOver && showSmall ? Visibility.Visible : Visibility.Collapsed;

            if (!isChecked)
            {
                PreviousView = propertyName;
            }
            ClearErrors();
        }
Exemple #2
0
        protected void AddTitleBarQuickVariableInputToggle()
        {
            var toggle = ActivityDesignerToggle.Create("pack://application:,,,/Dev2.Activities.Designers;component/Images/ServiceQuickVariableInput-32.png", "Close Quick Variable Input", "pack://application:,,,/Dev2.Activities.Designers;component/Images/ServiceQuickVariableInput-32.png", "Open Quick Variable Input", "QuickVariableInputToggle", this, ShowQuickVariableInputProperty
                                                       );

            TitleBarToggles.Add(toggle);
        }
        protected void AddTitleBarHelpToggle()
        {
            var toggle = ActivityDesignerToggle.Create("pack://application:,,,/Dev2.Activities.Designers;component/Images/ServiceHelp-32.png", "Close Help", "pack://application:,,,/Dev2.Activities.Designers;component/Images/ServiceHelp-32.png", "Open Help", "HelpToggle", this, ShowHelpProperty
                                                       );

            TitleBarToggles.Add(toggle);
        }
        protected void AddTitleBarQuickVariableInputToggle()
        {
            var toggle = ActivityDesignerToggle.Create("ServiceQuickVariableInput", "Close Quick Variable Input", "ServiceQuickVariableInput", "Open Quick Variable Input", "QuickVariableInputToggle", this, ShowQuickVariableInputProperty
                                                       );

            TitleBarToggles.Add(toggle);
        }
Exemple #5
0
        protected void RemoveHelpToggle()
        {
            ActivityDesignerToggle activityDesignerToggle = TitleBarToggles.FirstOrDefault(c => c.AutomationID == "HelpToggle");

            if (activityDesignerToggle != null)
            {
                TitleBarToggles.Remove(activityDesignerToggle);
                ShowHelp = false;
            }
        }
Exemple #6
0
        void AddTitleBarEditToggle()
        {
            // ReSharper disable RedundantArgumentName
            var toggle = ActivityDesignerToggle.Create("ServicePropertyEdit", "Edit", "ServicePropertyEdit", "Edit", "ShowParentToggle",
                                                       autoReset: true,
                                                       target: this,
                                                       dp: ShowParentProperty
                                                       );

            // ReSharper restore RedundantArgumentName
            TitleBarToggles.Add(toggle);
        }
Exemple #7
0
        public void Dispose()
        {
            TitleBarToggles.Clear();

            _modelItem.PropertyChanged -= OnModelItemPropertyChanged;

            OnDispose();
            CEventHelper.RemoveAllEventHandlers(this);
            CEventHelper.RemoveAllEventHandlers(TitleBarToggles);
            CEventHelper.RemoveAllEventHandlers(ModelItem);
            GC.SuppressFinalize(this);
        }
Exemple #8
0
        void AddTitleBarEditToggle()
        {
            // ReSharper disable RedundantArgumentName
            var toggle = ActivityDesignerToggle.Create("pack://application:,,,/Dev2.Activities.Designers;component/Images/ServicePropertyEdit-32.png", "Edit", "pack://application:,,,/Dev2.Activities.Designers;component/Images/ServicePropertyEdit-32.png", "Edit", "ShowParentToggle",
                                                       autoReset: true,
                                                       target: this,
                                                       dp: ShowParentProperty
                                                       );

            // ReSharper restore RedundantArgumentName
            TitleBarToggles.Add(toggle);
        }