Esempio n. 1
0
        private void RenameDataAndColumn(EditorItem newItem, renamedItems renItem)
        {
            string tmpColumnString;

            foreach (EditorItem item in newItem.Children)
            {
                RenameDataAndColumn(item, renItem);
                if (item is DynamicEditorItemInterface)
                {
                    DynamicEditorItemInterface tmp = (DynamicEditorItemInterface)item;
                    if (renItem.type == 0)
                    {
                        if (tmp.SourceDataStream == renItem.befoure)
                        {
                            tmpColumnString      = tmp.SourceColumn;
                            tmp.SourceDataStream = renItem.after;
                            tmp.SourceColumn     = tmpColumnString;
                        }
                    }
                    else if (renItem.type == 1)
                    {
                        if (tmp.SourceColumn == renItem.befoure)
                        {
                            tmp.SourceColumn = renItem.after;
                        }
                    }
                }
            }
        }
Esempio n. 2
0
        private void RenameDataStream_Click(object sender, EventArgs e)
        {
            UserTextInput tmpTx = new UserTextInput();
            renamedItems  tmpRenamedItem;

            tmpTx.Text         = "Rename";
            tmpTx.TextBoxTitle = "Enter new name...";
            foreach (DataStream tmpDS in tempDataStreams)
            {
                if (tmpDS.Name == DataStreamColections.SelectedNode.Text)
                {
                    tmpTx.ReturnText = tmpDS.Name;
                }
            }
            //tmpTx.ShowDialog();

            if (tmpTx.ShowDialog() == DialogResult.OK)
            {
                foreach (DataStream tmpDS in tempDataStreams)
                {
                    if (tmpDS.Name == DataStreamColections.SelectedNode.Text)
                    {
                        tmpRenamedItem         = new renamedItems();
                        tmpRenamedItem.befoure = tmpDS.Name;
                        tmpRenamedItem.after   = tmpTx.ReturnText;
                        tmpRenamedItem.type    = 0;
                        tempRenamed.Add(tmpRenamedItem);

                        tmpDS.Name = tmpTx.ReturnText;
                        RefreshTreeItems("");
                        return;
                    }
                }
            }
        }
Esempio n. 3
0
        private void RenameDataStream_Click(object sender, EventArgs e)
        {
            UserTextInput tmpTx = new UserTextInput();
            renamedItems tmpRenamedItem;
            tmpTx.Text = "Rename";
            tmpTx.TextBoxTitle = "Enter new name...";
            foreach(DataStream tmpDS in tempDataStreams)
            {
                if(tmpDS.Name == DataStreamColections.SelectedNode.Text)
                {
                    tmpTx.ReturnText = tmpDS.Name;
                }
            }
            //tmpTx.ShowDialog();

            if(tmpTx.ShowDialog() == DialogResult.OK)
            {
                foreach(DataStream tmpDS in tempDataStreams)
                {
                    if(tmpDS.Name == DataStreamColections.SelectedNode.Text)
                    {
                        tmpRenamedItem = new renamedItems();
                        tmpRenamedItem.befoure = tmpDS.Name;
                        tmpRenamedItem.after = tmpTx.ReturnText;
                        tmpRenamedItem.type = 0;
                        tempRenamed.Add(tmpRenamedItem);

                        tmpDS.Name = tmpTx.ReturnText;
                        RefreshTreeItems("");
                        return;
                    }
                }
            }
        }
Esempio n. 4
0
        private void RenameDataAndColumn(EditorItem newItem, renamedItems renItem)
        {
            string tmpColumnString;

            foreach(EditorItem item in newItem.Children)
            {
                RenameDataAndColumn(item, renItem);
                if(item is DynamicEditorItemInterface)
                {
                    DynamicEditorItemInterface tmp = (DynamicEditorItemInterface)item;
                    if(renItem.type == 0)
                    {
                        if(tmp.SourceDataStream == renItem.befoure)
                        {
                            tmpColumnString = tmp.SourceColumn;
                            tmp.SourceDataStream = renItem.after;
                            tmp.SourceColumn = tmpColumnString;
                        }
                    }else if(renItem.type == 1)
                    {
                        if(tmp.SourceColumn == renItem.befoure)
                        {
                            tmp.SourceColumn = renItem.after;
                        }
                    }
                }
            }
        }