Пример #1
0
        public FindForm(Form_Activity parent)
        {
            InitializeComponent();

            m_Parent = parent;
            TopMost = true;
        }
Пример #2
0
        public FindForm(Form_Activity parent)
        {
            InitializeComponent();

            m_Parent = parent;
            TopMost  = true;
        }
Пример #3
0
        public bool saveAll()
        {
            if (m_bHasChanged)
            {
                refreshCode();
                refreshlinkCode();

                Form_Activity TreeFrom   = m_Parent.TreeForm as Form_Activity;
                Object[]      Tags       = TreeFrom.Tree.SelectedNode.Tag as Object[];
                string        strTabName = string.Empty;
                string        filter     = string.Empty;

                if (Tags == null)
                {
                    return(false);
                }
                if (Tags[0].ToString() == "ACTIVITY")
                {
                    filter     = string.Format("ClassID = {0} and ActivityID = {1}", Tags[1], Tags[2]);
                    strTabName = "tbl_Guide_ActivityInfo";
                }
                else if (Tags[0].ToString() == "DAILYQUEST")
                {
                    filter     = string.Format("TypeID = {0} and QuestID = {1}", Tags[1], Tags[2]);
                    strTabName = "tbl_Guide_DailyQuestInfo";
                }
                else
                {
                    MessageBox.Show("未定义的标记位.");
                    m_bHasChanged = false;
                    return(false);
                }

                DataTable dt = TableHelper.GetDataTableProxy(strTabName, filter, null, m_Conn);
                dt.Rows[0]["Content"] = Code;
                dt.Rows[0]["Link"]    = LinkCode;

                string sql = string.Format("select * from {0} where {1}", strTabName, filter);
                TableHelper.SaveTable(dt, sql, m_Conn);
                m_bHasChanged = false;
                return(true);
            }
            return(false);
        }
Пример #4
0
        public TreeView LoadTreePlugin_Activity(int toSelectID)
        {
            if (m_OldForm != null)
            {
                m_PDC.Controls.Remove((m_OldForm as Form_Activity).Spliter);
                m_OldForm.Dispose();
            }

            Form_Activity newFrm = new Form_Activity(this, m_Conn, this.m_isReadOnly);
            //  newFrm.FieldList = m_fieldList;
            m_OldForm = newFrm;
            TreeView tree = newFrm.ReloadTree();
            m_PDC.Controls.Add(newFrm.Spliter);
            newFrm.Spliter.Dock = DockStyle.Fill;

            tree.AfterSelect += afterSelect;
            tree.BeforeSelect += beforeSelect;
            tree.BeforeLabelEdit += beforeLabelEdit;
            tree.AfterLabelEdit += afterLabelEdit;

            return tree;
        }
Пример #5
0
        public TreeView LoadTreePlugin_Activity(int toSelectID)
        {
            if (m_OldForm != null)
            {
                m_PDC.Controls.Remove((m_OldForm as Form_Activity).Spliter);
                m_OldForm.Dispose();
            }

            Form_Activity newFrm = new Form_Activity(this, m_Conn, this.m_isReadOnly);

            //  newFrm.FieldList = m_fieldList;
            m_OldForm = newFrm;
            TreeView tree = newFrm.ReloadTree();

            m_PDC.Controls.Add(newFrm.Spliter);
            newFrm.Spliter.Dock = DockStyle.Fill;

            tree.AfterSelect     += afterSelect;
            tree.BeforeSelect    += beforeSelect;
            tree.BeforeLabelEdit += beforeLabelEdit;
            tree.AfterLabelEdit  += afterLabelEdit;

            return(tree);
        }