Example #1
0
            void button_Click(object sender, RoutedEventArgs e)
            {
                Button        btn        = (Button)sender;
                Denominations DenomPopup = new Denominations(btn.Content.ToString());

                DenomPopup.ShowDialog();
                btn.Content = DenomPopup.Denom;


                var Selection = designerCanvas.SelectionService.CurrentSelection;
                ViewModelDesignerItem Ditem = new ViewModelDesignerItem();

                foreach (var slc in Selection)
                {
                    Ditem = (ViewModelDesignerItem)slc;
                }
                DockPanel    Sourcepnl        = (DockPanel)Ditem.Content;
                PropertyGrid SelectedPgrid    = designerCanvas.TransactionList.Find(x => x.Id == Sourcepnl.Uid).PropertyGrid;
                string       SelectedProperty = btn.Name.ToString();
                string       newValue         = btn.Content.ToString();
                StateCAS     statecas         = (StateCAS)SelectedPgrid.SelectedObject;

                Type         ClassType = statecas.GetType();
                PropertyInfo property  = ClassType.GetProperty(SelectedProperty);

                property.SetValue(statecas, newValue, null);
                designerCanvas.TransactionList.Find(x => x.Id == Sourcepnl.Uid).PropertyGrid.SelectedObject = statecas;
            }
Example #2
0
        public override object CreateInsertCommandScript(PropertyGrid SelectedPgrid, string ProjectName, string TransactionName, int ExtensionStateNumber)
        {
            StateCAS State = new StateCAS();

            State = (StateCAS)SelectedPgrid.SelectedObject;
            List <string> SqlStringList = new List <string>();

            string sql    = SqlStr;
            string ex1sql = sql;
            string ex2sql = sql;
            string ex3sql = sql;

            //Extension1


            if (State.ExtensionStateNumber1 != "255")
            {
                ex1sql = string.Format(ex1sql, Guid, Status, DateTime.Now.ToString("yyyyMMddHHmmss"), State.ExtensionStateNumber1, State.ExtensionDescription1,
                                       State.ExtensionState1Type, ProjectName, TransactionName, State.PleaseEnterNotesScreen, State.PleaseRemoveNotesScreen, State.ConfirmationScreen,
                                       State.HardwareErrorScreen, State.EscrowFullScreen, State.ProcessingNotesScreen, State.PleaseRemoveMt90NoScreen, State.PleaseWaitScreen1,
                                       State.ConfigId, State.BrandId, State.ConfigVersion);
                SqlStringList.Add(ex1sql);
            }


            //Extension2

            if (State.ExtensionStateNumber2 != "255")
            {
                ex2sql = string.Format(ex2sql, Guid, Status, DateTime.Now.ToString("yyyyMMddHHmmss"), State.ExtensionStateNumber2, State.ExtensionDescription2,
                                       State.ExtensionState2Type, ProjectName, TransactionName, State.GoodNextState, State.CancelNextState, State.DeviceErrorNextState,
                                       State.TimeoutNextState, State.RefundSlotNextState, State.ReservedEx2_1, State.ReservedEx2_2, State.PleaseWaitScreen2,
                                       State.ConfigId, State.BrandId, State.ConfigVersion);
                SqlStringList.Add(ex3sql);
            }


            //Extension3
            if (State.ExtensionStateNumber3 != "255")
            {
                ex3sql = string.Format(ex3sql, Guid, Status, DateTime.Now.ToString("yyyyMMddHHmmss"), State.ExtensionStateNumber3, State.ExtensionDescription3,
                                       State.ExtensionState3Type, ProjectName, TransactionName, State.Denominations1_12, State.Denominations13_24, State.Denominations25_36,
                                       State.Denominations37_48, State.Denominations49_50, State.ReservedEx3_1, State.RemoveRefusedNScreen, State.CounterfeitNRetainedScreen,
                                       State.ConfigId, State.BrandId, State.ConfigVersion);
                SqlStringList.Add(ex3sql);
            }

            sql = string.Format(sql, Guid, Status, DateTime.Now.ToString("yyyyMMddHHmmss"), State.StateNumber, State.StateDescription,
                                State.StateType, ProjectName, TransactionName, State.CancelKeyMask, State.DepositKeyMask, State.AddMoreKeyMask, State.RefundKeyMask,
                                State.ExtensionStateNumber1, State.ExtensionStateNumber2, State.ExtensionStateNumber3, State.Reserved,
                                State.ConfigId, State.BrandId, State.ConfigVersion);
            SqlStringList.Add(sql);

            return(SqlStringList);
        }
Example #3
0
        public override Object FillPropertyGridFromState(Object ClassInstance, PropertyGrid SelectedPgrid)
        {
            StateCAS Selectedstate = new StateCAS();
            StateCAS Dynamicstate  = new StateCAS();

            Selectedstate                       = (StateCAS)SelectedPgrid.SelectedObject;
            Dynamicstate                        = (StateCAS)ClassInstance;
            Dynamicstate._Description           = Selectedstate.StateDescription;
            Dynamicstate._ExtensionDescription1 = Selectedstate.ExtensionDescription1;
            Dynamicstate._ExtensionDescription2 = Selectedstate.ExtensionDescription2;
            Dynamicstate._ExtensionDescription3 = Selectedstate.ExtensionDescription3;

            Dynamicstate.BrandId  = Selectedstate.BrandId;
            Dynamicstate.ConfigId = Selectedstate.ConfigId;

            Dynamicstate._AddMoreKeyMask = Selectedstate.AddMoreKeyMask;
            Dynamicstate._CancelKeyMask  = Selectedstate.CancelKeyMask;
            //Dynamicstate._CancelNextStateNumber = Selectedstate._CancelNextStateNumber;
            Dynamicstate._ConfirmationScreen         = Selectedstate.ConfirmationScreen;
            Dynamicstate._CounterfeitNRetainedScreen = Selectedstate.CounterfeitNRetainedScreen;
            Dynamicstate._Denominations1_12          = Selectedstate.Denominations1_12;
            Dynamicstate._Denominations13_24         = Selectedstate.Denominations13_24;
            Dynamicstate._Denominations25_36         = Selectedstate.Denominations25_36;
            Dynamicstate._Denominations37_48         = Selectedstate.Denominations37_48;
            Dynamicstate._Denominations49_50         = Selectedstate.Denominations49_50;
            Dynamicstate._DepositKeyMask             = Selectedstate.DepositKeyMask;
            //Dynamicstate._DeviceErrorNextStateNumber = Selectedstate._DeviceErrorNextStateNumber;
            Dynamicstate._EscrowFullScreen      = Selectedstate.EscrowFullScreen;
            Dynamicstate._ExtensionStateNumber1 = Selectedstate.ExtensionStateNumber1;
            Dynamicstate._ExtensionStateNumber2 = Selectedstate.ExtensionStateNumber2;
            Dynamicstate._ExtensionStateNumber3 = Selectedstate.ExtensionStateNumber3;
            //Dynamicstate._GoodNextStateNumber = Selectedstate._GoodNextStateNumber;
            Dynamicstate._HardwareErrorScreen      = Selectedstate.HardwareErrorScreen;
            Dynamicstate._PleaseEnterNotesScreen   = Selectedstate.PleaseEnterNotesScreen;
            Dynamicstate._PleaseRemoveMt90NoScreen = Selectedstate.PleaseRemoveMt90NoScreen;
            Dynamicstate._PleaseRemoveNotesScreen  = Selectedstate.PleaseRemoveNotesScreen;
            Dynamicstate._PleaseWaitScreen1        = Selectedstate.PleaseWaitScreen1;
            Dynamicstate._PleaseWaitScreen2        = Selectedstate.PleaseWaitScreen2;
            Dynamicstate._ProcessingNotesScreen    = Selectedstate.ProcessingNotesScreen;
            Dynamicstate._RefundKeyMask            = Selectedstate.RefundKeyMask;
            //Dynamicstate._RefundSlotNextStateNumber = Selectedstate._RefundSlotNextStateNumber;
            Dynamicstate._RemoveRefusedNScreen = Selectedstate.RemoveRefusedNScreen;
            //Dynamicstate._TimeoutNextStateNumber = Selectedstate._TimeoutNextStateNumber;

            return(Dynamicstate);
        }
Example #4
0
        public override object FillStatesFromDB(object[] processRow, ArrayList StateList)
        {
            StateCAS state = new StateCAS();
            ModelCanvasStateObject        TransStateObj = new ModelCanvasStateObject();
            List <ModelParentStateObject> ParentobjList = new List <ModelParentStateObject>();
            List <ModelChildStateObject>  ChildobjList  = new List <ModelChildStateObject>();

            state.Status           = processRow[1].ToString();
            state.StateNumber      = processRow[3].ToString();
            state.StateDescription = processRow[4].ToString();
            state.StateType        = processRow[5].ToString();

            state._CancelKeyMask         = processRow[8].ToString();
            state._DepositKeyMask        = processRow[9].ToString();
            state._AddMoreKeyMask        = processRow[10].ToString();
            state._RefundKeyMask         = processRow[11].ToString();
            state._ExtensionStateNumber1 = processRow[12].ToString();
            state._ExtensionStateNumber2 = processRow[13].ToString();
            state._ExtensionStateNumber3 = processRow[14].ToString();
            state._Reserved = processRow[15].ToString();

            state.ConfigId      = processRow[16].ToString();
            state.BrandId       = processRow[17].ToString();
            state.ConfigVersion = processRow[18].ToString();

            //Extension State Kontrolu-1
            if (state.ExtensionStateNumber1 != "255")
            {
                object[] ExtensionState = GetExtensionState(ref StateList, state.ExtensionStateNumber1);
                state._ExtensionDescription1    = ExtensionState[4].ToString();
                state._PleaseEnterNotesScreen   = ExtensionState[8].ToString();
                state._PleaseRemoveNotesScreen  = ExtensionState[9].ToString();
                state._ConfirmationScreen       = ExtensionState[10].ToString();
                state._HardwareErrorScreen      = ExtensionState[11].ToString();
                state._EscrowFullScreen         = ExtensionState[12].ToString();
                state._ProcessingNotesScreen    = ExtensionState[13].ToString();
                state._PleaseRemoveMt90NoScreen = ExtensionState[14].ToString();
                state._PleaseWaitScreen1        = ExtensionState[15].ToString();
            }
            //Extension State Kontrolu-2
            if (state.ExtensionStateNumber2 != "255")
            {
                object[] ExtensionState = GetExtensionState(ref StateList, state.ExtensionStateNumber2);

                state._ExtensionDescription2 = ExtensionState[4].ToString();
                state._GoodNextState         = ExtensionState[8].ToString();
                state._CancelNextState       = ExtensionState[9].ToString();
                state._DeviceErrorNextState  = ExtensionState[10].ToString();
                state._TimeoutNextState      = ExtensionState[11].ToString();
                state._RefundSlotNextState   = ExtensionState[12].ToString();
                state._ReservedEx2_1         = ExtensionState[13].ToString();
                state._ReservedEx2_2         = ExtensionState[14].ToString();
                state._PleaseWaitScreen2     = ExtensionState[15].ToString();
            }
            //Extension State Kontrolu-3
            if (state.ExtensionStateNumber3 != "255")
            {
                object[] ExtensionState = GetExtensionState(ref StateList, state.ExtensionStateNumber3);

                state._ExtensionDescription3      = ExtensionState[4].ToString();
                state._Denominations1_12          = ExtensionState[8].ToString();
                state._Denominations13_24         = ExtensionState[9].ToString();
                state._Denominations25_36         = ExtensionState[10].ToString();
                state._Denominations37_48         = ExtensionState[11].ToString();
                state._Denominations49_50         = ExtensionState[12].ToString();
                state._ReservedEx3_1              = ExtensionState[13].ToString();
                state._RemoveRefusedNScreen       = ExtensionState[14].ToString();
                state._CounterfeitNRetainedScreen = ExtensionState[15].ToString();
            }


            //NextState Kontrolu
            if (state.GoodNextState != "255")
            {
                ChildobjList.Add(GetChildState("GoodNextState", state.TimeoutNextState, StateList, processRow[7].ToString(), state.StateType, state.StateNumber));
            }
            if (state.CancelNextState != "255")
            {
                ChildobjList.Add(GetChildState("CancelNextState", state.TimeoutNextState, StateList, processRow[7].ToString(), state.StateType, state.StateNumber));
            }
            if (state.DeviceErrorNextState != "255")
            {
                ChildobjList.Add(GetChildState("DeviceErrorNextState", state.TimeoutNextState, StateList, processRow[7].ToString(), state.StateType, state.StateNumber));
            }
            if (state.TimeoutNextState != "255")
            {
                ChildobjList.Add(GetChildState("TimeoutNextState", state.TimeoutNextState, StateList, processRow[7].ToString(), state.StateType, state.StateNumber));
            }
            if (state.RefundSlotNextState != "255")
            {
                ChildobjList.Add(GetChildState("RefundSlotNextState", state.TimeoutNextState, StateList, processRow[7].ToString(), state.StateType, state.StateNumber));
            }


            TransStateObj.BrandId          = state.BrandId;
            TransStateObj.ConfigId         = state.ConfigId;
            TransStateObj.Id               = state.StateNumber;
            TransStateObj.StateDescription = state.StateDescription;
            TransStateObj.Type             = state.StateType;
            TransStateObj.TransactionName  = processRow[7].ToString();

            TransStateObj.PropertyGrid.SelectedObject = state;
            TransStateObj.ParentStateList             = ParentobjList;
            TransStateObj.ChildStateList = ChildobjList;
            designerCanvas.TransactionList.Add(TransStateObj);
            return(StateList);
        }