コード例 #1
0
ファイル: EventLogDialog.cs プロジェクト: belsoft/traingraph
 private void buttonClearCache_Click(object sender, RoutedEventArgs e)
 {
     bool flag = true;
     string str = "";
     TrainsCacheStorage storage = new TrainsCacheStorage();
     if (!storage.Clear())
     {
         flag = false;
         str = str + string.Format("\n\r {0}", storage.LastError);
     }
     TrainGraphCacheStorage storage2 = new TrainGraphCacheStorage();
     if (!storage2.Clear())
     {
         flag = false;
         str = str + string.Format("\n\r {0}", storage2.LastError);
     }
     LayoutCacheStorage storage3 = new LayoutCacheStorage();
     if (!storage3.Clear())
     {
         flag = false;
         str = str + string.Format("\n\r {0}", storage3.LastError);
     }
     if (flag)
     {
         MessageBox.Show("Cache removed successfully");
     }
     else
     {
         MessageBox.Show("Cache removing failed..." + str);
     }
 }
コード例 #2
0
        private void buttonClearCache_Click(object sender, RoutedEventArgs e)
        {
            bool               flag    = true;
            string             str     = "";
            TrainsCacheStorage storage = new TrainsCacheStorage();

            if (!storage.Clear())
            {
                flag = false;
                str  = str + string.Format("\n\r {0}", storage.LastError);
            }
            TrainGraphCacheStorage storage2 = new TrainGraphCacheStorage();

            if (!storage2.Clear())
            {
                flag = false;
                str  = str + string.Format("\n\r {0}", storage2.LastError);
            }
            LayoutCacheStorage storage3 = new LayoutCacheStorage();

            if (!storage3.Clear())
            {
                flag = false;
                str  = str + string.Format("\n\r {0}", storage3.LastError);
            }
            if (flag)
            {
                MessageBox.Show("Cache removed successfully");
            }
            else
            {
                MessageBox.Show("Cache removing failed..." + str);
            }
        }