public void initAction(string ch, MouseEventArgs e)
        {
            ActionToolStrip obj = new ActionToolStrip();

            switch (ch)
            {
            case "NodeDataSynchronization":
                obj = ActionDataSync;
                initToolStrip(ActionDataSync.ActionPropery.ActionProperties.Type);
                CMSAction.Show(tvActionExplorer, e.Location);
                break;

            case "NodePayments":
                obj = ActionDataSyncPayment;
                initToolStrip(ActionDataSyncPayment.ActionPropery.ActionProperties.Type);
                CMSAction.Show(tvActionExplorer, e.Location);
                break;

            case "NodeDirect":

                obj = ActionDataSyncPaymentDirect;
                initToolStrip(ActionDataSyncPaymentDirect.ActionPropery.ActionProperties.Type);
                changeModeToolStripMenuItem.Text = "Change Mode : " + ActionDataSyncPaymentDirect.getMode();
                CMSAction.Show(tvActionExplorer, e.Location);
                break;

            case "NodeIndirect":

                obj = ActionDataSyncPaymentIndirect;
                initToolStrip(ActionDataSyncPaymentIndirect.ActionPropery.ActionProperties.Type);
                changeModeToolStripMenuItem.Text = "Change Mode : " + ActionDataSyncPaymentIndirect.getMode();
                CMSAction.Show(tvActionExplorer, e.Location);
                break;

            case "NodeFile":

                obj = ActionDataSyncPaymentIndirect;
                initToolStrip(ActionDataSyncPaymentIndirect.ActionPropery.ActionProperties.Type);
                changeModeToolStripMenuItem.Text = "Change Mode : " + ActionDataSyncPaymentIndirect.getMode();
                CMSAction.Show(tvActionExplorer, e.Location);
                break;

            case "NodeMembership":

                obj = ActionDataSyncMembership;
                initToolStrip(ActionDataSyncMembership.ActionPropery.ActionProperties.Type);
                changeModeToolStripMenuItem.Text = "Change Mode : " + ActionDataSyncMembership.getMode();
                CMSAction.Show(tvActionExplorer, e.Location);
                break;

            case "NodeMembershipApplication":


                obj = ActionDataSyncMembershipApplication;
                initToolStrip(ActionDataSyncMembershipApplication.ActionPropery.ActionProperties.Type);
                changeModeToolStripMenuItem.Text = "Change Mode : " + ActionDataSyncMembershipApplication.getMode();
                CMSAction.Show(tvActionExplorer, e.Location);
                break;

            case "NodeChangeAddress":


                obj = ActionDataSyncChangeAddress;
                initToolStrip(ActionDataSyncChangeAddress.ActionPropery.ActionProperties.Type);
                changeModeToolStripMenuItem.Text = "Change Mode : " + ActionDataSyncChangeAddress.getMode();
                CMSAction.Show(tvActionExplorer, e.Location);
                break;

            case "NodeMemberData":

                obj = ActionDataSyncMemberData;
                initToolStrip(ActionDataSyncMemberData.ActionPropery.ActionProperties.Type);
                changeModeToolStripMenuItem.Text = "Change Mode : " + ActionDataSyncMemberData.getMode();
                CMSAction.Show(tvActionExplorer, e.Location);
                break;

            case "NodeExamination":

                initToolStrip(ActionDataSyncExamination.ActionPropery.ActionProperties.Type);
                changeModeToolStripMenuItem.Text = "Change Mode : " + ActionDataSyncExamination.getMode();
                CMSAction.Show(tvActionExplorer, e.Location);
                break;

            case "NodeTechnicalActivities":

                initToolStrip(ActionDataSyncTechnicalActivities.ActionPropery.ActionProperties.Type);
                changeModeToolStripMenuItem.Text = "Change Mode : " + ActionDataSyncTechnicalActivities.getMode();
                CMSAction.Show(tvActionExplorer, e.Location);
                break;
            }
            CMSActionRefresh(obj.ActionPropery);
        }
Esempio n. 2
0
        public void setAction(string ch, int state)
        {
            ActionToolStrip obj = new ActionToolStrip();

            switch (ch)
            {
            case "NodeDataSynchronization":
                obj = ActionDataSync;
                ActionDataSync.changeState(state);

                break;

            case "NodePayments":
                obj = ActionDataSyncPayment;
                ActionDataSyncPayment.changeState(state);

                break;

            case "NodeDirect":
                obj = ActionDataSyncPaymentDirect;
                ActionDataSyncPaymentDirect.changeState(state);
                tvActionExplorer.SelectedNode.Text = "Direct [Table to table]    " + "(" + ActionDataSyncPaymentDirect.ActionPropery.ActionProperties.Text + ")";
                break;

            case "NodeIndirect":
                obj = ActionDataSyncPaymentIndirect;
                ActionDataSyncPaymentIndirect.changeState(state);
                tvActionExplorer.SelectedNode.Text = "Indirect [Gateway to DB]    " + "(" + ActionDataSyncPaymentIndirect.ActionPropery.ActionProperties.Text + ")";
                break;

            case "NodeFile":
                obj = ActionDataSyncPaymentIndirect;
                ActionDataSyncPaymentIndirect.changeState(state);
                tvActionExplorer.SelectedNode.Text = "From File [*.csv to table]    " + "(" + ActionDataSyncPaymentIndirect.ActionPropery.ActionProperties.Text + ")";
                break;

            case "NodeMembership":
                obj = ActionDataSyncMembership;
                ActionDataSyncMembership.changeState(state);

                break;

            case "NodeMembershipApplication":
                obj = ActionDataSyncMembershipApplication;
                ActionDataSyncMembershipApplication.changeState(state);
                tvActionExplorer.SelectedNode.Text = "Membership Application    " + "(" + ActionDataSyncMembershipApplication.ActionPropery.ActionProperties.Text + ")";
                break;

            case "NodeChangeAddress":
                obj = ActionDataSyncChangeAddress;
                ActionDataSyncChangeAddress.changeState(state);
                tvActionExplorer.SelectedNode.Text = "Change of Address    " + "(" + ActionDataSyncChangeAddress.ActionPropery.ActionProperties.Text + ")";
                break;

            case "NodeMemberData":
                obj = ActionDataSyncMemberData;
                ActionDataSyncMemberData.changeState(state);
                tvActionExplorer.SelectedNode.Text = "New/Upgraded Member's Data    " + "(" + ActionDataSyncMemberData.ActionPropery.ActionProperties.Text + ")";
                break;

            case "NodeExamination":
                obj = ActionDataSyncExamination;
                ActionDataSyncExamination.changeState(state);
                //tvActionExplorer.SelectedNode.Text = "New/Upgraded Member's Data    " + "(" + ActionDataSyncExamination.Text + ")";
                break;

            case "NodeTechnicalActivities":
                obj = ActionDataSyncTechnicalActivities;
                ActionDataSyncTechnicalActivities.changeState(state);
                //tvActionExplorer.SelectedNode.Text = "New/Upgraded Member's Data    " + "(" + ActionDataSyncTechnicalActivities.Text + ")";
                break;
            }
            //if(state == 1)
            //{
            //    tvActionExplorer.SelectedNode.Text = "Direct [Table to table]   (Up & Down Sync Runing  ...)";
            //}
            //if (state == 2)
            //{
            //    tvActionExplorer.SelectedNode.Text = "Indirect [Gateway to DB]   (Up & Down Sync Runing  ...)";
            //}
            CMSActionRefresh(obj.ActionPropery);
        }