Esempio n. 1
0
        void Button1Click(object sender, System.EventArgs e)
        {
            Server[] sList;
            if (((Button)sender).Text == "白LAN")
            {
                sList = this._serverList1;
            }
            else
            {
                sList = this._serverList2;
            }

            DataTable dt = (DataTable)this.dataGrid1.DataSource;

            System.Collections.ArrayList ret;
            SearchWord searchword = this._searchWord;

            foreach (Server server in sList)
            {
                DataRow h = dt.Select(String.Format("[Server] = '{0}'", server.name))[0];

                h["Server"]  = server.name;
                h["StartUp"] = server.StartUpCheck();
                string[] errorlist = server.StartUpErrorCheck(searchword);
                h["errorDetail"] = errorlist;
                h["Error"]       = errorlist.Length;

                h["WF"] = server.WfServiceLogCheck();
            }
        }
Esempio n. 2
0
        public MainForm()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            //Util.ResotreSettings(ref _serverList);

            _serverList1 = new Server[1];
            _serverList1[0] = new Server();
            _searchWord = new SearchWord();
            _searchWord.BlackList.Add("異常:");
            _searchWord.BlackList.Add("エラー");
            _searchWord.WhiteList.Add("異常:マスタ更新");

            Util.ResotreSettings(ref _serverList1, Server.PATH1);
            Util.ResotreSettings(ref _serverList2, Server.PATH2);
            Util.ResotreSettings(ref _searchWord);
            //Util.SaveSettings(_serverList1, Server.PATH1);
            //Util.SaveSettings(_serverList2, Server.PATH2);
            //Util.SaveSettings(_searchWord);
            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
        }
Esempio n. 3
0
 public string[] GetErrorStringList(SearchWord searchWord)
 {
     if (!isError)
     {
         return(new string[0]);
     }
     Init();
     Copy();
     return((string[])this.Check(searchWord).ToArray(typeof(string)));
 }
Esempio n. 4
0
File: Util.cs Progetto: sbvild/ss
 public static void SaveSettings(SearchWord _settings)
 {
     //
     //XMLファイルに保存する
     System.Xml.Serialization.XmlSerializer serializer1 =
         new System.Xml.Serialization.XmlSerializer(typeof(SearchWord));
     System.IO.FileStream fs1 =
         new System.IO.FileStream(SearchWord.PATH, System.IO.FileMode.Create);
     serializer1.Serialize(fs1, _settings);
     fs1.Close();
 }
Esempio n. 5
0
				public static void ResotreSettings(ref SearchWord _settings){
			//
			
//保存した内容を復元する
System.Xml.Serialization.XmlSerializer serializer2 =
    new System.Xml.Serialization.XmlSerializer(typeof(SearchWord));
System.IO.FileStream fs2 =
    new System.IO.FileStream(SearchWord.PATH, System.IO.FileMode.Open);

_settings = (SearchWord) serializer2.Deserialize(fs2);
fs2.Close();
		}
Esempio n. 6
0
        public static void ResotreSettings(ref SearchWord _settings)
        {
            //

//保存した内容を復元する
            System.Xml.Serialization.XmlSerializer serializer2 =
                new System.Xml.Serialization.XmlSerializer(typeof(SearchWord));
            System.IO.FileStream fs2 =
                new System.IO.FileStream(SearchWord.PATH, System.IO.FileMode.Open);

            _settings = (SearchWord)serializer2.Deserialize(fs2);
            fs2.Close();
        }
Esempio n. 7
0
        public ArrayList Check(SearchWord word)
        {
            //
            System.IO.StreamReader sr = new System.IO.StreamReader(m_destFile.FullName, System.Text.Encoding.GetEncoding("shift_jis"));
            ArrayList foundList       = new ArrayList();

            while (sr.Peek() > -1)
            {
                string stringLine = sr.ReadLine();

                foreach (string bw in word.BlackList)
                {
                    //
                    if (stringLine.IndexOf(bw) < 0)
                    {
                        //
                        goto continue_next_list;
                    }

                    //found
                    foreach (string ww in word.WhiteList)
                    {
                        //
                        if (stringLine.IndexOf(ww) >= 0)
                        {
                            //
                            goto continue_next_list;
                        }
                    }

                    //found
                    foundList.Add(stringLine);

                    continue_next_list :;
                }
            }

            sr.Close();

            return(foundList);
        }
Esempio n. 8
0
		public ArrayList Check(SearchWord word){
			//
			System.IO.StreamReader sr = new System.IO.StreamReader( m_destFile.FullName,  System.Text.Encoding.GetEncoding("shift_jis"));
			ArrayList foundList = new ArrayList();

			while (sr.Peek() > -1)
			{
    			string stringLine = sr.ReadLine();

    			foreach(string bw in word.BlackList){
    				//
    				if(stringLine.IndexOf(bw)<0){
    					//
    					goto continue_next_list;	
    				}
    				
    				//found
    				foreach(string ww in word.WhiteList){
    					//
    					if(stringLine.IndexOf(ww)>=0){
    						//
    						goto continue_next_list;
    					}
    				}
    				
    				//found
    				foundList.Add(stringLine);
    				
    				continue_next_list:	;
    			}
    			
			}

			sr.Close();
			
			return foundList;
		}
Esempio n. 9
0
 public string[] StartUpErrorCheck(SearchWord searchWord)
 {
     return(consoleLog.GetErrorStringList(searchWord));
 }
Esempio n. 10
0
		public string[] GetErrorStringList(SearchWord searchWord){
			if(!isError)
				return new string[0];
			Init();
			Copy();
			return (string[])this.Check(searchWord).ToArray(typeof(string));
		}
Esempio n. 11
0
		public string[] StartUpErrorCheck(SearchWord searchWord){
			return consoleLog.GetErrorStringList(searchWord);
		}