public void ProcessAction(string parameter)
        {
            if (IsSuitableView() && (Frame != null))
            {
                switch (parameter)
                {
                case "SaveAction":
                    SimpleAction saveAction = Frame.GetController <ModificationsController>().SaveAction;
                    if (saveAction.Enabled && saveAction.Active)
                    {
                        saveAction.DoExecute();
                    }
                    break;

                case "SaveAndNewAction":
                    //var a2 = Frame.GetController<ModificationsController>().SaveAndNewAction;
                    var a2 = Frame.GetController <ModificationsController>().SaveAndNewAction;
                    if (a2.Enabled && a2.Active)
                    {
                        a2.DoExecute(a2.Items.FirstActiveItem);
                    }
                    break;
                }
            }
        }
Ejemplo n.º 2
0
        private void ExecStandartAction(SimpleAction action)
        {
            if (action == null)
            {
                //analysisDataBindController.BindDataAction.Active.Clear();
                //analysisDataBindController.UnbindDataAction.Active.Clear();

                analysisDataBindController.BindDataAction.Active.SetItemValue("ResultValue", false);
                analysisDataBindController.UnbindDataAction.Active.SetItemValue("ResultValue", false);
                return;
            }

            analysisDataBindController.BindDataAction.Active.Clear();
            analysisDataBindController.UnbindDataAction.Active.Clear();

            analysisDataBindController.BindDataAction.Enabled.Clear();
            analysisDataBindController.UnbindDataAction.Enabled.Clear();


            analysisDataBindController.BindDataAction.Active.SetItemValue("ResultValue", true);
            analysisDataBindController.UnbindDataAction.Active.SetItemValue("ResultValue", true);

            action.DoExecute();

            analysisDataBindController.BindDataAction.Active.SetItemValue("ResultValue", false);
            analysisDataBindController.UnbindDataAction.Active.SetItemValue("ResultValue", false);
        }
Ejemplo n.º 3
0
        private void FrameOnTemplateChanged(object sender, EventArgs args)
        {
            if (NotifyEnabled() && Frame.Context == TemplateContext.ApplicationWindow)
            {
                var form = Frame.Template as XtraForm;
                if (form != null)
                {
                    _container = new Container();
                    var strip = new ContextMenuStrip(_container);
                    strip.Items.Add(GetMenuItem(CaptionHelper.GetLocalizedText(XpandSystemWindowsFormsModule.XpandWin, "Maximize"), (o, eventArgs) => ChangeFormVisibility(form)));
                    strip.Items.Add(GetMenuItem(CaptionHelper.GetLocalizedText(XpandSystemWindowsFormsModule.XpandWin, "Minimize"), (o, eventArgs) => ChangeFormVisibility(form)));
                    var logoffAction = Frame.GetController <LogoffController>().LogoffAction;
                    if (logoffAction.Active)
                    {
                        strip.Items.Add(GetMenuItem(CaptionHelper.GetLocalizedText(XpandSystemWindowsFormsModule.XpandWin, "LogOut"), (o, eventArgs) => Application.LogOff()));
                    }
                    strip.Items.Add(GetMenuItem(CaptionHelper.GetLocalizedText(XpandSystemWindowsFormsModule.XpandWin, "Exit"),
                                                (o, eventArgs) => {
                        _trayExitAction.DoExecute();
                    }));

                    _notifyIcon = new NotifyIcon(_container)
                    {
                        Visible = true, ContextMenuStrip = strip
                    };
                    SetIcon();
                    _notifyIcon.DoubleClick += (o, eventArgs) => ChangeFormVisibility(form);
                }
            }
        }
 void ExecuteAction(SimpleAction action, bool executedAndDisable) {
     action.Active[ArtifactStateCustomizationViewController.ActiveObjectTypeHasRules] = true;
     if (action.Active){
         action.DoExecute();    
     }
     if (executedAndDisable)
         action.Active[ArtifactStateCustomizationViewController.ActiveObjectTypeHasRules] = false;
 }
 private void processCurrentObjectController_CustomProcessSelectedItem(object sender, CustomProcessListViewSelectedItemEventArgs e)
 {
     if (!e.Handled && Frame.Context != TemplateContext.LookupControl && Frame.Context != TemplateContext.LookupWindow &&
         showDocumentDesignerAction.Active && showDocumentDesignerAction.Enabled)
     {
         e.Handled = true;
         showDocumentDesignerAction.DoExecute();
     }
 }
Ejemplo n.º 6
0
 void ExecuteAction(SimpleAction action, bool executedAndDisable)
 {
     action.Active[ArtifactStateCustomizationViewController.ActiveObjectTypeHasRules] = true;
     if (action.Active)
     {
         action.DoExecute();
     }
     if (executedAndDisable)
     {
         action.Active[ArtifactStateCustomizationViewController.ActiveObjectTypeHasRules] = false;
     }
 }
        private void saSelectRecordInLookup_Execute(object sender, SimpleActionExecuteEventArgs e)
        {
            ListViewProcessCurrentObjectController listViewProcessCurrentObjectController = Frame.GetController <ListViewProcessCurrentObjectController>();

            if (listViewProcessCurrentObjectController != null)
            {
                SimpleAction processCurrentObjectAction = Frame.GetController <ListViewProcessCurrentObjectController>().ProcessCurrentObjectAction;
                if (processCurrentObjectAction.Active.ResultValue && processCurrentObjectAction.Enabled.ResultValue)
                {
                    processCurrentObjectAction.DoExecute();
                }
            }
        }
Ejemplo n.º 8
0
        public void DoExecuteOnActivated(ViewController controller, SimpleAction action)
        {
            EventHandler controller_activated = (sender, e) =>
            {
                action.DoExecute();
            };

            controller.Activated   += controller_activated;
            controller.Deactivated += (sender, e) =>
            {
                controller.Activated -= controller_activated;
            };
        }
Ejemplo n.º 9
0
 private void flow_ProcessActionExecute(string obj)
 {
     DoCommandAction.Tag = obj;
     DoCommandAction.DoExecute();
 }
 private void processCurrentObjectController_CustomProcessSelectedItem(
     object sender, CustomProcessListViewSelectedItemEventArgs e)
 {
     e.Handled = true;
     writeMailAction.DoExecute();
 }
Ejemplo n.º 11
0
 void fileManager_SelectedFileOpened(object source, FileManagerFileOpenedEventArgs e)
 {
     currentSelect = e.File.Id;
     DoCommandAction.DoExecute();
 }