Ejemplo n.º 1
0
            void button_Click(object sender, RoutedEventArgs e)
            {
                Button btn = (Button)sender;

                BufferPositions bufferPopup = new BufferPositions(btn.Content.ToString());

                bufferPopup.ShowDialog();
                btn.Content = bufferPopup.BufferPositionValue;


                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.FindAll(x => x.TransactionName == designerCanvas.CurrentTransactionName).Find(x => x.Id == Sourcepnl.Uid).PropertyGrid;
                string       SelectedProperty = btn.Name.ToString();
                string       newValue         = btn.Content.ToString();
                StateY       statey           = (StateY)SelectedPgrid.SelectedObject;

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

                property.SetValue(statey, newValue, null);
                designerCanvas.TransactionList.FindAll(x => x.TransactionName == designerCanvas.CurrentTransactionName).Find(x => x.Id == Sourcepnl.Uid).PropertyGrid.SelectedObject = statey;
            }
Ejemplo n.º 2
0
            void ccb_ItemSelectionChanged(object sender, Xceed.Wpf.Toolkit.Primitives.ItemSelectionChangedEventArgs e)
            {
                Xceed.Wpf.Toolkit.CheckComboBox ccb = (Xceed.Wpf.Toolkit.CheckComboBox)sender;
                int mask = 0;

                foreach (var item in ccb.SelectedItems)
                {
                    double index = Convert.ToDouble(item.ToString().Substring(6));
                    mask = mask + (int)Math.Pow(2, index);
                }
                ccb.Text = mask.ToString("000");

                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 = property.DisplayName;
                string       newValue         = ccb.Text;
                StateY       stated           = (StateY)SelectedPgrid.SelectedObject;

                Type         ClassType    = stated.GetType();
                PropertyInfo propertyName = ClassType.GetProperty(SelectedProperty);

                propertyName.SetValue(stated, newValue, null);
                designerCanvas.TransactionList.Find(x => x.Id == Sourcepnl.Uid).PropertyGrid.SelectedObject = stated;
            }
Ejemplo n.º 3
0
        public override object CreateInsertCommandScript(PropertyGrid SelectedPgrid, string ProjectName, string TransactionName, int ExtensionStateNumber)
        {
            StateY State = new StateY();

            State = (StateY)SelectedPgrid.SelectedObject;
            List <string> SqlStringList = new List <string>();
            string        sql           = SqlStr;

            string BufferPositionsValue = State.BufferPositionsWithoutExt;

            if (State.ExtensionStateNumber != "255")
            {
                string exsql1 = sql;
                BufferPositionsValue = State.BufferPositionsWithExt;
                exsql1 = string.Format(exsql1, Guid, Status, DateTime.Now.ToString("yyyyMMddHHmmss"), State.ExtensionStateNumber,
                                       State.ExtensionDescription, State.ExtensionStateType, ProjectName, TransactionName,
                                       State.FDK_A_Active, State.FDK_B_Active, State.FDK_C_Active, State.FDK_D_Active, State.FDK_F_Active, State.FDK_G_Active,
                                       State.FDK_H_Active, State.FDK_I_Active, State.ConfigId, State.BrandId, State.ConfigVersion);
                SqlStringList.Add(exsql1);
            }

            if (State.MultiLanguageExtensionStateNumber != "255")
            {
                string exsql2 = sql;
                exsql2 = string.Format(exsql2, Guid, Status, DateTime.Now.ToString("yyyyMMddHHmmss"), State.MultiLanguageExtensionStateNumber,
                                       State.MultiLanguageExtensionDescription, State.MultiLanguageExtensionStateType, ProjectName, TransactionName,
                                       State.FDKAScreen, State.FDKBScreen, State.FDKCScreen, State.FDKDScreen, State.FDKFScreen, State.FDKGScreen,
                                       State.FDKHScreen, State.FDKIScreen, State.ConfigId, State.BrandId, State.ConfigVersion);
                SqlStringList.Add(exsql2);
            }

            sql = string.Format(sql, Guid, Status, DateTime.Now.ToString("yyyyMMddHHmmss"), State.StateNumber, State.StateDescription,
                                State.StateType, ProjectName, TransactionName, State.ScreenNumber, State.TimeoutNextState, State.CancelNextState,
                                State.FDKNextState, State.ExtensionStateNumber, BufferPositionsValue, State.FDKActiveMask, State.MultiLanguageExtensionStateNumber,
                                State.ConfigId, State.BrandId, State.ConfigVersion);
            SqlStringList.Add(sql);


            return(SqlStringList);
        }
Ejemplo n.º 4
0
        private static object FillStateFromPropertyGrid(Object ClassInstance, PropertyGrid SelectedPgrid)
        {
            StateY Selectedstate = new StateY();
            StateY Dynamicstate  = new StateY();

            Selectedstate = (StateY)SelectedPgrid.SelectedObject;
            Dynamicstate  = (StateY)ClassInstance;

            Dynamicstate._Description = Selectedstate.StateDescription;
            Dynamicstate.BrandId      = Selectedstate.BrandId;
            Dynamicstate.ConfigId     = Selectedstate.ConfigId;

            Dynamicstate._bufferPositionswithExt    = Selectedstate._bufferPositionswithExt;
            Dynamicstate._bufferPositionswithoutExt = Selectedstate._bufferPositionswithoutExt;
            //Dynamicstate._isMultiLanguage = Selectedstate._isMultiLanguage;
            //Dynamicstate._isExtensionState = Selectedstate._isExtensionState;
            Dynamicstate._FDKActiveMask = Selectedstate._FDKActiveMask;

            Dynamicstate._MultiLanguageExtensionDescription = Selectedstate.MultiLanguageExtensionDescription;
            Dynamicstate._cancelNextState = Selectedstate._cancelNextState;
            Dynamicstate._multilanguageExtensionStateNumber = Selectedstate.MultiLanguageExtensionStateNumber;
            Dynamicstate._screen           = Selectedstate._screen;
            Dynamicstate._timeoutNextState = Selectedstate._timeoutNextState;
            Dynamicstate._fdkNextState     = Selectedstate._fdkNextState;


            Dynamicstate._ExtensionDescription = Selectedstate.ExtensionDescription;
            Dynamicstate._AFDKActive           = Selectedstate._AFDKActive;
            Dynamicstate._BFDKActive           = Selectedstate._BFDKActive;
            Dynamicstate._CFDKActive           = Selectedstate._CFDKActive;
            Dynamicstate._DFDKActive           = Selectedstate._DFDKActive;
            Dynamicstate._FFDKActive           = Selectedstate._FFDKActive;
            Dynamicstate._GFDKActive           = Selectedstate._GFDKActive;
            Dynamicstate._HFDKActive           = Selectedstate._HFDKActive;
            Dynamicstate._IFDKActive           = Selectedstate._IFDKActive;

            return(Dynamicstate);
        }
Ejemplo n.º 5
0
        public override object FillStatesFromDB(object[] processRow, ArrayList StateList)
        {
            StateY state = new StateY();
            ModelCanvasStateObject        TransStateObj = new ModelCanvasStateObject();
            List <ModelParentStateObject> ParentobjList = new List <ModelParentStateObject>();
            List <ModelChildStateObject>  ChildobjList  = new List <ModelChildStateObject>();

            string BufferPositionsValue = "";

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

            state._screen               = processRow[8].ToString();
            state._timeoutNextState     = processRow[9].ToString();
            state._cancelNextState      = processRow[10].ToString();
            state._fdkNextState         = processRow[11].ToString();
            state._ExtensionStateNumber = processRow[12].ToString();
            //buffer
            BufferPositionsValue = processRow[13].ToString();
            state._FDKActiveMask = processRow[14].ToString();
            state._multilanguageExtensionStateNumber = processRow[15].ToString();

            //state.IsExtensionState = "0";
            //state.IsMultiLanguage = "0";

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

            if (state.ExtensionStateNumber != "255")
            {
                //state._isExtensionState = "1";
                state._bufferPositionswithExt = BufferPositionsValue;
                object[] ExtensionState = GetExtensionState(ref StateList, state.ExtensionStateNumber);
                state._ExtensionDescription = ExtensionState[4].ToString();
                state._AFDKActive           = ExtensionState[8].ToString();
                state._BFDKActive           = ExtensionState[9].ToString();
                state._CFDKActive           = ExtensionState[10].ToString();
                state._DFDKActive           = ExtensionState[11].ToString();
                state._FFDKActive           = ExtensionState[12].ToString();
                state._GFDKActive           = ExtensionState[13].ToString();
                state._HFDKActive           = ExtensionState[14].ToString();
                state._IFDKActive           = ExtensionState[15].ToString();
            }
            else
            {
                state._bufferPositionswithoutExt = BufferPositionsValue;
            }

            if (state.MultiLanguageExtensionStateNumber != "255")
            {
                //state._isMultiLanguage = "1";
                object[] ExtensionState = GetExtensionState(ref StateList, state.MultiLanguageExtensionStateNumber);
                state._MultiLanguageExtensionDescription = ExtensionState[4].ToString();
                state._FDKAScreen = ExtensionState[8].ToString();
                state._FDKBScreen = ExtensionState[9].ToString();
                state._FDKCScreen = ExtensionState[10].ToString();
                state._FDKDScreen = ExtensionState[11].ToString();
                state._FDKFScreen = ExtensionState[12].ToString();
                state._FDKGScreen = ExtensionState[13].ToString();
                state._FDKHScreen = ExtensionState[14].ToString();
                state._FDKIScreen = ExtensionState[15].ToString();
            }

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

            if (state.CancelNextState != "255")
            {
                ChildobjList.Add(GetChildState("CancelNextState", state.CancelNextState, StateList, processRow[7].ToString(), state.StateType, state.StateNumber));
            }
            if (state.FDKNextState != "255")
            {
                ChildobjList.Add(GetChildState("FDKNextState", state.FDKNextState, 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);
        }