Exemplo n.º 1
0
 public ResPath Clone()
 {
     ResPath newobj = new ResPath();
     newobj.Url = this.Url;
     newobj.Path = this.Path;
     return newobj;
 }
Exemplo n.º 2
0
        public ResPath Clone()
        {
            ResPath newobj = new ResPath();

            newobj.Url  = this.Url;
            newobj.Path = this.Path;
            return(newobj);
        }
Exemplo n.º 3
0
        void ExpandResDir(string strResDirPath)
        {
            try
            {
                this.Update();
                ResPath respath = new ResPath(strResDirPath);

                this.EnableControlsInSearching(false);

                // 展开到指定的节点
                this.dp2ResTree1.ExpandPath(respath);

                this.EnableControlsInSearching(true);

                this.EventLoadFinish.Set();

                API.PostMessage(this.Handle, WM_INITIAL_FOCUS, 0, 0);
            }
            catch
            {
            }
        }
Exemplo n.º 4
0
        private void dp2SearchForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            if (this.commander != null)
                this.commander.Destroy();

            if (this.dp2ResTree1 != null)
                this.dp2ResTree1.Stop();

#if NO
            if (stop != null) // 脱离关联
            {
                stop.Style = StopStyle.None;    // 需要强制中断
                stop.DoStop();

                stop.Unregister();	// 和容器关联
                stop = null;
            }
#endif

            // 保存前恢复简单检索面板,便于保存分割条的位置
            this.tabControl_query.SelectedTab = this.tabPage_simple;

            if (this.MainForm != null && this.MainForm.AppInfo != null)
            {
                MainForm.AppInfo.SetString(
                    "dp2_search_simple_query",
                    "word",
                    this.textBox_simple_queryWord.Text);
                this.MainForm.AppInfo.SetString(
    "dp2_search_simple_query",
    "matchstyle",
    this.comboBox_simple_matchStyle.Text);

                this.MainForm.AppInfo.SetString(
                    "dp2_search_muline_query",
                    "content",
                    StringUtil.GetSomeLines(this.textBox_mutiline_queryContent.Text, 100)
                    );

                this.MainForm.AppInfo.SetString(
    "dp2_search_muline_query",
    "matchstyle",
    this.comboBox_multiline_matchStyle.Text);

                // 保存resdircontrol最后的选择
                ResPath respath = new ResPath(this.dp2ResTree1.SelectedNode);
                MainForm.AppInfo.SetString(
                    "dp2_search_simple_query",
                    "resdirpath",
                    respath.FullPath);

                if (this.dp2ResTree1.SortTableChanged == true)
                {
                    string strSortTables = dp2ResTree.SaveSortTables(this.dp2ResTree1.sort_tables);

                    this.MainForm.AppInfo.SetString(
           "dp2_search",
           "sort_tables",
           strSortTables);
                }
                this.MainForm.AppInfo.SetBoolean(
       "dp2_search",
       "enable_checkboxes",
       this.dp2ResTree1.CheckBoxes);

                string strWidths = ListViewUtil.GetColumnWidthListString(this.listView_browse);
                this.MainForm.AppInfo.SetString(
                    "dp2searchform",
                    "record_list_column_width",
                    strWidths);

                this.MainForm.AppInfo.SetString(
    "dp2searchform",
    "query_lines",
    this.dp2QueryControl1.GetSaveString());

                SaveSize();

                this.MainForm.AppInfo.LoadMdiSize -= new EventHandler(AppInfo_LoadMdiSize);
                this.MainForm.AppInfo.SaveMdiSize -= new EventHandler(AppInfo_SaveMdiSize);
            }

            if (this.Channels != null)
                this.Channels.BeforeLogin -= new BeforeLoginEventHandle(Channels_BeforeLogin);

            if (this.m_commentViewer != null)
                this.m_commentViewer.Close();
        }