コード例 #1
0
ファイル: Breakpoint.xaml.cs プロジェクト: 3gbywork/SwordNet
        public Breakpoint()
        {
            UI.Culture = Thread.CurrentThread.CurrentUICulture;

            InitializeComponent();

            FileName.Header         = UI.Breakpoint_FileName;
            Description.Header      = UI.Breakpoint_Description;
            RefreshMenuItem.Header  = UI.Breakpoint_Refresh;
            RefreshMenuItem.Command = new RelayCommand <object>(ExecuteAction);

            var entity = new BreakpointConfigEntity();

            entity.OnConfigChanged += OnConfigChanged;
            XmlConfigurator.ConfigAndWatch(entity, new FileInfo("config/BreakpointConfig.xml"));

            mWatcher = new FileSystemWatcher()
            {
                Path = @"C:\",
                IncludeSubdirectories = false,
                NotifyFilter          = NotifyFilters.DirectoryName | NotifyFilters.FileName,
                EnableRaisingEvents   = true,
            };
            mWatcher.Created += OnFileChanged;
            mWatcher.Deleted += OnFileChanged;
            mWatcher.Renamed += OnFileRenamed;
        }
コード例 #2
0
 private void OnPanelLoaded(object sender, RoutedEventArgs e)
 {
     if (null == mConfig)
     {
         mConfig = new ContainerConfigEntity();
         mConfig.OnConfigChanged += OnConfigChanged;
         XmlConfigurator.ConfigAndWatch(mConfig, new FileInfo("config/ContainerConfig.xml"));
     }
 }
コード例 #3
0
ファイル: Console.xaml.cs プロジェクト: 3gbywork/SwordNet
        public Console()
        {
            UI.Culture = Thread.CurrentThread.CurrentUICulture;

            InitializeComponent();

            mMenuModel.StartButtonTitle = UI.Console_StartButtonTitle;
            mMenuModel.StopButtonTitle  = UI.Console_StopButtonTitle;
            mMenuModel.ClearButtonTitle = UI.Console_ClearButtonTitle;

            mMenuModel.ConsoleActionCommand = new RelayCommand <object>(ExecuteAction);

            ConsoleConfigEntity entity = new ConsoleConfigEntity();

            entity.OnConfigChanged += OnConfigChanged;
            XmlConfigurator.ConfigAndWatch(entity, new FileInfo("config/ConsoleConfig.xml"));
        }