Example #1
0
 public void OnServerChanged(object sender, ServerChangedEventArgs e)
 {
     if (this.ServerChanged != null)
     {
         this.ServerChanged(sender, e);
     }
 }
Example #2
0
        // 创建一个新的Server对象
        // return:
        //		-1	出错
        //		0	加入了
        //		1	发现重复,没有加入
        public int NewServer(string strUrl,
                             int nInsertPos)
        {
            Server server = null;

            /*
             * server = this.GetServer(strUrl);
             *
             * if (server != null)
             *      return 1;
             */// 暂时不去重

            server     = new Server();
            server.Url = strUrl;

            if (nInsertPos == -1)
            {
                this.Add(server);
            }
            else
            {
                this.Insert(nInsertPos, server);
            }

            m_bChanged = true;

            ServerChangedEventArgs e = new ServerChangedEventArgs();

            e.Url = strUrl;
            e.ServerChangeAction = ServerChangeAction.Add;
            OnServerChanged(this, e);

            return(0);
        }
Example #3
0
        // 将另一对象的数组内容灌入本对象
        public void Import(ServerCollection servers)
        {
            this.Clear();
            this.AddRange(servers);
            this.m_bChanged = true;

            // 新增加的动作
            ServerChangedEventArgs e = new ServerChangedEventArgs();

            e.Url = "";
            e.ServerChangeAction = ServerChangeAction.Import;
            OnServerChanged(this, e);
        }
Example #4
0
 void Servers_ServerChanged(object sender, ServerChangedEventArgs e)
 {
     this.treeView_res.Refresh(ResTree.RefreshStyle.All);   // 刷新第一级
 }
Example #5
0
 void Servers_ServerChanged(object sender, ServerChangedEventArgs e)
 {
     this.resTree.Refresh(ResTree.RefreshStyle.Servers);
 }
Example #6
0
        public void OnServerChanged(object sender, ServerChangedEventArgs e)
        {
            if (this.ServerChanged != null)
            {
                this.ServerChanged(sender, e);
            }

        }
Example #7
0
		// 创建一个新的Server对象
		// return:
		//		-1	出错
		//		0	加入了
		//		1	发现重复,没有加入
		public int NewServer(string strUrl,
			int nInsertPos)
		{
			Server server = null;
			/*
			server = this.GetServer(strUrl);

			if (server != null)
				return 1;
			*/	// 暂时不去重

			server = new Server();
			server.Url = strUrl;

			if (nInsertPos == -1)
				this.Add(server);
			else 
				this.Insert(nInsertPos, server);

			m_bChanged = true;

            ServerChangedEventArgs e = new ServerChangedEventArgs();
            e.Url = strUrl;
            e.ServerChangeAction = ServerChangeAction.Add;
            OnServerChanged(this, e);

			return 0;
		}
Example #8
0
        // 将另一对象的数组内容灌入本对象
        public void Import(ServerCollection servers)
        {
            this.Clear();
            this.AddRange(servers);
            this.m_bChanged = true;

            // 新增加的动作
            ServerChangedEventArgs e = new ServerChangedEventArgs();
            e.Url = "";
            e.ServerChangeAction = ServerChangeAction.Import;
            OnServerChanged(this, e);

        }
Example #9
0
        void Servers_ServerChanged(object sender, ServerChangedEventArgs e)
        {
            foreach( Form child in this.MdiChildren )
            {
                if (child is SearchForm)
                {
                    SearchForm searchform = (SearchForm)child;
                    searchform.RefreshResTree();
                }

            }
        }
Example #10
0
 void Servers_ServerChanged(object sender, ServerChangedEventArgs e)
 {
     this.resTree.Refresh(ResTree.RefreshStyle.Servers);
 }